Enforces structured root-cause analysis for bugs, test failures, errors, warnings, and performance regressions before proposing fixes. Uses phases: known issues, investigation, pattern comparison, hypothesis testing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-optimized:systematic-debuggingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Do root-cause investigation before proposing fixes.
Do root-cause investigation before proposing fixes.
No fix without evidence for root cause.
This is non-negotiable. Every fix must trace back to a proven root cause. A fix applied without understanding why it works is not a fix — it is a mask.
known-issues.md exists at the project root, search it for the error message, error code, or failing test name.find-polluter.sh from this skill's directory to identify which test is corrupting shared state.context-snapshot.json exists at the project root: read it. The changed_files and recent_commits fields answer this immediately without additional git commands.git log --oneline -10 and git diff HEAD~1..HEAD --name-only.Self-Consistency Gate — Before committing to a hypothesis, apply multi-path reasoning (see self-consistency-reasoner):
Then for the selected hypothesis:
| Temptation | Why it fails |
|---|---|
| "I know what the bug is" | You had a hypothesis, not proof. Test it. |
| "Quick fix, investigate later" | Later never comes. The mask becomes permanent debt. |
| "It's obviously this one line" | Obvious bugs get fixed in 5 minutes. If it were obvious, it would be fixed already. |
| "Let me try a few things" | Shotgun debugging creates new bugs and wastes time. |
| "The error message tells me exactly what's wrong" | Error messages describe symptoms, not causes. |
| "I'll just revert to a known-good state" | Reverts don't teach you what broke or prevent recurrence. |
If 3 fix attempts fail, stop. Do not attempt a fourth. Discuss architecture with the user before continuing. The bug may indicate a design flaw, not a code defect.
If you catch yourself doing any of these, restart from Phase 1:
root-cause-tracing.md — trace bugs backward through the call stackdefense-in-depth.md — validation at every data layercondition-based-waiting.md — replace timeouts with condition pollingAfter resolving a bug that is likely to recur (environment-dependent, configuration, platform-specific, or external-state errors), offer to add the error→solution mapping to known-issues.md using the format defined in error-recovery.
self-consistency-reasoner — multi-path reasoning for root cause diagnosistest-driven-development — write the regression test before the fixverification-before-completion — prove the fix with fresh evidenceerror-recovery — consult and update project-specific known issuesnpx claudepluginhub repozy/superpowers-optimizedEnforces systematic root cause investigation for bugs, test failures, and unexpected behavior through four phases: investigation, pattern analysis, hypothesis testing, and implementation.
Enforces 4-phase root cause investigation for bugs, errors, test failures, unexpected behavior, and technical issues before proposing fixes.
Enforces systematic root cause investigation for bugs, test failures, unexpected behavior, and performance issues before any fixes. Covers reproduction, recent changes, error analysis, and multi-component tracing.