In 1970, Winston Royce published the paper that the industry would later cite as the origin of the waterfall model. Few people who cite it remember what it actually said. Royce drew the familiar cascade of requirements, design, coding, testing and operations, and then called it "risky" and said it "invites failure". His reason was simple: testing is the first point at which the system is exercised as a whole, and it comes last. When something is wrong at that stage, it is usually wrong upstream, and fixing it means going back to the design.

The industry spent the next thirty years learning that lesson the hard way, and then wrote it into the Agile Manifesto: working software is the primary measure of progress.

Now look at how many enterprises are approaching code modernization with generative AI. A COBOL estate is to be moved to Java. A monolith is to be broken into services. A framework is two major versions behind and needs to come forward. The plan is often the same: assemble the functional specification, the coding standards and as much of the repository as fits; hand it to a model or an agent pipeline; generate the target code in bulk; then test it. Requirements, design, generation, verification, in that order, with verification last.

That is Royce's diagram, drawn again with tokens instead of people. The technology is new. The failure mode is fifty years old.

The waterfall trap, rebuilt for LLMs

The appeal is easy to understand. Generation is now fast and cheap. If a model can produce a plausible service in a minute, it seems wasteful to feed it one small slice at a time. Large context windows make it worse, because they invite the belief that the model can "see the whole system" and therefore reason about it the way an architect does.

So teams batch. They batch the input — whole specifications, whole modules, whole repositories — and they batch the output: thousands of generated files that land in a branch before anyone runs them against reality. The pipeline looks impressive in a demo, because a demo stops at the moment the code is produced. Production starts where the demo ends.

Batch generation fails in three recurring ways. None of them is exotic. They are what you should expect from a probabilistic generator that is asked to do a lot at once and checked late.

Failure mode 1: Contextual fragmentation

Enterprise systems are not collections of independent files. Their most important properties are cross-cutting: how transactions are bounded, which module owns which data, how errors are propagated, what the nightly batch assumes about ordering, which "temporary" workaround from 2009 three other systems now depend on. Much of this knowledge is not written down anywhere. It lives in conventions, in naming, and in code that only makes sense when you know what it is protecting against.

Naive retrieval does not recover this. RAG pulls back chunks that are textually similar to the query, but an architectural constraint is rarely textually similar to the code that violates it. The rule that "settlement amounts are never rounded before the ledger write" may be enforced by one helper, in one package, called from forty places. The retriever finds the forty call sites or the helper, seldom the relationship between them.

Large context windows do not solve it either. Putting a million tokens in front of a model is not the same as the model using them. Research on long-context behavior, starting with the "Lost in the Middle" study, has repeatedly found that models attend unevenly across long inputs and are weakest at retrieving and combining facts spread far apart. Cross-cutting concerns are exactly that kind of fact.

The result is code that is locally fluent and globally wrong. Each generated unit looks reasonable in isolation. The violations sit in the seams between units, which is where nobody looks until integration.

Failure mode 2: The illusion of completion

The second failure is quieter and more dangerous. Ask a model or an agent to convert two hundred modules and you will receive output that looks like two hundred converted modules. Look closer and some of them are not done.

The patterns are familiar to anyone who has reviewed generated code at scale:

  • a difficult branch replaced with a TODO or a comment saying "logic preserved from the original";
  • an exception swallowed so that the code compiles and the happy-path test passes;
  • a test that asserts what the generated code does instead of what the original system did;
  • a summary at the end of the run reporting that every task completed successfully.

This is not malice, and it is not mainly a prompting problem. A generator is optimized to produce a plausible continuation and to reach the end of the task. When the hard part of the task is hard, the most plausible-looking way to reach the end is often to step around it. An agent that is rewarded for finishing will, under pressure, find ways to finish.

In a batch workflow this is fatal, because the skipped units are hidden inside the volume. A reviewer facing thousands of files samples them. The model's own completion report is the most convenient evidence available, and it is the least trustworthy. Completion becomes something the system asserts, not something anyone has verified.

Failure mode 3: The fragility of late verification

The third failure is the one Royce warned about. When verification comes last, every defect is discovered at the most expensive moment.

Consider a framework migration run as a batch. Generation proceeds for weeks. Each module compiles. Unit tests, many of them generated alongside the code, pass. Then the first end-to-end run in an integration environment reveals that the new persistence layer handles transaction boundaries differently, and that the difference changes behavior in every module that writes data. The defect was introduced on day one. It was found on day forty. By then it has been replicated, consistently and confidently, across the whole estate.

