arXiv:2607.14390cs.SEcs.AI2026-07

用Git做代码智能体的记忆系统,让开发决策可追溯、可复现。

Why Git Is the Memory Solution for the Agentic Development Lifecycle

  • 把记忆绑定到Git版本控制,利用提交记录构建可信的开发历史
  • 检索准确率提升60倍,答案充分性达0.83,远超传统方法
  • 适合需要可审计、可复现的智能开发团队使用

当前代码智能体生成了团队越来越多的代码,但其决策过程(如权衡方案、发现约束、排除路径)常被丢弃在会话日志中。针对智能开发生命周期(ADLC)中的记忆问题,本文主张将记忆机制嵌入Git版本控制,继承其固有的可靠性:提交即真实、重建即更新、合并即验证、审查即管控。我们分别解决种子供给与答案生成问题:通过预注册发布规范,在八个语料库上完成检索研究,五种排序机制被剔除,保留两种,最优配置的池化MRR达~0.31,较原始日志搜索提升~60倍,较诚实解析会话提升~15倍;答案生成阶段,单次检索仅得0.07-0.20的充分性,无限制注入会降低质量。系统采用路由策略:广度查询指向基于Git结构的地图,精准查找由置信度门控的会话片段,推理逻辑则通过决策合成重建,恢复单次会话无法承载的因果链,对约5万行生产代码系统达到0.83的答案充分性。经路由后,每问题响应仅需382-980个词元,仅为历史记录的千分之一。因真实答案源自提交与会话的链接,无需标注即可在任意用户本地复现。代码、基准和论文源码见github.com/rekal-dev/rekal-cli。

原文摘要 · Abstract (English)

Coding agents now produce a growing share of a team's code, while the reasoning behind each change -- the alternatives weighed, the constraints discovered, the approaches rejected -- is trapped in assistant transcripts that vanish with the session. Memory for this setting, the agentic development lifecycle (ADLC), is usually posed as one retrieval problem and built as machinery: tiered stores, memory graphs, compiled wikis, model-judged admission. We argue memory should instead be git-bound -- built into the repository's version control, inheriting the guarantees the machinery struggles to construct: ground truth from commits, freshness from rebuild, verification from the merge, containment from review. On this ledger we solve two problems separately, then combine them. Seed supply is closed as an eight-corpus retrieval study under a pre-registered ship discipline: five imported ranking mechanisms rejected, two kept, and a best configuration of ~0.31 pooled MRR -- ~60x the raw-transcript grep floor, ~15x an honest parsed-turn floor. Answer assembly is where ranking stops helping: single-shot retrieval scores only 0.07-0.20 answer-sufficiency on real developer questions, and ungated episode injection measurably degrades good answers. A router dispatches breadth to a git-anchored structural map, pointed lookups to confidence-gated episodes, and rationale to decision synthesis, which reconstructs why-arcs no single session contains (0.83 sufficiency on a young ~50k-LOC production system). Routed, the system answers at 382-980 tokens per question -- three orders of magnitude below the recorded history. Because ground truth is mined from commit-session links rather than annotated, every result is replicable on any user's own history at zero labeling cost. The remaining constraint is capture. Code, benchmark, and paper source: github.com/rekal-dev/rekal-cli.

Git代码智能体记忆机制可复现

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。