
root-cause-tracing
by a-ariff
ð Production-ready Claude Code plugin marketplace with 41 components: 21 autonomous agents, 15 power skills, 2 smart hooks, 2 custom commands. Transform Claude Code into an autonomous development powerhouse. One-line install, cross-device sync, comprehensive documentation.
SKILL.md
name: root-cause-tracing description: Trace bugs backward to their origin, not just symptoms version: 1.0.0 author: Ariff when_to_use: When fixing bugs - trace to source before patching
Root Cause Tracing
Core Principle
TRACE BACKWARD TO THE BUG'S ORIGIN
Don't patch symptoms - fix the disease
The Backward Trace Method
SYMPTOM
â Where does this value come from?
IMMEDIATE CAUSE
â What set that to wrong value?
DEEPER CAUSE
â Why did that happen?
ROOT CAUSE â Fix HERE
Practical Steps
1. Start at Symptom
Q: What exactly went wrong?
â Document the exact symptom
â Note file, line, error message
2. First Backward Step
Q: Where does this value/state come from?
â Find the direct source
â Check: is THIS the bug or just a carrier?
3. Keep Tracing
Q: What set THAT to the wrong value?
â Follow the data flow backward
â Each step: is this the origin or just passing it along?
4. Identify Root
SIGNS YOU'VE FOUND ROOT:
- Logic error in requirements interpretation
- Initial state incorrectly set
- Wrong assumption in algorithm
- Missing validation at entry point
- Broken invariant at creation
Stop Conditions
You've found root cause when:
- There's no earlier source to trace
- The error was introduced HERE (not inherited)
- Fixing HERE prevents the bug entirely
- The "why" answer is: "wrong logic/design"
You're still at symptoms if:
- The wrong value came from somewhere else
- Another function passed bad data
- It's a consequence, not origin
- Fixing here = adding a workaround
Common Patterns
| Bug Pattern | Root Usually At |
|---|---|
| Wrong value displayed | Data calculation, not display code |
| Null pointer | Where object should've been created |
| Off-by-one | Loop bounds definition, not body |
| Race condition | Shared state design, not specific access |
| Invalid state | State transition logic, not current handler |
Anti-Patterns (Don't Do This)
â Symptom Patching
// Bad: Fix where error happens
if (value === undefined) value = defaultValue
// Good: Find why value is undefined
â Guard Stacking
// Bad: Add guards everywhere
if (x) if (y) if (z) doThing()
// Good: Ensure x, y, z correct at source
â Quick Fix Pressure
"Just make it work" â Technical debt
Better: "5 more minutes tracing saves 5 hours debugging later"
Verification
After identifying root cause:
- Explain the chain - Symptom â caused by â caused by â ROOT
- Confirm origin - "This is where wrong value first appears"
- Fix at root - Change the origin, not the symptoms
- Verify fix - Original symptom gone + no new bugs
Integration with Checkers
Use with:
assumption-checkerâ Was root cause an assumption?dependency-validatorâ Was root cause a broken dependency?pre-action-verifierâ Verify root cause fix before applying
ã¹ã³ã¢
ç·åã¹ã³ã¢
ãªããžããªã®åè³ªææšã«åºã¥ãè©äŸ¡
SKILL.mdãã¡ã€ã«ãå«ãŸããŠãã
ã©ã€ã»ã³ã¹ãèšå®ãããŠãã
100æå以äžã®èª¬æããã
GitHub Stars 100以äž
3ã¶æä»¥å ã«æŽæ°
10å以äžãã©ãŒã¯ãããŠãã
ãªãŒãã³Issueã50æªæº
ããã°ã©ãã³ã°èšèªãèšå®ãããŠãã
1ã€ä»¥äžã®ã¿ã°ãèšå®ãããŠãã
ã¬ãã¥ãŒ
ã¬ãã¥ãŒæ©èœã¯è¿æ¥å ¬éäºå®ã§ã

