Debug
Workflow
- •
Gather context:
- •Read relevant files
- •Check recent changes:
git log -p -5 -- <file> - •Search for related code
- •
Form hypothesis:
- •Theory about root cause
- •Confidence level: exploring → low → medium → high → certain
- •Relevant files involved
- •Evidence gathered
- •
Investigate:
- •Trace code path
- •Check edge cases
- •Look for recent regression-causing changes
- •
Iterate:
- •Update hypothesis based on findings
- •Continue until confident
- •
Fix: Once confident (high+), implement fix.
- •
Verify:
- •Run relevant tests
- •If fix fails, return to step 2
- •Document root cause in commit
Escalate to User When
- •Can't reproduce issue
- •Fix requires architectural changes
- •Multiple valid fixes with different tradeoffs
- •Issue in unfamiliar code