[KongchangAI]
· 3 min read· 1,899 words

Software Entropy in the AI Era: The Collapse After 400,000 Lines of Code in One Month

Software Entropy in the AI Era: The Collapse After 400,000 Lines of Code in One Month

AI-assisted development produced 400K lines in a month before velocity collapsed — only professional engineers reinforcing constraints can fight software entropy.

A Brazilian principal engineer documented an AI-assisted development experiment: 400,000+ lines of code and 150 features in one month, followed by collapsing velocity, with each new feature breaking three old ones and system entropy accelerating. Citing DORA, New Relic, and arXiv data, he shows that rising AI adoption reduces delivery stability and that agentic debt and agentic entropy accumulate rapidly without architectural constraints. The fix requires four layers: AI agent constraints, deterministic tools, strict refactoring cycles, and expert oversight. Core conclusion: AI tools are not ready to replace engineers, whose role shifts to architect, overseer, and constraint builder.

A Principal Software Engineer from Brazil documented an AI-assisted development experiment on his blog: over 400,000 lines of code, 150 features, 240 fixes, and 50 refactorings produced in one month — followed by a collapse in development velocity and an accelerating accumulation of system entropy. His conclusion: without professional engineers continuously building and reinforcing constraint mechanisms, an AI-coded codebase is destined to spiral out of control.

Software Entropy in the AI Era

What Is Software Entropy

The author introduces the thermodynamic concept of entropy into software development: entropy is the natural tendency of a system toward disorder or uncertainty, and software entropy is the inevitable drift of any software system toward chaos as it grows.

New features, new modules, emergency fixes, quick-and-dirty shortcuts for fast delivery — no matter how well-designed the hexagonal architecture or composable patterns may be, they can never cover every use case in advance. Entropy is not a defect; it is a fundamental property of any growing system. The real question is never whether it will happen, but how fast it happens and whether you have mechanisms to manage it.

The theoretical roots of software entropy trace back to Belgian chemist Ilya Prigogine's theory of dissipative structures. Prigogine showed that open systems can maintain ordered structures far from equilibrium through continuous input of energy and information — life itself being the prime example. Software systems are no different: they naturally tend toward disorder, but sustained engineering investment (code review, refactoring, testing, architectural governance) can maintain local order. Once that energy input is interrupted or insufficient, the system accelerates toward disorder. Meir Lehman's laws of software evolution from the 1980s corroborate this view, with the law of continuing complexity growth stating that system complexity increases throughout evolution unless active maintenance work counteracts it. This explains why when AI accelerates code generation without a corresponding increase in oversight and constraint "energy input," entropy is dramatically amplified.

How AI Accelerates Software Entropy

The author led two designers in building an entirely new chat experience product using the AI ecosystem. Before writing the first line of code, he aligned on scope, contracts, and overall architecture, including tech stack, repository structure, architecture guidelines, and context files and skill configurations prepared for AI agents.

The early phase went smoothly. Features piled up one after another, and test coverage and project conventions appeared to be followed. After three weeks, the codebase exceeded 400,000 lines, packed with animations and micro-interactions that would have taken an engineering team multiple sprint cycles to build by hand. But problems began erupting in clusters: development velocity for each feature started to decline, race conditions surged as new behaviors interacted with old state, one new feature could break three existing ones, and features that once took hours now took days.

According to discussions on Bilibili and YouTube channels covering the same topic, this "fast first, then collapse" curve is not an isolated case. Multiple developers report that AI-generated code creates a clear velocity illusion in the early phase, but without architectural constraints, debt accumulates far faster than with human-written code.

Quantitative Evidence of Entropy

The author's personal experiment aligns with multiple industry studies. According to the 2025 DORA State of AI-Assisted Software Development report, every 25% increase in AI adoption correlates with a 7.2% drop in delivery stability, because AI dramatically speeds up code generation, leading to larger batches, slower reviews, and rising system instability.

New Relic's 2026 State of AI Coding report surveyed 200 technology leaders: 94% believed AI-generated code was of higher quality during review, but 78% reported more post-launch incidents, and 82% experienced at least one production failure related to AI-generated code in the past six months. They call this "agentic debt" — unreviewed architectural logic accumulating rapidly until it triggers production incidents.

A systematic review covering 34 studies and 2,847 developers found that every 1,000 lines of AI-generated code adds 1.8 person-days to technical debt principal, and without intervention, the debt ratio doubles within six months.

According to the arXiv paper Beyond the 'Diff', agentic entropy is a form of systemic drift that traditional diff-based and human-centered explainable AI methods cannot capture, because they focus on local outputs rather than global agent behavior. Functional checks (e.g., confirming the code runs) mask deeper architectural violations and security gaps, creating an illusion of rapid progress while drift accumulates beneath the surface.

Agentic Debt and Agentic Entropy are two key concepts emerging in the AI coding era that must be distinguished from classic technical debt. Classic technical debt stems from trade-offs made by human teams under time pressure, typically with clear decision records and traceable owners; agentic debt accumulates from AI agents generating code in bulk without sufficient review, and is characterized by being diffuse, hidden, and hard to locate. Agentic entropy goes further, describing systemic drift in AI agent behavior at the global level — the model may continuously generate code that appears correct and runs locally, while its architectural decisions, naming conventions, and dependencies gradually diverge from the original design intent. Traditional diff-based code review only examines local changes in a single commit and cannot capture this global architectural drift accumulating across multiple commits, so passing functional tests may actually mask deeper system degradation.

The Fix: Tightening Constraint Mechanisms

