Code Maintainability Plummets in the AI Coding Era

๐ **Source:** [Code Maintainability Plummets in the AI Coding Era](https://leaddev.com/ai/code-maintainability-plummets-in-the-ai-coding-era)
> [!note]+ Document Notes
> tags: [ai-coding, technical-debt, code-maintainability, software-quality, developer-tools, code-duplication]
> author: [MISSING]
> source: LeadDev
> reference: https://leaddev.com/ai/code-maintainability-plummets-in-the-ai-coding-era
> date created: 2026-07-09 09:00
>
> # ๐ท๏ธ Title: Code maintainability plummets in the AI coding era
>
<!-- deep-read:sections start -->
## ๐งญ Table of Contents
- [๐ Summary](#-summary)
- [๐ Main Content](#-main-content)
- [๐๏ธ Notes](#๏ธ-notes)
- [๐ References](#-references)
- [๐ฃ๏ธ Paraphrase](#๏ธ-paraphrase)
- [๐ฐ Newsletter](#-newsletter)
- [โ
Action Items](#-action-items)
- [๐งช Hypotheses](#-hypotheses)
- [๐ Methodology](#-methodology)
- [โ Questions](#-questions)
- [๐ฎ Future Research](#-future-research)
- [๐ก Implications](#-implications)
- [๐ง Learning Styles Assessment](#-learning-styles-assessment)
- [๐ Accessibility Assessment](#-accessibility-assessment)
- [๐ DEIB Assessment](#-deib-assessment)
- [โ
Logical Validity](#-logical-validity)
- [๐ก๏ธ DARVO Analysis](#-darvo-analysis)
- [๐ฏ Conclusion](#-conclusion)
### ๐ References
- [GitClear/GitKraken โ The AI Code Quality & Maintainability Gap](https://www.gitclear.com/the_ai_code_quality_maintainability_gap)
- [Google DORA research](https://dora.dev/research/)
- [How AI-generated code accelerates technical debt (LeadDev)](https://leaddev.com/technical-direction/how-ai-generated-code-accelerates-technical-debt)
- [AI doesn't create great developers, it amplifies them (LeadDev)](https://leaddev.com/ai/ai-doesnt-create-great-developers-it-amplifies-them)
## ๐ Summary
- **What happened.** GitClear and GitKraken analyzed 623 million real-world code changes from 2023 to 2026 and found eight maintainability metrics degrading in the AI coding era: duplication up 81%, code reuse (move/refactor) down 70%, legacy refactoring down 74%, error masking up 47%, and functional connectivity down 35%.
- **Why it matters.** AI-assisted commits are now a quarter of all commits. The pattern is a structural shift away from shared libraries and legacy maintenance toward disposable, net-new code โ a slow accumulation of technical debt that maintainers inherit.
- **Key stakeholders.** Engineering leaders, maintainers, developers using LLMs in-flow, and the researcher Bill Harding (CEO of GitClear, report author).
- **Risks and tradeoffs.** Duplicated implementations that are "similar yet different," silently swallowed errors producing shallow apps and confusing user behavior, and rotting legacy code. Against this, AI delivers speed and prompt-satisfaction.
- **Bottom line.** AI accelerates output while eroding the maintainability properties that keep codebases livable; leaders should measure obfuscation patterns and course-correct, especially for models and junior cohorts more prone to these faults.
## ๐ Main Content
- The article's core claim is that AI coding tools optimize for satisfying a prompt, not for long-term maintainability, and that this shows up as measurable regressions across eight code-quality metrics.
- **DRY erosion.** Do not repeat yourself (DRY) holds that every piece of knowledge should have a single authoritative representation. Harding's framing โ "Every time you want something, AI creates a new package for it" โ describes the opposite: proliferation of near-duplicate implementations. Duplication (five-plus consecutive repeated meaningful lines) is up 81%.
- **Reuse collapse.** "Move (refactor)," a measure of how often commits edit existing code, is down 70%. Less sharing means teams re-solve the same problems and must rework testing, docs, and understandability around each new build.
- **Legacy neglect.** "Legacy refactoring" (changes to code last touched >12 months ago) has fallen 74% since 2023. Functional connectivity (calls to other functions in new commits) is down 35%. Developers build new instead of tending what exists.
- **Error masking / obfuscation.** Implementing a function properly means inferring possible inputs, which costs time and tokens. The shortcut is code that never throws. GitClear measured a 47% rise in "obfuscation" โ the density of rescue/catch blocks, safe-navigation operators, and stubbed methods that squelch unexpected-input signals. Result: shallow apps and confusing user behavior.
- **Contested / uncertain.** The article notes "some signals seem to be flattening" โ duplication and churn didn't increase as much recently โ leaving open whether this is a plateau. Harding thinks it's "far from over." Causation vs. correlation is not fully established; these are observational trends across a large corpus, not a controlled experiment.
### ๐๏ธ Notes
- 623M code changes analyzed, 2023โ2026; AI-assisted commits โ 25% of all commits.
- Eight maintainability-related metrics degrading; the "clearest signal" is declining reuse / shift away from shared libraries.
- Duplication +81% (unit: 5+ consecutive repeated meaningful lines).
- Move/refactor โ70%; legacy refactoring โ74% since 2023; functional connectivity โ35%.
- Obfuscation / error masking +47% relative to base year, rising year over year.
- Harding quotes carry the argument: "five different implementations of the same thing that are similar yet different"; "AI strongly prefers to write code that won't be labeled as a defect."
- Corroboration: Google DORA 2024 โ every 25% additional AI usage creates 7.2% more instability; 2025 and 2026 analyses echo instability tied to AI.
- Prior GitClear work: early-2025 validated AI code bloat/tech debt; early-2026 argued top performers gain most from AI (reinforcing the "10x developer" myth).
- Incident anchors: Moltbook token leak; Replit deleting a production database; PocketOS agent deleting a company database in 9 seconds.
- Leader guidance: build AI-coding best-practice awareness, review outputs, measure obfuscation patterns, watch specific LLMs/junior cohorts, course-correct.
## ๐ References
- [The AI Code Quality & Maintainability Gap โ GitClear](https://www.gitclear.com/the_ai_code_quality_maintainability_gap)
- [DORA research โ Google](https://dora.dev/research/)
- [How AI-generated code accelerates technical debt โ LeadDev](https://leaddev.com/technical-direction/how-ai-generated-code-accelerates-technical-debt)
- [AI doesn't create great developers, it amplifies them โ LeadDev](https://leaddev.com/ai/ai-doesnt-create-great-developers-it-amplifies-them)
- [Replit deleted production database โ The Register](https://www.theregister.com/software/2025/07/21/vibe-coding-service-replit-deleted-production-database/719783)
- [AI agent deleted a company's database in 9 seconds โ Euronews](https://www.euronews.com/next/2026/04/28/an-ai-agent-deleted-a-companys-entire-database-in-9-seconds-then-wrote-an-apology)
## ๐ฃ๏ธ Paraphrase
- Most developers in 2026 code with LLMs in their flow, but agentic output routinely violates DRY by generating a fresh package for every need instead of reusing existing knowledge.
- A GitClear/GitKraken study of 623M changes found AI-assisted commits are a quarter of the total and that eight maintainability metrics are worsening.
- The strongest signal is falling code reuse: teams edit existing code far less and discard prior progress each time they re-implement.
- To satisfy prompts cheaply, AI writes code that never errors, inflating error-masking constructs 47% and leaving maintainers to untangle which handling was real versus expedient.
- Legacy code is going untended โ refactoring of year-plus-old code has dropped 74% โ while corroborating DORA data ties higher AI usage to more instability; some metrics may be flattening, but the researcher expects the problem to persist.
## ๐ฐ Newsletter
- New from LeadDev: a sobering look at what AI-assisted coding is doing to maintainability. GitClear crunched 623 million commits and the trend lines aren't kind โ duplication up 81%, reuse down 70%, legacy refactoring down 74%. For the WordPress crowd shipping plugins and themes with AI in the loop, the takeaway is DRY still matters: reach for shared libraries and existing hooks before letting the assistant spin up yet another near-duplicate helper. Worth pairing with your own PR review checklist and a scan for silently swallowed errors.
- Helpful links: [the GitClear report](https://www.gitclear.com/the_ai_code_quality_maintainability_gap) and [Google's DORA research](https://dora.dev/research/) for the instability angle.
## โ
Action Items
#### DevRel
- Developer advocacy: publish guidance on DRY-preserving prompting; demo reuse-first agent workflows with measurable duplication deltas.
- Education: run a workshop on spotting AI error-masking (rescue/catch bloat, safe-navigation overuse, stubbed methods).
- Developer experience: ship snippet/library templates so the "reuse" path is lower-friction than "generate new."
- Developer marketing: content series on measuring maintainability metrics before/after AI adoption.
- Community management: survey members on observed AI code-bloat and legacy-neglect patterns.
- Internal/external/cross-project: align on shared obfuscation-detection tooling and feedback loops.
#### OSPO
- Policy & Governance: add AI-code review criteria (duplication, obfuscation) to contribution policy.
- License Compliance: watch for AI-generated near-duplicate vendored code that complicates provenance.
- Security Management: flag silent error suppression as a security review item (masked failures hide vuln signals).
- Software Inventory: track functional-connectivity decline as an SBOM/architecture drift indicator.
- Developer Support: office hours on refactoring AI-bloated modules toward reuse.
- Community Engagement: fund maintenance/legacy-refactor work upstream, not just net-new features.
- Strategic Alignment: report maintainability KPIs alongside velocity to executives.
#### Community
- Maintainers: add a "no new package when a shared one exists" release-hygiene check.
- Contributors: onboarding path teaching move/refactor over rebuild.
- Sponsors: earmark milestones for legacy refactoring, not only features.
- Ecosystem: coordinated review drills for AI-introduced obfuscation.
#### WordPress
- Core: triage AI-assisted PRs for duplication and swallowed errors.
- Core Performance: profile whether AI-generated error handling masks perf regressions.
- Core AI: build evaluation sets that penalize error-masking and duplication.
- **Core Program Team:** add maintainability metrics to release-readiness rituals.
- Mobile: review AI-generated fallback logic in offline UX for silent failures.
- Playground: reproducible labs demonstrating AI code-bloat patterns.
- Community: meetup kit on AI-assisted code review.
- Training: lesson on DRY and refactoring in the AI era.
- Marketing: narrative on quality-first AI adoption.
- Support: knowledge-base entry on debugging confusing behavior from masked errors.
- Design: n/a for this source's scope.
- Documentation: examples-first patterns that encourage reuse.
- Photos: Not applicable to this source โ no media-library relevance.
- TV: Not applicable to this source โ no video-submission relevance.
- Polyglots: Not applicable to this source โ no localization angle.
- Accessibility: ensure AI-generated error handling still surfaces accessible error states.
- Meta: track duplication metrics in .org contributor tooling.
- CLI: scaffolds that reuse existing commands rather than duplicate.
- Hosting: telemetry to catch instability tied to AI-heavy deploys.
- Tide: add duplication/obfuscation scoring signals.
- Openverse: n/a to this source's scope.
- Themes: review lints for duplicated template logic.
- Plugins: security-liaison check for silently caught errors.
#### The WPCC
- Programs: maintainer stipends aimed at legacy refactoring backlogs.
- Projects: documentation sprint on AI-code review practices.
- Funding experiments: milestone payouts tied to maintainability improvements.
### FAIR
- Technical independence: local metrics/provenance to detect AI-introduced drift.
- Policies and covenants: transparency on AI usage in contributions.
- Productized governance artifacts: scorecards including maintainability metrics.
## ๐งช Hypotheses
- Increasing AI-assisted commit share in a repo predicts rising code duplication over the following quarters.
- Repos with higher obfuscation density show more user-reported "confusing behavior" defects.
- Teams that enforce reuse-first review reverse the move/refactor decline faster than teams that don't.
- Legacy-refactoring decline correlates with slower incident resolution over 12+ months.
- Higher AI usage bands map to higher deployment instability, replicating DORA's 7.2%-per-25% finding.
- Top-performing developers show smaller maintainability regressions than average developers using the same AI tools.
### ๐ Methodology
- Longitudinal mining of large commit corpora (like GitClear's 623M changes) segmenting by AI-assisted vs. not, tracking the eight metrics over time.
- Controlled A/B: teams with reuse-first review policy vs. control, measuring duplication and functional connectivity deltas.
- Defect-linkage study joining obfuscation density to production incident and support-ticket data.
- Replication of DORA instability regression across independent org datasets.
### โ Questions
- Which specific LLMs and prompting patterns produce the most error masking?
- Does reuse decline reflect worse code, or a genuine shift in optimal architecture under cheap generation?
- Are the "flattening" signals a real plateau or a measurement artifact?
- How much of the duplication is harmful vs. benign boilerplate?
### ๐ฎ Future Research
- Causal (not just observational) designs isolating AI's effect on maintainability.
- Tooling to auto-detect and quantify obfuscation in CI.
- Cohort studies on junior vs. senior developers' AI-code maintainability.
- Longitudinal cost accounting: does today's bloat translate to measurable future maintenance cost?
### ๐ก Implications
- Practice: review AI output for duplication and swallowed errors; prefer reuse.
- Policy: maintainability metrics enter governance and release gates.
- Security: silent error suppression is a vuln-masking risk.
- Education: teach DRY, refactoring, and error-cause evaluation explicitly in the AI era.
- Funding: budget for legacy refactoring, not only net-new features.
### ๐ง Learning Styles Assessment
- Reading level estimate: Flesch-Kincaid Grade ~11โ13 (journalistic, some jargon: DRY, obfuscation, functional connectivity). Flesch Reading Ease ~40โ50.
#### ๐ Visual learners
- Present: one hero image and an event banner; no data charts.
- Improve: add before/after bar charts for each of the eight metrics; a trend line 2023โ2026.
#### ๐ Aural learners
- Present: none.
- Improve: 2โ3 minute audio summary of the five headline stats.
#### ๐ฃ๏ธ Verbal learners
- Present: DRY defined inline; vivid analogies ("five different implementationsโฆ similar yet different").
- Improve: glossary for obfuscation, functional connectivity, legacy refactoring.
#### ๐งฉ Kinesthetic learners
- Present: none.
- Improve: a checklist to audit your own repo for duplication and error masking.
#### ๐ง Logical learners
- Present: percentage deltas per metric; DORA corroboration.
- Improve: a table mapping each metric โ definition โ measured change โ consequence.
#### ๐งโ๐คโ๐ง Social learners
- Present: event promo (LDX3).
- Improve: discussion prompts for team retros on AI code quality.
#### ๐งโโ๏ธ Solitary learners
- Present: self-contained argument.
- Improve: reflection prompts on your own AI usage patterns.
#### ๐ฟ Naturalistic learners
- Present: "left to rot" ecosystem framing of legacy code.
- Improve: lifecycle/sustainability framing of codebase health.
### ๐ Accessibility Assessment
#### Screen reader semantics
- Present: headings and paragraph structure; hero image has alt text.
- Improve: ensure decorative event banner isn't announced redundantly; descriptive alt for any added charts.
#### Keyboard navigation
- Present: standard article links.
- Improve: verify visible focus and logical order on the live page (not assessable from content alone).
#### Contrast and readability
- Present: Not assessable from source text โ visual styling not provided.
- Improve: confirm 4.5:1 body-text contrast on the live site.
#### Text resizing and reflow
- Present: Not assessable from source text.
- Improve: confirm reflow at 200% zoom without clipping.
#### Media and captions
- Present: images only; no audio/video requiring captions.
- Improve: provide transcript/audio version for the article itself.
#### Forms and interactions
- Present: a registration gate ("1 article leftโฆ register").
- Improve: ensure the gate and any forms have labeled fields and accessible errors.
#### Standards reference
- Map gaps to WCAG 2.2 AA: 1.1.1 (alt), 1.4.3 (contrast), 1.4.10 (reflow), 2.4.7 (focus), 3.3.2 (labels).
### ๐ DEIB Assessment
#### Cultural breadth
- Present: single-region (US/English) sourcing and examples.
- Improve: cite global engineering data and non-US case studies.
#### Inclusive language
- Present: neutral, professional; jargon like DRY is defined.
- Improve: expand plain-language summary of "obfuscation" and "functional connectivity."
#### Neurodiversity support
- Present: chunked sections with a clear key-takeaways list.
- Improve: more subheadings and icon+text labels for scannability.
#### Representation
- Present: one named expert source (Bill Harding); limited perspective diversity.
- Improve: quote maintainers, junior developers, and researchers outside a single vendor.
#### Psychological safety
- Present: critical but non-blaming toward developers; frames AI, not people, as the driver.
- Improve: avoid implying junior cohorts are the problem; frame as tooling/process gaps.
### โ
Logical Validity
#### Strong reasoning
- Inductive: large-N dataset (623M changes) supports the generalization about maintainability trends โ strong sample, clearly the article's backbone.
- Causal (mechanistic): the "AI's goal is to satisfy a prompt โ shortcut of never-throwing code โ error masking" chain gives a plausible mechanism, not just correlation.
- Corroborative/analogical: independent DORA findings (7.2% more instability per 25% AI usage) triangulate the maintainability claim. Clarify by stating effect sizes with confidence intervals.
#### Fallacies
- Correlation-as-causation risk: metric changes are attributed to "the AI takeover" without controlled isolation. Location: framing around "before/after the AI takeover." Fix: state observational limits and confounders (team growth, changing repos).
- Appeal to authority / single-source reliance: much of the argument rests on one vendor's report and its CEO. Location: repeated Harding quotes. Fix: add independent datasets and dissenting views.
- Hasty generalization on the plateau: "Could this see the final plateauโฆ?" then dismissed โ a leading question. Location: closing paragraphs. Fix: present the flattening data neutrally.
#### Tone of voice
- Concerned, cautionary, mildly alarmist but measured ("sobering data," "left to rot," yet "One can only hope so"). Professional trade-press register aimed at engineering leaders.
### ๐ก๏ธ DARVO Analysis
- Deny: Not applicable to this source โ the article makes no denial; it acknowledges AI's downsides directly ("far from over").
- Attack: Mild โ AI tooling and, briefly, "certain LLMs or junior cohorts" are cast as fault-prone; this is critique, not personal attack on an accuser.
- Reverse victim/offender: Not applicable to this source โ no attempt to recast an accused party as victim; maintainers are consistently framed as the ones inheriting the cost.
## ๐ฏ Conclusion
- Bottom line: AI coding boosts output while measurably degrading maintainability โ more duplication, less reuse, neglected legacy code, and more masked errors โ per GitClear's 623M-change study, echoed by DORA's instability findings.
- Next steps for readers: measure duplication and obfuscation in your own repos, enforce reuse-first review, budget for legacy refactoring, and watch which models and cohorts produce the most masking โ then course-correct.
## ๐ Refactor Appendix โ Code maintainability plummets in the AI coding era
> Density: 2โ5 Literature atoms (H3), 0โ3 Permanent candidates (H4).
> Defaults: 3 Literature, 1 Permanent. Resonance filter: if you can't
> articulate in one line why a claim matters, drop it.
>
> Konik claim-header rules: present tense, declarative, โค10 words when
> possible, searchable, unique, mirrors annotation focus if present.
>
> Atomicity: one declarative sentence per atom. "and"/"also" โ split.
>
> Tag pool: #bmf ยท #addendum ยท #xref ยท #articleseed ยท #storystem ยท #share ยท #aphorisms
### ๐ Literature Atoms (H3)
#### [H1] AI coding raises duplication and lowers reuse
> [!quote] ID:rw_01kwyn0tnxzfp5cgf334g0gfn0_h1
> duplication was tracked as occurrences of five or more consecutive repeated meaningful lines
**Context & use**:
- Body: quantifies the +81% duplication rise; unit = 5+ consecutive repeated meaningful lines.
- Quantifies DRY erosion; the headline maintainability regression to cite.
**Tags**: #xref
**Highlight**: [view highlight](https://leaddev.com/ai/code-maintainability-plummets-in-the-ai-coding-era)
<!-- atomicity: 1 idea โ -->
#### [H2] AI hides errors instead of fixing their cause
> [!quote] ID:rw_01kwyn0tnxzfp5cgf334g0gfn0_h2
> AI strongly prefers to write code that wonโt be labeled as a defect
**Context & use**:
- Harding quote; obfuscation (error masking) up 47% year over base.
- Explains shallow apps and confusing user behavior from silent catches.
**Tags**: #xref
**Highlight**: [view highlight](https://leaddev.com/ai/code-maintainability-plummets-in-the-ai-coding-era)
<!-- atomicity: 1 idea โ -->
#### [H3] Legacy code is being left untended
> [!quote] ID:rw_01kwyn0tnxzfp5cgf334g0gfn0_h3
> "Since 2023, it has fallen 74%."
**Context & use**:
- "Legacy refactoring" = changes to code last touched >12 months ago.
- Developers build new instead of maintaining; functional connectivity also โ35%.
**Tags**: #xref
**Highlight**: [view highlight](https://leaddev.com/ai/code-maintainability-plummets-in-the-ai-coding-era)
<!-- atomicity: 1 idea โ -->
#### [H4] More AI usage tracks with more instability
> [!quote] ID:rw_01kwyn0tnxzfp5cgf334g0gfn0_h4
> "every 25% of additional AI usage creates 7.2% more instability"
**Context & use**:
- Google DORA 2024 corroboration, independent of GitClear.
- Triangulates the maintainability-decline thesis.
**Tags**: #xref #addendum
**Highlight**: [view highlight](https://leaddev.com/ai/code-maintainability-plummets-in-the-ai-coding-era)
<!-- atomicity: 1 idea โ -->
### ๐ง Permanent Candidates (H4)
#### [P1] AI optimizes for prompt-satisfaction, not maintainability
**Claim** (one sentence, Courtney's voice): AI coding tools optimize for satisfying the immediate prompt, which systematically trades away the reuse, legacy care, and honest error handling that keep a codebase maintainable.
**Evidence pointer**: [[#H1]], [[#H2]], [[#H3]]
**Scope & conditions**: Holds for agentic/LLM-assisted commits at scale; breaks when teams enforce reuse-first review and cause-based error handling that counteract the default.
**Links**:
- [[Technical debt]] โ because extends
- [[DRY principle]] โ because contrasts on reuse-vs-regenerate
- [[AI code review practices]] โ because applies-in engineering governance
<!-- atomicity: 1 idea โ -->
### โ๏ธ Fleeting Queue
- [F1] Build a CI check that flags obfuscation density (rescue/catch, safe-navigation, stubs) โ https://www.gitclear.com/the_ai_code_quality_maintainability_gap #fleeting #inbox
- [F2] Compare GitClear metric definitions against DORA instability metric for a combined dashboard โ #fleeting #inbox
### โ Things 3 (max 2 actions)
- [ ] Draft a reuse-first AI code-review checklist for plugin/theme PRs โ engineering #things
- [ ] Skim the GitClear report and note the eight metric definitions โ reading #things
<!-- deep-read:sections end -->
๐ **Full text:** [[Full Document Contents/Articles/Code Maintainability Plummets in the AI Coding Era.md|Code Maintainability Plummets in the AI Coding Era by leaddev.com]]
## Highlights
- duplication was tracked as occurrences of five or more consecutive repeated meaningful lines ([View Highlight](https://read.readwise.io/read/01kx4315hh4snv9svtk5awp1na))
- Note: Defines the metric behind the +81% duplication rise.
- Tags: atom/literature/h1
- Since 2023, it has fallen 74%. ([View Highlight](https://read.readwise.io/read/01kx431w93b9sczvamzsfgxyj3))
- Note: Legacy refactoring collapse โ code left untended in the AI era.
- Tags: atom/literature/h3
- AI strongly prefers to write code that wonโt be labeled as a defect ([View Highlight](https://read.readwise.io/read/01kx4319g73d9ts8vtmf4nj94e))
- Note: Harding on error masking โ silent catches hide defects.
- Tags: atom/literature/h2
- The result is code that silently catches errors without evaluating their underlying cause. ([View Highlight](https://read.readwise.io/read/01kx431f87fscx54pns80m2cgx))
- Note: Mechanism behind shallow apps and confusing runtime behavior.
- Tags: atom/literature/h2
- every 25% of additional AI usage creates 7.2% more instability ([View Highlight](https://read.readwise.io/read/01kx431q9wh8tnnwjnxrkw5ked))
- Note: Independent DORA corroboration of the instability thesis.
- Tags: atom/literature/h4
## Links
- [[AI Coding Defaults to Addition Over Maintenance]] โ distilled claim: immediate prompt satisfaction favors duplicated additions over legacy care and reuse.
- [[Clean Code Is the Human-AI Interface]] โ contrasts: legible shared structure is the maintainability surface AI-assisted changes must preserve.