You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AGENTS.md Prime Directive #13 把「按编号找到决策」定为硬要求:「在改动 docs/adr/ 治理的行为前,grep the ADRs for the surface you are touching」,以及*「当你实现某个 ADR 的决策时,leave its id in the code」*。这两条都以「编号 ⇒ 唯一决策」为前提,而上面三个编号不满足它。
scripts/adr-anchors.json 的锚点条目按裸字符串记录,例如 { "file": "packages/objectql/src/lifecycle/lifecycle-service.ts", "adrs": ["ADR-0057"], … }。
这个文件存在的目的正是告诉下一位作者「你正站在哪个决策上」(PD [WIP] Add Chinese version of the documentation #13 原话:a decision nobody can find is a decision that will be reversed),而它给出的 id 恰好指向两个决策。
在 #4672(知识 reap guard)实现中顺带发现,不在该单范围内,按 Prime Directive #10 立单记录。
事实
docs/adr/下有三个编号各自被两个主题完全无关的已接受 ADR 占用:00100010-metadata-protection-model.md0010-nl-to-flow-authoring.md00190019-app-as-consumer-unit.md0019-approval-as-flow-node.md00570057-erp-authorization-core-business-units-and-scope-depth.md0057-system-data-lifecycle-and-retention.md(
0006有三个文件,但那是同一决策的.v2/.v4版本,不算冲突。)为什么这不只是文件名洁癖
AGENTS.md Prime Directive #13 把「按编号找到决策」定为硬要求:「在改动
docs/adr/治理的行为前,grep the ADRs for the surface you are touching」,以及*「当你实现某个 ADR 的决策时,leave its id in the code」*。这两条都以「编号 ⇒ 唯一决策」为前提,而上面三个编号不满足它。实测规模:
packages/**/*.ts中 328 处裸ADR-0057引用。以ADR-0057为例,两个候选是 ERP 授权内核(安全) 与 系统数据生命周期(保留期回收) —— 域相差最远的一对,读者无法从编号本身判断。scripts/adr-anchors.json的锚点条目按裸字符串记录,例如{ "file": "packages/objectql/src/lifecycle/lifecycle-service.ts", "adrs": ["ADR-0057"], … }。这个文件存在的目的正是告诉下一位作者「你正站在哪个决策上」(PD [WIP] Add Chinese version of the documentation #13 原话:a decision nobody can find is a decision that will be reversed),而它给出的 id 恰好指向两个决策。
顺带一处断链:
0057-system-data-lifecycle-and-retention.md头部写[ADR-0010](./0010-metadata-protection.md),该文件不存在(实际是0010-metadata-protection-model.md)—— 而0010本身就是冲突编号之一。观察类,不是今天会咬人的缺陷
没有用户路径受影响,
pnpm check:adr-anchors今天是绿的(它校验锚点与文件的对应关系,不校验编号唯一性)。代价落在agent 导航上:按编号 grep 会同时命中两个无关决策,或者更糟 —— 只读到先命中的那个,并据此推理。因此标
finding、不入pm:queue,严重性交 PM 分诊。可能的处置方向(未做取舍,留给裁决)
ADR-0057-lifecycle),并让check:adr-anchors校验编号唯一性 + 拒绝裸的冲突编号;无论选哪条,建议同时给
check:adr-anchors加编号唯一性断言 —— 这正是本仓反复付费的「declared ≠ enforced」形状:PD #13 声明了「编号可定位决策」,但没有任何门校验它。