Back to All
Ai/ml
Blog

AI Can Rewrite Legacy Code. Who Validates It?

Listen
AI Can Rewrite Legacy Code. Who Validates It?
6:59

Dr. Ryan Ries here. I saw a story this week that made me hit the brakes:

Cisco reportedly handed a 27-year-old engineer, one teammate, and effectively unlimited AI tokens a goal: rewrite 98% of the company’s legacy code in 24 months.

Two people, to rewrite decades of code, in just two years.

Now, before anyone starts planning a retirement party for their entire application-development team, Cisco has not actually done this yet. The team has a four-week window to prove the approach, and Cisco’s engineering organization would still own the production result. The 98% number is a target, not an accomplishment.

Still, the fact that a company like Cisco is even running this experiment tells us something important. We are moving past “Can AI help a developer write code faster?” and into “Can AI change the economics of modernizing an entire enterprise?”

Your Legacy Code Is Not Going to Rewrite Itself

Every large company has systems nobody wants to touch. The original developers retired, the documentation is incomplete, a business rule from 2007 is buried inside 4,000 lines of code, and somehow that rule still determines whether an invoice gets paid.

Make it make sense!

Those systems survive because replacing them is expensive, risky, and usually less exciting than funding something new. Technical debt is a little like the box of cables in your garage. You know you should deal with it, but one day one of those cables will save you a lot of trouble when a failure happens.

AI changes the cost curve. It can inspect large codebases, map dependencies, translate old patterns, generate tests, propose refactors, and help move software into modern or memory-safe languages. Work that used to require months of analysis can potentially begin in hours.

That does not mean the AI understands every undocumented exception, customer promise, security requirement, or weird integration keeping the business alive. Generating replacement code is the easy part. Proving that the replacement code handles all of the exceptions and performs as expected is the new work your team has to do.

Now, if you know me, you know I am quite the skeptic.

If an agent rewrites a million lines of legacy code, who validates the million lines? If the answer is another instance of the same model, we are back to AI grading AI’s homework. Faster failure is still failure. It just arrives with a much larger pull request.

This Is an AI-DLC Problem

This is exactly why we have been pushing the idea of an AI Development Lifecycle (AI-DLC) at Mission Cloud.

Giving developers an AI coding assistant is useful, but that is still the old development lifecycle with AI inserted into one step. What Cisco is testing requires something different. The lifecycle itself has to be designed for agents that can analyze, generate, test, and revise software at machine speed.

That means the acceptance process cannot be “the code compiled, so ship it.” You need:

  • A clear specification for what the system is supposed to do
  • Dependency mapping and architecture boundaries
  • Automated functional, regression, performance, and security testing
  • Independent acceptance criteria for consequential changes
  • Traceability showing what changed, why it changed, and which evidence supported approval
  • Feature flags, progressive delivery, and a reliable rollback path

The goal is not to put a human eyeball on every generated line. At this volume, that will not scale either. The goal is to use automation for repeatable checks and preserve human attention for the changes where judgment, context, and accountability actually matter.

Agents Are Becoming the New AI Customer

There is another piece of this story that I think is easy to miss. The people using AI are no longer the only ones consuming it. The agents are.

Menlo Ventures estimates enterprise AI spending reached $176.8 billion in 2026, up from $33 billion in 2025. But the percentage of enterprises paying for AI only moved from 55% to 65%. That suggests the spending growth is coming largely from companies that already adopted AI and are now doing a lot more with it.

The same research says agents generated 80% of the tokens observed through OpenRouter, and surveyed organizations spent about 2.5 times what they originally budgeted. I would not treat either number as a perfect census of the market, but the direction is pretty clear.

We are moving from people opening a chatbot and asking a question to software performing thousands of steps while nobody is watching the token meter. Often the chatbot is answering a question that is different than you asked requiring you to think about your prompt and send the agent off to do the task again adding even more tokens to the meter.

Seat-based software economics had a natural ceiling. Agent economics do not work that way. An agent can keep reading files, calling tools, rerunning failed steps, and asking other agents for help long after a person would have gone home.

The Control Plane Is Becoming Part of the Product

This is where governance has to be more than just a PDF somebody reviews once a year.

Snowflake’s recent announcements are one example of where the market is going. Its expanded Cortex AI Gateway includes agent tracing, abuse detection, cost governance, dynamic model routing, sandboxing, and tool integration. Snowflake is also working on a Business Ontology layer intended to give agents approved definitions for business concepts.

That may sound like infrastructure plumbing, because it is. But this plumbing is what keeps two agents from giving two different answers to “revenue,” lets you see which tool an agent called, and stops an automated workflow from spending all weekend retrying the same broken task.

When AI moves from assistant to workforce, identity, permissions, context, observability, testing, cost limits, and human escalation are not optional. They HAVE to be part of the product.

A Few Things I Would Do Now

  • Reopen the legacy backlog. Look for systems that were deferred because analysis and conversion costs were too high, especially bounded domains with good test coverage.
  • Run proof periods. Cisco’s reported four-week test will be their pilot before going full throttle.
  • Separate generation from acceptance. The system producing the code should not be the only system deciding whether the code is ready. That is a recipe for disaster.
  • Design for reversibility. If AI increases the volume of change, rollback, feature flags, and progressive delivery become even more important.
  • Put cost controls around agents early. Measure tokens, tool calls, retries, review, remediation, infrastructure, and long-term maintenance, not just the cost of generating code.

Some Final Thoughts

I think the Cisco experiment is exciting. I also think the headline is doing a lot of work before the team has had a chance to prove anything.

But even if Cisco misses the 98% target by a mile, this still changes the conversation. AI may make modernization projects economically possible that were previously too painful to start and that is a big deal!

I’ve said it before and I’ll say it again: moving faster with AI does not remove the need for governance and validation. It makes both more important.

If your team has a legacy modernization backlog, is experimenting with AI-generated code, or is trying to figure out what an AI Development Lifecycle should look like, reach out to us.

Until next time,
Ryan

PS., heading to re:Invent in a month? Make sure you check out Mission Cloud’s events and where we’ll be. Particularly our Mission Cloud IGNITE party with Nelly.

Now time for this week’s AI-generated image and the prompt I used to create it.

Create a photorealistic scene of a fuzzy puppet engineer standing in front of an enormous dusty wall of old computer servers, tangled cables, floppy disks, and blinking mainframes. The puppet holds a tiny glowing AI-powered wrench while hundreds of small friendly robot workers rapidly replace ancient components behind him. One nervous executive puppet watches from a safe distance holding a clipboard labeled “4-week proof.” Whimsical, cinematic, highly detailed, warm workshop lighting, humorous but optimistic.

image (18)-2

Ryan Ries avatar

{{ readTime }} minutes read