AI Writes Your Code. Nobody Understands It. Here's the Data.
88% of developers say AI worsens technical debt. Maintenance costs hit 4x by year two. Addy Osmani named it Comprehension Debt — the gap between how much code exists and how much your team actually understands.
Published by GitIntel Research
TLDR
- 88% of developers report at least one negative impact of AI tools on technical debt (SonarSource, 2026)
- 53% say AI creates code that "looks correct but is unreliable" — passing review but failing in production
- Unmanaged AI-generated codebases hit 4× maintenance cost by year two compared to human-authored equivalents
- Addy Osmani (Google Chrome) coined Comprehension Debt — the gap between how much code exists and how much developers actually understand
- GitIntel now detects Comprehension Debt patterns in git history: low-context AI commits with high churn ratios
The 4× maintenance cost figure comes from Codebridge's analysis of organizations that adopted AI coding tools in 2023–2024 and tracked maintenance costs two years later. The pattern: AI tools accelerate initial delivery (by an estimated 35–40%), but teams that don't invest in comprehension — documentation, review depth, architectural mapping — hit an inflection point around month 18 where maintenance costs spike past the velocity gains.
Separately, 75% of engineering leaders surveyed by SonarSource said they expected to face moderate or severe AI-related technical debt problems by the end of 2026. That survey was taken in January. Many are already there.
Why Comprehension Debt Accumulates
There are three structural reasons AI-generated code accumulates comprehension debt faster than human-written code:
1. No authorial intent in the commit history
When a developer writes a function, the commit message often captures why — "fix race condition in auth refresh loop" or "cache invalidation for region-based pricing." AI-generated commits tend to describe what, not why. The reasoning that prompted the code lives in a chat window that doesn't get pushed to git.
# Human commit (context-rich)
fix: prevent double-charge on retry after Stripe timeout
- idempotency key now scoped to session + attempt
- resolves #4821 (reported by 3 enterprise customers)
# AI-assisted commit (context-poor)
feat: update payment processing logic
Both commits may contain identical code quality. The difference is whether the next engineer can understand why the code is the way it is.
2. AI optimizes for correctness, not readability
LLMs are trained on vast corpora of code with a reward signal that prioritizes functional correctness. There is no equivalent reward signal for "a new engineer can understand this in 10 minutes." The result is code that works but uses patterns developers in your codebase haven't seen before — borrowed from the LLM's training set, not from your team's conventions. Estimated 8× increase in novel code patterns introduced per month with AI-assisted development (SonarSource).
3. Review incentives break down at AI velocity
AI tools have increased PR volume by ~20% YoY. Each PR brings a review burden. But reviewer time is fixed. The result is rubber-stamp reviews on AI code — the cognitive work of truly understanding the code gets deferred indefinitely. 53% of developers in the SonarSource survey admitted to approving AI-generated PRs they didn't fully understand. The comprehension debt lands with whoever touches the code next.
What This Looks Like in Git History
Comprehension Debt has measurable signatures in git history. When we scan repositories with GitIntel, we see a consistent pattern in high-AI-adoption codebases:
| Signal | Low AI Repos | High AI Repos |
|---|---|---|
| Avg commit message length | 42 words | 11 words |
| Issue/PR reference rate | 61% | 23% |
| Lines added per commit | ~48 lines | ~312 lines |
| Code churn within 30 days | 8% | 34% |
| Duplicate block ratio | 2.1% | 18.7% |
Aggregated from GitIntel scans across 47 repositories, March 2026. "High AI" = >15% Co-Authored-By commits.
The churn and duplication metrics are symptoms. The commit message collapse — from 42 words to 11 — is the root signal. It means the reasoning behind the code isn't being captured anywhere permanent. The context lives in a chat window. The code ships without it.
The Velocity Trap
Here's the math that makes this hard to act on. AI tools demonstrably save developers time in the short term — estimated 3.6 hours per week on code-writing tasks (multiple vendor studies, 2025). That's real. Teams ship faster. Backlogs shrink. Managers see green.
THE VELOCITY TRAP
Time saved writing code (AI)
+3.6 hrs/dev/week
Time added reviewing AI PRs (+23.5% incidents)
−1.2 hrs/dev/week
Time lost understanding unfamiliar AI code
−2.1 hrs/dev/week
Net productivity gain +0.3 hrs/dev/week
Estimates based on SonarSource (2026), CodeRabbit PR analysis (13M PRs), and METR (2025) data. Not a controlled study.
The 0.3 hours might be real. But the comprehension cost compounds. The 2.1 hours lost to understanding AI code grows every month as the ratio of "code I didn't write and don't fully understand" increases. By month 18, the Codebridge data suggests that ongoing maintenance — bug fixes, feature additions, incident response — costs 4× more than it would on a fully human-authored codebase of comparable size.
Bain & Company reviewed AI productivity ROI across 40 enterprise engineering teams in early 2026 and described the organizational outcomes as "unremarkable." The individual developer saves time. The organization does not deliver faster. The gap is comprehension debt, accumulating silently in every AI-assisted commit.
Measuring What You Can't See
You can't fix what you don't measure. And right now, most engineering teams have zero visibility into their comprehension debt. The signals exist — they're in your git history. You just need to surface them.
A basic comprehension debt audit looks at four metrics per commit:
# With GitIntel: scan for comprehension debt signals
gitintel scan --format json | jq '
.commits[]
| select(.ai_assisted == true)
| {
sha: .sha,
msg_length: (.message | split(" ") | length),
lines_added: .insertions,
has_issue_ref: (.message | test("#[0-9]+")),
churn_30d: .churn_ratio
}
'
The four signals — message length, diff size, issue cross-reference, and 30-day churn ratio — give you a rough comprehension debt score per commit. Commits with short messages, large diffs, no issue references, and high churn are the ones most likely to become maintenance sinkholes.
THREE RULES THAT HELP
- 01
Require "why" in AI commit messages. Not "update auth logic" — "update auth logic: fixes retry loop that caused double-charges under Stripe timeout (#4821)." The model can write this. Make it part of your PR template.
- 02
Cap AI diff size at ~200 lines. Above 200 lines, reviewers lose the ability to build a genuine mental model. Split AI-generated changes into smaller, purposeful commits. This is review hygiene, not AI-specific — but AI makes large diffs the default.
- 03
Track AI churn ratio, not just AI ratio. A codebase that's 15% AI-generated is fine. A codebase where 60% of that AI code churns within 30 days is a comprehension debt crisis in progress. The churn ratio is the leading indicator.
The Question Engineering Leaders Aren't Asking
"How much of our code is AI-generated?" is the question teams ask when they start thinking about AI governance. It's the right first question. But the more important question is: "Of the AI-generated code in our codebase, what percentage does any engineer on our team fully understand?"
In most organizations, that number is dropping every month. Not because the AI code is bad. Because it's being generated faster than the team's collective mental model of the system can absorb it.
The $12.8B industry built around generating code faster has not yet built the tooling to measure whether anyone can understand what gets generated. That's the next frontier — and it starts with looking at what's already in your git history.
Measure your codebase's AI ratio
GitIntel scans your git history for AI attribution signals, churn ratios, and comprehension debt indicators.
# Install
curl -fsSL https://gitintel.com/install.sh | sh
# Scan your repo
cd your-repo
gitintel scan
Open source (MIT) · Local-first · No data leaves your machine
Sources: SonarSource (2026), Codebridge (2026), Addy Osmani / addyosmani.com, Bain & Company (2026), CodeRabbit PR analysis, METR (2025). GitIntel scan data from 47 repositories, March 2026.
Related reading on GitIntel: