agentic-flow-kit 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/modules/hosts/claude/commands/wf-build.md +2 -0
  2. package/modules/hosts/claude/commands/wf-gate-checklist.md +2 -0
  3. package/modules/hosts/claude/commands/wf-review.md +2 -0
  4. package/modules/hosts/claude/commands/wf-source-sync-check.md +2 -0
  5. package/modules/hosts/claude/commands/wf-sync-hosts.md +2 -0
  6. package/modules/hosts/claude/commands/wf-test.md +2 -0
  7. package/modules/hosts/codex/commands/wf-build.md +2 -0
  8. package/modules/hosts/codex/commands/wf-gate-checklist.md +2 -0
  9. package/modules/hosts/codex/commands/wf-review.md +2 -0
  10. package/modules/hosts/codex/commands/wf-source-sync-check.md +2 -0
  11. package/modules/hosts/codex/commands/wf-sync-hosts.md +2 -0
  12. package/modules/hosts/codex/commands/wf-test.md +2 -0
  13. package/modules/hosts/cursor/commands/wf-build.md +2 -0
  14. package/modules/hosts/cursor/commands/wf-gate-checklist.md +2 -0
  15. package/modules/hosts/cursor/commands/wf-review.md +2 -0
  16. package/modules/hosts/cursor/commands/wf-source-sync-check.md +2 -0
  17. package/modules/hosts/cursor/commands/wf-sync-hosts.md +2 -0
  18. package/modules/hosts/cursor/commands/wf-test.md +2 -0
  19. package/modules/hosts/opencode/commands/wf-build.md +2 -0
  20. package/modules/hosts/opencode/commands/wf-gate-checklist.md +2 -0
  21. package/modules/hosts/opencode/commands/wf-review.md +2 -0
  22. package/modules/hosts/opencode/commands/wf-source-sync-check.md +2 -0
  23. package/modules/hosts/opencode/commands/wf-sync-hosts.md +2 -0
  24. package/modules/hosts/opencode/commands/wf-test.md +2 -0
  25. package/modules/hosts/trae/commands/wf-build.md +2 -0
  26. package/modules/hosts/trae/commands/wf-gate-checklist.md +2 -0
  27. package/modules/hosts/trae/commands/wf-review.md +2 -0
  28. package/modules/hosts/trae/commands/wf-source-sync-check.md +2 -0
  29. package/modules/hosts/trae/commands/wf-sync-hosts.md +2 -0
  30. package/modules/hosts/trae/commands/wf-test.md +2 -0
  31. package/package.json +1 -1
  32. package/templates/_agents/commands/build.md +2 -0
  33. package/templates/_agents/commands/gate-checklist.md +2 -0
  34. package/templates/_agents/commands/review.md +2 -0
  35. package/templates/_agents/commands/source-sync-check.md +2 -0
  36. package/templates/_agents/commands/sync-hosts.md +2 -0
  37. package/templates/_agents/commands/test.md +2 -0
  38. package/templates/_agents/rule-budgets.txt +3 -1
  39. package/templates/_agents/scripts/check-loop.mjs +6 -1
  40. package/templates/_agents/scripts/check-loop.test.mjs +27 -0
  41. package/templates/_agents/scripts/policy.mjs +15 -0
  42. package/templates/_githooks/pre-push +3 -2
@@ -2,6 +2,8 @@
2
2
  description: Build 阶段:起 plan + 实现代码 + 自验(确认后才动代码)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Build · 起 plan + 写代码
6
8
 
7
9
  > AI 起草 plan,用户确认;进计划模式列改动,用户确认;最后才动代码。两道确认门。
@@ -2,6 +2,8 @@
2
2
  description: 三处口径一致性检查(doctor §检查项 ↔ check-loop §检查项,显式配对登记表 + 断档/未登记告警)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Gate-Checklist · 三处口径一致性(显式配对登记表)
6
8
 
7
9
  > `src/doctor.mjs` § 检查项 ↔ `.agents/scripts/check-loop.sh` § 检查项,按脚本内 **PAIRS 登记表**对照。
@@ -2,6 +2,8 @@
2
2
  description: 代码评审标准(按风险分级:机器兜底 + AI 自查出清单,用户决策定性与合入)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Review
6
8
 
7
9
  > 参考 Anthropic REVIEW.md 做法。宗旨是**用户决策 + AI 协作**:AI 跑机器门禁、自查、出分级清单与建议;用户确认问题定性与合入。把"该机器兜底"与"靠 AI 自查"分开列明,避免注意力耗在机械逐行上。
