Developers now merge code they did not write, reviewed by attention that AI-speed volume has already exhausted. QA's newest job is validating AI-authored dev code as a first-class function: risk-ranked review that asserts behavior rather than style, and targeted test generation aimed at the hotspots where AI code historically breaks.
Tier: Core · Workflow area: Quality leadership & governance
This playbook gives QA a repeatable protocol for the PR streams AI is now producing: triage by risk, review against an AI-specific defect checklist, and answer weak spots with tests — because the scalable response to suspicious code is not longer arguments, it is a failing test.
Dev teams use Copilot/Claude/Cursor heavily and PR throughput has visibly jumped. Defect escapes are rising in AI-heavy areas, or reviews have become rubber stamps. Leadership asks what QA's role is "now that AI writes the code" — this playbook is the concrete answer. A high-risk change (payments, auth, data migration) arrives largely AI-authored.
The org barely uses AI codegen — standard review practice covers it. You would be duplicating a strong existing review culture on low-risk code — target the gaps, not every PR; QA validating all AI code line-by-line does not scale and should not try.
Triage incoming AI-heavy PRs by risk, not by order. A two-minute score per PR: touches money, auth, PII, or data migration (+3 each); modifies error handling or concurrency (+2); >400 changed lines (+2); area with weak test coverage (+2); pure refactor with strong existing tests (−2). QA deep-validates the top of the list; the rest get the checklist pass only. Publishing the scoring rule matters more than the exact weights — it makes QA's attention allocation legible and negotiable.
Review against the AI-specific defect checklist. AI code fails differently from human code — plausible, confident, and wrong at the seams. The checklist encodes the known hotspots:
Interrogate the tests that came with the PR. AI PRs arrive with AI tests, and generated tests systematically flatter generated code — they assert what the code does, not what it should do. Check for tautological asserts, mocks of the very behavior under test, and missing negative cases. Then let mutation testing arbitrate on the high-risk paths:
npx stryker run --mutate "src/billing/**"
Mutation score src/billing: 41% (23/56 mutants killed)
Survived: boundary-condition mutants in proration.ts (7),
error-path mutants in refund.ts (9)
A 41% score on new billing code converts "these tests look thin" from an opinion into a number a PR conversation can act on.
Answer weak spots with targeted tests, not commentary. For each surviving-mutant cluster or checklist finding, write (or generate-and-review) the test that pins the correct behavior:
Prompt to your coding agent:
Write pytest cases for proration.calculate() covering: month-end
anchor dates (Jan 31 -> Feb), zero-day proration, negative line
items, and the documented rounding rule (banker's rounding per
ADR-114). Assert exact expected values computed independently
from the spec — do not derive expectations by calling the
function under test.
That last constraint is the anti-flattery clause: expectations must come from the spec, or the test enshrines the bug. Review the generated tests against the same checklist — turtles all the way down, gates at every layer.
Verify behavior parity on AI refactors. For "no functional change" PRs, run the old and new implementations against the same input corpus (golden inputs from production traces where possible) and diff outputs. Any divergence is either a bug or an undocumented improvement — both need a human decision recorded in the PR.
Feed findings back as prevention. Escapes and review catches aggregate into two artifacts: an updated checklist (new hotspot classes earn a bullet) and prompt guidance for dev teams ("always specify rounding rules and boundary behavior in codegen prompts"). QA reviewing AI code without feeding patterns back is a filter; with the loop closed it is a control system.
Assert behavior, not style. The moment QA's review comments are about naming and formatting, the function has failed — dev reviewers own idiom; QA owns "this breaks on February 29th and here is the failing test."
AI moved the bottleneck from writing code to validating it — which relocates the bottleneck directly into QA's core competency. The teams that treat AI-code validation as a designed function, with triage rules and mutation evidence, are the ones for whom the codegen boom is a promotion rather than a flood.