← News

ResearchSources: arXiv · 3 Dec 2026

Case study tests regenerative coding: deleting code and rebuilding it with local small language models

A report describes babregen, an open-source tool that deletes a program module and rebuilds it from durable records using local small language models, with no access to the old code.

In plain words

Researchers tested an idea from Martin Fowler: instead of editing old code, you delete a module and let a small language model running locally rebuild it from records of what the module must do. The tool babregen automates this and checks the new code against tests. In their study, two local models produced working replacements, though not always on the first try.

What was announced

The arXiv report presents a case study of regenerative software, a concept the authors attribute to Fowler. A module is deleted and rebuilt by local small language models using records of the module, its public signatures and docstrings, and the source of its durable evaluations. The open-source tool babregen implements seven primitives from Fowler that keep a module's intent, architecture and evaluations as durable records, with a static check comparing these records against the source code. A mutation analysis and a strict acceptance rule test the strength of the evaluations, and no generation of a module has access to the old code.

In the study, two local small language models rebuilt working modules: the larger model was accepted at the first attempt in every run, while the smaller one needed a repair in every run but one. The acceptance rule rejected one rebuild that violated a documented input contract, and a post-freeze check found one accepted rebuild exposed an additional name through a star import. Two human steps examine surviving mutants and rejected regenerations so failure causes can be traced. The authors conclude that knowledge exercised by evaluations can outlive the implementation, while noting it remains open whether this holds for maintaining a mature module.

What it does not show

  • The evidence is an arXiv abstract, so the full paper's methods and results could not be checked.
  • The study covers a single case study with two local models; broader applicability is not established.
  • The authors state that whether the approach preserves the knowledge needed to maintain a mature module remains open.

For security and IT teams

Scope
The report describes a case study with an open-source tool and a worked example, not a production deployment; the tool maps each primitive to a record, check and command.

Sources

Source-support review completed 3 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.

Coverage: arXiv: abstract.

Updates and corrections

No corrections so far.

First published 3 Dec 2026

New to the subject? AI from the Ground Up starts from the beginning.