@@ -2,6 +2,8 @@
2
2
  description: 装户面同步一致性检查(包源 templates/_agents/ vs 装副本 .agents/ 三类差异:缺失 / 孤儿 / 漂移)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Source-Sync-Check · 装户面同步一致性
6
8
 
7
9
  > `templates/_agents/` 包源 vs `.agents/` 装副本——三类差异报告:缺失 / 孤儿 / 漂移。
@@ -2,6 +2,8 @@
2
2
  description: 跨宿主适配层同步(正文段 sha 比对 + 用户拍板 + 单向 apply;frontmatter 不动)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Sync-Hosts · 跨宿主适配层正文段同步
6
8
 
7
9
  > 改权威源(`templates/_agents/{commands,roles}/*.md`)后薄适配(`modules/hosts/<h>/{agents,commands}/*.md`)要同步——薄适配正文 = 权威源正文,frontmatter 各自保留宿主特化(commands 层文件名 = 宿主命令名,opencode / trae 同用 `wf-` 前缀,单源见 `src/profiles.mjs#HOSTS.commandPrefix`;trae 另有 `name: wf-X`,zcode/omp 各自原描述)。
@@ -2,6 +2,8 @@
2
2
  description: Test 阶段:静态门(架构红线 + build + test)+ UI 实测(headless Chrome)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Test · 静态门 + UI 实测
6
8
 
7
9
  > 两道闸:静态门全过 + 涉及 UI 走浏览器实测。失败不放过。
@@ -2,6 +2,8 @@
2
2
  description: Build 阶段:起 plan + 实现代码 + 自验(确认后才动代码)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Build · 起 plan + 写代码
6
8
 
7
9
  > AI 起草 plan,用户确认;进计划模式列改动,用户确认;最后才动代码。两道确认门。
@@ -2,6 +2,8 @@
2
2
  description: 三处口径一致性检查(doctor §检查项 ↔ check-loop §检查项,显式配对登记表 + 断档/未登记告警)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Gate-Checklist · 三处口径一致性(显式配对登记表)
6
8
 
7
9
  > `src/doctor.mjs` § 检查项 ↔ `.agents/scripts/check-loop.sh` § 检查项,按脚本内 **PAIRS 登记表**对照。
@@ -2,6 +2,8 @@
2
2
  description: 代码评审标准(按风险分级:机器兜底 + AI 自查出清单,用户决策定性与合入)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Review
6
8
 
7
9
  > 参考 Anthropic REVIEW.md 做法。宗旨是**用户决策 + AI 协作**:AI 跑机器门禁、自查、出分级清单与建议;用户确认问题定性与合入。把"该机器兜底"与"靠 AI 自查"分开列明,避免注意力耗在机械逐行上。
@@ -2,6 +2,8 @@
2
2
  description: 装户面同步一致性检查(包源 templates/_agents/ vs 装副本 .agents/ 三类差异:缺失 / 孤儿 / 漂移)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Source-Sync-Check · 装户面同步一致性
6
8
 
7
9
  > `templates/_agents/` 包源 vs `.agents/` 装副本——三类差异报告:缺失 / 孤儿 / 漂移。
@@ -2,6 +2,8 @@
2
2
  description: 跨宿主适配层同步(正文段 sha 比对 + 用户拍板 + 单向 apply;frontmatter 不动)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Sync-Hosts · 跨宿主适配层正文段同步
6
8
 
7
9
  > 改权威源(`templates/_agents/{commands,roles}/*.md`)后薄适配(`modules/hosts/<h>/{agents,commands}/*.md`)要同步——薄适配正文 = 权威源正文,frontmatter 各自保留宿主特化(commands 层文件名 = 宿主命令名,opencode / trae 同用 `wf-` 前缀,单源见 `src/profiles.mjs#HOSTS.commandPrefix`;trae 另有 `name: wf-X`,zcode/omp 各自原描述)。
@@ -2,6 +2,8 @@
2
2
  description: Test 阶段:静态门(架构红线 + build + test)+ UI 实测(headless Chrome)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Test · 静态门 + UI 实测
6
8
 
7
9
  > 两道闸:静态门全过 + 涉及 UI 走浏览器实测。失败不放过。
