Systematic Debugging
Trigger
Use for broken behavior with a symptom that can be observed or bounded.
Non-trigger
Do not activate for a new feature, broad refactor, read-only review, or a request whose expected behavior still needs product decisions.
Loop
- Define the expected and observed behavior and reproduce the smallest reliable failure.
- Trace trigger to the first observed invalid state. Runtime or test evidence outranks a plausible reading of code.
- Form competing hypotheses and write a distinct prediction for each.
- Test one discriminating prediction at a time; invalidate failed hypotheses explicitly.
- Apply the minimum root-cause fix at the layer that owns the invariant.
- Show red/green regression evidence when practical, then run scoped readiness verification and clean up temporary diagnostics.
Use the hypothesis loop for the evidence ledger. After two serious failed hypotheses, request read-only advisor help with attempts and evidence. After three materially different approaches fail, stop and report a blocker instead of stacking another speculative patch.
Route security, auth, sensitive data, migrations, or shared API changes through an independent risk gate.