From gangsta
Guides systematic root-cause debugging for bugs, test failures, unexpected behavior, performance issues, and build failures via reproduction, evidence gathering, boundary checks, and data flow tracing before fixes.
npx claudepluginhub kucherenko/gangsta --plugin gangstaThis skill uses the workspace's default tool permissions.
Random fixes waste time and create new bugs. Quick patches let the real rat walk free.
Enforces systematic root cause analysis before fixes for bugs, test failures, unexpected behavior, performance issues, and build failures.
Guides systematic root cause investigation for bugs, test failures, unexpected behavior, performance issues, and build failures before proposing fixes.
Enforces root cause investigation for bugs, test failures, unexpected behavior, and performance issues through four phases before proposing fixes.
Share bugs, ideas, or general feedback.
Random fixes waste time and create new bugs. Quick patches let the real rat walk free.
Core principle: ALWAYS find the root cause before attempting fixes. Symptom fixes are invalid.
Violating the letter of this process is violating the spirit of debugging.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed The Brief, you cannot propose fixes. This is Omerta.
Use for ANY technical issue:
Use this ESPECIALLY when:
Don't skip when:
You MUST complete each phase before proceeding to the next.
BEFORE attempting ANY fix:
Read the Evidence
Reproduce the Crime
Check Recent Activity
Gather Evidence at Every Boundary
WHEN system has multiple components (CI → build → signing, API → service → database):
BEFORE proposing fixes, add diagnostic instrumentation:
For EACH component boundary:
Run once to gather evidence showing WHERE it breaks. THEN analyze evidence to identify the failing component. THEN investigate that specific component.
Trace the Data Flow
WHEN error is deep in the call stack:
Find the pattern before fixing:
Find Working Examples
Compare Against References
Identify Differences
Understand Dependencies
Scientific method:
Form Single Hypothesis
Test Minimally
Verify Before Continuing
When You Don't Know
Fix the root cause, not the symptom:
Create Failing Test Case
gangsta:drill-tdd for writing proper failing testsImplement Single Fix
Verify Fix
gangsta:sweep-verification to verify before claiming successIf Fix Doesn't Work
If 3+ Fixes Failed: Escalate to the Don
Pattern indicating architectural rot:
STOP and question fundamentals:
Discuss with the Don before attempting more fixes.
This is NOT a failed hypothesis — this is a wrong architecture.
If you catch yourself thinking:
| Thought | Reality |
|---|---|
| "Quick fix for now, investigate later" | Investigate NOW. Quick fixes compound. |
| "Just try changing X and see" | That's guessing, not debugging. The Brief. |
| "Add multiple changes, run tests" | Can't isolate what worked. One at a time. |
| "Skip the test, I'll manually verify" | Manual verification is not evidence. |
| "It's probably X, let me fix that" | "Probably" means you haven't investigated. |
| "I don't fully understand but this might work" | Might = guessing. The Brief. |
| "One more fix attempt" (after 2+) | 3 failures = architectural problem. Escalate. |
| "Here are the main problems: [list]" | Listing without investigating = invalid. |
| Proposing solutions before tracing data flow | STOP. Trace first, propose second. |
ALL of these mean: STOP. Return to The Brief.
Watch for these redirections:
When you see these: STOP. Return to The Brief.
| 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. Escalate to the Don. |
| Phase | Key Activities | Success Criteria |
|---|---|---|
| The Brief | Read errors, reproduce, check changes, gather evidence | Understand WHAT and WHY |
| Cross-Examination | Find working examples, compare | Identify differences |
| The Theory | Form hypothesis, test minimally | Confirmed or new hypothesis |
| The Hit | Create test, fix, verify | Bug resolved, tests pass |
If systematic investigation reveals the issue is truly environmental, timing-dependent, or external:
But: 95% of "no root cause" cases are incomplete investigation.