Can AI modernize legacy code and old applications?
It can do a lot of the work, but not unsupervised. AI is good at the slow parts of modernization — reading undocumented code, explaining what a function does, translating between languages, and drafting migrations. Where it fails is the part that matters most: it doesn't know the business logic and edge cases the old system quietly encodes, so it will confidently rewrite something subtly wrong. The pattern that works is AI as an accelerator with engineers verifying, plus tests that prove the new code behaves like the old.
Where AI is good
Legacy modernization is mostly archaeology, and that’s exactly where models help. They can read a sprawling, undocumented codebase and explain what a module does, map dependencies, translate from an old language to a modern one, and draft the first version of a migration. The work that used to take an engineer days of careful reading, AI can compress into a reviewable draft.
Where it breaks
The danger is the knowledge that isn’t in the code’s syntax: the business rules, the edge cases, the weird exception that exists because of a contract signed in 2011. A model reads the code, not the intent, so it will fluently reproduce structure while getting a critical behavior wrong — and a subtly wrong migration is more dangerous than an obviously broken one, because it ships.
The pattern that works
Treat AI as an accelerator, not an autonomous rewriter. Let it do the reading, explaining, and drafting; keep engineers on verification and the decisions that require understanding why the old system does what it does. Above all, lean on tests: characterize the legacy behavior first, then prove the modernized code matches it. The safety net isn’t the model’s confidence, it’s the test that catches where the model was wrong.
From the conversation
This explainer is drawn from these episodes — each carries its full transcript.