Skill: /code-debug
ORCHESTRATOR. One debugger subagent. It diagnoses before it touches anything.
Invocation
/code-debug "<error text / failing test / what broke>" (optionally /code-debug <slug> to tie it
to a feature build)
Steps
- Gather the symptom: the error/stack/failing-test name from the user, plus the build
report
swarm-report/<slug>-build.mdif a slug was given. - Spawn 1 debugger (
Task,general-purpose). Prompt:Answer TERSE. Read
.claude/agents/debugger.mdand follow it exactly. Symptom: <verbatim error / failing test>. Feature slug (if any): . - Report the debugger's return verbatim: root cause, evidence, fix, and the re-run output.
- Route the outcome:
fixed→ suggest/code-review <slug>to check the fix.root_cause_found(found but not fixed) orstuck→ show the hypothesis ladder; the user decides the fix, or re-run/code-build <slug>with the root cause as input.cannot_reproduce→ ask the user for exact repro steps; do not guess-patch.
Where it sits in the loop
/code-plan → /code-build → /code-review. If a test fails or review says rework → /code-debug →
back to /code-build. The Stop test-gate hook blocks "done" until tests actually run.