@@ -2,6 +2,8 @@
2
2
  description: Build 阶段:起 plan + 实现代码 + 自验(确认后才动代码)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Build · 起 plan + 写代码
6
8
 
7
9
  > AI 起草 plan,用户确认;进计划模式列改动,用户确认;最后才动代码。两道确认门。
@@ -2,6 +2,8 @@
2
2
  description: 三处口径一致性检查(doctor §检查项 ↔ check-loop §检查项,显式配对登记表 + 断档/未登记告警)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Gate-Checklist · 三处口径一致性(显式配对登记表)
6
8
 
7
9
  > `src/doctor.mjs` § 检查项 ↔ `.agents/scripts/check-loop.sh` § 检查项,按脚本内 **PAIRS 登记表**对照。
@@ -2,6 +2,8 @@
2
2
  description: 代码评审标准(按风险分级:机器兜底 + AI 自查出清单,用户决策定性与合入)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Review
6
8
 
7
9
  > 参考 Anthropic REVIEW.md 做法。宗旨是**用户决策 + AI 协作**:AI 跑机器门禁、自查、出分级清单与建议;用户确认问题定性与合入。把"该机器兜底"与"靠 AI 自查"分开列明,避免注意力耗在机械逐行上。
@@ -2,6 +2,8 @@
2
2
  description: 装户面同步一致性检查(包源 templates/_agents/ vs 装副本 .agents/ 三类差异:缺失 / 孤儿 / 漂移)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Source-Sync-Check · 装户面同步一致性
6
8
 
7
9
  > `templates/_agents/` 包源 vs `.agents/` 装副本——三类差异报告:缺失 / 孤儿 / 漂移。
@@ -2,6 +2,8 @@
2
2
  description: 跨宿主适配层同步(正文段 sha 比对 + 用户拍板 + 单向 apply;frontmatter 不动)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Sync-Hosts · 跨宿主适配层正文段同步
6
8
 
7
9
  > 改权威源(`templates/_agents/{commands,roles}/*.md`)后薄适配(`modules/hosts/<h>/{agents,commands}/*.md`)要同步——薄适配正文 = 权威源正文,frontmatter 各自保留宿主特化(commands 层文件名 = 宿主命令名,opencode / trae 同用 `wf-` 前缀,单源见 `src/profiles.mjs#HOSTS.commandPrefix`;trae 另有 `name: wf-X`,zcode/omp 各自原描述)。
@@ -2,6 +2,8 @@
2
2
  description: Test 阶段:静态门(架构红线 + build + test)+ UI 实测(headless Chrome)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Test · 静态门 + UI 实测
6
8
 
7
9
  > 两道闸:静态门全过 + 涉及 UI 走浏览器实测。失败不放过。
@@ -2,6 +2,8 @@
2
2
  description: Build 阶段 · 起 plan + 实现代码 + 自验(两道确认门,确认后才动代码)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Build · 起 plan + 写代码
6
8
 
7
9
  > AI 起草 plan,用户确认;进计划模式列改动,用户确认;最后才动代码。两道确认门。
@@ -2,6 +2,8 @@
2
2
  description: 三处口径一致性检查(doctor §检查项 ↔ check-loop §检查项,显式配对登记表 + 断档/未登记告警;横向工具)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Gate-Checklist · 三处口径一致性(显式配对登记表)
6
8
 
7
9
  > `src/doctor.mjs` § 检查项 ↔ `.agents/scripts/check-loop.sh` § 检查项,按脚本内 **PAIRS 登记表**对照。
@@ -2,6 +2,8 @@
2
2
  description: Review · 代码评审(横切,合入前使用;P0/P1/P2 分级清单 + 用户定性与合入时机)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Review
6
8
 
7
9
  > 参考 Anthropic REVIEW.md 做法。宗旨是**用户决策 + AI 协作**:AI 跑机器门禁、自查、出分级清单与建议;用户确认问题定性与合入。把"该机器兜底"与"靠 AI 自查"分开列明,避免注意力耗在机械逐行上。
@@ -2,6 +2,8 @@
2
2
  description: 装户面同步一致性检查(包源 templates/_agents/ vs 装副本 .agents/ 三类差异:缺失 / 孤儿 / 漂移;横向工具)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Source-Sync-Check · 装户面同步一致性
6
8
 
7
9
  > `templates/_agents/` 包源 vs `.agents/` 装副本——三类差异报告:缺失 / 孤儿 / 漂移。
