Workflow: Bug Fix
Diagnose and fix a reported bug.
When to Use
- Ticket describes a bug with reproduction steps or error details
- Hotfixes (critical priority) follow the same flow but skip the backlog queue
Inputs
- Issue identifier, title, and description (including repro steps, error messages, logs)
- The target repo’s codebase
Steps
- Reproduce — understand the bug from the description. Read relevant code and try to identify the root cause
- Diagnose — trace the code path. Read error messages, logs, and stack traces. Identify the exact location and cause
- Write a failing test — create a test that demonstrates the bug before fixing it
- Fix — make the minimal change to resolve the root cause. Do not fix adjacent issues
- Verify — run the failing test (now passing) plus the full test suite
- Commit with conventional commit messages
Quality Checks
- Root cause is identified, not just symptoms patched
- A regression test exists that would catch this bug if reintroduced
- Fix is minimal — no unrelated changes
- All existing tests still pass
References
- See “Hotfix Process” in
.ai/projects/cascadeguard/sdlc.md .ai/steering/bug-fix-workflow.md