Skip to main content
AI & Technology11 min

AI Code Review Checklist for Agent-Written PRs (2026)

A 24-point review checklist, a pull request template and a Google Sheets review log for code written by AI coding agents like Claude Code and Codex.

Published 2026-11-21
Share:
Last updated:

AI Code Review Checklist and Review Log (Google Sheets)

The 24 checks and three risk tiers from this post, plus a review log that calculates escape rate for agent-written and human PRs.

Enter your email to download it. You will also get System Prompt every other week: one practical artifact plus a few notes on what is working.

No spam. Unsubscribe any time.

TL;DR: A 24-point review checklist, a pull request template and a Google Sheets review log for code written by AI coding agents like Claude Code and Codex.

This is a review checklist and pull request template for code written by AI coding agents such as Claude Code, Codex and Cursor, plus a Google Sheets review log that shows whether agent-written PRs let more defects through than human ones. Checked November 21, 2026.

Everything below is on this page. The download adds the log, which calculates escape rate and review effort by risk tier and by author type, so after four weeks you have numbers from your own codebase.

This is spoke 2 of the AI SDLC field guide. The policy that sits above it, which decides what agents may touch in the first place, is the AI coding agent policy template.

Why agent-written PRs need their own checklist

A standard review checklist assumes the author understood the change. With an agent, the person who opens the PR may have read the diff once. Four findings show where review has to work harder:

  • More issues per PR. CodeRabbit analysed 470 open-source GitHub PRs and found 10.83 issues per AI-co-authored PR against 6.45 per human-only PR, about 1.7 times as many. Logic and correctness issues were 75% more common, and security issues were up to 2.74 times higher.[1] It is a vendor study and authorship was inferred from co-author signals, so read it as a direction rather than a precise multiplier.
  • Insecure defaults. Veracode tested more than 100 models on 80 coding tasks. In 45% of test cases the models introduced a vulnerability from the OWASP Top 10. They failed to secure code against cross-site scripting in 86% of the relevant tests and against log injection in 88%.[2]
  • Packages that do not exist. In a USENIX Security 2025 study of package hallucinations, the average share of hallucinated packages was at least 5.2% for commercial models and 21.7% for open-source models, with 205,474 unique made-up package names.[3] If an attacker registers one of those names, anyone who installs the suggestion without checking gets the attacker's package.
  • Faster, less stable delivery. The 2025 DORA report drew on nearly 5,000 technology professionals, 90% of whom use AI at work. It found a positive relationship between AI adoption and software delivery throughput, and a continuing negative relationship with delivery stability.[4]

These are averages across many teams and tools, not measurements of your codebase. What they agree on is that review is where the extra issues get caught or shipped. Review time is limited, so the checklist starts by deciding how much review each PR gets.

Step 1: Put every PR in a risk tier

Decide the tier from the files a PR touches, before anyone reads the diff. Three tiers are enough for most teams:

TierThe PR touchesReviewersRequired before merge
1 LowDocs, comments, test-only additions, internal scripts that never run in productionOneCI green, tier 1 checks
2 StandardFeature code or refactors inside a module that already has testsOne who owns the moduleCI green, new tests fail without the change, tier 1 and 2 checks
3 HighAuth, permissions, payments, personal data, migrations, infrastructure, CI/CD workflows, new or upgraded dependencies, agent instruction or permission filesTwo, one of them a code ownerEverything above, a security scan, a rollback plan, all 24 checks

The tier depends on what the change touches, not on who or what wrote it. An agent-written docs fix is tier 1. A two-line human change to an auth check is tier 3. Author type changes how closely a reviewer reads within a tier, and the review log tracks it separately so you can see whether that is enough.

Step 2: Add the pull request template

GitHub fills the PR description from a file named pull_request_template.md in the repository root, in docs/ or in .github/. Collaborators get the template once it is merged into the default branch. For several templates, put them in a PULL_REQUEST_TEMPLATE/ subdirectory and choose one with the template query parameter.[5]

Copy this into .github/pull_request_template.md:

## What and why
Closes #
Spec or issue this implements:

## How this was written
- [ ] Human-written
- [ ] Agent-assisted (a person wrote most of it)
- [ ] Agent-written (an agent wrote most of it)
Tool and mode, if an agent was used:

## Risk tier
- [ ] 1 Low: docs, tests, internal scripts
- [ ] 2 Standard: feature code in a tested module
- [ ] 3 High: auth, payments, personal data, migrations, infrastructure, CI, dependencies, agent config

## What I checked myself
- [ ] I ran it and saw the new behaviour work
- [ ] The new tests fail without this change
- [ ] No test was deleted, skipped or loosened
- [ ] Every new dependency exists, is the one I meant, and has an allowed licence
- [ ] No secrets, tokens or personal data in code, fixtures or logs
- [ ] I can explain every changed line

## Files changed outside the task
None, or list them

## Rollback (tier 3 only)

Two fields do most of the work. "How this was written" tells the reviewer how much of the reasoning behind the diff lives in a person's head. "Files changed outside the task" catches agents tidying files nobody asked them to touch.

Step 3: Review against the checklist

The 24 checks, grouped by what they protect. The number in brackets is the lowest tier each one applies to. The workbook has the same list with a Pass, Fail or N/A column.

Scope

  • The PR links the issue or spec the agent worked from. (1)
  • The diff does only what the spec asked. Unrelated edits are split out or reverted. (1)
  • The description says how the code was written and what the author checked. (1)

Tests

  • New behaviour has tests that fail without the change. (2)
  • No test was deleted, skipped, loosened or re-snapshotted to make the build pass. (1)
  • No values are hard-coded to match test fixtures. (2)

