thoughtbox:debug
Skill64 starsChanged 4 months agoMITView on GitHub
Trigger when debugging something unexpected — a test failure, surprising behavior, production incident, or any situation where initial attempts aren't working. Prevents the common agent failure mode of trying random things when stuck. Use when "the first fix didn't work", "this is behaving unexpectedly", "I'm stuck", "why is this happening", or after 2+ failed attempts to fix something.
- Reads credentials
In this repository102 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- assumptionsSkill
- capture-learningSkill
- Codex-opus-4-6-promptingSkill
- Codex-promptSkill
- mcp-code-modeSkill
- deploy-team-hubSkill
- diagramSkill
- distillSkill
- effect-tsSkill
- escalateSkill
- evalSkill
- experimentSkill
- hddSkill
- hub-auditSkill
- hub-collabSkill
- implementSkill
- knowledgeSkill
- peer-notebook-delivery-guardSkill
- research-taskSkill
- session-reviewSkill
- source-command-hdd-decideSkill
- source-command-hdd-hddSkill
- source-command-hdd-researchSkill
- source-command-hdd-stage-adrSkill
- source-command-hdd-validateSkill
- statusSkill
- supabaseSkill
- synthesizeSkill
- tasteSkill
- teamSkill
- test-suiteSkill
- theseus-protocolSkill
- thoughtbox:decisionSkill
- thoughtbox:evolutionSkill
- thoughtbox:knowledge-querySkill
- thoughtbox:onboardSkill
- thoughtbox:refactorSkill
- thoughtbox:researchSkill
- thoughtbox:session-reviewSkill
- thoughtbox-teamSkill
- ulc-loopSkill
- ulysses-protocolSkill
- workflow-brainstormingSkill
- workflow-ideationSkill
- workflow-reflectionSkill
- workflow-revisionSkill
- workflows-compoundSkill
- workflowSkill
- workflows-planSkill
- workflows-reviewSkill
- workflows-workSkill
- workflow-tournamentSkill
- assumptionsSkill
- capture-learningSkill
- claude-opus-4-6-promptingSkill
- claude-promptSkill
- mcp-code-modeSkill
- deploy-team-hubSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Start a debugging session.
- Distinctive: line 44
Before investigating, declare what you will do AND what you will do if it fails.
- Distinctive: line 59
Run the primary action using whatever tools are needed (Read, Grep, Bash, etc.).
- Distinctive: line 82
When S hits 2, the protocol blocks further plan operations until you reflect.
- Distinctive: line 103
When the bug is found and fixed:
- Distinctive: line 147
When debugging feels frustrating — when you want to "just try this one more thing" — that is exactly when S=2 reflection would help most.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Thoughtbox Debug
Guided debugging workflow built on the Ulysses surprise-gated protocol. Prevents reactive debugging spirals by forcing structured hypotheses after repeated surprises.
Core Mechanic: The S-Register
The S-register (surprise counter) is the discipline mechanism. Each unexpected outcome increments S. At S=2, stop and form a falsifiable hypothesis before continuing. This breaks the "try something, doesn't work, try something else" spiral.
Phase 1: Initialize
Start a debugging session. Define the problem and any constraints.
async () => {
return await tb.ulysses({
operation: "init",
problem: "$ARGUMENTS",
constraints: [
// Hard limits on what you can change
]
});
}This starts a session with S=0. State the problem precisely — vague problems produce vague debugging.
Phase 2: Plan-Act-Assess Loop
Repeat this cycle for each investigation step.
2a. Plan with a pre-committed recovery action
Before investigating, declare what you will do AND what you will do if it fails. The recovery action prevents post-hoc rationalization.
async () => {
return await tb.ulysses({
operation: "plan",
primary: "Check CI environment variables vs local .env",
recovery: "If env vars match, check node version differences"
});
}2b. Execute
Run the primary action using whatever tools are needed (Read, Grep, Bash, etc.). Gather evidence. Do not interpret yet.
2c. Assess the outcome
Report whether the result matched your expectation.
async () => {
return await tb.ulysses({
operation: "outcome",
assessment: "unexpected", // or "expected"
severity: "minor", // or "major"
details: "Env vars are identical — rules out config differences"
});
}"unexpected"increments S."expected"leaves S unchanged.- Be honest. Calling a surprise "expected" defeats the protocol.
Phase 3: Forced Reflection (S=2)
When S hits 2, the protocol blocks further plan operations until you reflect. This is the mechanism that prevents spiraling.
async () => {
return await tb.ulysses({
operation: "reflect",
hypothesis: "The CI failure is caused by a timing race — the database isn't ready when tests start",
falsification: "If adding a 5-second delay before test execution doesn't fix it, this hypothesis is false"
});
}Requirements for reflect:
hypothesis: a specific, testable explanation (not "something is wrong with X")falsification: explicit criteria that would prove the hypothesis wrong
Reflection resets S to 0. Continue the Plan-Act-Assess loop with a focused hypothesis to test.
Phase 4: Resolution
When the bug is found and fixed:
async () => {
return await tb.ulysses({
operation: "complete",
terminalState: "resolved",
summary: "Root cause: async database seeding wasn't awaited in test setup. Fix: added await to beforeAll hook."
});
}Terminal states:
"resolved"— root cause found and fixed"abandoned"— not worth further investigation"deferred"— understood but fix postponed (file an issue)
Phase 5: Check Status
Query the current protocol state at any point.
async () => {
return await tb.ulysses({ operation: "status" });
}
// Returns: S value, consecutive surprises, hypothesis count, historyWhen to Use This
Use Ulysses when:
- Your first attempt did not work
- The behavior is genuinely surprising
- You have been going in circles
- The problem involves multiple interacting systems
- You catch yourself thinking "let me just try one more thing"
Skip for:
- Simple typos or obvious errors
- Well-understood failure modes
- Quick fixes that work on first try
Key Principle
When debugging feels frustrating — when you want to "just try this one more thing" — that is exactly when S=2 reflection would help most. The protocol forces you to stop guessing and start hypothesizing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

