Skip to content

Commit 7f463e8

Browse files
committed
feat(scripts): 派发前框架新鲜度自检门禁 —— 三份框架副本 vs origin/main (#5866)
#5866 的通道:派发提示词由 harness 从磁盘上的工作树装配,而非 origin/main。 共享 PM 检出长期停在长命分支上就会漂移 —— 2026-08-06 实测一棵落后 173 个提交 的检出,三份框架文档全部还是 #5130 之前的两轴决策框架,从它派发出去的每个 dev agent 都少了 business-need 那条轴,而该轴按 #5130 的裁决是会改变结论的 (#5021#4936 同形状反向判,只有这条轴能把它们分开)。 与 #5865 的 check:skill-frame-sync 是两条不同的不变量,按分诊裁决分脚本: sync 问「同一棵树内四份副本是否同构」,本门禁问「这棵树相对 origin/main 是否 新鲜」。一棵一致地停在两轴的旧树在 sync 上是绿的(副本确实同构,按设计正确), 却正是 #5866 报告的缺陷 —— self-test 把这条独立性钉死:同一份 fixture 跑两个 门禁,断言 sync 绿、freshness 红。 COPIES / AXIS_MAP / analyzeCopy / runAllChecks 从 check-skill-frame-sync.mjs 导入(仅加 export 关键字 + 入口守卫,零行为改动),使「框架结构」只有一份定义; 把锚点复制进第二个脚本,等于在门禁自己身上复刻它们所要治的手抄漂移病。 判据是轴数与轴序(经 AXIS_MAP 映射),不是字节:字节比对会在每条合法改这段 文字的分支上变红,一天之内就会被绕过。字节差异只作为信息打印,从不参与判定。 离线降级为警告而非硬红(分诊明确要求):fetch 失败时按 refs/remotes/origin/main 降级比对,无该引用则告警放行。实现为单一代码路径上的严重度钳制 —— 离线跑的是 同一段比对、打同一段诊断,只有退出码不同,避免降级分支无人执行而腐烂。 不接 lint.yml:CI 检出的是全新 merge ref,本门禁在那里恒绿;而在任何合法修改 框架的 PR 上,「与 main 不同」恰恰是该 PR 的目的,接进去就是假红。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BDmDsu2575gDxeMCxXhDE3
1 parent 7e791e5 commit 7f463e8

3 files changed

Lines changed: 877 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"check:docs-audit-scope": "node scripts/docs-audit/affected-docs.mjs --self-test && node scripts/docs-audit/check-audit-scope.mjs --self-test && node scripts/docs-audit/check-audit-scope.mjs",
3838
"check:role-word": "node scripts/check-role-word.mjs",
3939
"check:skill-frame-sync": "node scripts/check-skill-frame-sync.mjs --self-test && node scripts/check-skill-frame-sync.mjs",
40+
"check:skill-frame-freshness": "node scripts/check-skill-frame-freshness.mjs --self-test && node scripts/check-skill-frame-freshness.mjs",
4041
"check:adr-anchors": "node scripts/check-adr-anchors.mjs",
4142
"check:org-identifier": "node scripts/check-org-identifier.mjs",
4243
"check:authz-resolver": "node scripts/check-single-authz-resolver.mjs --self-test && node scripts/check-single-authz-resolver.mjs",

0 commit comments

Comments
 (0)