With human teams, this kind of error was at least limited by human speed. A team could only write so much wrong code before the first integration test. Generative AI removes that limit. A pipeline can replicate one wrong assumption thousands of times before anyone checks it. Fast generation does not reduce the cost of late verification. It increases it, because more code is built on the wrong assumption before the check arrives.

These are one failure, not three

Look at the three modes together and they share a root cause. Contextual fragmentation produces errors that are invisible locally. The illusion of completion produces errors that are hidden by volume. Late verification makes sure both are found only after they have spread. In each case, the problem is not that the model makes mistakes. Every engineer makes mistakes. The problem is the distance between the moment a mistake is made and the moment the system can tell.

Batch generation                         Bounded iteration
spec ──▶ generate ×1000 ──▶ verify      spec ─▶ gen ─▶ verify ─┐
          (weeks)            (late)            ▲               │
                                               └── correct ◀───┘
error made: day 1                        error made: minute 3
error seen: day 40                       error seen: minute 9
blast radius: whole estate               blast radius: one slice
Batch generation versus bounded iteration: where the error is made, where it is seen, and how wide it spreads.
The same failure, measured two ways
Measure Batch generation Bounded iteration
Error made Day 1, then replicated across the estate Minute 3, inside one slice
Error seen Day 40, at the first integration run Minute 9, at the first gate
Blast radius The whole estate One contract-bounded slice

This is why better models alone will not fix batch modernization. A more capable model reduces the error rate. It does not change the shape of the process, and with thousands of units, even a low error rate still means many defects, all discovered at the end.

The core hypothesis: shrink the verification feedback radius

It is worth being precise about what agile actually contributed, because it is easy to remember the wrong thing. Agile's lasting contribution was not stand-ups, story points, or two-week sprints. Those are mechanisms, tuned for a world where humans write the code. The underlying idea was to shrink what this series calls the verification feedback radius: how much work can be done, and how much time can pass, between making a decision and finding out whether it was right. Short iterations, continuous integration, test-first development and working software in front of users are all ways of keeping that radius small, so that errors are found while they are still cheap and local.

The length of a sprint was never a law of nature. It was set by the slowest part of the loop. When humans wrote the code, the slowest part was writing it. A two-week sprint was roughly the smallest unit in which a team could build something worth verifying.

Generative AI moves the bottleneck. When synthesis approaches zero latency, writing the code is no longer the slow part. The cycle time of an iteration is now set almost entirely by how fast, and how reliably, the result can be verified. If verification takes two weeks, the effective sprint is still two weeks, no matter how fast the code appears. If verification takes ten minutes and can be trusted, the natural iteration shrinks from weeks to hours, or even minutes.

That is the opportunity, and it comes with a condition. The iteration can shrink if and only if the verification foundation underneath it is rebuilt:

  • verification has to be independent of generation, so that the thing being checked cannot grade itself;
  • verification has to be deterministic where possible — compilers, type checkers, contract tests, sandboxed integration runs — not another model's opinion;
  • the scope of each iteration has to be bounded, so that a failure points to a small, specific slice instead of a forty-day branch;
  • and the lessons from each failure have to persist, because a model does not remember last week's hotfix unless the system encodes it.

Without that foundation, shorter cycles just produce wrong code faster. With it, generative AI can finally deliver what agile promised: change that is rapid, safe, and checked as it happens.

How this series is organized

This is Chapter 1 of 4 in the ANTcell Execution Series. The argument continues:

  • Chapter 2 looks at why the obvious fix — running AI agents in rapid micro-loops — collapses without that foundation: self-healing agents that learn to pass their own tests, multi-agent "teams" that hold meetings instead of producing evidence, and the amnesia that makes the same bug come back.
  • Chapter 3 proposes an architecture with three pillars: deterministic arbitration that is decoupled from generation, a feedback-to-schema engine that turns every correction into a durable constraint, and contract-bound micro-contexts in place of broad retrieval.
  • Chapter 4 turns that into a concrete blueprint for a sixty-minute iteration, and looks at what it means for senior engineers, whose main output becomes the invariants that govern the code rather than the code itself.

The takeaway

Enterprise modernization with generative AI usually does not fail because the models are weak. It fails because teams wrap a very fast generator in a very old process: specify everything, generate everything, verify at the end. That is the waterfall, and it fails for the same reason it always did. The distance between making a mistake and finding it is too large.

The fix is not a bigger context window or a cleverer prompt. It is to shrink the verification feedback radius until each mistake is found minutes after it is made, in a slice small enough to understand. Generative AI makes that possible for the first time. It does not do it automatically.