Skip to content
Try CosmosBook demo
Back to Guides

Quality Gates in Software Development: Manufacturing QA for an Agent-Run SDLC

Aug 21, 2026
Molisha Shah
Molisha Shah
Quality Gates in Software Development: Manufacturing QA for an Agent-Run SDLC

Quality gates belong at every station of an agent-run production line, not only at the merge point, because a station-level admission decision stops a defect where it appears while generation is cheap and verification is the constraint.

TL;DR

Agent-authored change arrives at volumes merge-point review was never sized for, so defects surface after the cheapest moment to catch them has passed. This guide assigns named owners and prices each gate's cycle time against prevented escapes, using jidoka, manufacturing's stop-the-line discipline of in-line detection, to ground the policy.

An agent fleet opens thirty pull requests overnight against a review rotation sized for six a day. Every change compiles and passes lint, so nothing looks wrong. By Thursday the queue is two days deep, reviewers are approving on skim, and the one gate the organization trusts has become both a bottleneck and a rubber stamp. The merge check worked exactly as designed. The organization had placed it at the only station in the line that cannot absorb the new volume.

This guide is for engineering executives and platform leads setting gate policy across many teams and repositories. Their organizational decision covers which stations get a gate, what each gate admits forward, who owns it, and what its cycle-time cost buys in prevention. The production line has five stations: intake, spec, build, verify, and ship. Gates provide the manufacturing QA layer across all five. This guide excludes CI configuration and tool settings, including single-pipeline wiring. Gate placement is the prior question, and merge-only organizations have been answering it by default.

Quality Gates in Software Development Provide In-Line QA

A quality gate is a station-level decision point that evaluates work against predefined, measurable criteria before admitting it forward. Thomas Flohr's chapter on gate criteria, published by Springer in 2008 on pages 245 to 256, describes teams checking project results against "predefined criteria being derived from carefully chosen metrics." ISO and IEC published ISO/IEC 25010:2023, edition 2.0, on November 15, 2023, with a nine-characteristic product quality model that teams can use as criteria vocabulary. NIST published NIST SP 800-218, the Secure Software Development Framework version 1.1, on February 3, 2022. It recommends security practices that gate owners can check, and NIST states that the framework does not prescribe how to implement each practice, offering a basis for a risk-based approach, not a checklist.

The gate is a policy object, distinct from the instruments around it. A CI check is a test a pipeline runs. A linter rule supplies one criterion, and an acceptance criterion is a spec artifact. Engineering leaders assign an owner accountable for the outcome, and the gate issues the admission decision from those signals.

Detection location shapes everything downstream. Terminal inspection puts a separate quality department at the end of the line, after every station has invested in the work. Toyota's production system calls this form of in-line detection jidoka, which stops the line at the station where a machine or worker detects an abnormality. Downstream stations never build on the defective work. No primary source establishes that quality gates descend historically from manufacturing, so this guide argues the analogy on its operational merits. An agent-run line, like a factory line, needs station-level QA with authority to stop production. The software factory operating model keeps specifications and merge approval with people while agents do the writing.

Why the Merge Point Fails Once Agents Author the Change

Merge-point review functions as terminal inspection within a DevOps workflow. Every defect reaching it has already consumed upstream planning and generation compute, and every artifact competes for the same fixed pool of reviewer attention. Adding generation capacity upstream of that fixed-capacity station produces queues, not shorter cycle time.

DORA's 2025 report on AI-assisted software development draws on a survey of nearly 5,000 technology professionals. It puts the mechanism plainly: "Without robust control systems, like strong automated testing, mature version control practices, and fast feedback loops, an increase in change volume leads to instability." The same report describes AI as an amplifier that magnifies both the strengths of high-performing organizations and the dysfunctions of struggling ones. A merge-only line is a control system with one control, and volume is what exposes it.

The merge point still deserves a gate, and Augment Code's page on commit-time review gates covers that implementation layer in detail. This guide addresses the policy above it: the other four stations must catch their own defect classes so the merge queue stops serving as the line's sole rejection point.

A Station Map: Intake, Spec, Build, Verify, Ship

Five stations make a production line for software. At each station, the gate defines the evidence required for admission and the role responsible for the decision. Acceptance criteria written as testable statements are what make the spec station enforceable, an AI spec template is what keeps them testable, and Cosmos Experts can carry those criteria into the sessions that generate against them.

StationWhat Admits Work ForwardWhat the Gate BlocksEnforcement ModeOwning Role
IntakeA ticket that states the problem and priority, with enough context to start workAmbiguous or duplicate requests, along with requests that lack an ownerHuman judgmentProduct or tech lead
SpecAcceptance criteria that a team can test before generation beginsWork with a done state that the team cannot verify after generationHuman judgment supported by template checksTech lead
BuildCode that meets build and static-analysis requirements and declares only dependencies that an automated registry check verifiesUnbuildable artifacts and policy violations, including hallucinated packagesAutomated in-line checkDeveloper, with security owning the dependency rule
VerifyChanges with passing tests and resolved review findingsDefects that would otherwise surface after releaseAutomated checks with human adjudication of findingsQA lead
ShipA release with tested rollback criteria and a named on-call ownerChanges that lack a rollback path or accountable ownerHuman decision on automated evidenceRelease manager

Static analysis needs one clarification here. It supplies evidence for an automated gate, and the gate policy determines which findings block admission and who can waive them. Organizations that conflate the two often tune tools when they need to assign owners. The same distinction decides what the verify station can prove, where the evidence is the test suite and the review record, so the practices for reviewing agent-authored code and for mutation testing set that station's ceiling. The station framing extends the software factory model, which separates a production line's stations from the DevOps loop that circles them.

Who Owns Each Gate

Gate policy across many teams fails on ownership gaps more often than on threshold values. A threshold wrong by ten percent still blocks something. Teams quietly waive an unowned gate until it protects nothing. Each station therefore needs one accountable role: product or tech lead at intake and spec, developers at build with security owning dependency ingestion, the QA lead at verify, and the release manager at ship. These assignments keep decisions close to the expertise each station requires while preserving a single accountable owner.

Dependency ingestion is the clearest case for named ownership because the evidence is specific. USENIX Security 2025 accepted Spracklen et al.'s package hallucination study, arXiv 2406.10279 version 3, which generated 576,000 Python and JavaScript code samples across 16 LLMs. The authors found 205,474 unique hallucinated package names. Average hallucination rates ran at least 5.2 percent for commercial models and 21.7 percent for open-source models. Human merge reviewers cannot verify registries at agent volume. A security-owned automated build gate can perform that check, and an attacker needs only the names nobody verified.

Ownership across team boundaries needs a mechanism that separates execution scope from the admission decision and from the evidence trail. Augment Code offers Cosmos, a unified cloud agents platform generally available on paid plans, for that separation. Cosmos Environments define where agents run and what they can access, Cosmos Experts define checking behavior, and Cosmos Sessions preserve an auditable record of long-running agent work. A security owner can therefore evaluate the dependency rule without owning the producing team, and within Cosmos the Deep Reviewer Expert reads a change end to end while the QA lead retains the blocking decision.

Owners also need signals that resist gaming, because raw throughput flatters agent output. That is why agent metrics mislead when they stand in for station-level yield. Gate owners should read escape rates.

What a Gate Costs Against What It Prevents

Manufacturing put a price on inspection a century ago. Dodge and Romig's 1929 paper in the Bell System Technical Journal, volume 8, number 4, October 1929, pages 613 to 631, set out a sampling-inspection method. The NIST/SEMATECH e-Handbook credits Dodge and Romig with popularizing acceptance sampling and describes it as the middle road between no inspection and total inspection. Agent-generated work changes that cost model, because automation makes some forms of verification cheap. The economics now favor in-line inspection of every eligible artifact, reserving scarce human judgment for evidence automation cannot adjudicate.

Per-artifact data helps leaders decide where to spend that judgment. Springer published Schreiber and Tippe's ICICS 2025 paper in Lecture Notes in Computer Science volume 16219 on pages 153 to 172. The researchers collected 7,703 files that repository authors explicitly attributed to four AI tools and ran CodeQL over the 7,117 that remained after filtering, finding 4,241 CWE instances across 77 vulnerability types. Of those 7,117 analyzable files, 861 contained at least one CWE-mapped vulnerability, producing the reported 12.1 percent rate, and 87.9 percent contained no identifiable CWE-mapped vulnerability. The rate applies to analyzable files rather than all collected files.

Per-artifact defect rates stay low enough for triage at small volumes. Agent volume changes the operational consequence, because the same measured rate produces findings in proportion to the number of files entering the line. A finding still has to reach a fix, and a scan-to-merge remediation path is what stops a blocked gate from turning into a backlog.

Veracode's first-party GenAI security report, published July 28, 2026, marks a useful decision boundary. Veracode tested more than 100 models over four years on an 80-task benchmark. Across all tested models and tasks in the benchmark languages, the average security pass rate was 56 percent, while modern models generated syntactically correct code nearly 100 percent of the time. Within this benchmark, syntax checks admitted almost every output and security checks rejected 44 percent. That distribution puts security criteria at verify and automated dependency or policy checks at build, and it says nothing about the admission rate of a compile gate in production.

The useful comparison asks whether added gate delay improves station yield and reduces downstream escapes. First-pass yield measures the share of work a station admits without rework, and defect escape rate measures the defects caught downstream of the station that should have caught them. Both belong in the small set of code quality metrics a gate owner reads on a cadence, and autonomous development metrics covers how those figures behave once agents author most of the volume. Engineering leaders should revisit a gate when its queue grows while its escape rate stays flat, because the added cycle time is buying no measurable prevention.

Where Gate Design Goes Wrong

The reflexive answer to agent volume is more gates, often the same merge-style checkpoint replicated across the line. That response misreads manufacturing QA as a mandate for more inspection. W. Edwards Deming's third point argues the opposite: "Cease dependence on inspection to achieve quality. Eliminate the need for inspection on a mass basis by building quality into the product in the first place." The Deming Institute's points, which the Institute presents as a condensation of Out of the Crisis, pages 23 to 24, also reject zero-defect slogans aimed at the workforce.

Open source
augmentcode/augment.vim608
Star on GitHub

Deming targeted terminal mass inspection by a separate quality department. Jidoka uses a different mechanism. Toyota describes it as "automation with a human touch" and traces it to Sakichi Toyoda's automatic loom, which built the capability to make judgments into the machine itself. Detection stays inside the station, the station stops, and the defect cannot propagate. An agent-run pipeline can follow that model, because software produces the artifact and policy supplies the stop condition.

Deming's eleventh point identifies the remaining risk, rejecting management by numbers and numerical goals. A gate expressed only as a pass rate invites the behavior the number rewards. The 2025 developer survey from Stack Overflow found that 66 percent of respondents, n equals 31,476, cited AI solutions that are "almost right, but not quite" as their most-cited frustration with AI tools. Almost-right work clears a numeric pass bar comfortably. Gate owners should place detection at the producing station and read a rising pass rate paired with a rising escape rate as evidence of gaming.

How to Right-Size Gate Policy Across Teams

Gate policy starts from the constraint. Compare how long work waits in front of each station across your highest-volume repositories, and the longest queue identifies where verification capacity binds. Pause added generation capacity upstream of that station until the queue drains, because every new agent seat in front of a constrained verify station adds backlog rather than output.

Let recurring defect classes determine placement. Identify the station that produces each class and put the check there, with authority to stop that station's work. A hallucinated dependency belongs at a build-station stop. An untestable acceptance criterion belongs at a spec-station stop. Neither belongs at the merge point, which is where both currently land.

Standardize gate definitions centrally and delegate thresholds to the accountable role, so a policy stays comparable across teams while a threshold stays tunable per repository. Cosmos Experts can hold the standardized checking behavior while the owning role keeps the admit-or-block decision. Cosmos Sessions give each owner the audit trail to review their own station on a cadence, without a central board becoming the new bottleneck. Write the bypass rule down before it is needed: when a release manager overrides a gate during an incident, that override is recorded as an exception with a named owner, never applied silently.

Sequence adoption against a QA maturity model so gates arrive as teams can absorb them. The commit-time review guide linked above covers merge-point mechanics, CI rollout, threshold calibration, and tool configuration, and none of those mechanics changes the gate-placement policy.

What to Do Next

The tradeoff runs between coverage and flow. Every added gate buys prevention at a cycle-time cost, and a gate at an unconstrained station adds delay without reducing escapes. The failure mode is not too few gates; it is gates placed where the line was never blocked.

This week, measure queue time in front of intake, spec, build, verify, and ship in your three highest-volume repositories, then rank the stations by wait. Take the highest-ranked station and name one defect class it currently lets through. That station and that defect class are the next gate decision, and the ranking tells you what the gate is worth before anyone builds it.

Frequently Asked Questions

Written by

Molisha Shah

Molisha Shah

Molisha is an early GTM and Customer Champion at Augment Code, where she focuses on helping developers understand and adopt modern AI coding practices. She writes about clean code principles, agentic development environments, and how teams are restructuring their workflows around AI agents. She holds a degree in Business and Cognitive Science from UC Berkeley.


Get Started

Give your codebase the agents it deserves

Install Augment to get started. Works with codebases of any size, from side projects to enterprise monorepos.