3.2 KiB
3.2 KiB
| description | argument-hint | |
|---|---|---|
| Systematic debugging with root cause investigation - no random trial-and-error |
|
Systematic Debugging
Start a methodical debugging session using the four-stage investigation framework with iterative review.
Instructions
- Consider the recent conversation history, your context, and the problem to be debugged.
- Specific user instructions should be followed unless they are contradictory to the task at hand. $ARGUMENTS
Steps
- Load — Use the Skill tool and load the outfitter:debugging skill
- Consider — Ultrathink and analyze the problem, consider available evidence, potential causes, and investigation approach
- Dispatch or Execute — Choose execution path based on available tools:
- If Task tool available: Run the debug loop (see below)
- If Task tool unavailable: Execute the debugging methodology directly using the loaded skill
Debug Loop (when Task tool available)
Run iterative cycles until the issue is resolved:
┌─────────────────────────────────────────────────────────┐
│ 1. INVESTIGATE — Dispatch outfitter:debugger │
│ └─ Collect evidence, form hypothesis, propose fix │
│ ↓ │
│ 2. REVIEW — Dispatch outfitter:reviewer │
│ └─ Validate fix, check for regressions, verify │
│ root cause addressed (not just symptoms) │
│ ↓ │
│ 3. EVALUATE — Check review outcome │
│ └─ If approved → Done │
│ └─ If issues found → Back to step 1 with feedback │
└─────────────────────────────────────────────────────────┘
Loop Execution
- Dispatch debugger (background) — Pass error context, evidence, any prior feedback
- Retrieve results — Use TaskOutput to get proposed fix and rationale
- Dispatch reviewer (background) — Pass the proposed fix and debugger's findings for code review
- Retrieve review — Use TaskOutput to get validation results
- Evaluate:
- Approved: Report success, document root cause and fix
- Issues found: Loop back to debugger with reviewer feedback
- Max iterations (3): Escalate to user with findings so far
Context Accumulation
Each loop iteration passes forward:
- Original error context
- Investigation findings from debugger
- Review feedback from reviewer
- Cumulative hypotheses tested
The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you catch yourself wanting to "just try something" — stop. Return to investigation.
Context Handoff (for initial dispatch)
When dispatching to the debugger subagent, include:
- Exact error messages or unexpected behavior
- Stack traces if available
- Recent changes (git diff context)
- Reproduction steps if known
- Any hypotheses already formed
- Prior loop feedback (if iterating)