CodeScene introduces an AI framework, validated in production at loveholidays, showing when and where it's safe to implement AI coding assistants
MALMÖ, Sweden, Jan. 28, 2026 /PRNewswire/ -- New research shows that AI-coding assistants increase defect risk by at least 30 percent when applied to unhealthy code, with real-world risk likely far higher in legacy systems. The findings come from Code for Machines, Not Just Humans: Quantifying AI-Friendliness with Code Health Metrics, a large-scale, peer-reviewed empirical study by Markus Borg, Principal Researcher at CodeScene, and Adam Tornhill, Founder and CTO at CodeScene.
Key Findings from the Research:
- The 30% Risk Spike: AI-generated code in "unhealthy" parts of the codebases leads to higher defect rates.
- The Context Gap: AI accelerates output but cannot distinguish "working" code from "maintainable" code.
- Productivity Paradox: Improper AI adoption results in slower delivery and cancelled gains due to increased technical debt.
The findings help explain why several recent industry studies have reported more bugs, slower delivery, and cancelled productivity gains after initial AI adoption. In unhealthy code, AI acts as a technical debt multiplier rather than an accelerator.
The research also points to a solution. CodeHealth™ — a research-validated, ten-point code-level metric shown to correlate with defect rates and development speed — acts as a protective buffer for AI-assisted development. Improving code health reduces AI-induced defects while enabling faster, more predictable delivery.
"In the AI era, healthy code is no longer optional," said Adam Tornhill. "It's a prerequisite for safe, effective, and economically viable AI adoption."
To address this gap, CodeScene today outlined an automated AI framework built on CodeHealth™, the CodeScene MCP Server, and the AI-powered refactoring engine CodeScene ACE, forming a self-correcting, agentic workflow that makes AI-assisted development safe, predictable, and measurable.
The framework solves three core problems:
- Risk Assessment & Strategic View — CodeHealth™ analysis shows where AI coding can be safely applied today.
- AI Safeguards — A code health-aware MCP Server enforces deterministic quality checks in real time and prevents AI coding agents from introducing technical debt.
- AI-Powered Uplift for Not-Yet-Ready Areas — Using CodeScene ACE via the MCP Server, teams automatically refactor problematic code so AI can be applied safely. Improvements are validated using CodeHealth™ metrics. Benchmarks show up to 2x improvement over frontier models, with customers reporting 6–8x time savings versus manual refactoring.
Real-World Proof: loveholidays
At loveholidays, early agentic coding with Claude led to declining code health. After introducing CodeScene's code health-aware safeguards, the team reversed the trend and scaled from 0 to 50 percent agent-assisted code within five months while increasing throughput and maintaining high code quality.
As Stuart Caborn, Distinguished Engineer at loveholidays, told International Business Times: "AI has an amplifying effect. If your engineering practices are strong, AI helps you move faster. If they're weak, it will destroy you."
"AI can't determine what 'good code' looks like," Tornhill added. "Code Health gives AI that ground truth, connecting AI performance directly to business outcomes like speed, defects, and ROI."
In the AI era, healthy code is the foundation for scaling AI without scaling risk. The full whitepaper, AI-Ready Code: How Code Health Determines AI Performance, is available now.
About CodeScene
CodeScene helps organizations manage technical debt by impact, adopt AI-assisted coding safely, and prove ROI using CodeHealth™ — the only scientifically validated code quality metric proven to predict defect risk and delivery performance. codescene.com
Photo: https://mma.prnewswire.com/media/2870540/CodeScene.jpg
Logo: https://mma.prnewswire.com/media/2870539/CodeScene_Logo.jpg
Share this article