TL;DR
- AI accelerates creation by 55%
- AI increases defects by 23.7%
- 80% of AI code violated architectural patterns
- AI code is legacy code on day one
The Productivity Paradox
GitHub's research shows developers complete tasks 55% faster with Copilot.
But velocity isn't productivity. Productivity is value delivered per unit of time.
GitClear analyzed 150+ million lines of changed code:
- Projects with heavy AI assistance show 23.7% higher bug-fix ratio
- Code "churn" (rewritten within two weeks) increased significantly
- Copy/paste code increased 8% year-over-year
Developers write more code faster, then spend more time fixing it.
The Generative Debt Taxonomy
Structural Debt
Code that's technically correct but architecturally wrong.
// AI generated - works but violates architecture
async function getUser(id: string) {
const response = await fetch(`/api/users/${id}`);
return response.json();
}
// Your architecture uses a service layer
import { userService } from '@/services/user';
const user = await userService.getById(id);
AI doesn't know your architecture. It generates plausible code based on training data, not your codebase conventions.
Hallucinated Dependencies
AI sometimes suggests libraries that don't exist. For seniors, this is caught immediately. For juniors, it might survive to production.
I worked with a team where a junior used Copilot to generate a validation function. The AI suggested a library that sounded reasonable but didn't exist. The junior created stub functions and moved on.
The code "worked" in development. In production, the validation validated nothing. Cleanup took two weeks.
The Verification-First Workflow
- Treat AI code as untrusted input
- Review AI suggestions like junior developer PRs
- Verify against YOUR architecture, not training data
- Test edge cases the AI doesn't know about
Seniors ship 2.5x more AI-assisted code than juniors—not because they use it more, but because they can validate the output.
Key Takeaways
- AI is a powerful tool, but tools require skill to use safely
- 96% of devs don't trust AI output, but 50%+ don't review it carefully
- Establish who's responsible for reviewing AI-generated code on your team
- AI code is legacy code on day one
Originally published on alexmayhew.dev
Top comments (0)