The author's remediation measures span four layers. Direct instructions, specific skills, and context files within AI agents to enforce architectural patterns. Deterministic tools including lint rules, pipeline validation, and custom checks to verify architectural consistency before merge. Strict periodic refactoring cycles to proactively pay down debt principal. And most importantly, expert oversight — a professional developer continuously strengthening guidelines, judging what to use and what not to use, how to fix things, and correcting AI to follow new stricter rules.

The author emphasizes that without this professional developer continuously strengthening guidelines, understanding trade-offs, and proactively reinforcing constraints, this codebase was doomed to fail — or could only be fully rewritten or deprioritized.

The distinction between deterministic constraints and probabilistic constraints is key to understanding the remediation strategy. AI agent instructions, skill files, and context prompts are probabilistic constraints — they influence the model's output tendencies but cannot guarantee outputs will match expectations, and the model may still deviate in different contexts. Lint rules, pipeline validation, and custom architectural checks are deterministic constraints — they judge results in binary fashion (pass or fail) and do not depend on the model's "understanding" or "cooperation." When dealing with agentic entropy, probabilistic constraints alone are far from sufficient, because entropy is essentially the cumulative effect of probabilistic deviations. Deterministic constraints provide hard gates before merge, blocking unacceptable architectural violations from entering the codebase. The combined strategy: use probabilistic constraints to guide AI toward compliant code, use deterministic constraints to ensure that even when AI deviates it gets caught, and finally rely on expert oversight to continuously update rules to cover newly emerging deviation patterns.

Exponential Codebase Decay

What happened within one month equates to the chaos level that multiple teams and developers would accumulate over years of technical debt — every new feature breaking three old ones. The author calls this exponential codebase decay, and it is not a metaphor but the real consequence when the rate of entropy production exceeds the rate of human oversight by orders of magnitude.

The IEEE Computer Society states it bluntly: standing between problematic AI output and downstream disaster are software engineers. Engineers with knowledge of the software lifecycle who can guide and oversee AI assistants and their output are invaluable.

The ACM Technology Policy Committee's TechBrief on vibe coding warns that this practice often skips the core engineering practices that ensure systems are safe, reliable, and maintainable. Lead author Simson Garfinkel said it dramatically boosts developer productivity but also introduces security vulnerabilities, increases technical debt, and produces code that is hard to maintain.

Gartner predicts that by 2029, 60% of organizations will adopt significantly smaller software engineering teams at scale, up from 15% in 2026. But smaller teams plus AI does not mean no engineers — it means engineers need different skills: architects, overseers, constraint builders.

The mathematical intuition behind exponential decay can be illustrated with a simple model: assume each new feature introduces an average of 0.3 hidden conflicts with existing features, and each conflict increases subsequent feature development time by 2%. When the number of features grows from 10 to 100, cumulative conflicts grow from 3 to 30, but each conflict's drag on development velocity is nonlinear — because conflicts interact with each other, producing compound effects. The observed reality of "every new feature breaking three old ones" means remediation work grows quadratically with feature count, while development velocity declines exponentially in response. The fundamental difference from human development lies in the time scale: debt that human teams accumulate over months, AI-assisted development can accumulate in a single month, causing problems to erupt before the team has built coping mechanisms. This is why the author emphasizes establishing constraints and refactoring cadence early, rather than remediating after entropy becomes visible.

Reflections for Engineering Leaders

The author poses three questions to managers, engineering leads, VPs, and CTOs. What direction is your organization designing toward — AI writing code with engineers overseeing, or engineers using AI as a tool while retaining architectural ownership? Where are your gaps — do you have mechanisms to detect accumulating software entropy, deterministic constraints rather than just guidelines, engineers who can recognize when AI deviates from architectural intent? What is your oversight model — New Relic data shows 62% of technology leaders trust AI-generated code enough to ship it directly without line-by-line human verification; is that a risk you are willing to take?

Conclusion: Engineers Are Still Necessary

The author is not opposed to agentic coding, nor to non-engineers writing code. His conclusion is that current AI tools are not yet ready to be driven entirely by AI enthusiasts. Engineers will continue to exist; this is the new normal. We should not fear AI but embrace new tools, understand how to improve productivity, and invest more time in strategy, features, design patterns, career development, well-being, and family.

The illusion that one person assisted by AI can replace an entire engineering team is just that — an illusion. What happened within one month is precisely the consequence of removing professional expertise from the loop: accelerated entropy, collapsing velocity, compounding costs. Software engineers are still necessary. The question is whether we are building organizations that know how to use them.

One-line Summary

After AI-assisted development produced 400,000 lines of code in one month, velocity collapsed — only professional engineers continuously reinforcing constraints can counter software entropy.

Paragraph Summary

A Brazilian principal engineer documented an AI-assisted development experiment: over 400,000 lines of code and 150 features in one month, followed by a sharp decline in development velocity, with each new feature breaking three old ones and system entropy accelerating. The author cites DORA, New Relic, and arXiv data showing that rising AI adoption reduces delivery stability, and that agentic debt and agentic entropy accumulate rapidly without architectural constraints. The fix involves four layers: AI agent constraints, deterministic tools, strict refactoring cycles, and expert oversight — none optional. The core conclusion: AI tools are not ready to fully replace engineers; the software engineer's role shifts to architect, overseer, and constraint builder, and removing professional expertise from the loop only accelerates entropy and compounding costs.

#software entropy#AI-assisted development#agentic debt#agentic entropy#technical debt#DORA report#New Relic#AI coding#software engineering#codebase decay
Share:

Related articles