A newly published case study details how an AI coding agent, called AICode, completed a large-scale architectural refactoring that the author deemed 'effectively infeasible' through incremental changes. The task involved dismantling a core lifetime invariant in a 717,725-line production TypeScript application across 3,648 files: ensuring that a streaming AI generation survives the closing of its UI panel and can be reattached to the same live stream without loss or duplication.
The agent operated under a 'specification-first' protocol: it first produced a formal specification, refined it over 14 cycles, then implemented the changes atomically, followed by a compile/test feedback loop and 17 verification cycles auditing the code against the frozen specification. Across 31 audit passes, the agent corrected 201 defects before any human executed the program. The convergence criterion was empirical: two consecutive verification passes with zero findings.
The change touched 189 files (31 new), with the two commits totaling 288 files, 34,770 insertions, and 16,422 deletions. The entire process took three days and cost USD 2,430. The author reports that across the first and roughly thirty later sessions, the software behaved as specified with no observed bugs.
The paper acknowledges the absence of a test oracle or human review, meaning there is no mathematical proof of correctness. Instead, validation was performed through manual testing under stress across 30 coding sessions. The author also published the full specification and raw session logs (over 1,500 pages in French) as evidence, allowing independent inspection and consistency checking.
This case study addresses a central open problem in software engineering: turning the high capability of AI coding agents into a disciplined process that reliably produces production-grade systems, even when changes span hundreds of interdependent files.