From spec-superflow
Systematically investigates bugs, test failures, and unexpected behavior with a 4-phase root-cause-first methodology before proposing any fix.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spec-superflow:bug-investigatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Core principle:** Find root cause before attempting fixes. Symptom fixes are failure.
Core principle: Find root cause before attempting fixes. Symptom fixes are failure.
No fixes without root cause investigation first. If you haven't completed Phase 1, you cannot propose fixes.
Use for ANY technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues. Especially when under time pressure, "one quick fix" seems obvious, you've already tried multiple fixes, or you don't fully understand the issue.
Don't skip because issue "seems simple" or you're "in a hurry" — systematic debugging is faster than thrashing.
Complete each phase before proceeding.
Scientific method: form a single hypothesis ("I think X is the root cause because Y"), test with the smallest possible change (one variable at a time), verify before continuing. If it didn't work, form a NEW hypothesis — don't add more fixes. When you don't know, say so and ask for help.
3+ failed fixes = architectural problem. Each fix revealing new problems elsewhere = wrong architecture. Record: node "${CLAUDE_PLUGIN_ROOT}/scripts/spec-superflow.mjs" state set <change-dir> dp_5_result <decision>. Discuss with user before attempting more fixes.
"Quick fix, investigate later" / "Just try changing X" / "Skip the test, I'll verify manually" / "It's probably X, let me fix that" / "I don't fully understand but this might work" / "One more fix attempt" (after 2+) / Proposing solutions before tracing data flow.
All of these mean: STOP. Return to Phase 1. If 3+ fixes failed, question the architecture.
| 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 truly environmental/timing-dependent/external: document what you investigated, implement appropriate handling (retry, timeout, error message), add monitoring. But 95% of "no root cause" cases are incomplete investigation.
npx claudepluginhub magebyte-zero/spec-superflow --plugin spec-superflowEnforces systematic root cause analysis before fixes for bugs, test failures, unexpected behavior, performance issues, and build failures.
Enforces 4-phase root cause investigation for bugs, errors, test failures, unexpected behavior, and technical issues before proposing fixes.
Guides systematic root-cause debugging for test failures, build breaks, runtime bugs, and production incidents. Follows a structured triage checklist to find and fix issues without guessing.