debuglisted
Install: claude install-skill arbazkhan971/godmode
## Activate When
- `/godmode:debug`, "why is this happening?", "this doesn't work"
## Lessons Integration
Before investigation: read `.godmode/lessons.md` for known root causes and debugging shortcuts.
After session: append lessons about root cause patterns discovered.
## The Loop
```
failing_count = run_tests() # test_cmd (from stack detection), count failures
current_iteration = 0
skipped = 0
WHILE failing_count > 0 AND skipped < 3:
current_iteration += 1
bug = pick_highest_severity(remaining_bugs)
technique_index = 0
techniques = [stack_trace, git_bisect, state_inspection, binary_search]
# 1. REPRODUCE — run failing command 3x. Consistent failure = real bug. Intermittent = add to flaky list.
# 2. SELECT TECHNIQUE (max 5 min each):
Stack trace → Trace Analysis | "Used to work" → `git bisect` | Regression → `git log -20`
Intermittent/Wrong results → State Inspection | Unknown → Binary Search (eliminate half)
# 3. INVESTIGATE — insert print/log at suspect file:line. Log: variable name=value, caller, actual vs expected.
# 4. PROVE — state: "Bug is at {file}:{line} because {variable}={actual}, expected {expected}. Reproduce: {cmd}."
Chain: Symptom → Why? → Why? → Root cause → Fix (file:line + diff). Min 3 'why's.
# Root cause found → KEEP (fix or hand off)
# Root cause NOT found → try next technique (step 2)
# All techniques exhausted → DISCARD bug (skip++), log reason_stuck + root_cause_unkno