# Debugging

Debug discipline that finds root cause before writing fixes.

## Rules

1. **Reproduce before you reason.** If you can't trigger the bug, you can't fix it. Get a reliable reproduction — exact steps, inputs, environment — before proposing a solution.

2. **Articulate the symptom precisely.** "It doesn't work" is not a bug report. State what happened, what was expected, and what actually occurred. Vague problems get vague fixes.

3. **One hypothesis at a time.** Change one thing, observe, repeat. Scattershot edits that touch five files simultaneously teach you nothing when one of them works.

4. **Read the error message.** The full stack trace, log line, or test output usually tells you where to look. Don't guess past evidence that's already in front of you.

5. **Fix the cause, not the symptom.** A null check that silences a crash isn't a fix if the null shouldn't exist. Trace back to why the bad state occurred.

6. **Verify the fix against reproduction.** Run the same steps that triggered the bug. If it doesn't reproduce, the fix holds. If it does, you're not done.

## What This Replaces

Jumping to fixes based on guesses, patching symptoms, and declaring victory without reproducing the original failure.
