You can't bolt AI onto a system that was never designed to be understood.
I've seen this happen more times than I can count. Companies assume AI coding tools will make their development teams instantly more productive. So the team starts using Copilot to generate code, explain legacy modules, and build new features on top of an existing application.
The results are disappointing.
Not because the AI isn't capable.
Because it can't understand a system that nobody fully understands.
Most legacy apps weren't built for AI collaboration. They were built to solve business problems and ship quickly. Documentation is outdated or missing. Different teams followed different patterns. Business logic is buried in old stored procedures. And the few people who really understand the system are often no longer around.
AI relies on context. It learns from your code, architecture, naming conventions, and existing patterns. When that context is inconsistent or difficult to follow, AI can only guess. It will still generate code. It just won't generate the right code.
This is the real challenge: if a system is hard for people to understand, it's also hard for AI to work with. That's why modernization comes before AI, not alongside it.
In practice, AI quickly speeds up the clean, modular parts of your system. At the same time, it exposes every weak spot in the rest of the codebase. The question isn't whether you'll need to modernize.
It's whether you'll do it before or after your AI initiative runs into those limitations.