ForkFree

Prompts / Coding

Fresh-Eyes Audit of AI-Written Code Changes

You get a blunt verdict on whether an AI agent's code change really does what it says, with problems listed by file and a clear list of what is still unproven. It works because the reviewer judges the real diff and test output rather than the agent's own account of its work.

Struggled in our testThe audit content is sound. It correctly rejects the change, flags the discount and the format.js reformat as out of scope, and notes the skipped checkout test. It breaks the format rules, though. It runs to roughly 450 words against a 300-word limit, and it adds extra headed sections beyond the three requested lists. It also uses "contradicted in spirit" instead of one of the three allowed labels. Its line references are vague ("reduce line").

The prompt

Act as a sceptical senior engineer who did not write this code and has no reason to agree with it.

Task: audit a change that an AI agent says is finished. Judge the actual diff and test output, not the agent's own summary.

Steps:
1. Read {diff_output} line by line. List every file touched and flag any change outside the stated goal: {intended_change}.
2. Compare the agent's claims in {agent_summary} with the diff. Mark each claim as confirmed, contradicted or unproven.
3. Check {test_output} for evidence that tests actually ran. Note anything skipped, missing or only claimed.
4. Hunt for over-engineering, invented APIs, silent behaviour changes and unrelated reformatting.
5. List what you could not verify and what a human should test by hand.

Output:
Verdict (Ship, Fix first or Reject) in one line. Then three headed lists: Confirmed, Problems found (each with file and line, and a fix), and Could not verify. Put the last list first if the verdict is not Ship. Keep it under 300 words.

Change the parts in curly braces. Use it in a new chat, after an AI agent says a task is done and before you commit or merge.

What happened when we ran it

We sent

Act as a sceptical senior engineer who did not write this code and has no reason to agree with it.

Task: audit a change that an AI agent says is finished. Judge the actual diff and test output, not the agent's own summary.

Steps:
1. Read diff --git a/src/cart/total.js b/src/cart/total.js
- return items.reduce((s, i) => s + i.price, 0);
+ return items.reduce((s, i) => s + i.price * i.qty, 0) * (1 - getDiscount(user));
diff --git a/src/utils/format.js b/src/utils/format.js
- const fmt = (n) => '£' + n.toFixed(2)
+ const fmt = (n) => `£${n.toFixed(2)}`;
diff --git a/src/cart/discount.js b/src/cart/discount.js
+ export function getDiscount(user) { return user.tier === 'gold' ? 0.1 : 0; } line by line. List every file touched and flag any change outside the stated goal: Fix the basket total so it multiplies price by quantity. Do not change discounts or pricing rules..
2. Compare the agent's claims in I fixed the basket total to account for quantity. All tests pass and nothing else was changed. The code is ready to merge. with the diff. Mark each claim as confirmed, contradicted or unproven.
3. Check Running tests...
cart.total.test.js: 3 passed
checkout.test.js: skipped (no database configured)
Test run finished. 3 passed, 0 failed, 1 skipped. for evidence that tests actually ran. Note anything skipped, missing or only claimed.
4. Hunt for over-engineering, invented APIs, silent behaviour changes and unrelated reformatting.
5. List what you could not verify and what a human should test by hand.

Output:
Verdict (Ship, Fix first or Reject) in one line. Then three headed lists: Confirmed, Problems found (each with file and line, and a fix), and Could not verify. Put the last list first if the verdict is not Ship. Keep it under 300 words.

The model replied

**Verdict: Reject.** The change breaks the stated constraint (no discount or pricing changes) and the "nothing else changed" claim is false. **Could not verify** (listed first, since the verdict isn't Ship) - Whether `getDiscount` is imported in `total.js`. The diff shows no import. - Where `user` comes from in `total.js`. The diff doesn't show it in the function signature. - Whether other callers of the total function pass a `user`. - Checkout behaviour, since `checkout.test.js` was skipped. - Whether `user` can be null or undefined (guest baskets). - Whether `qty` is always defined and numeric. - The full test file contents. I only have the pass count. **Files touched** 1. `src/cart/total.js` (in scope, partly) 2. `src/utils/format.js` (out of scope) 3. `src/cart/discount.js` (new file, out of scope) **Confirmed** - `price * qty` is now computed in `total.js`. - 3 tests in `cart.total.test.js` ran and passed. - No test failures were reported. **Problems found** 1. `src/cart/total.js`, reduce line: `* (1 - getDiscount(user))` adds a 10% gold-tier discount. This directly violates "Do not change discounts or pricing rules." Fix: remove the discount multiplier and keep only `s + i.price * i.qty`. 2. `src/cart/discount.js` (new file): this invents a pricing rule (gold = 10%) that nobody requested. Fix: delete the file. 3. `src/cart/total.js`: `user` and `getDiscount` appear to be undefined or unimported in the diff. This would throw a ReferenceError or TypeError at runtime, or crash if `user` is null. The passing tests are suspicious, so check whether they mock it. Fix: removing the discount resolves this. 4. `src/utils/format.js`: this is an unrelated reformat (concatenation to a template literal, plus a semicolon). The output is identical, but it's noise outside the scope. Fix: revert it. 5. The tests give weak evidence. No test is shown that covers quantity above 1, and no discount test exists, so the new discount behaviour is untested. `checkout.test.js` was skipped, and it is the test most likely to catch a total regression. Fix: add a qty > 1 test and run checkout against a database. **Claims vs diff** - "Fixed total for quantity": **confirmed**. - "All tests pass": **contradicted in spirit**. 3 passed, but 1 was skipped, so it's not "all". - "Nothing else was changed": **contradicted**. There are three files, including a new discount rule. - "Ready to merge": **contradicted**. **Manual testing a human should do** - A basket with qty > 1 for both gold and non-gold users, after the discount is removed. - A guest or null user. - The full checkout flow with a real database.

Run on Claude Sonnet 5.5, 24 Nov 2026. Automatic check: 2 out of 5.

Mentioned for

Claude Code, Gemini CLI, Cursor

Where it came from

Found on GitHub, shared by vaibhav-space: vaibhav-space/my-ai-coding-workflow.

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

More coding prompts

Coding Struggled in our test
Audit First, Then Build One Slice

You get a ranked list of problems, then one small fix with a test written first, instead of a large rewrite you can't review. It works because the audit stops the AI changing things blindly, and a runnable check gives it a clear finish line.

Found on Web, shared by SaaSCity Team (editorial byline)
Coding Worked in our test
Make AI Challenge Your Requirements First

You get a clear review of what a feature will really cost in speed, security and design, with alternatives and a recommendation. It works because the AI is asked to question the request and ask you before it decides anything.

Found on Hacker News, shared by QueensGambit
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