First posted on LinkedIn, November 4, 2025.
---
Why is modernization of legacy codebases hard for LLMs?
It is because of the asymmetry of verification and the verifier's rule. (Credit: Jason Wei)
> "Verifier's rule: The ease of training AI to solve a task is proportional to how verifiable the task is. All tasks that are possible to solve and easy to verify will be solved by AI."
More specifically, the ability to train AI to solve a task is proportional to whether the task has the following properties:
(1) Objective truth: everyone agrees on what good solutions are
No one knows the objective truth in a legacy system. The rules are encoded in the runtime of the system. Domain experts have partial knowledge of the system. Furthermore, there is no agreement on what a rearchitected future system should look like.
(2) Fast to verify: any given solution can be verified in a few seconds
Unless there are extensive test suites and documentation, formal verification for functional equivalence is very difficult. Divining the rules and business logic of the system requires a ton of human capital and machine automation.
(3) Scalable to verify: many solutions can be verified simultaneously
Without LLMs, trying multiple solutions was not possible. Simultaneous coding workflows are only becoming a reality now; however, limited context windows and context rot lead LLMs into black holes when the code bases have massive gravity.
(4) Low noise: verification is as tightly correlated to the solution quality as possible
Verification is hard when there is no benchmark or eval to begin with. Solution quality can never be effectively measured in a legacy system unless an equal amount of attention is devoted to functional testing.
(5) Continuous reward: It's easy to rank the goodness of many solutions for a single problem
There is no objective measure of what constitutes a good solution because of the nebulous definition of "goodness" for the future system.