Update bug workflow: require failing test first and worktree

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dave
2026-02-20 11:54:55 +00:00
parent cde75bd7fb
commit 44fdaf4fd6

View File

@@ -142,9 +142,11 @@ Not everything needs to be a full story. Simple bugs can skip the story process:
* **Reproduction Steps:** How to trigger the bug
* **Proposed Fix:** Brief technical approach
* **Workaround:** Temporary solution if available
2. **Fix Immediately:** Make minimal code changes to fix the bug
3. **Archive:** Move fixed bugs to `bugs/archive/` when complete
4. **No Guardrail Update Needed:** Unless the bug reveals a missing constraint
2. **Create a Worktree:** Create a git worktree and branch for the fix (e.g., `git worktree add ../project-bug-N -b bugfix/bug-N-description master`).
3. **Write a Failing Test:** Before fixing the bug, write a test that reproduces it (red). This proves the bug exists and prevents regression.
4. **Fix the Bug:** Make minimal code changes to make the test pass (green).
5. **Archive & Merge:** Move the bug file to `bugs/archive/`, squash merge to master, delete the worktree and branch.
6. **No Guardrail Update Needed:** Unless the bug reveals a missing constraint
### Bug vs Story
* **Bug:** Existing functionality is broken → Fix it