Verified against Cursor · 2026-08-07
Make Cursor's Agent mode audit its own diff for scope creep before you review it
A post-edit review prompt that has the agent re-check every file it just touched against the original brief, itemizing an UNREQUESTED label for anything it can't cite the brief to justify, catching incidental reformatting hidden inside an otherwise legitimate multi-file diff.
The prompt
Ready to copy — highlighted parts are example details you can swap.
Re-read every change you just made across every file in this session against the original brief below. Don't trust your memory of what you intended to do — actually diff each file against its state before you started editing. ORIGINAL BRIEF Add pagination to the /api/orders endpoint using limit/offset query params, default limit 20, max limit 100. Do not change the response shape for existing fields. FILES TOUCHED THIS SESSION app/api/orders/route.ts, lib/orders/types.ts For every file you touched, answer: 1. What changed, in one line. 2. Which part of the brief this satisfies — quote it directly, word for word. If you can't quote a specific part, that's the signal, not a formality to skip past. 3. If you can't point to a part of the brief that required this change, mark it UNREQUESTED and explain why you made it anyway. Then answer directly: - Did you touch any file not implied by the brief at all? - Did you change formatting, imports, or unrelated lines in a file you were already editing for a legitimate reason? List those separately — they still count as scope creep even inside a file you had a real reason to open, and they're the easiest kind to miss in a normal skim of the diff. - Did you make any change that's technically an improvement but wasn't asked for — a rename, a small optimization, an added comment? Improvement is not the same test as requested; list it under UNREQUESTED regardless of whether it's good. End with one verdict: SCOPE CLEAN, or SCOPE CREEP with the full file list and reasons.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
This converts the same self-check Cursor's own checkpoint diff view already gives you visually into a forced, itemized comparison, instead of a skim of a colored diff panel across a dozen files where a reformatted block reads as noise rather than as a decision that needs justifying. Asking the model to cite a specific quoted piece of the brief for every changed file makes it much harder for an incidental reformat or an adjacent "while I was in there" cleanup to hide inside a large multi-file diff, because there's no clause in the brief to point to for "also reformatted the imports in an unrelated file" — the citation requirement has nowhere to attach for that kind of change, which is exactly what surfaces it. The UNREQUESTED label matters specifically because a model asked generically "did you do anything you shouldn't have" will almost always say no — that's a leading question with an easy denial available, since "shouldn't have" invites a judgment call the model can resolve in its own favor. Forcing it to attempt a citation for every single file first, and only fall back to UNREQUESTED when no citation exists, produces an actual audit trail instead of a reflexive assurance. The explicit "improvement is not the same test as requested" instruction closes the specific rationalization an agent reaches for once it's flagged an unrequested change: framing a rename or a small optimization as obviously good, which is a different and easier question than whether it was in scope, and answering the easier question is how scope creep gets waved through in review even by a human reviewer who should know better.
What you get back
1. api/orders/route.ts — added limit/offset parsing with defaults 20/max 100. Satisfies: "using limit/offset query params, default limit 20, max limit 100." 2. api/orders/route.ts — also reformatted the existing error-handling block (indentation, added blank lines) while adding the pagination logic. UNREQUESTED — no part of the brief called for reformatting existing code; this happened while editing the same function. 3. lib/orders/types.ts — added a PaginationParams type. Satisfies: implied by "limit/offset query params" needing a typed shape, though not stated explicitly — noting this is an inference, not a direct quote. Files not implied by the brief: none. Formatting/import changes in a file opened for a legitimate reason: yes, item 2 above. Unrequested "improvements": none beyond item 2. Verdict: SCOPE CREEP — api/orders/route.ts (unrequested reformatting of the error-handling block).
Verified against
Cursor 2.2 · 2026-08-07
Changelog
- 2026-08-07 — Initial publish, verified against Cursor 2.2 Agent mode's post-edit self-review behavior.
Need this built into your business?
If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.
EXPLORE CUSTOM SOFTWARE