@@ -2,6 +2,8 @@
2
2
  description: 跨宿主适配层同步(正文段 sha 比对 + 用户拍板 + 单向 apply;frontmatter 不动;横向工具)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Sync-Hosts · 跨宿主适配层正文段同步
6
8
 
7
9
  > 改权威源(`templates/_agents/{commands,roles}/*.md`)后薄适配(`modules/hosts/<h>/{agents,commands}/*.md`)要同步——薄适配正文 = 权威源正文,frontmatter 各自保留宿主特化(commands 层文件名 = 宿主命令名,opencode / trae 同用 `wf-` 前缀,单源见 `src/profiles.mjs#HOSTS.commandPrefix`;trae 另有 `name: wf-X`,zcode/omp 各自原描述)。
@@ -2,6 +2,8 @@
2
2
  description: Test 阶段 · 静态门 + 切库冒烟 + UI 实测 + L2/L3 独立复核(关单在本阶段)
3
3
  ---
4
4
 
5
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
6
+
5
7
  # Test · 静态门 + UI 实测
6
8
 
7
9
  > 两道闸:静态门全过 + 涉及 UI 走浏览器实测。失败不放过。
@@ -3,6 +3,8 @@ name: wf-build
3
3
  description: Build 阶段 · 起 plan + 实现代码 + 自验(两道确认门,确认后才动代码)
4
4
  ---
5
5
 
6
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
7
+
6
8
  # Build · 起 plan + 写代码
7
9
 
8
10
  > AI 起草 plan,用户确认;进计划模式列改动,用户确认;最后才动代码。两道确认门。
@@ -3,6 +3,8 @@ name: wf-gate-checklist
3
3
  description: 三处口径一致性检查(doctor §检查项 ↔ check-loop §检查项,显式配对登记表 + 断档/未登记告警;横向工具)
4
4
  ---
5
5
 
6
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
7
+
6
8
  # Gate-Checklist · 三处口径一致性(显式配对登记表)
7
9
 
8
10
  > `src/doctor.mjs` § 检查项 ↔ `.agents/scripts/check-loop.sh` § 检查项,按脚本内 **PAIRS 登记表**对照。
@@ -3,6 +3,8 @@ name: wf-review
3
3
  description: Review · 代码评审(横切,合入前使用;P0/P1/P2 分级清单 + 用户定性与合入时机)
4
4
  ---
5
5
 
6
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
7
+
6
8
  # Review
7
9
 
8
10
  > 参考 Anthropic REVIEW.md 做法。宗旨是**用户决策 + AI 协作**:AI 跑机器门禁、自查、出分级清单与建议;用户确认问题定性与合入。把"该机器兜底"与"靠 AI 自查"分开列明,避免注意力耗在机械逐行上。
@@ -3,6 +3,8 @@ name: wf-source-sync-check
3
3
  description: 装户面同步一致性检查(包源 templates/_agents/ vs 装副本 .agents/ 三类差异:缺失 / 孤儿 / 漂移;横向工具)
4
4
  ---
5
5
 
6
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
7
+
6
8
  # Source-Sync-Check · 装户面同步一致性
7
9
 
8
10
  > `templates/_agents/` 包源 vs `.agents/` 装副本——三类差异报告:缺失 / 孤儿 / 漂移。
@@ -3,6 +3,8 @@ name: wf-sync-hosts
3
3
  description: 跨宿主适配层同步(正文段 sha 比对 + 用户拍板 + 单向 apply;frontmatter 不动;横向工具)
4
4
  ---
5
5
 
6
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
7
+
6
8
  # Sync-Hosts · 跨宿主适配层正文段同步
7
9
 
8
10
  > 改权威源(`templates/_agents/{commands,roles}/*.md`)后薄适配(`modules/hosts/<h>/{agents,commands}/*.md`)要同步——薄适配正文 = 权威源正文,frontmatter 各自保留宿主特化(commands 层文件名 = 宿主命令名,opencode / trae 同用 `wf-` 前缀,单源见 `src/profiles.mjs#HOSTS.commandPrefix`;trae 另有 `name: wf-X`,zcode/omp 各自原描述)。
@@ -3,6 +3,8 @@ name: wf-test
3
3
  description: Test 阶段 · 静态门 + 切库冒烟 + UI 实测 + L2/L3 独立复核(关单在本阶段)
4
4
  ---
5
5
 
6
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
7
+
6
8
  # Test · 静态门 + UI 实测
7
9
 
