Scaling Software Complexity and the AI Systemic Risk

As AI-driven complexity accelerates, engineering teams face systemic threats from decoherence and brittle automation. We examine how to maintain coherence in the age of generative software.

TL;DR

  • Systemic Decoherence: AI-assisted development often introduces incompatible, locally valid code models, exponentially increasing long-term technical debt and architectural fragmentation.
  • The Feedback Trap: Unlike game-based AI, software development lacks the rapid, deterministic feedback loops required to verify global system integrity, leading to "deodorant" code.
  • Harnessing Agency: Success in autonomous engineering relies on domain-specific, high-fidelity harnesses rather than generic agentic workflows or "off-the-shelf" LLM skills.
  • Actionable Resilience: Engineering leadership must pivot from raw output metrics to coherence-preservation, using automated testing as the primary catalyst for safe, continuous refinement.

Modern software architecture faces an emerging threat: systemic decoherence. As engineering teams integrate large language models (LLMs) into their CI/CD pipelines and IDE workflows, they generate code at an unprecedented rate. However, this velocity frequently masks the accumulation of "locally valid but mutually incompatible" models. According to analysis by Kristen Maevyn, decoherence occurs when a system’s internal logic becomes fragmented, forcing engineers to spend an increasing percentage of their time translating between disparate design patterns rather than extending functionality. When the cost of managing these translations eclipses the cost of development, the system enters a state of rot—a "big ball of mud" constructed at high speed. This phenomenon is not merely a byproduct of developer error but a structural consequence of how AI tools are currently deployed. When engineering teams prioritise short-term feature delivery—the "quick path"—over long-term adaptability, they incur a specific form of debt that compounds exponentially. Maintaining coherence requires a deliberate, often slower, investment in domain modelling. For technical leaders, the challenge is to distinguish between legitimate productivity gains and the illusory progress provided by AI agents that lack the necessary context to maintain global system integrity.

The Rise of Systemic Decoherence

Decoherence describes a state where an evolving codebase drifts away from a unified architectural vision. In human-led teams, architectural drift is often mitigated by shared mental models and explicit communication. In contrast, LLM-based agents lack internalised context; they treat the codebase as a sequence of tokens to be predicted, prioritising local validity (does this function compile?) over global coherence (does this module violate the established data flow or domain boundary?). The "quick path" of development—applying a patch or adding a feature without updating the underlying abstractions—accelerates decoherence. If developers do not explicitly counter this by refactoring toward coherence, the system enters a state where any change risks unintended side effects. This effectively cripples the development lifecycle, as the cognitive load of navigating the resulting "pong" of inconsistencies becomes insurmountable. As noted in recent commentary, the system reaches a point where effort spent attempting to enhance the codebase only accelerates its degradation.

Metric Coherent System Decoherent System
Refactoring Cost Predictable, modular Non-linear, high risk
Design Patterns Uniform, enforced Contradictory, fragmented
AI Interaction Domain-constrained Context-agnostic
Technical Debt Managed via tests Compounding exponentially

Constraints of AI-Driven Feedback Loops

The success of reinforcement learning in environments like Chess or Go is often cited as a proxy for the future of AI-driven software development. However, these successes rely on deterministic, closed-loop environments where the feedback signal—a win or loss—is instantaneous and unambiguous. Software engineering operates under entirely different constraints. The feedback loop for software is defined by its ultimate utility: how effectively the system enables users to complete tasks. This loop is slow, multi-dimensional, and prone to noise. When an AI agent optimises solely for the completion of a pull request or a ticket, it lacks the necessary environmental signals to understand long-term maintainability. This leads to common anti-patterns, such as "heavy commenting," which often functions as an olfactory deodorant for poor design. If an agent requires excessive documentation to explain a module’s logic, the underlying architecture has failed to express its intent through its code structure.

Crafting Domain-Specific Harnesses

Generic, off-the-shelf agentic skills are insufficient for complex enterprise systems. Relying on generalised automation often leads to the "software factory" model, which prioritises raw output over architectural soundness. Substantial success in autonomous development requires the construction of sophisticated, problem-specific harnesses. Engineering leaders should view these harnesses as the implementation of "Ubiquitous Language" in the AI era. By pinning down a precise, project-specific vocabulary and encoding it into the agent’s prompt engineering and feedback mechanisms, teams can constrain the AI to operate within the established boundaries of the system.

Implementing Domain Harnesses

