CodeScene published a case study showing that AI agents can refactor a large legacy codebase quickly and cheaply. Over three weeks, the agents rewrote a 300,000‑line C version of Street Fighter III: 3rd Strike, producing 2,903 commits across 726 files. The work cost roughly $4,000 in AI token usage – about half a month’s developer salary – and moved the Code Health score from 5.6 to a perfect 10.0.
How the AI did it
The team used the CodeHealth MCP Server as a deterministic quality signal. The server gave each change a score, letting the agents know whether a refactoring helped or hurt the code’s health. A replay‑trace harness compared the game’s frame‑by‑frame state before and after each change, ensuring functional correctness. The agents learned a playbook of 22 refactoring recipes, including familiar patterns like Extract Function and novel ones such as Shared Index Range for loops that differ only in start/end values.
What practitioners think
Reactions on LinkedIn split along two lines. Some, like CTO Mats Iremark, called the result “almost like cheating” and highlighted the huge productivity gain. Others, such as tech lead Konrad Otrębski, questioned the scope, noting the work was done on an open‑source game rather than a production system and asking whether the changes were merged in a single massive pull request or many smaller ones. CodeScene’s engineers said the changes were merged through 54 pull requests on a fork.
Why it matters
For a typical developer, this shows that AI can automate large‑scale clean‑up tasks that would normally take months, potentially lowering the cost and risk of working with legacy code. However, the result depends on having a reliable correctness check, which many real‑world projects lack.