8
10
  > 两道闸:静态门全过 + 涉及 UI 走浏览器实测。失败不放过。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-flow-kit",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "AI-Native 闭环工作流 + wiki 知识层脚手架——flow-kit init 一条命令为新项目装好 .agents 工作流引擎(阶段命令/角色契约/门禁钩子/kb 检索/看板/规则面预算)+ workflow 文档闭环 + wiki 知识库,装完自包含、零运行时依赖",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -17,6 +17,8 @@ approval_required: true
17
17
  next: .agents/commands/test.md
18
18
  ---
19
19
 
20
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
21
+
20
22
  # Build · 起 plan + 写代码
21
23
 
22
24
  > AI 起草 plan,用户确认;进计划模式列改动,用户确认;最后才动代码。两道确认门。
@@ -16,6 +16,8 @@ approval_required: true
16
16
  next: .agents/commands/build.md(缺点属 build 改 doctor / check-loop 未对账导致的,修复后回 build)
17
17
  ---
18
18
 
19
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
20
+
19
21
  # Gate-Checklist · 三处口径一致性(显式配对登记表)
20
22
 
21
23
  > `src/doctor.mjs` § 检查项 ↔ `.agents/scripts/check-loop.sh` § 检查项,按脚本内 **PAIRS 登记表**对照。
@@ -15,6 +15,8 @@ approval_required: true
15
15
  next: .agents/commands/build.md(仅 P0 / P1 未清时;清零后经用户确认合入)
16
16
  ---
17
17
 
18
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
19
+
18
20
  # Review
19
21
 
20
22
  > 参考 Anthropic REVIEW.md 做法。宗旨是**用户决策 + AI 协作**:AI 跑机器门禁、自查、出分级清单与建议;用户确认问题定性与合入。把"该机器兜底"与"靠 AI 自查"分开列明,避免注意力耗在机械逐行上。
@@ -16,6 +16,8 @@ approval_required: true
16
16
  next: .agents/commands/build.md(漂移属 build 改包源未同步导致的,修复后回 build)
17
17
  ---
18
18
 
19
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
20
+
19
21
  # Source-Sync-Check · 装户面同步一致性
20
22
 
21
23
  > `templates/_agents/` 包源 vs `.agents/` 装副本——三类差异报告:缺失 / 孤儿 / 漂移。
@@ -15,6 +15,8 @@ approval_required: true
15
15
  next: .agents/commands/build.md(漂移属 build 改权威源未同步导致的,修复后回 build)
16
16
  ---
17
17
 
18
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
19
+
18
20
  # Sync-Hosts · 跨宿主适配层正文段同步
19
21
 
20
22
  > 改权威源(`templates/_agents/{commands,roles}/*.md`)后薄适配(`modules/hosts/<h>/{agents,commands}/*.md`)要同步——薄适配正文 = 权威源正文,frontmatter 各自保留宿主特化(commands 层文件名 = 宿主命令名,opencode / trae 同用 `wf-` 前缀,单源见 `src/profiles.mjs#HOSTS.commandPrefix`;trae 另有 `name: wf-X`,zcode/omp 各自原描述)。
@@ -21,6 +21,8 @@ approval_required: true
21
21
  next: L1 关单结束 ;L2/L3 上 prod 时 → .agents/commands/deploy.md
22
22
  ---
23
23
 
24
+ > **装户边界**:本文档中 `src/`、`bin/flow-kit.mjs`、`templates/_agents/`、`modules/hosts/` 为 kit 包源仓视角引用——装户仓(无 `templates/` 包源)对应命令不适用,本仓以 `.agents/` 装副本为准。
25
+
24
26
  # Test · 静态门 + UI 实测
25
27
 
26
28
  > 两道闸:静态门全过 + 涉及 UI 走浏览器实测。失败不放过。
@@ -3,6 +3,8 @@
3
3
  # 超限含义:常驻面只增不减——须先删除或下沉被取代条目再增(一进一出)。
4
4
  # 本文件会被 core.autocrlf 检出为 CRLF,读取方(rule-budget.sh)已显式去 \r,禁止依赖行尾格式。
5
5
  # 口径:预算比较用「索引 / HEAD 字节」(git cat-file,LF 归一);禁用工作区 wc -c 核对(CRLF 膨胀)。
