AI-Generated Smells: An Analysis of Code and Architecture in LLM and Agent-Driven Development

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhu, Yuecai, Tsantalis, Nikolaos, Rigby, Peter C.
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909012655603712
author Zhu, Yuecai
Tsantalis, Nikolaos
Rigby, Peter C.
author_facet Zhu, Yuecai
Tsantalis, Nikolaos
Rigby, Peter C.
contents The promise of Large Language Models in automated software engineering is often measured by functional correctness, overlooking the critical issue of long term maintainability. This paper presents a systematic audit of technical debt in AI-generated software, revealing that AI does not eliminate flaws but rather introduces a distinct machine signature of defects. Our multi-scale analysis, spanning single-file algorithmic tasks and complex, agent generated systems, identifies a fundamental Reasoning-Complexity Trade-off: as models become more capable, they generate increasingly bloated and coupled code. This architectural decay is so pronounced that we establish a Volume-Quality Inverse Law, where code volume is a near perfect predictor of structural degradation. Crucially, we demonstrate that neither functional correctness nor detailed prompting mitigates this decay. These findings challenge the current paradigm of prompt-driven generation, reframing the central problem of AI-based software engineering from one of code generation to one of architectural complexity management. We conclude that future progress depends on equipping agents with explicit architectural foresight to ensure the software they build is not just functional, but also maintainable.
format Preprint
id arxiv_https___arxiv_org_abs_2605_02741
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle AI-Generated Smells: An Analysis of Code and Architecture in LLM and Agent-Driven Development
Zhu, Yuecai
Tsantalis, Nikolaos
Rigby, Peter C.
Software Engineering
Artificial Intelligence
The promise of Large Language Models in automated software engineering is often measured by functional correctness, overlooking the critical issue of long term maintainability. This paper presents a systematic audit of technical debt in AI-generated software, revealing that AI does not eliminate flaws but rather introduces a distinct machine signature of defects. Our multi-scale analysis, spanning single-file algorithmic tasks and complex, agent generated systems, identifies a fundamental Reasoning-Complexity Trade-off: as models become more capable, they generate increasingly bloated and coupled code. This architectural decay is so pronounced that we establish a Volume-Quality Inverse Law, where code volume is a near perfect predictor of structural degradation. Crucially, we demonstrate that neither functional correctness nor detailed prompting mitigates this decay. These findings challenge the current paradigm of prompt-driven generation, reframing the central problem of AI-based software engineering from one of code generation to one of architectural complexity management. We conclude that future progress depends on equipping agents with explicit architectural foresight to ensure the software they build is not just functional, but also maintainable.
title AI-Generated Smells: An Analysis of Code and Architecture in LLM and Agent-Driven Development
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2605.02741