PreviewYou're previewing CTO AI Forge. Sign in to use it.Sign in
← All lessons
L4 · Agentic engineering: agents in CI/CD, guardrails, quality and security9 min read

Code quality at AI speed: how much human review is enough?

When AI writes a growing share of code, the question shifts from "should humans review AI code?" to "which changes need how much human review?" Reviewing everything deeply doesn't scale; reviewing nothing is reckless.

Signals that quality is slipping

  • Duplication rising, refactoring falling. GitClear's analysis of 211 million changed lines found copy-pasted lines rising from 8.3% to 12.3% between 2020 and 2024 and refactoring falling from 25% of changed lines in 2021 to under 10% in 2024.
  • Bigger PRs. DX reported median PR size nearly doubling from 44 to 72 lines in the year to June 2026.
  • Rising change-failure rate or rework as the AI-authored share grows.

A risk-tiered review model

TierExamplesReview
LowTests, docs, internal tooling, mechanical migrations with strong test coverageAutomated checks + light human review
MediumFeature code in well-tested servicesStandard peer review; AI first-pass review allowed
HighAuth, payments, crypto, data migrations, infrastructure-as-code, public APIs, safety-critical pathsQualified human reviewer, security review, no auto-merge

Tiers are decided by what the code touches, not by who or what wrote it — but AI-authored changes in high tiers deserve explicit attention because reviewers may assume they are routine.

Keeping reviewers effective

  • Cap PR size; ask agents to split work.
  • Require the author (human or agent) to explain why the change is correct, with test evidence.
  • Rotate reviewers and protect review time in planning.
  • Track review time and defects found in review per period.

Code health practices

Schedule refactoring, enforce duplication and complexity checks in CI, and keep architecture decision records so agents and humans follow the same patterns.

What this means for the CTO

Set a written review policy by risk tier and apply it to all code. This is one of the six decisions in this hub because it trades speed against risk directly, and because the right answer changes as your tests and gates mature.

Watch the quality signals every period. If duplication, PR size or change-failure rate climbs, tighten tiers; if they stay healthy with strong tests, you can safely lighten review on low-risk work.

Write the tiers into CODEOWNERS and branch protection so they are enforced automatically, and tell engineers the reasoning, so the policy feels like engineering judgment rather than bureaucracy.

Real example

GitClear's 2025 research analysed 211 million changed lines from repositories including those owned by Google, Microsoft and Meta (2020–2024) and found copy-pasted lines rising from 8.3% to 12.3% of changes and lines classified as refactoring falling from 25% in 2021 to under 10% in 2024. Source: GitClear — AI Copilot Code Quality: 2025 research ↗

Use it

Quick check · 3 questions

  1. 1.What should decide a change's review tier?

  2. 2.Which signal suggests code health is slipping?

  3. 3.What should an author (human or agent) provide with a change?

0 of 3 answered

Sources

Last reviewed 2026-10-01.