Systematic Debugging (Mitchell Hashimoto's pattern)
- •Reproduce: Confirm the issue is reproducible
- •Isolate: Find the minimal reproduction case
- •Diagnose: Read relevant code, trace execution path
- •Fix: Make the smallest possible change
- •Verify: Confirm fix without regressions
Rules
- •Read error messages and stack traces before acting
- •Never guess at fixes -- understand root cause first
- •Launch parallel Explore agents for different hypotheses (run_in_background: true)
- •Check git log for recent changes that might have caused it
- •For complex fixes, write spec.md with diagnosis before implementing
Anti-patterns
- •Don't add try/catch to hide errors
- •Don't add defensive null checks without understanding why null occurs
- •Don't retry flaky operations without understanding the failure mode