Bug fix brief for a coding agent
Find the root cause of a bug, fix it minimally and prove it with a regression test.
Free to use and change. Filling in and copying happen in your browser.
How it is built
- Goal: Fix this bug: {{symptom}}. Expected behaviour: {{expected}}.
- Context: Start in {{files}}. Read the project instructions file before changing anything.
- Constraints: Find the root cause before editing. Keep the change minimal and match the surrounding code. Do not change public APIs, dependencies or unrelated files. Do not commit or push.
- Done when: A new regression test fails before the fix and passes after it, and {{check_command}} passes.
- Stop and ask: Before deleting data, changing a schema or touching other modules, or if the cause turns out to be different from this description.
- Report: Explain the cause, the change, the commands you ran with their results, and anything you could not verify.
Tips
- Describe the symptom, not your guess at the fix.
- Ask for one bug per prompt so each change stays reviewable.
Read how to write prompts for coding agents for the reasoning behind templates like this. Adapting it? Check your version with the prompt checker.
More coding-agent templates
- Plan a feature before coding
Get an implementation plan with files, steps and tests to review before the agent writes code.
- Review a change before merging
A focused review of a diff for bugs, security and missing tests, ranked by severity.
- Write tests for existing code
Add tests that pin down current behaviour, following the project’s test conventions.
- Refactor without changing behaviour
Simplify code in small, safe steps while keeping the tests green.