plugins/superpowers-bd/skills/systematic-debugging/SKILL.md
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
npx skillsauth add schlenks/superpowers-bd systematic-debuggingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Core principle: ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
Violating the letter of this process is violating the spirit of debugging.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed Phase 1, you cannot propose fixes.
Create native tasks for each phase:
addBlockedBy: [phase-1-id]addBlockedBy: [phase-2-id]addBlockedBy: [phase-3-id]ENFORCEMENT:
status: completedAny technical issue: test failures, bugs, unexpected behavior, performance problems, build failures.
Especially when: under time pressure, "just one quick fix" seems obvious, previous fix didn't work.
Don't skip when: issue seems simple, you're in a hurry, manager wants it fixed NOW.
Complete each phase before proceeding to the next.
Phase 1: Root Cause Investigation — Read errors, reproduce, check recent changes, gather evidence at boundaries, trace data flow. Success: Understand WHAT and WHY. See references/phase-1-investigation.md
Phase 2: Pattern Analysis — Find working examples, compare completely, identify all differences, understand dependencies. Success: Differences identified. See references/phase-2-pattern-analysis.md
Phase 3: Hypothesis and Testing — Form single specific hypothesis, test with smallest change, verify. Success: Hypothesis confirmed or replaced. See references/phase-3-hypothesis-testing.md
Phase 4: Implementation — Create failing test, implement single fix for root cause, verify no regressions. If 3+ fixes failed, question architecture. Success: Bug resolved, tests pass. See references/phase-4-implementation.md
| Phase | Key Activities | Success Criteria | |-------|---------------|------------------| | 1. Root Cause | Read errors, reproduce, check changes, gather evidence | Understand WHAT and WHY | | 2. Pattern | Find working examples, compare | Identify differences | | 3. Hypothesis | Form theory, test minimally | Confirmed or new hypothesis | | 4. Implementation | Create test, fix, verify | Bug resolved, tests pass |
If investigation reveals issue is truly environmental, timing-dependent, or external: document what you investigated, implement handling (retry, timeout, error message), add monitoring. But: 95% of "no root cause" cases are incomplete investigation.
If you catch yourself thinking:
ALL of these mean: STOP. Return to Phase 1.
If 3+ fixes failed: Question the architecture (see Phase 4). See references/rationalizations.md for common excuses.
references/phase-1-investigation.md: Detailed Phase 1 stepsreferences/phase-2-pattern-analysis.md: Detailed Phase 2 stepsreferences/phase-3-hypothesis-testing.md: Detailed Phase 3 stepsreferences/phase-4-implementation.md: Detailed Phase 4 stepsreferences/rationalizations.md: Common excuses and user signalsreferences/real-world-impact.md: Systematic vs random debugging statisticsreferences/git-bisect.md: Git bisect for regression pinpointing in multi-developer reposreferences/root-cause-tracing.md: Backward tracing for deep call stacksreferences/defense-in-depth.md: Multi-layer validation after root causereferences/condition-based-waiting.md: Condition polling to replace timeoutsreferences/condition-based-waiting-example.ts: TypeScript examplereferences/find-polluter.sh: Script to find test pollution sourcesreferences/CREATION-LOG.md: Skill creation historyreferences/tests/: Pressure test scenariostools
Use when converting a Superpowers-BD implementation plan or Shortcut story into a beads epic with dependency-aware child tasks
development
Use when the user asks for /cr-style review of local changes, commits, a branch diff, or a GitHub PR outside subagent-driven development
development
Use when you have a spec or requirements for a multi-step task, before touching code
tools
Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions