If AI agents generate code ten times as fast, why isn’t software finished ten times as fast? And how do we know whether the generated code is the right code at all? Using the theory of constraints, this article shows why the bottleneck of software development is shifting from coding to verification and validation, which methods exist for them, and where automating them reaches its limits.
From Writing Software to Assuring It#
“Coding is solved”: under this catchphrase, Boris Cherny, head of Claude Code at Anthropic, talked in February 2026 on Lenny’s Podcast about what comes next. It is a deliberately pointed thesis, but for wide areas of application I consider it accurate. Translating sufficiently concrete requirements into executable code is becoming ever faster and cheaper. That does not mean AI agents can implement arbitrary software without errors. And judging whether the result is useful and correct software is not automatically sped up to the same degree.
The productivity of software development as a whole rises far less than the productivity of coding.
An economics working paper by Demirer, Musolff and Yang [1] provides empirical evidence for this. In the version revised in September 2026, based on data on more than 500,000 GitHub developers, the authors report estimated cumulative gains from autonomous coding agents of 240 percent in commits, but only 80 percent in projects and 30 percent in actual releases. The gap is not due to verification and validation alone, but it shows that faster code production only partly turns into released software.
Ahmed El-Deeb also describes this shift in a contribution to ACM SIGSOFT Software Engineering Notes [2]. For him, what matters is no longer how much code we can generate.
What matters is how many changes we can generate that we have good reason to trust are the right ones.
The Theory of Constraints: Throughput Depends on the Bottleneck#
That faster code production does not speed up software development to the same degree comes as no surprise from the perspective of the theory of constraints. Eliyahu M. Goldratt described it in 1984 together with Jeff Cox in the novel The Goal, using the example of a factory [3]. Its core statement: the throughput of a system is limited by its bottleneck. An improvement elsewhere does not increase throughput; it only increases the inventory of work in progress in front of the bottleneck.
A software factory that generates code faster than it can check it mainly produces unchecked code.
Goldratt later described five steps for aligning a system with its bottleneck. Applied to a software factory, they might look like this:
- Identify the bottleneck: If coding is no longer the bottleneck, it lies in verification and validation.
- Exploit the bottleneck: Do not waste the scarce review capacity, especially human capacity, on changes that would already fail automated checks.
- Subordinate everything else: Do not generate more changes than can be checked.
- Elevate the bottleneck: Automate the evidence and improve its strength.
- Start over: Once verification is no longer the bottleneck, the next one takes its place, probably validation.
Review ping-pong shows how step 2 can be missed: humans merely pass the results of their coding and review agents back and forth. It ties up exactly the scarce human review capacity that is the bottleneck, and adds nothing to the review. I describe how to avoid this in a separate article.
Verification and Validation: Two Different Problems#
The following sections examine which methods exist for verification and validation, how they can be automated and, above all, how we know whether our evidence is meaningful at all.
The classic distinction is: In verification, we ask whether we built the software right. In validation, we ask whether we built the right software. NASA’s Systems Engineering Handbook makes the same distinction [4] and aligns validation with the intended use in the intended operational environment.
The difference lies mainly in the yardstick of the check. In verification, we compare the implementation with a specification. In validation, we compare our ideas and the software that resulted from them with the actual requirements of its use.
As a running example, take invoicing software that, as required, adds 19 percent VAT to the net amount: 100 euros net become 119 euros. The software does exactly that; with respect to this specification, its behavior is correct.
During rollout, however, it turns out that the company also provides cross-border services, for which, under certain conditions, the reverse charge procedure applies. The specification has missed a relevant business case.
Software can fully meet its specification and still be unfit for its intended use.
The example is deliberately simplified. It is about two classes of errors: errors in implementing a requirement and gaps in the requirements themselves.
Verification and validation are not consecutive project phases. Requirements can be validated before implementation, and a single test can serve both purposes.
Automated Tests and Formal Proofs#
For verification in software factories, two methods are particularly interesting: automated tests and formal proofs.
An automated test runs software under defined or generated conditions and checks the observed behavior against an expected result or an expected property. Our invoicing test could, for example, check that 100 euros net and a tax rate of 19 percent yield a tax amount of 19 euros.
A passing test provides evidence for the checked behavior, but no proof for other inputs. Conversely, a failing test may also point to a wrong test expectation.
A formal proof takes a different approach. Instead of merely examining selected executions, it proves mathematically that a specified property holds for all cases considered under defined assumptions. For our invoicing software, we could, for example, prove that for all permissible net amounts at a given tax rate the tax amount is calculated according to a defined rounding rule.
Further methods complement these two approaches. Static analysis examines properties without running the software, type systems rule out certain classes of errors, and model checking, another form of formal verification, checks properties of a formally described state model. Depending on the method, the results range from hints at possible errors to mathematically assured guarantees.
For a software factory, the combination is what makes this interesting. A type system could, for instance, prevent net and gross amounts from being mixed up by accident. A formal proof could assure the calculation. Automated tests could additionally check whether the interaction with the database and the invoice output actually works. In each case, it must be clear which property is proven under which assumptions.
How Do We Know the Right Result?#
Automated tests need an authority that decides whether the observed behavior is correct. In research, this is called a test oracle. Barr et al. examined the associated problem as early as 2015 in an extensive literature survey [5].
Running a test is comparatively easy to automate. Determining the right result is a different task. In the invoicing example, someone has to know when which tax rate applies, how to round, and which details must appear on an invoice.
The oracle does not always have to provide a concrete expected result. It can also check an invariant, use an independent reference implementation, or examine relationships between several calculations. Property-based testing checks such invariants and relationships over many generated inputs, for instance that for every net amount, the gross amount equals the net amount plus tax. Model-based testing uses a formal model of the expected behavior as the oracle and derives test cases from it. This reduces the effort of formulating individual test expectations. But these methods, too, require knowledge of which relationships should hold.
Formal verification has a structurally similar problem. A mathematically correct proof is only relevant to the domain if the proven property expresses the intended requirement precisely enough. A proof that the tax amount is never negative may also admit an implementation that always calculates zero euros of VAT.
Neither a green test run nor a successful proof automatically answers the question of whether the expectations were chosen correctly.
The Quality of the Evidence Itself#
If an AI also generates the tests and formal proofs, we need methods that assess their quality, ideally automatically as well.
Here we have to distinguish between the technical correctness of a piece of evidence and its strength. A test can run correctly without detecting relevant errors. A mathematical proof can be logically flawless and still prove a property that is too weak.
Mutation Testing#
In mutation testing, an implementation is deliberately altered. We then check whether the existing tests detect these alterations. If, for example, we change the tax rate in the program from 19 to 7 percent and all tests still pass, that points to a gap in test coverage.
Mutation testing thus checks not the software, but the tests’ ability to detect deviations, and does so much more directly than mere code coverage. Mutation testing has limits, too: some mutations do not change the relevant behavior at all, and its strength depends on which alterations are generated. A high mutation score therefore does not prove that the tests are correct in domain terms.
Comparable methods now exist for formal specifications as well. With MutDafny, Amaral et al. presented an approach in 2026 that alters implementations and examines whether they can still be verified against the unchanged specification [6]. In their study, the authors identified five real-world specifications that should be strengthened.
Another approach is IronSpec [7]. Presented in 2024, the framework combines, among other things, the mutation of formal specifications with purpose-built proofs about their intended properties. In six already formally verified real-world systems, the researchers found a total of ten specification bugs.
Mutation testing is thus a cross-cutting method for examining the strength of different kinds of evidence.
Further Options#
So-called vacuity checking examines formally expressed properties for whether they are satisfied for trivial reasons. The property “If an invoice is cross-border, reverse charge is applied”, for example, is also satisfied if the model does not allow cross-border invoices at all. The proof then succeeds, but says nothing about the tax rule. The same happens with tests whose decisive check conditions are never reached.
Add to this consistency checks, independent reviews and comparison with reference systems. None of these methods fully assures the evidence, but together they uncover different weaknesses. In the article Agentic AI Is Like a Rocket, I described this as triangulation of different checks: no check can be gamed without being caught by another.
The Problem of Correlated Errors#
In a software factory, it is tempting to have both implementations and evidence generated automatically. This creates a particular danger: both can rest on the same wrong assumption.
If a coding agent equates a tax-exempt service with a service under reverse charge, it might use the same internal status for both. A test derived from the implementation may well adopt this error. Even a formal specification could be phrased so that it permits exactly this behavior.
A 2026 preprint by Konstantinou et al. shows how unit tests generated by LLMs adopt errors of previously generated code [8]. Tests written only after the faulty code detected just 14 percent of the deliberately subtle bugs, independently generated tests at least 25 percent. The authors attribute the fact that these, too, missed three quarters mainly to weak assertions, that is, to the test oracle. Independence is therefore necessary, but not sufficient. Another preprint by Wang et al. finds indications, based on 1,403 C programs, that formal specifications generated from requirements and implementation can be too weak or follow faulty code [9]. Both are preprints, so the evidence is preliminary.
This suggests a possible architectural decision:
Domain requirements and the evidence based on them should be created as independently of the implementation as possible.
That does not mean all tests or proofs must exist before the first line of code, but it does mean their domain expectations must not come from the code under test. BDD scenarios are an obvious choice: domain experts and software developers write down the expected behavior up front as executable examples (Given, When, Then). Property-based testing and model-based testing are also suitable if properties and models are derived from the requirements rather than from the code.
Different agents or models can help, but they do not guarantee independence if they use the same faulty source information. What matters is which information sources and assumptions the evidence rests on.
Validation: The More Stubborn Bottleneck?#
While verification needs an explicit yardstick, a major difficulty of validation is that the yardstick itself first has to be discovered and made concrete.
If we know that reverse charge must be taken into account, we can specify the requirement and check its implementation. If we do not know about the business case, even a perfect proof of the tax calculation specified so far does not help us.
The task, then, is to uncover unknown gaps: by observing real workflows, talking to domain experts, analyzing actual business cases, and through early prototypes, because users only recognize some things in the concrete system.
AI can help here, too. It can systematically question requirements, point out possible special cases, identify contradictions, or evaluate existing documents and business processes. A study by Mircea et al. with 26 participants shows that AI-assisted revisions can help make previously unstated requirements visible [10]. Curto et al. likewise report that several cooperating language models, in the context studied, were able to propose requirements that participants had not identified before and mostly rated as plausible [11].
So validation is not fundamentally impossible to automate. But whether a proposed business case is relevant is something the AI cannot infer from the consistency of its own proposals. For that it needs external information: from humans, from binding rules, observed workflows or independent data sources.
The fundamental boundary lies less between human and machine than between existing knowledge and a reality not yet sufficiently explored.
It is an open question how far this gap can be closed by AI and better access to domain information sources.
Consequences for the Architecture of a Software Factory#
A software factory that only generates code quickly and runs a conventional CI pipeline falls short. It needs an infrastructure that also systematically creates, runs and evaluates evidence of quality. How the other functions of such a factory work together is described in the article Anatomy of an AI Software Factory. How it decides which changes may proceed without human review is covered in Quality and Autonomy in an AI Software Factory.
The following tasks seem particularly relevant to me:
- Requirements elicitation and validation: uncover gaps in domain knowledge in a targeted way and incorporate feedback from actual use.
- Specification: state requirements precisely and verifiably, and make their origin traceable.
- Verification: select suitable combinations of tests, static analysis and formal proofs and run them automatically.
- Evidence quality: assess the strength of the evidence, for example through mutation testing and consistency checks.
- Risk assessment: decide which changes can be approved automatically and which need additional independent or human review, as in the Gray Software Factory.
What matters is the cost-effectiveness of these methods. Particularly strong evidence that takes longer to create or check than the rest of development can itself become the bottleneck. Conversely, a very cheap method can turn out expensive if its low strength lets errors slip through into production.
Formal evidence has trust boundaries, too: a proven calculation is of little use if wrong input data arrives or the result is processed incorrectly. Moreover, according to Rice’s theorem, not every relevant property of arbitrary programs is algorithmically decidable.
For the design of a software factory, we therefore do not need maximum verification effort for every change.
We need verification effort that is proportionate to the risk, traceable and as automatable as possible.
This is reminiscent of the broader idea of software assurance: trust arises from a combination of evidence and explicit assumptions, not from a single metric.
Conclusion: Throughput Counts, Not the Amount of Code#
Speeding up coding shifts the bottleneck of software development. A central task increasingly consists of determining which software should be built at all, proving its correctness, and assessing the strength of that evidence.
Research already offers approaches for all three tasks. I find mutation testing for formal specifications and AI-assisted requirements elicitation particularly promising.
Still open is how we can reliably ensure the independence of automatically generated evidence, which combination of verification methods is cost-effective for complex business applications, and how well AI can uncover previously unknown requirements under real-world conditions.
For me, in the spirit of the theory of constraints, this results in a different perspective on the productivity of software development: The decisive throughput of a software factory is not the amount of code produced. It is the number of changes fit for their domain purpose whose quality we can assess with good reason, at an effort proportionate to the respective risk.
Coding is a solved problem? The real challenge begins where we have to determine whether we generated the right code.
Sources and Further Reading#
- Demirer, M.; Musolff, L.; Yang, L. (2026): Writing Code vs. Shipping Code: Productivity Effects Across Generations of AI Coding Tools. NBER Working Paper 35275, revised version September 2026. ↩
- El-Deeb, A. (2026): From Code Scarcity to Verification Scarcity: The New Bottleneck in Agentic Software Engineering. ACM SIGSOFT Software Engineering Notes, 51(4). ↩
- Goldratt, E. M.; Cox, J. (1984): The Goal: A Process of Ongoing Improvement. North River Press; overview: Theory of Constraints (Wikipedia). ↩
- NASA: Systems Engineering Handbook – 5.4 Product Validation. ↩
- Barr, E. T.; Harman, M.; McMinn, P.; Shahbaz, M.; Yoo, S. (2015): The Oracle Problem in Software Testing: A Survey. IEEE Transactions on Software Engineering, 41(5). ↩
- Amaral, I.; Mendes, A.; Campos, J. (2026): MutDafny: A Mutation-Based Approach to Assess Dafny Specifications. ICSE 2026. ↩
- Goldweber, E.; Yu, W.; Vakil Ghahani, S. A.; Kapritsos, M. (2024): IronSpec: Increasing the Reliability of Formal Specifications. OSDI 2024. ↩
- Konstantinou, M.; Tambon, F.; Papadakis, M. (2026): On the Risk of Coding Before Testing: An Empirical Study on LLM-Based Test Generation Workflow. arXiv preprint. ↩
- Wang, W.; Chen, S.; Sun, Z.; Feng, S. (2026): Are LLM-Generated Formal Specifications Faithful to Their Requirements?. arXiv preprint. ↩
- Mircea, M.; Gevrek, E.; Schmid, E.; Schneider, K. (2026): Supporting Stakeholder Requirements Expression with LLM Revisions: An Empirical Evaluation. REFSQ 2026. ↩
- Curto, H.; Semini, L.; Marques-Neto, H. T. (2026, online): Evaluating Multi-LLM Pipelines for Early-Stage Software Requirements Elicitation. Empirical Software Engineering, 32(2), article 63. ↩
