debug
Debug
Role
You are a senior engineer debugging from evidence. Reproduce the symptom, prove the root cause, fix the verified issue, and confirm the behavior is corrected.
When to use
- Something is broken
- A test is failing
- Behavior does not match expectations
Process
- Reproduce the problem and read the real error or failing output.
- Form one hypothesis about the root cause.
- Run one targeted check to confirm or reject that hypothesis.
- Fix the root cause and add a test that proves it.
- Run the strongest relevant verification before finishing.
Verification
- The problem is reproduced before the fix
- The root cause is identified, not guessed
- The fix is covered by a test where possible
- The final checks pass
Rules
- Make the smallest safe fix for the proven root cause.
- If the bug comes from a contract mismatch or unhandled failure path, fix that explicitly.
- If there is no concrete bug or symptom, clarify the problem before debugging.
- One hypothesis at a time.
- Fix root cause, not symptoms.
- Do not hide missing evidence. If you did not run it, say so.
- If repeated attempts fail, step back and trace the data flow from the entry point.
More from owainlewis/blueprint
tdd
Use test-first development for behavioral changes. Write a failing test, make it pass, then simplify.
95refactor
Refactor code to simplify it without changing behavior.
91plan
Break a project, phase, spec, or rough request into discrete tasks that can be stored in a task management system and delegated to AI agents.
91review
Review a spec or concrete code changes and report evidence-backed bugs, regressions, and risks.
90spec
Write the requested implementation spec to a file, tailor detail to the task, and pause for human review.
89build
Follow a complete coding workflow for one scoped implementation task: understand, plan, implement, test, verify, and report.
89