root-cause-tracing

ljchg12-hue's avatarfrom ljchg12-hue

Systematically trace bugs and issues to their root cause using debugging techniques and analysis methods

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 6, 2026

When & Why to Use This Skill

The Root Cause Tracing skill enables a systematic approach to identifying the fundamental origins of software bugs and system failures. By leveraging structured analysis frameworks such as the 5 Whys, Fishbone diagrams, and Fault Tree Analysis, this skill helps developers move beyond surface-level symptoms to implement permanent solutions and prevent recurring technical debt.

Use Cases

  • Software Bug Investigation: Systematically reproducing, isolating, and tracing complex logic errors to their specific source in the codebase.
  • Production Incident Response: Analyzing critical system failures or service outages to determine the primary trigger and mitigate future risks.
  • Performance Bottleneck Analysis: Identifying the underlying causes of high latency, database slowness, or resource exhaustion through timeline and profile analysis.
  • Systematic Failure Analysis: Applying the 5 Whys framework to uncover deep-seated design flaws or process gaps that lead to technical issues.
nameroot-cause-tracing
descriptionSystematically trace bugs and issues to their root cause using debugging techniques and analysis methods

Root Cause Tracing Skill

Systematically identify root causes of bugs and system failures.

When to Use

  • Bug investigation
  • Production incidents
  • Performance issues
  • System failures

Analysis Frameworks

  1. 5 Whys: Ask "why?" repeatedly
  2. Fishbone Diagram: Categorize causes
  3. Fault Tree Analysis: Logic tree of failures
  4. Timeline Analysis: Chronological events

Debugging Process

  1. Reproduce: Create minimal reproduction
  2. Isolate: Narrow down location
  3. Trace: Follow execution path
  4. Hypothesis: Form theory
  5. Test: Verify theory
  6. Fix: Implement solution
  7. Verify: Confirm fix works

Tools

  • Debuggers (gdb, lldb, pdb)
  • Logging and tracing
  • Profilers
  • Stack traces
  • Network analyzers

5 Whys Example

Problem: Website is slow
Why? Database queries are slow
Why? No indexes on frequently queried columns
Why? Database schema not optimized
Why? Initial design didn't account for scale
Why? No performance testing during development
Root Cause: Lack of performance testing

Best Practices

  • Document investigation steps
  • Don't jump to conclusions
  • Test hypotheses systematically
  • Consider multiple causes
  • Implement preventive measures

Resources