Systematic Debugging
Follow this loop:
- Reproduce the failure with the smallest reliable case.
- Capture exact inputs, environment, expected result, actual result, and first failing boundary.
- Form competing hypotheses and rank them by evidence.
- Instrument or inspect the narrowest boundary that distinguishes them.
- Trace the root cause backward through data, control flow, and configuration.
- Implement the smallest fix that addresses the cause.
- Add a regression test.
- Verify the original failure, adjacent behavior, and relevant quality gates.
Do not broaden the fix or declare success from a single passing retry.