StepGleam logoStepGleam
Coding guide

Review AI-written pull requests against an acceptance contract

A reviewer's method from r/ExperiencedDevs: a short scope contract at the top of the PR, the diff checked against it first, no extra behavior, plus Copilot code review as a first pass.

~25 minBeginner 76/100 6 steps Updated Oct 26, 2026
GitHubGitHub Copilot code reviewClaude Code
Review AI-written pull requests against an acceptance contract — illustration for this Coding guide

Tools used

Step navigator0/6 done
0 of 6 steps done
What you'll get

PRs that carry a scope contract, a review that checks behavior before style, and a clear rule for cutting extra behavior.

Who this is for

Developers who review PRs produced by Claude Code, Codex, Cursor or Copilot, whether their own or a teammate's.

Read this first

Before you start

AI-written code tends to compile and pass tests while still missing what was meant. In an r/ExperiencedDevs thread on exactly that problem, one reviewer described a contract-first review, and another said they anchor every review to a short written "what should not change" summary. This guide turns those descriptions into a repeatable review.

Step-by-step instructions

Step 1 of 6 · Coding

Put a short contract at the top of the PR

In the PR description, write what is in scope, what is explicitly out of scope, and 3 to 5 acceptance checks in plain language. This is the reviewer's own description of what consistently helped.

Where this comes from: u/Illustrious_Echo3222 in r/ExperiencedDevs: "How do you review your code against the original plan or requirement?".

Review AI-written pull requests against an acceptance contract — guide thumbnail
Why this works

Without a contract, the reviewer has nothing objective to compare the diff against.

Step 2 of 6 · Coding

Check behavior against the contract before reading the implementation

Read the contract, then check the diff's behavior against it before you judge elegance or tests. Another commenter in the thread does the same: they check behavior against the written summary "before I look at elegance or tests".

Where this comes from: u/workflowsidechat in r/ExperiencedDevs: "How do you review your code against the original plan or requirement?".

Why this works

The most expensive AI mistake is the right code for the wrong problem.

Step 3 of 6 · Coding

Push requirements into tests, and ask for screenshots for UI

Where possible, encode the acceptance checks as tests, including a couple of high-level "this flow should do X and never do Y" checks. For UI changes, ask for screenshots or a short demo video, because "reading JSX doesn't catch the design drift."

Where this comes from: u/Illustrious_Echo3222 in r/ExperiencedDevs: "How do you review your code against the original plan or requirement?".

Copy-ready promptClaude Code
Add tests that encode these acceptance checks: <paste checks>. For the UI change, take before/after screenshots of <page>.
Why this works

Tests and screenshots turn your contract into something a machine and a reviewer can check.

Step 4 of 6 · Coding

Run Copilot code review as a first pass

On the PR, under Reviewers, click Request next to Copilot (or run gh pr edit <number> --add-reviewer @copilot). Copilot leaves comments labeled High, Medium or Low. By default it does not approve or block. Add review guidance to .github/copilot-instructions.md or AGENTS.md. Treat it like the review bots in other teams' workflows: a first pass, not the final say.

Where this comes from: u/metaphorm (review bots + human final review) in r/ExperiencedDevs: "Claude Autonomous Coding: Discussion".

Why this works

It catches obvious issues quickly so your human review can focus on intent.

Step 5 of 6 · Coding

Cut or split anything not in the contract

Be strict about "no extra behavior". If the PR adds things that are not in the contract, they get cut or split into another PR. The reviewer warns that otherwise "the codebase slowly turns into a pile of almost right features."

Where this comes from: u/Illustrious_Echo3222 in r/ExperiencedDevs: "How do you review your code against the original plan or requirement?".

Why this works

Agents love adding helpful extras; each one is unreviewed scope.

Step 6 of 6 · Coding

Check that new code reuses existing patterns

If the change touches architecture, look for a short note on how it reuses existing patterns rather than inventing new ones. The same reviewer says this is "where AI tends to quietly fork abstractions." Ask the agent to explain which existing modules it reused, then confirm in the code.

Where this comes from: u/Illustrious_Echo3222 in r/ExperiencedDevs: "How do you review your code against the original plan or requirement?".

Copy-ready promptClaude Code
Which existing modules or patterns did this change reuse, and where did it introduce a new abstraction? List file paths.
Why this works

Duplicate abstractions are hard to spot later and expensive to merge back together.

End of guide · Reviewed Oct 26, 2026

Pro tips3
  • Keep the contract to a handful of lines. If it needs a page, the PR is too big.
  • Copilot may repeat comments on re-review even after you resolve them (GitHub notes this). Don't treat repeats as new findings.
  • Copilot code review also reads CLAUDE.md and AGENTS.md from the head branch.
Common mistakes3
  • Approving because CI is green.
  • Letting "while I was there" changes ride along.
  • Asking the same agent that wrote the code to grade it in the same session.
FAQ2
Does Copilot's review count as an approval?
Not by default. It leaves a Comment review unless an admin enables Copilot approvals, which GitHub describes as public preview.
What if I'm the only developer?
Write the contract anyway, for your future self, and review the diff against it before merging.
Sources4