superpowers-systematic-debugging
Skill101 starsChanged 30 days agoMITView on GitHub
Any bug, failing or flaky test, or surprise behavior? Load BEFORE you investigate or guess.
3 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- lucasnscr/issue-to-pr-aitheir own version, first seen Oct 25, 2026
- EvovexAI/EvoFlowedited, first seen Oct 8, 2026
- host452b/polishedited, first seen Sep 30, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- EvovexAI/EvoFlow★ 61244% same
- host452b/polish★ 244% same
Wrote their own version · 1
- lucasnscr/issue-to-pr-ai★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- superpowers-brainstormingSkill
- superpowers-diagnosing-superpowersSkill
- superpowers-executing-plansSkill
- superpowers-finishing-a-development-branchSkill
- superpowers-receiving-code-reviewSkill
- superpowers-sync-upstreamSkill
- superpowers-test-driven-developmentSkill
- superpowers-using-git-worktreesSkill
- superpowers-verification-before-completionSkill
- superpowers-writing-plansSkill
- superpowers-writing-skillsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Core principle: ALWAYS find root cause before fixes.
- Distinctive: line 33
Don't fully understand the issue
- Distinctive: line 49
Don't skip errors or warnings — often contain the exact solution
- Distinctive: line 50
Read stack traces completely.
- Distinctive: line 54
Not reproducible → gather more data, don't guess
- Distinctive: line 112
STOP. Question fundamentals: Is this pattern sound?
- Distinctive: line 113
Discuss with your human partner before more fixes: NOT a failed hypothesis — a wrong architecture.
- Distinctive: line 139
See these: STOP. Return to Phase 1.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Systematic Debugging
Overview
Random fixes waste time, create new bugs. Quick patches mask real issue.
Core principle: ALWAYS find root cause before fixes. Symptom fixes = failure.
Break letter of process = break spirit of debugging.
The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRSTPhase 1 not done? Cannot propose fixes.
When to Use
ANY technical issue: test failures, production bugs, unexpected behavior, performance problems, build failures, integration issues.
ESPECIALLY when:
- Under time pressure (emergencies make guessing tempting)
- "Just one quick fix" seems obvious
- Already tried multiple fixes
- Previous fix didn't work
- Don't fully understand the issue
Don't skip when:
- Issue seems simple (simple bugs have root causes too)
- In a hurry (rushing guarantees rework)
- Manager wants it NOW (systematic beats thrashing)
The Four Phases
You MUST complete each phase before the next.
Phase 1: Root Cause Investigation
BEFORE attempting ANY fix:
- Read Error Messages Carefully
- Don't skip errors or warnings — often contain the exact solution
- Read stack traces completely; note line numbers, file paths, error codes
- Reproduce Consistently
- Trigger it reliably? Exact steps?
- Not reproducible → gather more data, don't guess
- Check Recent Changes
- What changed that could cause this? (
git diff, recent commits, new deps, config)
- What changed that could cause this? (
Gather Evidence in Multi-Component Systems
WHEN system has multiple components (CI → build → signing, API → service → database), BEFORE proposing fixes, add diagnostic instrumentation at each boundary:
For EACH component boundary: - Log what data enters the component - Log what data exits the component - Verify environment/config propagation Run once to gather evidence showing WHERE it breaks THEN investigate that specific componentExample (multi-layer system):
echo "=== Secrets available in workflow ===" if [ -n "${IDENTITY:-}" ]; then echo "IDENTITY: SET"; else echo "IDENTITY: UNSET"; fi echo "=== Env vars in build script ===" printenv IDENTITY >/dev/null 2>&1 && echo "IDENTITY in environment" || echo "IDENTITY not in environment" echo "=== Keychain state ===" security find-identity -vThis reveals which layer fails (secrets → workflow ✓, workflow → build ✗).
Trace Data Flow
WHEN error deep in call stack: see Root Cause Tracing reference (auto-included below) for complete backward-tracing technique.
Quick version: Where does bad value originate? What called this with bad value? Trace up until you find source. Fix at source, not symptom.
Phase 2: Pattern Analysis
- Find Working Examples — locate similar working code in same codebase
- Compare Against References — implementing a pattern? Read reference implementation COMPLETELY (every line, no skimming)
- Identify Differences — list every difference between working and broken, however small. Don't assume "that can't matter"
- Understand Dependencies — what components, settings, config, environment, assumptions does this need?
Phase 3: Hypothesis and Testing
- Form Single Hypothesis — "I think X is root cause because Y." Write it down. Be specific.
- Test Minimally — SMALLEST possible change to test it. One variable at a time.
- Verify Before Continuing — Worked? → Phase 4. Didn't? → form NEW hypothesis. DON'T pile fixes on top.
- When You Don't Know — say "I don't understand X." Don't pretend. Ask for help. Research more.
Phase 4: Implementation
Fix root cause, not symptom:
- Create Failing Test Case — simplest reproduction, automated if possible. MUST have before fixing. Use superpowers-test-driven-development skill.
- Implement Single Fix — address root cause. ONE change. No "while I'm here" improvements, no bundled refactoring.
- Verify Fix — test passes now? No other tests broken? Issue actually resolved? (Use superpowers-verification-before-completion skill.)
- If Fix Doesn't Work — STOP. Count fixes tried. < 3: return to Phase 1 with new info. ≥ 3: STOP and question architecture (step 5). DON'T attempt fix #4 without architectural discussion.
- If 3+ Fixes Failed: Question Architecture
- Pattern: each fix reveals new coupling elsewhere; fixes require "massive refactoring"; each fix creates new symptoms.
- STOP. Question fundamentals: Is this pattern sound? Continuing through inertia? Refactor vs. keep patching symptoms?
- Discuss with your human partner before more fixes. NOT a failed hypothesis — a wrong architecture.
Red Flags - STOP and Follow Process
Catch yourself thinking:
- "Quick fix for now, investigate later"
- "Just try changing X and see if it works"
- "Add multiple changes, run tests"
- "Skip the test, I'll manually verify"
- "It's probably X, let me fix that"
- "I don't fully understand but this might work"
- "Here are the main problems: [lists fixes without investigation]"
- Proposing solutions before tracing data flow
- "One more fix attempt" (when already tried 2+)
- Each fix reveals a new problem in a different place
ALL of these mean: STOP. Return to Phase 1. 3+ fixes failed: question architecture (Phase 4.5).
Signals You're Doing It Wrong
Watch for these redirections from your human partner:
- "Is that not happening?" — you assumed without verifying
- "Will it show us...?" — you should have added evidence gathering
- "Stop guessing" — you're proposing fixes without understanding
- "We're stuck?" (frustrated) — your approach isn't working
See these: STOP. Return to Phase 1.
Common Rationalizations
| Excuse | Reality |
| "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs. |
| "Emergency, no time for process" | Systematic debugging is FASTER than guess-and-check thrashing. |
| "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
| "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it. |
| "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
| "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. Read it completely. |
| "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
| "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question pattern, don't fix again. |
Quick Reference
| 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 |
When Process Reveals "No Root Cause"
Systematic investigation shows issue is truly environmental, timing-dependent, or external? Process complete. Document what you investigated, implement appropriate handling (retry, timeout, error message), add monitoring/logging.
But: 95% of "no root cause" cases = incomplete investigation.
Supporting Techniques (auto-included references)
- Root Cause Tracing — trace bugs backward through call stack to original trigger
- Defense in Depth — add validation at multiple layers after finding root cause
- Condition-Based Waiting — replace arbitrary timeouts with condition polling
Related skills: superpowers-test-driven-development (Phase 4 failing test) · superpowers-verification-before-completion (confirm the fix).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

