ForkFree

Prompts / Coding

Match Ownership Wording to Change Size

You get a tightly scoped code change, plus a separate list of things the AI spotted but left alone. It works because you state how far the AI may go, so a sense of "ownership" does not trigger unrequested refactoring.

Partly workedThe fix is correct and minimal, and the five "Noticed but not changed" bullets are sound. It breaks the output format, though. The scope statement runs to two sentences plus an extra explanatory paragraph, and it gives both a diff and the full edited function when "changed code only (as a diff or the edited function)" asked for one. The prompt said to add no other commentary.

The prompt

Act as a senior engineer who has been given responsibility for the code below, but only within the scope of the change requested.

Task: Make the change described in {change_request} to the code in {code_snippet}. Treat the ownership level as {ownership_level}, and do not go beyond it.

Steps:
1. Restate the change in one sentence and the ownership level you will work to, so the boundary is clear.
2. Identify the smallest set of lines that must change to deliver the request, and leave everything else untouched, including naming, formatting and structure.
3. Make the change. Do not rename, reorganise or "tidy" anything outside that set.
4. List any problems you noticed outside the boundary as suggestions only, without applying them.

Output:
A short scope statement, the changed code only (as a diff or the edited function), then a bullet list headed "Noticed but not changed" with at most five items. Add no other commentary.

Change the parts in curly braces. Use it when you want a bug fix or small tweak in a codebase you care about, and a broad "treat this as your own" framing would risk a sprawling rewrite.

What happened when we ran it

We sent

Act as a senior engineer who has been given responsibility for the code below, but only within the scope of the change requested.

Task: Make the change described in Orders with a discount code should not charge VAT twice. At the moment the total is wrong when a code is applied, because tax is added both in calculate_subtotal and again in finalise_order. to the code in def calculate_subtotal(items, code=None):
    total = sum(i.price * i.qty for i in items)
    if code:
        total -= total * code.rate
    return total * 1.2

def finalise_order(items, code=None):
    sub = calculate_subtotal(items, code)
    total = sub * 1.2
    return {'total': round(total, 2), 'items': len(items)}. Treat the ownership level as minimal localised patch: fix only the double VAT bug, no refactoring, and do not go beyond it.

Steps:
1. Restate the change in one sentence and the ownership level you will work to, so the boundary is clear.
2. Identify the smallest set of lines that must change to deliver the request, and leave everything else untouched, including naming, formatting and structure.
3. Make the change. Do not rename, reorganise or "tidy" anything outside that set.
4. List any problems you noticed outside the boundary as suggestions only, without applying them.

Output:
A short scope statement, the changed code only (as a diff or the edited function), then a bullet list headed "Noticed but not changed" with at most five items. Add no other commentary.

The model replied

**Scope:** Remove the duplicated 1.2 VAT multiplier so tax is applied once when a discount code is used. Ownership level: minimal localised patch, only the double-VAT bug. I'm removing the multiplier from `finalise_order`, so `calculate_subtotal` stays unchanged and remains the single place VAT is applied. ```diff def finalise_order(items, code=None): sub = calculate_subtotal(items, code) - total = sub * 1.2 + total = sub return {'total': round(total, 2), 'items': len(items)} ``` Edited function: ```python def finalise_order(items, code=None): sub = calculate_subtotal(items, code) total = sub return {'total': round(total, 2), 'items': len(items)} ``` **Noticed but not changed** - The 1.2 VAT rate is hard-coded in `calculate_subtotal`; it should be a named constant or config value. - `calculate_subtotal` returns a VAT-inclusive figure despite its name, which suggests a subtotal; consider renaming or splitting it. - Prices are handled as floats, which risks rounding errors; `Decimal` or integer pence would be safer for money. - `code.rate` isn't validated, so a rate above 1 or a negative rate could produce a negative or inflated total. - The bug affected all orders, not only those with a code, so the issue's wording undersells it; worth adding a regression test covering both cases.

Run on Claude Sonnet 5.5, 12 Nov 2026. Automatic check: 3 out of 5.

Mentioned for

Claude, ChatGPT, Gemini

Where it came from

Found on Web, shared by explainx.ai: Fable 5.2 Ownership Prompt: 5× More Refactors.

This is our own version of the idea, written and tested by us. The original may differ.

More coding prompts

Coding Worked in our test
Generate Strict JSON Spec From Description

You get a clean, machine-readable JSON object that matches your rules on the first try. It works because the model reads the rules first, then checks its own answer against each one before replying.

Found on GitHub, shared by DominikScholz
Coding Worked in our test
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.

Found on Web, shared by David Ch (@chhddavid)
Coding Struggled in our test
Root-Cause Bug Fix With Honest Testing

You get a small, targeted fix with a test that proves it, plus an honest list of what was and was not checked. It works because it sets a clear goal, limits the scope, and tells the AI when to carry on and when to stop.

Found on Web, shared by Rizki Murtadha (Promptessor)