Todayâs episode is brought to you by: Notion
Learn more about Notionâs Developer Platform today at https://ntn.so/refactoring
Today's guest is Adam Tornhill, founder of CodeScene and author of Your Code as a Crime Scene.
With Adam, we talked about how his team refactored the whole Street Fighter 3 codebase, which is more than 300K lines of code, in just a few days and spending a few thousand dollars in tokens, and measured how that led to better and cheaper AI development of new features.
And then we discussed how the CodeScene team does agentic development, what the process looks like, what the bottlenecks are, and what are the crucial parts that Adam believes we still need to do as humans.
Show notes:
đĨ Interview Summary
If you are a đ paid subscriber đ you will find my own summary of the interview below.
Itâs the 5-minute, handcrafted takeaways of what we talked about, with timestamps to the relevant video moments, for those who donât have time to sit through the 1-hour chat.
Here is the agenda for today:
đšī¸ Refactoring Street Fighter with AI agents
đ The refactoring playbook
đ§Ē Testing, docs, and the new fundamentals
đ¤ CodeSceneâs agentic development process
đŽ Bottlenecks and the future of the developer role
Letâs dive in đ
1) đšī¸ Refactoring Street Fighter with AI agents
Adamâs team at CodeScene, in collaboration with researcher Marcus Borg, set out to explore large-scale refactoring using AI agents. They needed a code base that was non-trivial, legacy, and universally understandable, so they picked a decompiled version of Street Fighter 3, a 25-year-old game with 300,000 lines of C code.
When they first analyzed the code base with CodeSceneâs own metrics, it scored a 5.4 on a 10-point scale, roughly the industry average for enterprise code and very far from what Adam calls âAI-optimal codeâ (9.5 or higher). The team had two goals: uplift the code health as much as possible, and preserve the existing behavior of the game.
âIâve never ever seen anything close to this before. A rewrite at that scale would have been a 12-to-18-month project. And now that can be automated for a fraction of the cost at a fraction of the time.â
Street Fighter turned out to be a particularly good target because the game already had a clever test approach: computing the hash of each rendered frame and comparing them. This gave the agents a reliable way to verify that refactoring didnât break anything.
The preparation phase took about two weeks (as a side project), with the team exploring different models and patterns. The actual uplift then took just a few days and cost roughly $4,000 in API tokens. They primarily used Claude Code with Opus, because while GPT models were competent at refactoring, they werenât as good at documenting and extending the playbook.




