thinkhard.SI

Prompt repository Engineering & code

Review a pull request written by a coding agent

A coding agent opened a pull request and you want it checked against the brief for scope creep, weakened tests and invented code before you merge.

Registry no.
ENG-019
Collection
Engineering & code
Laid out for
Claude
Score
10 out of 10
Blanks to fill
5
Added

Engineering & codeClaude

The prompt

Score 10 of 10, Excellent

Use it when A coding agent opened a pull request and you want it checked against the brief for scope creep, weakened tests and invented code before you merge.

  • {{brief}}
  • {{agent_summary}}
  • {{diff}}
  • {{project_notes}}
  • {{reviewer}}
Full prompt and why it works
System prompt
You review pull requests written by coding agents, for the engineer who will merge them. You know how agent changes tend to go wrong: work beyond the brief, tests edited until they pass, calls to functions or options that do not exist, and errors swallowed to make a check go green. You report only what the diff shows.
User message
<brief>
{{brief}}
</brief>

<agent_summary>
{{agent_summary}}
</agent_summary>

<diff>
{{diff}}
</diff>

<project_notes>
{{project_notes}}
</project_notes>

Review the diff above against the brief, for {{reviewer}} to decide whether to merge, ask for changes or discard it. Do not take the agent's summary on trust: check each claim in it against the diff.

Report in this order:
1. Verdict in one line: merge, merge after small fixes, or send back, with the main reason.
2. Brief coverage: each requirement in the brief, marked done, partly done or missing, with the file and line that shows it.
3. Out of scope: every change the brief did not ask for, including renames, reformatting, new dependencies and config edits.
4. Tests: tests added, tests changed or deleted, and any assertion that was loosened, skipped or rewritten to match the new output. Quote each one.
5. Red flags: functions, imports, options or APIs the diff uses that are not defined in the diff or the project notes (mark these "verify this exists"), catch blocks that hide errors, hard-coded values that look tuned to pass a test, and removed validation or logging.
6. Claims in the summary that the diff does not support.

Keep the report under 600 words. Quote code exactly with its file name, so the reviewer can find each point. A good review ends with the three things most worth checking by hand; leave style nits to the linter.

<example>
The form of one red flag: "src/billing/retry.ts, line 42: catch (e) {} swallows the error from chargeCard, so a failed charge now looks like a success."
</example>

Do not suggest new features or redesigns. If the diff is cut off or a file is missing, say which and review what is there. If you cannot tell whether something exists elsewhere in the codebase, say so instead of assuming either way.

Variables

{{brief}}
The task you gave the agent, as you wrote it.
{{agent_summary}}
The agent's own summary of what it did, from the pull request or the session.
{{diff}}
The full diff of the pull request.
{{project_notes}}
Anything that helps judge the diff: the project's AGENTS.md or CLAUDE.md, relevant interfaces, or "none".
{{reviewer}}
Who decides on the merge, for example "me" or "the tech lead".

Why it works

  • Background facts. The agent's summary is checked against the diff claim by claim, because summaries describe what the agent meant to do rather than what it did.
  • What good looks like. It names the failure modes particular to agent code, such as edited tests, invented APIs and swallowed errors, and ends with the three things to check by hand.
  • If unsure. Anything that may not exist in the codebase is marked "verify this exists" instead of being assumed real or fake.

How to use it

  1. Press Fill in variables and type your details into each blank. What you type stays in this browser.
  2. Copy the filled prompt into the AI tool you already use, such as ChatGPT, Claude or Gemini, or open it in the Grader or the Prompt Tester here.
  3. Before you rely on it, try it on three or four real examples. The Prompt Tester runs them all at once and shows which ones go wrong.
Use it from code

Get this prompt as JSON from the free REST API, with your own text in the blanks, or let an AI assistant fetch it through the MCP server. No key.

curl -s https://thinkhard.si/api/v1/prompts/review-coding-agent-pull-request

With the MCP server added to Claude, ChatGPT, Cursor or VS Code, call get_prompt with {"prompt": "review-coding-agent-pull-request"}, or just ask for it by name.