30 September 2026 (updated: 30 September 2026)
Chapters
Most enterprise teams have a system nobody wants to touch. It runs payroll, prices insurance policies, or routes orders, and it has done so reliably for fifteen years. It also runs on an outdated framework, has no tests, and the people who understood it best left the company a long time ago.
When a system gets to this point, someone usually proposes rewriting it from scratch. That tends to be the most expensive option available. Leaving the system alone costs money too, though. McKinsey estimates that tech debt amounts to 20–40% of the value of an organization's entire technology estate, and CIOs report that 10–20% of budget meant for new products gets diverted to dealing with it.
AI coding tools change this. They don't make a rewrite safe. They make the careful, incremental alternative much cheaper, and that alternative has always been the better choice.
A rewrite looks clean on a whiteboard. In practice it means:
The alternative is Martin Fowler's Strangler Fig pattern. You grow new functionality around the old system, move traffic over one slice at a time, and retire legacy components only once nothing depends on them. The system keeps running throughout, and each step can be rolled back.
The pattern's weak point has always been cost. Understanding a tangled module well enough to extract it, writing tests to pin its behavior down, and carefully refactoring it takes a lot of slow, expensive engineering time. AI speeds up exactly this work.
This is the least glamorous use case, and probably the one that pays off most. Before you can change legacy code, you need to know what it does. AI can summarize modules, trace data flows, explain obscure idioms, and draft documentation for code that has never had any.
The best results come from pairing an LLM with structured analysis of the codebase rather than pasting in raw files. Thoughtworks built a tool that combines an LLM with a knowledge graph generated from the code's syntax trees, and cut reverse engineering of a COBOL mainframe module from six weeks to two.
Legacy systems rarely have good test coverage, and refactoring without tests is gambling. AI can generate characterization tests: tests that record what the code does today, bugs included, so any change in behavior shows up immediately. A human still needs to review which behaviors are intended. Getting a first draft of hundreds of tests in a day instead of a month makes a big difference, though.
Framework upgrades, language version bumps, and API migrations are repetitive, spread across the codebase, and tedious, which makes them a good fit for AI. Two well-documented examples:
Neither company let the model run unsupervised. Both used AI to produce changes and relied on engineers and existing tooling to review, test, and ship them.
Within a single slice of the system, AI assistants are good at mechanical but error-prone work: breaking up very long functions, extracting interfaces so a component can be replaced, removing dead code, and replacing deprecated libraries. Work that used to fill a week-long refactoring ticket can be proposed in an afternoon and then checked against your new test suite.
Here's how these pieces fit together into a modernization plan that doesn't depend on a single high-risk launch:
Each cycle delivers something the business can use, and the team learns something that makes the next cycle faster.
AI speeds up modernization, but it also brings new ways to fail.
Most enterprises don't need to rewrite their legacy software. They need to understand it, protect it with tests, and replace it gradually, one well-chosen slice at a time. That approach was always the sound one. It was just slow and expensive. AI makes the slow parts much faster, provided engineers stay in control of what gets merged.
If you have a system everyone is afraid to touch, don't start by planning a replacement. Start by using AI to map it and find the first piece worth modernizing.
30 September 2026 • EL Passion
16 August 2026 • EL Passion
16 August 2026 • EL Passion