docs(skills): teach Agent Note consolidation
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write
|
||||
2026-07-19-require-agent-notes-for-non-trivial-changes.md: b9f631706437f380eb87422bdf7f4b8f83932a64
|
||||
2026-07-19-require-agent-notes-for-non-trivial-changes.zh.md: 85265cd11e15575f07f14a34f68c6956b720fe67
|
||||
2026-07-19-require-agent-notes-for-non-trivial-changes.md: 32d7408b3d56e6571a14a8191e9b4b0fe901f5a3
|
||||
2026-07-19-require-agent-notes-for-non-trivial-changes.zh.md: 713845706e650b4b4acd591368d9bcff137a38b7
|
||||
|
||||
@@ -16,6 +16,8 @@ Updating the note that already owns a decision satisfies the rule; a new note is
|
||||
|
||||
A fully superseded implemented note may be consolidated into the current owning note and deleted only after that owner preserves every unique rationale, alternative, consequence, verification contract, and named coverage gap. The same change repairs inbound links and removes any Chinese counterpart, consistency record, and `required` entry in `scripts/translation-pairing.manifest.json`. Partial supersession keeps both notes cross-linked and current; consolidation neither rewrites an old decision into its opposite nor leaves git history as the only copy of rationale.
|
||||
|
||||
When a later decision removes an earlier feature completely, the removal note becomes the current owner only after the feature is absent from production code, configuration, schemas, durable or wire formats, migration, and compatibility behavior; no current documentation presents it as available; and no test exercises it as supported behavior. Removal rationale and tests that verify absence may remain. The removal owner preserves the feature's original motivation, why that motivation no longer justified the surface, alternatives to full removal, the capability given up, conditions for reintroduction, and verification of complete absence. Implementation inventories and tests that only described the deleted behavior are obsolete rather than current verification contracts. A removal limited to one transport, default, implementation, or presentation remains partial supersession.
|
||||
|
||||
Review enforces the semantic boundary. No automated gate attempts to classify a diff as trivial or non-trivial, so this policy adds no gate stage or runtime.
|
||||
|
||||
## Alternatives considered
|
||||
@@ -30,6 +32,8 @@ Review enforces the semantic boundary. No automated gate attempts to classify a
|
||||
|
||||
**Rewrite the old note into the replacement decision.** This erases the decision boundary and its rejected alternatives. Consolidation instead preserves those facts in the current owner before deleting the obsolete file.
|
||||
|
||||
**Preserve every implementation and test detail from a removed feature.** This recreates the obsolete note inside its replacement. The removal owner keeps the rationale and verification needed to understand or revisit the current absence, while deleted mechanics remain available in git history.
|
||||
|
||||
**Add a CI diff-classification gate.** A mechanical check cannot reliably determine whether a semantic change is trivial, while another gate adds runtime and invites false positives or superficial compliance.
|
||||
|
||||
## Consequences
|
||||
@@ -37,5 +41,6 @@ Review enforces the semantic boundary. No automated gate attempts to classify a
|
||||
- Every substantial change preserves its rationale and rejected alternatives beside the implementation.
|
||||
- Contributors maintain an existing owning note instead of creating duplicate records.
|
||||
- Fully superseded records can collapse into one current owner without losing their unique rationale or verification contract.
|
||||
- Features that were later removed can have one current owner without carrying obsolete implementation and test inventories forward.
|
||||
- Partial supersession remains explicit and cross-linked, while deletion requires link, bilingual-pair, and required-manifest cleanup in the same change.
|
||||
- Mechanical edits remain lightweight, and the gate topology and runtime remain unchanged.
|
||||
|
||||
@@ -16,6 +16,8 @@ Status: implemented
|
||||
|
||||
只有在当前持有该决策的记录保存了所有独有的决策依据、备选方案、影响、验证契约和明确指出的覆盖缺口后,才可将被完全取代的 implemented Agent Note 合并到该记录中并删除。同一变更还要修复入站链接,并删除中文对侧文件、一致性记录,以及 `scripts/translation-pairing.manifest.json` 中对应的 `required` 条目。仅部分被取代时,两个记录仍需互相链接并保持与现状一致;合并既不将旧决策改写成与其相反的决策,也不让 git 历史成为决策依据的唯一副本。
|
||||
|
||||
后续决策完全移除较早的功能时,只有该功能已从生产代码、配置、schema、持久化格式或协议格式、迁移和兼容行为中消失,当前文档不再将其描述为可用,且没有测试把它作为受支持行为来执行,移除记录才会成为当前持有记录。移除决策的依据和验证该功能已不存在的测试可以保留。它必须保留该功能的最初动机、为什么该动机已不足以证明继续保留该功能、完全移除之外的备选方案、放弃的能力、重新引入的条件,以及证明已彻底移除的验证。只描述已删除行为的实现清单和测试已经过时,不属于当前验证契约。仅移除一种传输、默认值、实现或展示仍属于部分取代。
|
||||
|
||||
评审负责执行这条语义边界。自动化门禁不尝试把差异分类为平凡或实质性变更,因此这项政策不会增加门禁阶段或运行时间。
|
||||
|
||||
## 备选方案
|
||||
@@ -30,6 +32,8 @@ Status: implemented
|
||||
|
||||
**将旧 Agent Note 改写为替代它的决策。** 这样会抹去决策边界及其否决的备选方案。合并做法是在删除过时文件前,先由当前持有决策的记录保存这些事实。
|
||||
|
||||
**保留已移除功能的每一项实现与测试细节。** 这会在替代记录中重建过时记录。移除决策的持有记录只保留理解或重新审视当前已移除状态所需的决策依据与验证,已删除机制仍可从 git 历史查看。
|
||||
|
||||
**添加 CI 差异分类门禁。** 机械检查无法可靠判断语义变更是否平凡,额外门禁还会增加运行时间,并引入误报或表面合规。
|
||||
|
||||
## 影响
|
||||
@@ -37,5 +41,6 @@ Status: implemented
|
||||
- 每项实质性变更都会在实现旁保留其决策依据和被放弃的备选方案。
|
||||
- 贡献者维护现有的决策持有记录,而不是创建重复记录。
|
||||
- 被完全取代的记录可以归并到一个当前持有记录中,同时不丢失其独有的决策依据或验证契约。
|
||||
- 后来被移除的功能可以只有一个当前持有记录,而无需继续保留过时的实现与测试清单。
|
||||
- 仅部分被取代的情况仍需明确记录并互相链接;删除记录则必须在同一变更中清理链接、双语配对和 `scripts/translation-pairing.manifest.json` 的 `required` 条目。
|
||||
- 机械编辑仍保持轻量,门禁拓扑和运行时间也保持不变。
|
||||
|
||||
Reference in New Issue
Block a user