Skip to content
Conseil.dev

AI Legacy Migration Without the Rewrite

The conseil.dev team

June 8, 2026

ailegacy-migrationarchitectureautomationengineering
AI Legacy Migration Without the Rewrite

Ask any engineering leader about their legacy migration plan, and you will probably see a wince.

The playbook used to be simple and painful: freeze new feature development, spin up a parallel team, and spend 18 months rewriting an aging monolith into the Next Big Framework. Three years later the dust settles. You have migrated. But the framework you migrated to is already bloated, its ecosystem has fractured, and your shiny new stack is the new legacy. You traded one cage for another.

That playbook has changed. Two shifts are driving the change: the maturation of generative AI, and an architectural move from rigid frameworks to composable harnesses. Together, they let engineering teams break the cycle of vendor lock-in and multi-million-dollar rewrites.

Migrate to a harness, not a framework

To run a successful migration you first have to get the destination right.

A framework uses inversion of control (the "Hollywood Principle": don't call us, we'll call you). It dictates your architecture, owns the lifecycle, and deeply couples your business logic to its internal rules. If you use AI to translate an old AngularJS monolith into a massive Next.js or Spring Boot monolith, you have not solved the problem. You have reset the timer on your technical debt.

A harness is a supportive shell. It handles the wiring (routing, builds, API gateways, edge deployments) but gets out of your way when it comes to actual application logic. Astro for frontend delivery, Vite for the build layer, or lightweight edge runtimes for backend routing are all examples.

When you migrate to a harness, you decouple your stack. Future UI libraries, databases, or payment gateways can be swapped like Lego bricks without tearing down the house.

Why AI prefers harnesses

Even with a perfect target architecture, untangling legacy spaghetti code is dangerous. This is where AI turns a high-risk gamble into a calculated pipeline.

AI is very good at writing isolated, stateless functions, and terrible at architecting massive, highly-coupled systems. If you ask an AI coding agent to generate a large shared-state application, it will hallucinate dependencies and tie itself in knots.

But a harness acts as a universal plugboard. You do not need the AI to understand the whole system. You just need it to write single-purpose modules:

  • "Write a serverless Go function that takes this legacy JSON payload and maps it to our new schema."
  • "Generate a standalone React component for a data table based on this old jQuery logic."

Harnesses demand modularity. AI generates modularity well.

The AI-accelerated strangler fig

In practice, the migration becomes a continuous loop rather than a stop-the-world event. The pattern, borrowed from Martin Fowler's "Strangler Fig Application," works in four steps.

1. Deploy the harness (the shell)

You do not rewrite the app behind closed doors. You deploy a modern, lightweight harness in front of your legacy application.

At this stage the harness does almost nothing. It receives user traffic and forwards 100% of it to the legacy monolith. To the user, nothing has changed. But you now have the control layer.

2. AI as the code archaeologist

Legacy systems are often black boxes. Instead of having senior engineers spend months untangling undocumented business rules, AI agents are deployed as "archaeologists."

Before changing a single line of code, teams use AI to trace data flow and generate extensive unit and integration tests against the legacy behavior. This creates a safety net around the old code, guaranteeing that when the logic is swapped, the business outcomes stay identical.

3. Isolate and translate

This is where velocity multiplies. Because the harness allows for independent, plug-and-play components, you isolate a single legacy module (for example, the user authentication flow). You feed it to an AI agent to translate the logic into an isolated, framework-agnostic module, ensuring it passes the generated parity tests.

4. Plug, route, and strangle

The new module plugs directly into the harness. You update the router: send 5% of checkout traffic to the new decoupled component, send everything else to the old monolith. Once stability is proven, dial it up to 100%.

Repeat this loop until the legacy system is completely strangled out, starved of traffic, and deleted.

The last migration you will ever run

The real promise of combining AI with harness architecture is not just speed. It is future-proofing.

AI is driving the cost of writing code toward zero, which means code itself is becoming disposable. If you migrate into a heavy framework, you lock yourself into the past. If you migrate into a harness, you are optimizing for flexibility on day 1,000.

When the next massive technology shift arrives in five years, you will not need to freeze development for 18 months. Because your logic is cleanly decoupled inside a harness, you will unplug the outdated module, ask your AI to rewrite it in tomorrow's best syntax, and snap it right back into the shell.

Stop rewriting. Start wiring. You can see how we scope and ship these projects before committing to anything.


Planning a legacy migration? We start with a 30-minute discovery call to assess your current stack, identify the first module to strangle, and map a phased migration plan. No commitment, no jargon.

Book a 30-minute discovery call → cal.com/conseildev/30min