A battle-tested checklist for reviewing AI-generated PRs, organized by priority. Every item caught a real bug in a real codebase. Print it, pin it, use it.
I've reviewed over 500 AI-assisted PRs in the past year. Every team I've worked with asked for the same thing: a concrete checklist they can pin to their monitors and use during code review. This is that checklist.
It's not theoretical. Every item on this list caught a real bug or quality issue in a real codebase. I've organized it by category and priority, so you can adapt it to your team's specific needs.
Don't try to check every item on every PR. That defeats the purpose. Instead:
Always check the Critical items (they catch the highest-impact bugs)
Check Architecture items when the PR adds new files or patterns
Check Performance items when the PR touches data fetching, loops, or database queries
Check Testing items when the PR includes test files
Time target: 10-15 minutes per PR using this checklist. The AI code quality guide places review alongside prompting, automated checks and runtime monitoring.
Figure 1. Run the critical checks and select the additional checks that the changed behavior needs.
## Critical Security & Correctness- [ ] No hardcoded secrets, API keys, or credentials- [ ] Authentication check present on all protected endpoints- [ ] Authorization check present (not just authentication)- [ ] User input validated and sanitized before use- [ ] No SQL/NoSQL injection vectors (parameterized queries only)- [ ] Error responses don't leak internal details (stack traces, DB schema)- [ ] Sensitive data not logged (passwords, tokens, PII)
These seven items catch the most dangerous AI mistakes. AI regularly generates code that skips auth checks, logs sensitive data, or uses string interpolation in database queries. I've seen each of these in production codebases.
Example catch: AI generated an API endpoint that checked if the user was logged in but didn't check if they had permission to access the specific resource. Classic IDOR vulnerability. Resource-level authorization checks the caller’s permission for the invoice being requested.[1]
Figure 2. An authenticated caller still needs permission for the particular resource.
# Architecture (Check When Adding New Files/Patterns)
markdown
## Architecture & Patterns- [ ] Follows existing project error handling pattern- [ ] Uses established data access layer (not direct DB calls in routes)- [ ] Imports use project aliases (@/) not deep relative paths- [ ] No new dependencies added without team approval- [ ] File placed in correct directory per project structure- [ ] No duplicate logic (search codebase for similar functions)- [ ] Follows existing naming conventions (files, variables, functions)- [ ] Uses existing shared utilities instead of reimplementing
The "no duplicate logic" check is crucial. An assistant can miss formatCurrency() in your utils folder when it retrieves incomplete repository context. Search for an existing helper before accepting another implementation. I once found 11 implementations of email validation in a single codebase, each slightly different.[2]
## Test Quality- [ ] Tests verify behavior, not implementation details- [ ] Edge cases from above have corresponding tests- [ ] Error/failure paths tested (not just happy path)- [ ] Mocks are minimal (only external dependencies mocked)- [ ] Assertions are specific (not just "toBeDefined")- [ ] Test descriptions clearly state expected behavior- [ ] No tests that mirror the implementation logic
Automate what you can. The CI/CD quality gate guide develops that part of the workflow. Project-specific static rules can detect selected code patterns. ESLint and Semgrep rules need tests, and their coverage depends on the syntax and data flow they inspect. Save human review time for the things that require judgment.[5]
Assign an "AI quality reviewer" each sprint. This person does a deep review of all AI-assisted PRs using the full checklist. Other reviewers use the quick-reference card. The AI review process guide covers how to divide the work between reviewers.
I originally made this checklist 30 items long. Nobody used it because it took too long. The version above is the result of cutting it down to the items that actually caught bugs. Every item I removed was either too rare to justify the review time or better caught by automated tooling.
The lesson: a checklist that gets used at 80% thoroughness beats a perfect checklist that gets skipped.
Start with the Critical section and record the issues it catches in your own review process. Add sections as the habit builds.
In MachGTM, which I build, reviewing a generated research brief raises an evidence question that also applies to AI-assisted code. The research-quality account describes defining the expected facts independently, retaining their supporting passages, and recording missing findings separately from unsupported claims. For a pull request, declare the required behaviours and failure cases before reading the generated tests, then keep the observed results and unresolved cases with the review.
Frequently asked questions
Should every pull request use the whole checklist?
Start with the critical security and correctness checks on each change. Add architecture checks for new patterns, performance checks for data access and testing checks for changed behavior. A focused review is easier to repeat than a checklist applied mechanically.
Why is authentication insufficient for an invoice endpoint?
Authentication identifies the caller. The endpoint must also verify that this caller can access the particular invoice. Scope the data lookup or apply an equivalent resource-level permission check before returning the record.
Does Prisma include always execute one SQL query?
The relation load strategy affects the SQL Prisma sends. A nested read can use multiple SQL queries while avoiding a separate query for every user. Inspect query behavior in the version and configuration your project actually uses.
Which checklist items can be automated?
Linters, security scans, dependency checks and project-specific static rules can cover repeatable patterns. They need tests and suitable scope. Business requirements, unusual failure paths and the wider effect of a change still need an engineer’s review.
Five predictions for where code intelligence is heading by 2028, based on 6 years of building tools in this space. Includes what's real, what's overhyped, and a maturity model for planning.
Build software composition analysis into CI with dependency inventories, vulnerability checks and licence review. Define owners, response targets and follow-up.
Apply developer documentation best practices with ADRs, comments and tested examples. Use the WRITE system to keep changes reviewable and find stale guidance.
Code review designed for human-written code catches only 47% of AI code issues. Here's the 3-layer review stack built for an AI-first world with measurable results.
A blanket ban on AI coding tools is as reckless as uncontrolled adoption. The RAPID decision framework helps engineering leaders choose the right control tier.
Most AI code quality advice fails in regulated industries. After consulting for fintech, healthtech, and automotive, here's the framework that passed 11 regulatory audits.