As AI coding agents become both primary producers and consumers of source code, the software industry faces an accelerating loss of institutional knowledge. Each commit captures a code diff but discards the reasoning behind it - the constraints, rejected alternatives, and forward-looking context that shaped the decision. I term this discarded reasoning the Decision Shadow. This paper proposes Lore, a lightweight protocol that restructures commit messages - using native git trailers - into self-contained decision records carrying constraints, rejected alternatives, agent directives, and verification metadata. Lore requires no infrastructure beyond git, is queryable via a standalone CLI tool, and is discoverable by any agent capable of running shell commands. The paper formalizes the protocol, compares it against five competing approaches, stress-tests it against its strongest objections, and outlines an empirical validation path.
翻译:随着AI编程代理日益成为源代码的主要生产者和消费者,软件行业正面临机构知识加速流失的困境。每次提交虽能捕获代码差异,却丢弃了背后的决策逻辑——包括约束条件、被否定的替代方案以及影响决策的前瞻性背景。我将这种被丢弃的推理过程称为"决策暗影"。本文提出Lore协议,该轻量级协议通过原生git尾部标记重构提交消息,将其转化为包含约束条件、被否替代方案、代理指令及验证元数据的自包含决策记录。Lore无需git之外的任何基础设施,可通过独立CLI工具进行查询,且能被任何能执行shell命令的代理发现。本文形式化定义了该协议,与五种竞争方案进行对比,针对最严峻的质疑进行压力测试,并规划了实证验证路径。