6
+ # 2026-10-06 backflow-loop-audit-remediation:6 份命令文档顶部加「装户边界」标注(build.md 实测 8386B
7
+ # 超 8192 被拦)——单篇上限 8192→8704(与装户 Shipyard.Material 同值,512B 步进);目录合计未超不动。
6
8
  AGENTS.md 7680
7
- .agents/commands/*.md 8192
9
+ .agents/commands/*.md 8704
8
10
  .agents/commands/ 65536
@@ -68,7 +68,8 @@
68
68
  // quote 字段职责冲突(对质凭据 vs 并录指纹,现归还单一职责)。无 batch 的历史行静默跳过
69
69
  // (无判定依据的行不产出不可消除噪声——沿 audit-gate-hardening P3 教训)
70
70
  // 17. 发版提交树上仍未收口的 intent/spec/plan [hard-block]
71
- // 18. 委派台账对账 [warning]
71
+ // 18. 委派台账对账 [warning](policy v4 加 delegationSince 生效日豁免:日期早于锚的 L2/L3 存量豁免——
72
+ // delegations.md 记法自始不含文件名、无豁免时 113 条不可消退;缺键 v1-v3 维持原全量对账)
72
73
  // 19. 逐阶段审计(起草先于入口确认 / 台账审批顺序倒置) [warning]
73
74
  // 20. 引擎脚本测试覆盖(包源环境:templates/_agents/scripts/ 下每个非 *.test.mjs 引擎脚本须有同名兄弟
74
75
  // .test.mjs,或在 .agents/scripts-test-exempt.txt 登记豁免;2026-10-01 gate-script-test-coverage) [warning]
@@ -1077,6 +1078,10 @@ runCheck16({ ROOT, ENUMS, docFiles, fmGet, inSet, isTracked, linesOf, readdirOrN
1077
1078
  if (!inScope) continue;
1078
1079
  const date = sub === 'incidents' ? (fmGet(abs, '发现') || fmGet(abs, '日期')) : fmGet(abs, '日期');
1079
1080
  if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) continue;
1081
+ // delegationSince 生效日豁免(policy v4,2026-10-06 loop-audit-remediation):锚前文档为存量回溯件
1082
+ // ——台账记法约定(delegations.md 头部「任务一句话含文件名」)自生效日才立,存量不回填;缺键
1083
+ // (v1-v3)→ 维持原全量对账行为(向后兼容,检查面不放松)
1084
+ if (typeof kitPolicy.delegationSince === 'string' && date < kitPolicy.delegationSince) continue;
1080
1085
  const base = path.basename(abs);
1081
1086
  const stripped = base.replace(/\.md$/, '');
1082
1087
  if (rows.some((r) => r.date >= date && (r.line.includes(base) || r.line.includes(stripped)))) continue;
@@ -2078,6 +2078,33 @@ w(T, 'workflow/intents/2026-09-12-deep.md', INTENT('deep', '状态: draft\n级
2078
2078
  `exit=${r.status}\n${outOf(r)}`);
2079
2079
  rmfix(T);
2080
2080
  }
2081
+ {
2082
+ // 检查 18 delegationSince 生效日豁免(policy v4,2026-10-06 loop-audit-remediation)。
2083
+ // 「缺键回退原行为」由上方既有场景群天然覆盖(fixture 不写 kit.json → loadKitPolicy 回退 v1 无该键)。
2084
+ const T = mkfix();
2085
+ const pre = '2026-09-12-pre.md';
2086
+ w(T, '.agents/kit.json', '{"policyVersion":4}\n');
2087
+ w(T, `workflow/intents/${pre}`, INTENT('pre', '状态: done\n级别: L2\n日期: 2026-09-12', '\n## 验收标准(可测试)\n- [x] 用例通过(证据:fixture)\n'));
2088
+ w(T, `workflow/specs/${pre}`, SPEC('pre', '状态: approved\n级别: L2\n日期: 2026-09-12'));
2089
+ w(T, `workflow/plans/${pre}`, PLAN('pre', '状态: approved\n级别: L2\n日期: 2026-09-12'));
2090
+ let r = run(T);
2091
+ check('检查18 v4:文档日期早于 delegationSince → 存量豁免不出账(同面在 v1 下照报,见上方首场景)',
2092
+ r.status === 0 && !outOf(r).includes('委派台账'),
2093
+ `exit=${r.status}\n${outOf(r)}`);
2094
+
2095
+ const post = '2026-10-06-post.md';
2096
+ w(T, `workflow/intents/${post}`, INTENT('post', '状态: done\n级别: L2\n日期: 2026-10-06', '\n## 验收标准(可测试)\n- [x] 用例通过(证据:fixture)\n'));
2097
+ w(T, `workflow/specs/${post}`, SPEC('post', '状态: approved\n级别: L2\n日期: 2026-10-06'));
2098
+ w(T, `workflow/plans/${post}`, PLAN('post', '状态: approved\n级别: L2\n日期: 2026-10-06'));
2099
+ r = run(T);
2100
+ // post 日期 ≥ 确认门生效日(v4 confirmDocsEffective=2026-10-06)且无台账行 → 检查 15 hard 同场出账(预期);
2101
+ // 本场景只断言检查 18 对受管日期照报——豁免通道不得吞掉生效日后的真漏点。
2102
+ check('检查18 v4:文档日期 ≥ delegationSince 且台账无文件名 → 照报(exit 1 属检查15 同场,非本检查升级)',
2103
+ r.status === 1 && outOf(r).includes('确认未对账')
2104
+ && outOf(r).split('\n').some((l) => l.includes('委派台账') && l.includes(`intents/${post}`)),
2105
+ `exit=${r.status}\n${outOf(r)}`);
2106
+ rmfix(T);
2107
+ }
2081
2108
  {
2082
2109
  const T = mkfix();
2083
2110
  const body = 三件套(false);
@@ -37,6 +37,21 @@ export const POLICIES = {
37
37
  confirmIncidentsEffective: '2026-10-06',
38
38
  bindingTs: '2026-09-28',
39
39
  },
40
+ // 版本 4 = 版本 3 的五个日期 + 检查 18 的 delegationSince(委派台账对账生效日)。
41
+ // 背景(2026-10-06 loop-audit-remediation):delegations.md 台账记法自始为「任务一句话」(全表 0 行含
42
+ // workflow 文件名),检查 18 匹配口径要求行含文件名且无生效日豁免——8 月底起的 L2/L3 存量在现口径下
43
+ // 永远无法满足,产出 113 条不可消退 advisory,违反「无判定依据的行不产出不可消除噪声」红线。
44
+ // 补锚后:日期 < delegationSince 的文档存量豁免;≥ 生效日的 L2/L3 done/fixed/closed 须在台账
45
+ // (记法约定同步补「任务一句话含文件名」,见 delegations.md 头部)。缺键(v1-v3)→ 检查 18 维持
46
+ // 原全量对账行为(向后兼容不放松)。装户经 kit.json policyVersion: 4 选入。
47
+ 4: {
48
+ moduleSince: '2026-09-22',
49
+ check14Since: '2026-09-23',
50
+ confirmDocsEffective: '2026-10-06',
51
+ confirmIncidentsEffective: '2026-10-06',
52
+ bindingTs: '2026-09-28',
53
+ delegationSince: '2026-10-06', // 检查 18 委派台账对账生效日(2026-10-06 loop-audit-remediation);v1-v3 无此键 → 原全量对账行为
54
+ },
40
55
  };
41
56
 
42
57
  export function loadKitPolicy(root) {
@@ -12,8 +12,9 @@
12
12
  # (intent approved/done + 同名 plan 在场 + L2/L3 另须同名 spec;判据见 check-loop.mjs 加固门段),
13
13
  # hard 失败即阻断 push,防「未文档化的探索件」进 main。
14
14
  #
15
- # 机器门:本地钩子(唯一本地机器门)——服务端兜底(如有)= 项目自有 CI;本 kit 不附带 CI 配置,裸装无跨环境保证。
16
- # 本仓:.github/workflows/ci.yml 于 push main / 全部 PR 复跑 check-loop / doctor / source-sync-check --gate / workflows-check 四道门。
15
+ # 机器门:本地钩子(唯一机器门)——kit 不附带 CI 配置,装户仓裸装无跨环境保证。
16
+ # kit 源仓:.github/workflows/ci.yml 于 push main / 全部 PR 复跑 check-loop / doctor / source-sync-check --gate / workflows-check 四道门。
17
+ # 装户仓(无 templates/ 包源):无 CI——source-sync-check --gate / doctor / flow-kit 命令不适用(引用即失败),本地钩子即全部机器门。
17
18
  # 不要用 `git push --no-verify` 绕开——发现 hard-block 应先修 workflow 文档再推。
18
19
 
19
20
  cd "$(git rev-parse --show-toplevel)" || exit 1