THE AI INSTITUTE / RESEARCH FOR LEADERS
Fix the Code Your AI Copies
Existing software can become an example for new AI-written work. Treat that inheritance as part of the rollout decision.
Before expanding AI-assisted software development, identify and repair unsafe patterns that agents are likely to reuse. Fund the quality of the existing code alongside the speed of new delivery.
Key points
What this paper means for leaders
- Existing code is an input to AI-written changes, not merely background.
- Prioritise unsafe patterns that are both consequential and likely to be reused.
- Keep security review independent of an instruction to follow local style.
- Test the effect of repaired examples without assuming the whole system is safe.
Technology & Operating Model
The next change can inherit yesterday's mistake
An AI coding rollout should include a decision about the software already in place. A tool that reads nearby files can produce work that fits the organisation's conventions. But familiar code is not necessarily safe code. Before expanding the pilot, ask which examples the tool is likely to copy and whether anyone has checked them.
This changes the investment question. New-feature capacity and maintenance capacity should not be approved as unrelated budgets. If an old implementation becomes a reference for many new changes, repairing it may protect more than the original component. That is an Institute inference to test locally, not a measured financial return.
Imagine an internal service with an old example that omits a necessary access check. An assistant follows that pattern when adding another feature. The new feature appears consistent with the existing system, but consistency has carried the omission forward. This is an invented illustration, not a reported customer incident.
Continue reading
Register once. Keep reading every Institute article.
Read all Institute research on this device with your name and work email. No password or account setup needed.