A 700-line AI-generated PR looks clean, compiles, and passes lint — and still ships a hallucinated prop, a missing error state, and a div posing as a button. Reviewing generated frontend code is a different skill from reviewing human code, and it needs its own checklist.
Tier: Core · Workflow area: Testing & quality
This playbook gives you a provenance-aware review protocol: a fixed sequence of frontend-specific checks that target where generators actually fail, plus a way to use a second AI as a reader without letting it approve anything.
Skip it for trivial generated diffs (a story file, a copy change) where ordinary review suffices.
Read the prompt before the diff. If the PR description includes the task given to the agent, read it first and ask: what would a model plausibly get wrong here? Missing constraints in the prompt (no a11y mention, no design-system mention) predict the defect classes you should hunt hardest.
Run the six-lane frontend checklist, one lane at a time. Do not interleave — each lane is a separate pass over the diff:
variant="subtle", onDismiss) on real components; typecheck catches some, but untyped props, string unions widened to string, and spread props slip through.#, px, rgb(, style={{. Every hit either maps to a token or gets flagged.<button>/<a>, inputs have labels, focus order follows the visual order, icons have accessible names, custom widgets follow an APG pattern rather than a click-handler-on-div.package.json, duplicate utility libraries, a chart library imported for one sparkline. Check the CI bundle diff if you have one.Deploy a second reader, scoped and adversarial. Paste the diff into a different assistant than the one that wrote it:
You are reviewing a PR written by another AI. Do not summarize it.
Find only: (1) props or APIs that may not exist on the imported
components, (2) missing loading/error/empty states, (3) accessibility
violations, (4) hardcoded style values. Cite file and line for each.
Say "none found" per category if clean.
Treat its output as leads to verify, never as findings to forward.
Exercise one unhappy path by hand. Pull the branch, run the app, and break something: kill the network mid-fetch, submit the form empty, tab through the new screen with the keyboard. Five minutes of hostile usage catches what diff-reading cannot.
Write findings by defect class. Comment with the lane name ("hallucinated prop", "missing error state") so the team accumulates a shared vocabulary — and so instruction files (see the constraints playbooks) can be updated to prevent the class, not just the instance.
Generated frontend code fails in predictable classes — invented props, absent error states, div-buttons, off-token styles, effect-driven re-renders, silent weight. Review by lane, verify one unhappy path live, and feed every finding back into the generation instructions.
When client code cannot leave the tenant, the second-reader step changes; the human protocol does not.
Never paste a client's proprietary diff into a public chat tool to "get a quick second opinion." A provenance review that violates the NDA is a worse outcome than any UI defect it might catch.