Develop a strict interface definition for AI agents to interact with the codebase. By requiring agents to pass a domain-specific validation suite before a PR is even created, you prevent the "first-pass decoherence" that occurs when an LLM writes code that compiles but ignores your system's design invariants.

Strategies for Constraint

  • Define the Domain: Maintain glossaries and explicit architectural patterns. Ensure these are injected into the context window as foundational constraints.
  • Feedback Loops: Create automated test suites that serve as the agent's "game environment," providing immediate pass/fail signals.
  • Boundary Enforcement: Treat the harness as a contract. If the agent’s proposed solution breaks the domain harness—such as leaking an internal database model into the API layer—the code must be rejected before it ever reaches human review.

Testing as a Catalyst for Improvement

A lack of automated test coverage is the primary enabler of systemic decay. When coverage is sparse, teams default to the "if it ain’t broke, don’t touch it" fallacy. This creates a static environment where technical debt remains unaddressed until it causes an outage. Conversely, robust guard rails and safety nets, such as comprehensive unit and integration tests, transform the risk profile of the system. With sufficient testing, the engineering mindset shifts from "maintenance as avoidance" to "maintenance as refinement." When a safety net exists, engineers—and their AI agents—can actively seek out and improve existing abstractions, turning potential decoherence into an opportunity for refactoring. Testing is not merely a bug prevention mechanism; it is the infrastructure that allows for continuous evolution without sacrificing system integrity.

# Example: Establishing a test-first feedback loop for AI
# Run this locally before committing AI-generated code
# Always test in staging/CI environment first.

npm run test:unit -- --coverage --threshold 90
npm run test:integration -- --tags=domain-boundary-check

Economic Realities and the AI Build-Out

The current market environment, characterised by massive data centre investment, has direct implications for engineering strategy. Historical analysis, such as that provided by Jason Furman, suggests that the "AI bubble" is largely a phenomenon of stock market valuations rather than a systemic risk to the foundational financial architecture. For the individual practitioner, this means the pressure to deliver via AI-assisted means is often a reaction to external market volatility rather than an internal engineering necessity. Furthermore, the concentration of capital in high-density compute infrastructure has diverted resources from broader societal needs. Engineering leaders should remain cognisant that the current surge in AI spending is a corporate capital allocation strategy. While the tools provided by this expansion can be powerful, they do not alleviate the requirement for sound engineering judgement. The bubble may pop, but the codebases built on the current generation of tools will remain. Prioritising coherence is the only strategy that ensures long-term viability, regardless of market cycles.

Strategic Next Steps for Technical Leaders

Engineering leadership in the era of AI requires a fundamental shift in priorities. Instead of simply measuring pull request velocity or lines of code generated, leaders must treat systemic coherence as a primary performance metric.

Audit for Decoherence

Identify modules with high churn and low test coverage. These are the primary sites of decoherence. Prioritise these modules for immediate refactoring and the introduction of stricter domain harnesses before attempting to automate new features in those areas. Failure to do so will accelerate the arrival of a unmaintainable "big ball of mud."

Frequently asked questions

What is the most effective way to detect systemic decoherence in a codebase?

Decoherence manifests as an exponential increase in the time required to complete simple tasks or fix bugs in specific modules. You can detect it quantitatively by monitoring "churn-to-coverage" ratios; modules that change frequently but lack high-fidelity automated test coverage are the most likely to have become decoherent. If you find your senior engineers spending more time explaining architectural constraints to junior developers or AI agents than writing code, you have entered a state of systemic decoherence.

Should I stop using AI tools if my system is already experiencing decoherence?

No, but you must change how you use them. AI tools are excellent for refactoring existing, well-defined modules, but they are dangerous when tasked with creating new ones in a system where the "Ubiquitous Language" is not yet established. Use AI as a force multiplier for writing tests and documenting existing interfaces. Do not allow agents to make architectural decisions until you have established a domain-specific harness that restricts the AI to your system's established patterns.

How do I convince management that slower development is sometimes necessary?

Frame the conversation around the "cost of change." Explain that decoherence makes future features exponentially more expensive to implement. Use the economic concept of technical debt—by investing in domain-specific harnesses now, you are reducing the interest payments on every subsequent feature. When you show that a coherent system allows for faster, lower-risk deployments, the argument for "slower" initial development shifts from an abstract architectural preference to a concrete financial and operational strategy.

Sources and further reading

This analysis was produced by the ITSTCK editorial pipeline with AI assistance, using only the public sources cited above, and passed automated checks for structure, sourcing and CVE accuracy. Verify critical details against the vendor advisory before acting.

Subscribe to ITSTCK

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe