Business

AI Can Write the Code. Can Your Team Verify It?

Or in other words “AI Makes Coding Faster. Code Review Is the New Bottleneck.”
AI coding tools are changing the economics of software development. Engineers can now generate features, refactor large codebases, and ship changes faster than ever. But there is a catch: writing code is getting cheaper, while verifying that it is correct, secure, and safe to deploy remains expensive.

That creates a new engineering bottleneck. If AI doubles the amount of code your team produces but your review process cannot keep up, you haven’t doubled engineering productivity. You’ve created a bigger queue of unverified changes.

Anthropic’s approach to code review offers a useful lesson: optimize for minimum human review time without increasing reverts, production incidents, or security risks. The goal isn’t to eliminate code review. It’s to stop spending expensive human attention on work machines can do reliably.

For engineering leaders, this requires rethinking code review as a system, not simply adding an AI reviewer to GitHub.

Stop treating every pull request the same

A documentation change and a change to authentication should not go through the same review process. Yet many teams apply essentially the same rules to both, requiring human approvals regardless of risk while relying on reviewers to catch everything from formatting mistakes to subtle security vulnerabilities.

AI makes this model increasingly inefficient.

A better approach is to move routine verification into automated workflows and reserve human attention for decisions that require context, experience, and accountability. That means distinguishing between three categories of work:

  • Machines are good at: Running tests, checking types, detecting common defects, enforcing conventions, and identifying suspicious code patterns.
  • AI can help with: Understanding repository context, reviewing business logic, finding edge cases, and explaining potential regressions.
  • Humans remain accountable for: Architecture, security boundaries, product intent, high-impact changes, and decisions where the consequences of failure are significant.

The distinction matters. AI-generated approval is not proof that code works, and asking another AI agent to review a change does not automatically create an independent review. The process needs deterministic checks, different review contexts, explicit risk rules, and measurable outcomes.

A seven-layer system for AI-native code review

Here is a practical architecture for implementing this approach.
It works with Cursor, Gemini, Claude, or other coding models; the workflow matters more than the vendor.

1. Verify before opening the PR

The coding agent should run relevant tests, builds, linters, and type checks before submitting a pull request. Then, a separate agent or fresh model context should inspect the final diff, looking for missing edge cases, unintended changes, and inadequate tests.

The principle is simple: don’t make a human reviewer discover problems that automation could have caught before the PR was opened.

2. Review the repository, not just the diff

A useful AI reviewer needs to understand the intended change, relevant code paths, architecture, and existing conventions. Reviewing isolated changed lines misses important bugs that only become visible in the context of the larger system.

Have the reviewer report actionable findings with severity and supporting evidence. A second pass can validate those findings, helping filter false positives before they reach the developer.

Keep the bar high: a short list of credible issues is more useful than dozens of speculative comments.

3. Give security its own gate

Security cannot be an afterthought or just another checkbox in a general code review.

Run dedicated checks for authorization failures, insecure handling of secrets, injection vulnerabilities, unsafe dependencies, and other relevant threats. Changes to authentication, tenant isolation, customer data, identity, and security controls deserve heightened scrutiny.

For security-sensitive products, unresolved critical findings—and high-severity findings under the team’s policy—should block merging unless an explicitly authorized exception is documented.

4. Keep deterministic CI mandatory

AI review complements traditional engineering controls; it does not replace them.

Every PR should pass the applicable automated checks: linting, type checks, unit and integration tests, API contracts, production builds, and dependency and secret scanning. Run broader tests when the change warrants them.

These checks should be fast enough to support frequent iteration, but no AI agent should be able to override a failed required check simply because it believes the code is correct.

5. Make human approval proportional to risk

Introduce a risk classification that determines the required review path.

RiskExamplesProposed human approval
LowDocumentation, isolated UI changes, low-impact refactoring0, where policy permits
MediumBusiness logic, APIs, standard feature work1
HighAuthentication, authorization, sensitive data, security controls, risky migrations2 (or more)

These are starting rules, not universal thresholds. Repository owners must define protected areas and mandatory approvals, and an automated classifier must never override those policies.
The important change is that low-risk work can move quickly without weakening safeguards for high-risk work.
A small diff is not necessarily a low-risk diff.

6. Merge safely and release gradually

Passing CI and code review doesn’t guarantee that a change integrates correctly with the latest version of the application. A merge queue or equivalent mechanism should validate changes against the current target branch.
Where practical, deploy behind feature flags, test internally, and roll out progressively. Separate deployment from activation so a feature can be disabled without requiring a new code change.

For significant changes, define success metrics and failure thresholds before rollout.

7. Design for fast detection and rollback

No review system catches every defect.
A good engineering organization assumes that some failures will reach production and limits the damage they can cause. Changes need clear ownership, useful observability, and a fast rollback or disablement path. On-call engineers should be able to identify the responsible release and recover quickly. This is especially important as AI increases the volume of changes moving through the system. Faster code production without faster detection and recovery is an incomplete productivity strategy.

Measure outcomes, not AI activity

It is easy to measure the number of AI reviews completed or comments generated. Those metrics tell you very little about whether your engineering process improved.

Instead, track five outcomes:

  • Human review time: Median and 95th-percentile time spent reviewing each PR.
  • Delivery speed: Time from PR creation to merge and from merge to production.
  • Code quality: Reverts, escaped defects, and production incidents.
  • Security: Vulnerabilities introduced, time to detection, and unresolved findings at merge.
  • AI effectiveness: Actionable findings, false-positive rate, missed defects, and review rounds per PR.

Establish a baseline before introducing the new workflow.
Then run a controlled pilot and compare the results. If review time falls but incidents increase, the system has failed. If the number of AI comments rises without reducing defects or human effort, the system has also failed.
The objective is better engineering outcomes, not more automation for its own sake.

What R&D leaders should do next

  • Start with one repository.
    Establish baseline metrics and pilot the workflow before rolling it out organization-wide.
  • Automate repetitive review feedback.
    Convert recurring comments into tests, linters, static-analysis rules, or coding-agent instructions.
  • Define risk tiers.
    Specify which changes can use a fast path and which always require human or security approval.
  • Use models pragmatically.
    Evaluate Cursor, Gemini, and other tools against the same representative set of defects; avoid making the process dependent on a single vendor.
  • Keep changes small and reversible.
    Small PRs, feature flags, merge queues, and rollback mechanisms reduce the cost of mistakes.
  • Turn failures into better guardrails.
    Every meaningful regression should inform a test, a deterministic check, or an improvement to the review process.
  • Review the results regularly.
    Expand automation only when the data shows that speed is improving without compromising quality or security.

The real shift

AI coding tools are changing the economics of writing software, but they don’t eliminate the need to establish that software is safe to ship. They make that responsibility more important.

The next step isn’t to add an AI reviewer and hope for the best. It’s to build a verification pipeline in which deterministic tools catch predictable problems, AI handles context-heavy analysis, humans focus on consequential decisions, and production systems are designed to recover quickly.

The winning engineering team won’t necessarily be the one that generates the most code.
It will be the one that can verify and safely ship the most valuable code, with the least wasted human effort.


Discover more from Ido Green

Subscribe to get the latest posts sent to your email.

Standard

Leave a Reply