The Economic Benefit of Refactoring
A CTO discusses the challenges of maintaining a large codebase generated entirely by AI agents. The author highlights the necessity of refactoring agent-generated code to improve efficiency and reduce token consumption.
Why it matters
As AI-assisted coding becomes standard, managing the technical debt and architectural quality of machine-generated code is becoming a critical engineering challenge.
Giles is CTO for Europe, Middle East and India at Thoughtworks. He has over 25 years experience in engineering and technology leadership across technologies from mobile to AI and industries including retail, fintech and healthcare.
This article is part of “Exploring Gen AI” . A series capturing Thoughtworks technologists' explorations of using gen ai technology for software development.
As part of getting to grips with the new world of agentic engineering, I built an application to support my work. It’s a sophisticated app: high-quality web UI with dynamic refresh and look-up, modals and auto-save, integrations to external systems, machine learning and text analysis, background jobs, and a proper environment setup with fully automated deployment. It’s approximately 150,000 lines of code, primarily in Rust (~120 kLoC) with the remainder in TypeScript and Terraform.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in