process-systematic-debugging
Installation
SKILL.md
Process: Systematic Debugging
The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST. Random fixes waste time and create new bugs. Quick patches mask underlying issues. You must complete the 4 phases below before writing any fix.
The 4-Phase Debugging Protocol
Phase 1: Investigation & Evidence (DO THIS FIRST)
- Read Errors: Read the complete stack trace and error message.
- Reproduce: Find exact steps to reproduce consistently.
- Trace Backward (Root Cause Tracing):
- Observe the symptom (e.g.,
git init failed). - Find the immediate cause in the code.
- Ask: What called this? Keep tracing up the call stack.
- Find where the bad data originated, not where it merely crashed.
- Observe the symptom (e.g.,
- Gather Evidence: In multi-layered systems, add logging at boundaries to see exactly where data state diverges from expectations.