AI-Generated Code Quality: How to Keep Standards High When Models Write 90% of the Code

    When AI coding tools produce the bulk of the code, code review has to be redesigned around two layers: verification that runs before submission and review based on independent scoring. This article breaks down how one engineering team scaled parallel agents while reducing rollbacks, how to build verification skills that are fast and reliable, how to structure review standards and role separation, and which decisions must remain with humans. It also includes a reusable checklist for setting up an AI coding quality system.

    1. The Problem: When Models Become the Main Producers, the Review Model Must Change

    Traditional software collaboration follows a clear serial chain: a developer opens a merge request, a colleague reads it line by line, and once the review is approved, the change is merged. This chain assumes one thing — code is produced far more slowly than humans can read it, so manual review never becomes the bottleneck.

    That assumption collapses as soon as an AI coding tool becomes the primary producer. A publicly shared engineering practice from a leading AI research team offers an extreme example: about 90% of the code in its AI coding tool team is written and self-reviewed by models. In the centralized code repository, the number of daily merges grew from roughly 2,500 to more than 30,000 within four months — an increase of about 12x.

    Intuition suggests that a tenfold-plus increase in output should send defect rates out of control. The public data shows the opposite: over the same period in which merge requests more than doubled, the share of changes that had to be rolled back dropped by more than 40%.

    That contrast is the core issue of this article. It shows that quality did not come from “humans reading more,” but from moving the verification point earlier and automating the checks. The rest of this article breaks the system into two layers — verification and review — explains how each is designed, and identifies which parts still have to be handled by people.

    2. The Core Principle: Most of the Review Work Should Happen Before Submission

    The team’s first design principle is that most quality gating does not happen after a merge request is created; it is already done before the code is submitted.

    This principle directly determines the return on effort. If quality depends on manual review after the fact, there is a hard ceiling on how many agents an engineer can watch at once — usually one or two, because the cost of checking every output falls on a person. Once trusted automated checks exist, running dozens or even hundreds of agents in parallel becomes a viable option.

    There is an easily overlooked causal link here: a verification loop improves quality not only because it “finds more defects,” but because it changes scalability. Giving agents the ability to verify their own output pays off far more than repeatedly tuning prompt wording — the latter can only make local improvements within a single generation, while the former turns quality constraints into objective standards that can be executed repeatedly.

    The team’s lead for the AI coding tool puts it this way: giving a model a way to verify its own results is probably the single most important thing for getting good outcomes, and he personally estimates it can improve final results by 2–3x. To be clear, this is a personal, experience-based estimate, not a universal conclusion measured across all software tasks.

    Internal testing offers more quantifiable supporting evidence: on tasks such as structured file generation, adding an independent scoring role that checks model output against a defined rubric improved task success rates by up to about 10 percentage points compared with a standard prompt loop, with the largest gains on the hardest problem sets. The explanation is that failures on hard problems are often not “couldn’t write it” but “wrote it wrong and couldn’t tell,” and independent scoring fills exactly that blind spot in self-judgment.

    3. Verification Layer: Give Agents Hands That Can Actually Run

    Prompts cannot replace execution. The concrete form of verification capability varies by domain, but the essence is always an action that can run automatically and produce a determinable result:

    • Run a build or script command to confirm the artifact can be produced;
    • Run unit and integration test suites to confirm behavior has not regressed;
    • Click through key paths in a browser or mobile simulator to confirm end-to-end usability;
    • Run schema validation and field-level comparison on structured artifacts.

    In practice, the team captured “how to start the application and how to run a smoke check” as a reusable verification skill, stored in a conventional directory inside the repository and placed as close as possible to the code being verified, so the model calls it automatically before submitting changes. This “keep it nearby” approach is not a style preference; it lowers the cost of discovery — a skill in the same repository and directory as the code has the shortest retrieval path and the highest reuse rate.

    Verification skills themselves also need to be verified. They must meet two hard requirements: fast and stable. If a verification run takes ten minutes, the agent cannot iterate at high frequency; if verification fails intermittently, the model receives noisy signals and makes wrong corrections. So the team continuously iterates and stress-tests verification scripts to push the false-positive rate into an acceptable range. A common practice is to add timeouts and retry limits to verification, and to distinguish “environment failures” from “assertion failures,” so infrastructure flakiness is not mistaken for a code defect.

    A sample skill description structure is shown below (format illustration only, not a specific platform interface):

    1. ---
    2. name: verify
    3. description: Start the service and run a smoke check for pre-submission self-verification
    4. ---
    5. # Steps
    6. 1. Install dependencies and build
    7. 2. Start the service in the background and wait for the health check to pass
    8. 3. Call core endpoints and assert status codes and key fields
    9. 4. Output a structured result: pass / fail + failure reason
    10. # Constraints
    11. - Total timeout 120s; environment errors are marked infra_error and do not count as code failures

    4. Review Layer: Independent Scoring, Standards First, and Separation of Duties

    Verification answers “can it run”; review answers “should it be written this way.” The key to the latter is turning subjective judgment into checkable items.

    First, standards before generation. The scoring rubric must be written before generation and cover dimensions such as correctness, edge-case handling, readability, and test completeness, using decidable descriptions rather than adjectives. When standards are vague, the scoring role degrades into an expression of style preference.

    Second, role separation. The generator and the scorer should not share the same context. The value of independent scoring is that it does not inherit the generation process’s self-narrative; it faces only the final artifact and the standard — which matches the earlier finding that gains are largest on hard problems.

    Third, tiered review. Not every change needs the same level of scrutiny. Changes can be routed by blast radius: small, local edits can be released on automated verification alone; changes touching public interfaces, data migrations, permissions, or billing — high-risk areas — must go through human review.

    Fourth, a failure loop. Rollback data is the most honest feedback source. Attribute each rollback to a specific dimension (misunderstood requirements, missed edge cases, missing verification, uncovered by the standard), then feed that back into verification skills and scoring items to form a continuously converging loop. The 40% drop in rollback rate comes essentially from the cumulative effect of this loop, not from any single mechanism going live.

    5. Where Humans Must Stay in the Loop

    No matter how high automated coverage gets, four kinds of work must be done by people:

    1. Defining goals and trade-offs. What to build, what not to build, and which metric to sacrifice first are business judgments.
    2. Assessing cross-system impact. A model’s visibility is usually limited to the current repository context; cross-team contracts and long-term evolution costs need human judgment.
    3. Auditing the verification standards themselves. Someone has to ensure tests really cover critical paths and that scoring items have no systematic bias.
    4. Final adjudication of anomalies and low-confidence cases. When verification signals conflict, human judgment is the last gate.

    6. A Reusable Implementation Checklist

    • Build verification first, then scale parallelism: teams without trusted automated checks should not blindly increase agent concurrency.
    • Treat verification as a repository asset: store it nearby, version it, and review it alongside the code.
    • Set performance and stability budgets for verification, and distinguish environment failures from assertion failures.
    • Produce scoring standards before generation, and make them itemized and decidable.
    • Isolate generation and scoring contexts, and prioritize independent scoring for hard problems.
    • Route review intensity by risk level, and keep a human sign-off for high-risk areas.
    • Drive continuous improvement by attributing rollbacks and patching blind spots in verification and standards.

    7. Conclusion

    High throughput and high defect rates are not necessarily bound together. When the producer becomes a model, the focus of quality assurance shifts from “read more” to “verify earlier and verify more accurately”: move executable verification ahead of submission, turn subjective review into independent scoring, and concentrate human effort on defining goals and adjudicating high-risk cases. In environments supported by infrastructure such as a general-purpose container platform, logging services, and monitoring and alerting, this combination of “verification first + tiered review + human backstop” can serve as a general reference path for building an AI coding quality system.