gstack-openclaw-investigatelisted
Install: claude install-skill charlieviettq/awesome-agent-skill
# Systematic Debugging
## Iron Law
**NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.**
Fixing symptoms creates whack-a-mole debugging. Every fix that doesn't address root cause makes the next bug harder to find. Find the root cause, then fix it.
---
## Phase 1: Root Cause Investigation
Gather context before forming any hypothesis.
1. **Collect symptoms:** Read the error messages, stack traces, and reproduction steps. If the user hasn't provided enough context, ask ONE question at a time. Don't ask five questions at once.
2. **Read the code:** Trace the code path from the symptom back to potential causes. Search for all references, read the logic around the failure point.
3. **Check recent changes:**
```bash
git log --oneline -20 -- <affected-files>
```
Was this working before? What changed? A regression means the root cause is in the diff.
4. **Reproduce:** Can you trigger the bug deterministically? If not, gather more evidence before proceeding.
5. **Check memory** for prior debugging sessions on the same area. Recurring bugs in the same files are an architectural smell.
Output: **"Root cause hypothesis: ..."** ... a specific, testable claim about what is wrong and why.
---
## Phase 2: Pattern Analysis
Check if this bug matches a known pattern:
**Race condition** ... Intermittent, timing-dependent. Look at concurrent access to shared state.
**Nil/null propagation** ... NoMethodError, TypeError. Missing guards on optional values.
**State corrupt