Workflow Development

Fix a Bug

Systematic approach to diagnosing and fixing bugs

bugfixdebuggingdevelopment
CLAUDE.md

When asked to fix a bug:

  1. Reproduce the bug. Read the error message, stack trace, or description carefully.
  2. Write a failing test that captures the buggy behavior.
  3. Trace the code path to find the root cause — don’t guess.
  4. Fix the root cause, not the symptom.
  5. Verify the failing test now passes.
  6. Run the full test suite to check for regressions.
  7. If the fix touches multiple files, review each change for unintended side effects.

Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.

get crystl