Turn Vague Bug Reports Into Concrete Objectives
You get a bug fix broken into a reproduction, a minimal change and a regression test, each checked against clear objectives. Concrete objectives stop the model drifting into large rewrites or guessing at what "fixed" means.
The prompt
You are a senior software engineer who fixes bugs with small, verifiable changes.
Task: Fix the bug described below. Do not work from a vague goal such as "make it work". Turn it into concrete, checkable objectives first.
Bug report: {bug_report}
Relevant code: {code_snippet}
Expected behaviour: {expected_behaviour}
Steps:
1. Restate the bug as three to four concrete objectives, each of which can be shown as done or not done.
2. Reproduce the failure: give the exact input, the command or test that triggers it, and the wrong result it produces.
3. Propose the smallest fix that meets the objectives, and explain why you left other changes out.
4. Write a regression test that fails before the fix and passes after it.
5. Check each objective and say whether the fix meets it.
Output:
A numbered list of objectives, then a "Reproduction" section, a "Fix" section with a code diff, a "Regression test" section with code, and a final checklist marking each objective as met or not met. Keep prose brief.
Change the parts in curly braces. Use it when you have a bug report and want a small, tested fix rather than a broad rewrite.
What happened when we ran it
We sent
You are a senior software engineer who fixes bugs with small, verifiable changes.
Task: Fix the bug described below. Do not work from a vague goal such as "make it work". Turn it into concrete, checkable objectives first.
Bug report: Customers on our online shop are charged the wrong total when they apply a 10% discount code to an order containing an item that is already on sale. Yesterday a basket with a £40 sale item and a £20 regular item came to £54 instead of £52. Support has had three complaints since Monday.
Relevant code: function applyDiscount(items, percent) {
let total = 0;
for (const item of items) {
total += item.price;
}
const discounted = total * (1 - percent / 100);
return Math.round(discounted);
}
Expected behaviour: The 10% code should apply only to items not already on sale. The result should be returned in pounds to two decimal places, not rounded to a whole number. For the basket above, the total should be £58.00 (£40 sale item plus £18 for the discounted regular item).
Steps:
1. Restate the bug as three to four concrete objectives, each of which can be shown as done or not done.
2. Reproduce the failure: give the exact input, the command or test that triggers it, and the wrong result it produces.
3. Propose the smallest fix that meets the objectives, and explain why you left other changes out.
4. Write a regression test that fails before the fix and passes after it.
5. Check each objective and say whether the fix meets it.
Output:
A numbered list of objectives, then a "Reproduction" section, a "Fix" section with a code diff, a "Regression test" section with code, and a final checklist marking each objective as met or not met. Keep prose brief.
The model replied
Run on Claude Sonnet 5.5, 12 Nov 2026. Automatic check: 4 out of 5.
Mentioned for
Claude, ChatGPT, Gemini
Where it came from
Found on Web, shared by David Ch (@chhddavid): David Ch on X: How to master Fable 5.2 (Full Course).
This is our own version of the idea, written and tested by us. The original may differ.