Skip to content
Prompt Maker Studio

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.

Fill in
<GOAL>
Fix this bug: {{symptom}}. Expected behaviour: {{expected}}.
</GOAL>

<CONTEXT>
Start in {{files}}. Read the project instructions file before changing anything.
</CONTEXT>

<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.
</CONSTRAINTS>

<DONE_WHEN>
A new regression test fails before the fix and passes after it, and {{check_command}} passes.
</DONE_WHEN>

<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.
</STOP_AND_ASK>

<REPORT>
Explain the cause, the change, the commands you ran with their results, and anything you could not verify.
</REPORT>

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