Bug-fixing workflow
Diagnose before you change anything. Guessing at fixes wastes tokens and creates new bugs.
Steps
- Recall context. If a project memory exists (
project-memoryskill /.memory/), read it — the bug may be a known gotcha or tie to a past decision. - Diagnose properly. Invoke the
diagnosing-bugsskill (mattpocock-skills) and follow its loop: reproduce, form a hypothesis, gather evidence, confirm root cause — before writing a fix.- Not installed?
npx skills@latest add mattpocock/skills --skill=diagnosing-bugs
- Not installed?
- Fix at the root, not the symptom. Smallest change that addresses the confirmed cause.
- Prove it. Add or run a test that fails before and passes after. Report the evidence honestly — if you couldn't reproduce or verify, say so.
- Close the loop. Update docs if behavior changed (
keep-documentation), and record a non-obvious root cause in project memory so it isn't rediscovered later.
Redaction
Diagnosis surfaces logs and commands — redact secrets to <REDACTED> before showing them.