AI Coding at Scale: Building Code Verification and Review Pipelines

    When AI becomes the primary author instead of the reviewer, the classic "open a PR, get line-by-line review, merge" loop starts to break down. This article looks at what one technical team actually built when roughly 90% of their code was written and self-reviewed by AI, daily merges grew about 12x in a few months, and the share of changes that had to be rolled back dropped by more than 40%. It covers moving verification ahead of the pull request, giving agents an environment they can actually execute code in, adding an independent grader that checks output against explicit criteria, packaging verification as a reusable skill inside the repo, and the decisions that still have to stay with humans.

    When the main author of the code stops being human

    What happens to the familiar workflow — open a PR, have colleagues read it line by line, approve, merge — once the primary author of the code is an AI agent rather than a human engineer? This is no longer hypothetical. Plenty of engineering teams are living through the transition right now.

    Consider a concrete scenario. In one team’s AI coding setup, roughly 90% of the code is written and self-reviewed by AI. Across their monorepo, daily merges grew from about 2,500 to more than 30,000 over a few months — roughly a 12x increase. Intuition says a spike like that in code throughput means quality is about to fall apart. The actual data says the opposite: even as the number of merged PRs doubled, the proportion of changes that had to be rolled back fell by more than 40%.

    That raises an engineering question worth digging into. What kind of verification and review mechanism did they build that kept quality intact while AI produced code in bulk? And which parts of the process still, today, have to be backed by a human?

    1. The core call: verify before the PR, not after it

    In the traditional workflow, code quality is protected mainly by post-hoc review — the code gets written, moves into the PR stage, and a reviewer reads it line by line and leaves comments. Under high-speed AI code generation, that post-hoc review becomes the bottleneck. Review speed cannot keep up with generation speed, and no human can read every line of a change volume that large.

    So one key engineering decision follows: most quality checks should happen before code is committed, not after the PR exists. Getting high-quality output from AI takes more than carefully tuned prompts — you have to give it an executable, feedback-generating path to verification.

    The difference is easy to frame:

    • No verification loop. The AI finishes writing and has no way to prove itself correct, so engineers fall back to manual inspection of every change. At that point one person can effectively supervise only one or two agents, and throughput is capped by nature.
    • A trustworthy automated check. The AI can run tests, builds, and smoke checks before submitting, find problems, and fix them on its own. The engineer’s job shifts from reading code line by line to setting objectives and reviewing results — which is what makes it possible to drive dozens, even hundreds, of agents in parallel.

    This is also why a closed verification loop is such an effective lever for quality: letting an agent verify its own output beats repeatedly tuning the prompt. Prompt tuning improves linearly and hits diminishing returns. A verification loop supplies an unambiguous right/wrong signal that lets the agent iterate to convergence on its own.

    2. Give the agent a pair of hands that can actually run

    Verification presupposes that the agent has an environment it can genuinely execute in. Put differently, the point is not to tell it “you should get this right” but to let it actually run the code and see what happens.

    In engineering practice, “executable verification” is one of the single most important things for getting good results. Some practitioners estimate that wiring an agent up with a way to verify its own work raises final output quality by roughly two to three times. Worth stressing: numbers like “two to three times” are anecdotal, experience-based judgments, not rigorously measured results across all software tasks — the payoff varies widely by task and shouldn’t be treated as a universal benchmark.

    The concrete form of verification depends on the domain. Common ones include:

    • Running a build or compile command to confirm the code compiles.
    • Running a unit or integration test suite to confirm the logic is correct.
    • Clicking through the app in a real runtime — a browser, a phone emulator — to validate interactive behavior.
    • Running static checks (type checking, lint, formatting) to enforce style and conventions.

    How rich the range of verification methods is directly determines how broad a set of tasks the agent can cover. The closer a task sits to having an unambiguous right/wrong signal (structured data generation, API implementation, and so on), the more obvious the payoff.

    3. An independent grader that checks against a rubric

    Beyond letting agents run and test their own work, a more rigorous approach adds an independent grading step: a separate reviewer role checks the output against a predefined set of criteria, instead of having the same entity both write the code and decide whether it’s right.

    In internal testing on structured file generation, this “independent grader checks against a rubric” approach improved task success rates by up to about 10 percentage points compared with an ordinary prompt loop — with the biggest gains on the hardest problems.

    Why does independent grading work? It comes down to separating responsibilities:

    1. It avoids self-confirmation bias. A single model acting as both athlete and referee tends to overlook its own mistakes. An independent rubric supplies an external reference frame.
    2. It makes the standard explicit. Writing down what counts as acceptable turns a vague “is this good?” into checkable items that can be verified one by one.
    3. It pays off most on hard cases. The more complex and error-prone the scenario, the more valuable an objective standard is — it catches low-quality output precisely where it matters.

    4. Package verification as a reusable skill

    For verification to become the norm rather than a verbal convention, it has to be captured as a reusable in-repo asset. A common practice: write verification procedures — how to start the app, how to run a smoke check — into a verify skill document, place it in an agreed skills directory (for example, a dedicated directory in the repo for agent skills), keep it close to the relevant code so agents can discover it locally and invoke it on demand. Before submitting any change, the agent should trigger this procedure automatically.

    A sketch of what such a skill definition might look like (illustrative structure only, not a specific product interface):

    1. # Skill: verify
    2. ## When to use
    3. Before submitting any code change.
    4. ## How to verify
    5. 1. Install dependencies and run the build; confirm there are no compile errors
    6. 2. Run the test suite; confirm everything passes
    7. 3. Start the app and run a smoke check; confirm core paths work
    8. 4. Run static checks (types/lint); confirm the code meets conventions
    9. ## Smoke check checklist
    10. - [ ] Service starts normally and listens on its port
    11. - [ ] Key endpoints return the expected responses
    12. - [ ] Core pages/flows can be completed end to end

    A companion verification script looks roughly like this:

    1. #!/usr/bin/env bash
    2. set -euo pipefail
    3. echo "[verify] Building..."
    4. # build_command
    5. echo "[verify] Running unit tests..."
    6. # test_command
    7. echo "[verify] Running static checks..."
    8. # lint_command
    9. echo "[verify] Running smoke checks..."
    10. # smoke_test_command
    11. echo "[verify] All checks passed"

    Hard-coding verification into a reusable skill pays off three ways. First, consistency: every agent and every submission runs the same standard. Second, maintainability: when verification logic changes, you edit it in one place. Third, discoverability: a newly onboarded agent can find and call the skill on its own, with no human having to walk it through the steps.

    5. What still has to be backed by a human

    However much a verification pipeline lifts quality and throughput, it is not a cure-all. The following still require a human engineer to own the final call:

    • Defining the goal and the boundaries. AI implements clearly stated tasks efficiently, but “should this requirement be built at all, and where are its boundaries” is still a human decision. When the goal is fuzzy, even the strongest verification only confirms that a task was completed correctly against the wrong objective.
    • The correctness of the verification standards themselves. A verification pipeline can guarantee “meets the standard”; it cannot guarantee “the standard is right.” If the rubric, the test cases, or the smoke checklist have blind spots, the AI’s self-certification silently breaks. Designing and maintaining those standards is a human job.
    • Adjudicating high-risk changes. Changes touching data migration, permissions, security, or live traffic paths should keep a mandatory human review gate rather than being released on automated checks alone.
    • Cross-system design intent and trade-offs. Architectural trade-offs, long-term maintainability, and team conventions are largely tacit knowledge that resists being fully encoded as verification items, and they need human judgment.

    A pragmatic division of labor: hand “is it correct?” to the verification pipeline, and keep “should we, is it worth it, where do we go next?” with people. Let AI self-certify quality and parallelize within clear standards, while humans gate the critical points.

    Conclusion

    Scaling AI coding is not fundamentally about making AI write more code. It is about pushing quality constraints upstream through an engineered verification pipeline. Four points capture the core of it: verify before the PR rather than after; give agents executable paths to verification; use an independent grader that checks output against explicit criteria; and package verification as a reusable skill. On that foundation — with humans stepping back to goal definition, standard maintenance, and high-risk adjudication — teams can genuinely gain speed without losing control.