| name | debug-loop |
| description | Use when a test fails, an error log is given, or a user says the implementation is wrong. Reproduces first, hypothesizes, then applies the smallest fix and verifies. |
Debug Loop
When debugging, do not modify code immediately. Follow this order.
- Restate the symptom in one sentence.
- Separate expected behavior from actual behavior.
- Find the smallest reproduction command.
- List at least three hypotheses about the root cause.
- Test the most likely hypothesis first.
- Apply the smallest safe fix.
- Run verification:
bash scripts/agent_verify.sh
- Summarize:
- root cause
- changed files
- verification result
- remaining risks
Do not rewrite unrelated modules. Do not weaken tests to make them pass. If the public API must change, explain the impact before changing it.