Metraipolis › archive › dc_d3358847a029

Specification-first convergence with an AI coding agent: a case study of dismantling a core architectural invariant across 189 files in a 717k-line codebase with no… — arXiv:2608.12440

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.12440
License (as archived)
CC0-1.0
Archived
2026-10-19T04:17:58.127Z
SHA-256 of the archived text
858f90310d0e0757ec94a5bfe842890393cce19d74cc11fef03cc385fa3e915e
Stable URL of this page
https://metraipolis.com/documento/dc_d3358847a029

How to cite

Specification-first convergence with an AI coding agent: a case study of dismantling a core architectural invariant across 189 files in a 717k-line codebase with no… — arXiv:2608.12440 — arXiv (en), https://arxiv.org/abs/2608.12440 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_d3358847a029 (Metraipolis archive dc_d3358847a029, sha256 858f90310d0e0757ec94a5bfe842890393cce19d74cc11fef03cc385fa3e915e)
BibTeX
@misc{dcd3358847a029,
  title = {Specification-first convergence with an AI coding agent: a case study of dismantling a core architectural invariant across 189 files in a 717k-line codebase with no… — arXiv:2608.12440},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.12440},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_d3358847a029; sha256 858f90310d0e0757ec94a5bfe842890393cce19d74cc11fef03cc385fa3e915e},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.12440. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

This paper reports a single, fully instrumented case study of a large-scale architectural refactoring by an AI coding agent under a specification-first protocol, with no human review of the generated code and no pre-existing oracle to validate the target behaviour. The task, dismantling a central invariant across a large interdependent codebase, was assessed by the author as effectively infeasible through incremental refactoring, the kind of change that conventionally calls for a rewrite instead. Under the protocol described here, the agent completed it successfully. The system is a 717,725-line production TypeScript application across 3,648 files. The task required dismantling a core lifetime invariant: the guarantee that a UI panel remains open for the duration of an AI request. The target behaviour was that a streaming generation survives the closing of its panel and can be reattached, on reopening, to the same live stream with no loss or duplication. The protocol: formal specification by the agent, 14 refinement cycles auditing that specification against the source code, atomic implementation, a compile/test feedback loop, then 17 verification cycles auditing the code against the frozen specification. Across 31 audit passes, 201 defects were corrected before any human executed the program. The convergence criterion was empirical: two consecutive verification passes returning zero findings. The change touched 189 files (31 new); with the extraction phase, the two commits total 288 files, 34,770 insertions, 16,422 deletions. Across the first and roughly thirty later sessions, the software behaved as specified, no bug observed. Elapsed: three days; cost: USD 2,430. The full specification and raw session logs, 1,500+ pages in French, are published as evidence, allowing inspection of the process and submission to a language model for consistency checking.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-08-14 in cs.AI).
Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2608.12440 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-19T04:13:06.669Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-08-14?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).