Bug Fix Debugging
Use this skill when the task is to find and fix a concrete bug or regression in an existing codebase.
Goal: identify the smallest correct fix, prove the root cause, and leave behind a targeted verification path.
Working model
- Reproduce or locate the failure signal before editing.
- State the suspected root cause and the evidence for it.
- Read the narrowest relevant code path first.
- Fix the cause, not just the symptom.
- Add or update a regression test when the project has a nearby test pattern.
- Run the smallest useful verification command.
Rules
- Do not rewrite broad modules just to fix a narrow bug.
- Do not silence errors without explaining why the error is impossible or expected.
- Preserve user changes and unrelated dirty files.
- Prefer one minimal patch plus one validation step over speculative refactors.
- If the bug is caused by ambiguous requirements, state the assumption explicitly.
Output checklist
- Root cause.
- Files changed.
- Why the fix is safe.
- Validation command and result.
- Remaining risk if verification was incomplete.