Continuous Architecture Specification Governance for LLM Coding Agents: An Industrial Instantiation of Spec-Driven Development and the Self-Obsolescence Law
Description
As autonomous coding agents transition from localized code completion to end-to-end repository engineering, software teams increasingly face a severe Specification Bloat Crisis. Under unconstrained prompt engineering, human architects accumulate hundreds of reactive rules and troubleshooting guides, triggering severe context window dilution and catastrophic Attention Cliffs (>30K tokens), where agent adherence to architectural boundaries collapses. This paper presents Continuous Architecture Specification Governance (CASG), an evolutionary framework derived from an 8-month empirical longitudinal study of AMF-LIMS, a mission-critical 474.9K SLOC pharmaceutical laboratory platform governed by strict GxP and FDA 21 CFR Part 11 regulations.
CASG formally partitions specifications into orthogonal negative invariant bounds (Rules) and positive procedural playbooks (Skills). A centralized 165-line hierarchical router dynamically dispatches specifications on-demand, avoiding 94.40% of redundant prompt injection to insulate agents from the 30,000-token Attention Cliff while reducing LLM operational costs by 94.40%. To suppress pathological glue patching under raw stack traces, CASG introduces a 7-slot structured diagnostic interface governed by an absorbing Markov chain Strike-Two circuit breaker, achieving a 96.54% autonomous repair convergence rate across all 1,243 empirical error episodes (96.93% excluding circuit breaker halts).
Crucially, we discover and formally prove the Self-Obsolescence Law: as architectural rules solidify into deterministic compilation gates, reactive troubleshooting documentation undergoes asymptotic logical obsolescence into zero-maintenance silence. Longitudinal tracking of 13,259 code mutations demonstrates an unprecedented 82.30% long-term code survival rate across an 8-month observation window (with 48.72% of sequential modifications occurring at macro step distances Δ >= 16 interaction steps), proving that a single lead architect can sustain enterprise-scale architectural integrity with less than 1.5 hours of weekly governance overhead.