---
name: "Coder agents must find root causes for bugs"
---

# Story 252: Coder agents must find root causes for bugs

## User Story

As a project owner, I want coder agents to always investigate and fix the root cause of bugs rather than layering new code on top, so that fixes are surgical, minimal, and don't introduce unnecessary complexity.

## Acceptance Criteria

- [ ] When a coder agent picks up a bug, it must first investigate to find the root cause (e.g. using `git bisect`, `git log`, reading the relevant code history)
- [ ] The coder's commit message must explain what broke and why, not just what was changed
- [ ] Coders must not add new abstractions, wrappers, or workarounds when a targeted fix to the original code is possible
- [ ] The system prompt or agent instructions for coder agents include clear guidance: "For bugs, always find and fix the root cause. Use git bisect to find breaking commits. Do not layer new code on top of existing code when a surgical fix is possible."
- [ ] If a coder cannot determine the root cause, it must document what it tried and why it was inconclusive, rather than guessing and shipping a speculative fix

## Out of Scope

- Changes to how stories (non-bugs) are handled
- Automated enforcement (this is guidance/instruction, not a gate)
