跳到正文
arXiv:cs.AI· Thomas Bartz-Beielstein·· 4 小时前

删除代码而不丢失知识:面向 Python 库的可再生软件实践

Deleting Code Without Losing Knowledge: Regenerative Software for Python Libraries

AI 导读

一份 53 页报告将 Fowler 提出的七项原语首次应用于安全关键预测库 spotforecast2-safe,知识以机器可读记录存于受跟踪目录,并据此为每个单元生成不含实现、只含架构、意图、决策、公开契约、评估与消费者的再生包。

正文

View PDF HTML (experimental)

Abstract:In the age of "Software 3.0", when a complete program can be rewritten in minutes by an agent, the traditional approach of relying on code as the sole source of truth becomes questionable. Fowler advocated for a set of seven primitives, which lay the framework for regenerative software, so that programs can be deleted and rebuilt without losing their knowledge. The knowledge lives in machine-readable records in a tracked directory, from which a *regeneration bundle* is built for each unit. The regeneration bundle is a single file with the module's architecture, intent, decisions, public contract, evaluations, and consumers, but no implementation, plus the one dependency module it may import. The open-source package spotregen implements these primitives and provides a graphical user interface. This report presents a first application of Fowler's primitives to the safety-critical forecasting library spotforecast2-safe. During the first experiments, the Claude Code session that orchestrated the study consumed more than 43 million tokens, almost all of them its own history re-sent with every request. This motivated the switch to an architecture that is built on local models. Deterministic checks and the maintainer judged the results. The report contains executable examples for every primitive. Each example runs spotregen against the repository or against a throw-away copy of it.
Comments: 53 pages
Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI)
MSC classes: 68-04
ACM classes: D.2.0
Cite as: arXiv:2610.17197 [cs.SE]
  (or arXiv:2610.17197v1 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2610.17197

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Thomas Bartz-Beielstein [view email]
[v1] Mon, 12 Oct 2026 17:57:40 UTC (4,695 KB)

来源:arXiv:cs.AI · arxiv.org