Correctness

  • Error paths and edge cases are handled: empty input, timeouts, retries, partial failure. No swallowed exceptions. (2)
  • Comments and docstrings describe what the code actually does. (2)
  • No new helper duplicates one that already exists in the codebase. (2)

Dependencies

  • Every new package exists, is the one intended (exact name and publisher) and is maintained. (1)
  • Each new dependency has a licence on your allowed list. (2)
  • Lockfile changes match the manifest changes, and nothing else moved. (2)

Security

  • No secrets, tokens or credentials in code, tests, fixtures, comments or logs. (1)
  • Every new input is validated and every new output is encoded for its context. (2)
  • Every new endpoint or query checks authorisation, not only authentication. (2)
  • Database queries, shell commands and log lines use parameters or escaping, never raw string building. (2)
  • Personal or sensitive data is not written to logs. (2)

Agent configuration

  • Changes to AGENTS.md, CLAUDE.md, agent permission settings or MCP server config get code-owner review. (1)
  • CI/CD workflow changes are reviewed by a code owner, and no permission or secret scope got wider. (3)
  • If the agent read issues, web pages or third-party docs during the task, nothing in the diff follows instructions from that content that nobody asked for. Prompt injection is LLM01 in the OWASP Top 10 for LLM Applications 2025.[6] (2)

Ownership and release

  • The human reviewer can explain every changed line. If not, request changes. (1)
  • An AI review was a first pass only. A person gave the required approval. (1)
  • Tier 3 changes ship behind a flag or with a written rollback. (3)
  • Migrations are reversible, or the backfill was tested on a copy of production data. (3)

The test checks deserve a habit of their own. Before approving, ask whether the new test would fail on the main branch. A test written in the same session as the code tends to assert what the code does, and that passes whether or not the code is right.

Step 4: Make the tiers enforceable in GitHub

A checklist that nobody has to use fades within a quarter. Two GitHub features carry the tiers:

  • Code owners. A CODEOWNERS file in .github/, the root or docs/ says who owns which paths. Owners are requested for review automatically when a PR touches their files, and branch protection can require a code owner's approval before merge. When several patterns match a file, the last matching pattern wins.[7]
  • Required approvals. By default, GitHub Copilot leaves a "Comment" review rather than an "Approve", so its review does not count toward required approvals. It can be configured to approve.[8] Leave that off. Treat any AI reviewer as a first pass and keep the required approval with a person.

A starting CODEOWNERS that routes tier 3 paths to owners. Replace the teams and paths with yours:

# Tier 3 paths: a code owner must approve
/.github/workflows/   @your-org/platform
/infra/               @your-org/platform
/db/migrations/       @your-org/data
/src/auth/            @your-org/security
/package.json         @your-org/platform
/AGENTS.md            @your-org/eng-leads
/CLAUDE.md            @your-org/eng-leads
/.claude/             @your-org/eng-leads

Step 5: Log four weeks of reviews and read the escape rate

The review log has one row per merged PR: tier, author type, lines changed, review minutes, issues found in review, and escaped defects, meaning bugs found after merge and traced back to that PR. Two columns calculate themselves:

  • Escape rate = escaped defects รท (issues found in review + escaped defects). The share of problems review missed.
  • Review minutes per 100 lines, so a 2,000-line agent PR and a 40-line fix can be compared.

The two summary tabs put agent-written, agent-assisted and human PRs side by side, and the three tiers side by side. After four weeks, three readings matter:

  1. Agent-written escape rate above human in the same tier. Review for that tier is too shallow. Find the most common escaped defect type and make it a required check.
  2. Review minutes per 100 lines falling as agent volume rises. Reviewers are skimming. Cap the size of agent-written PRs.
  3. Any tier 3 escape. Check whether that PR had two reviewers and a code owner, as the tier requires.

Escaped defects also feed your change failure rate, so the log doubles as the quality half of an AI adoption scorecard.

What this does not replace

The checklist is for the person reading the diff. It does not replace automated tests, a static analysis or dependency scanner in CI, or a security review for systems that need one.

Frequently Asked Questions

What should a code review checklist for AI-generated code include?+

Scope (the diff matches the spec), tests that fail without the change, checks that new packages exist and are the intended ones, security checks on inputs, authorisation and secrets, review of agent configuration files, and a named person who can explain every line. The 24 checks on this page are grouped that way.

Can an AI code reviewer approve a pull request?+

On GitHub, Copilot's review is a "Comment" by default and does not count toward required approvals, though it can be configured to approve. Keep the required approval with a person and use AI review as a first pass.

Where does a pull request template go on GitHub?+

In a file named pull_request_template.md in the repository root, in docs/ or in .github/. It applies once merged into the default branch. Several templates go in a PULL_REQUEST_TEMPLATE/ folder.

How do we know if agent-written code is causing more bugs?+

Log each merged PR with its author type and count the bugs traced back to it after merge. Compare the escape rate of agent-written and human PRs within the same risk tier. The workbook does the calculation.

Should agent-written PRs be smaller?+

If review minutes per 100 lines fall as agent PR volume grows, yes. Large diffs get skimmed. Set a size limit for agent-written PRs in tiers 2 and 3.

AI Code Review Checklist and Review Log (Google Sheets)

The 24 checks and three risk tiers from this post, plus a review log that calculates escape rate for agent-written and human PRs.

Enter your email to download it. You will also get System Prompt every other week: one practical artifact plus a few notes on what is working.

No spam. Unsubscribe any time.

More product management guides, templates and frameworks.