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.
npx claudepluginhub repozy/superpowers-optimizedThis skill uses the workspace's default tool permissions.
Do root-cause investigation before proposing fixes.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
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 issues