@aibyzero/cm-workflow 0.21.7 → 0.25.1

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 (227) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +64 -0
  3. package/README.md +15 -1
  4. package/VERSION +1 -1
  5. package/docs/architecture.md +9 -0
  6. package/docs/cm-acceptance-completion.md +3 -1
  7. package/docs/cm-control-policy-v2.md +35 -3
  8. package/docs/execution-optimizations.md +1 -1
  9. package/docs/external-models.md +1 -0
  10. package/docs/human-correction.md +1 -1
  11. package/docs/installation.md +63 -19
  12. package/docs/js-workflow-control.md +67 -31
  13. package/docs/next-steps.md +10 -0
  14. package/docs/runtime-failover.md +2 -2
  15. package/docs/user-guide.md +1 -1
  16. package/package.json +1 -1
  17. package/runtime/js/cm-ai/batch-location.mjs +14 -0
  18. package/runtime/js/cm-ai/batch-plan.mjs +6 -2
  19. package/runtime/js/cm-ai/claude-probe-diagnosis.mjs +21 -0
  20. package/runtime/js/cm-ai/claude-review-stream.mjs +20 -7
  21. package/runtime/js/cm-ai/claude-tool-preview.mjs +4 -2
  22. package/runtime/js/cm-ai/cm-ai-admission.mjs +9 -3
  23. package/runtime/js/cm-ai/cm-ai-conversation-entry.mjs +51 -8
  24. package/runtime/js/cm-ai/cm-ai-qa-log.mjs +30 -4
  25. package/runtime/js/cm-ai/codex-review-adapter.mjs +2 -4
  26. package/runtime/js/cm-ai/delivery-evidence.mjs +3 -1
  27. package/runtime/js/cm-ai/developer-adapter.mjs +15 -1
  28. package/runtime/js/cm-ai/drive-core.mjs +50 -6
  29. package/runtime/js/cm-ai/drive-next-step.mjs +61 -0
  30. package/runtime/js/cm-ai/durable-runner-state.mjs +85 -23
  31. package/runtime/js/cm-ai/execution-snapshot.mjs +5 -2
  32. package/runtime/js/cm-ai/execution-store.mjs +21 -3
  33. package/runtime/js/cm-ai/external-run-guard.mjs +9 -1
  34. package/runtime/js/cm-ai/host-check.mjs +4 -2
  35. package/runtime/js/cm-ai/host-conversation-execution.mjs +29 -2
  36. package/runtime/js/cm-ai/host-handoff.mjs +7 -0
  37. package/runtime/js/cm-ai/host-progress.mjs +18 -0
  38. package/runtime/js/cm-ai/host-qa-executor.mjs +47 -15
  39. package/runtime/js/cm-ai/host-qa-fix-owner.mjs +11 -2
  40. package/runtime/js/cm-ai/host-qa-policy.mjs +24 -14
  41. package/runtime/js/cm-ai/host-session.mjs +1 -1
  42. package/runtime/js/cm-ai/host-workflow-capabilities.mjs +1 -1
  43. package/runtime/js/cm-ai/host.mjs +1 -1
  44. package/runtime/js/cm-ai/operator-guidance.mjs +126 -2
  45. package/runtime/js/cm-ai/project-qa-gate.mjs +13 -2
  46. package/runtime/js/cm-ai/provider-review-observation.mjs +7 -3
  47. package/runtime/js/cm-ai/qa-plan-notes.mjs +106 -0
  48. package/runtime/js/cm-ai/review-continuation.mjs +102 -0
  49. package/runtime/js/cm-ai/review-evidence-file.mjs +11 -0
  50. package/runtime/js/cm-ai/review-package.mjs +25 -4
  51. package/runtime/js/cm-ai/review-presentation.mjs +31 -14
  52. package/runtime/js/cm-ai/review-runner.mjs +5 -4
  53. package/runtime/js/cm-ai/review-verdict-rules.mjs +7 -0
  54. package/runtime/js/cm-ai/reviewed-evidence-supersede.mjs +30 -1
  55. package/runtime/js/cm-ai/task-commit-codec.mjs +11 -1
  56. package/runtime/js/cm-ai/task-commit.mjs +7 -4
  57. package/runtime/js/cm-ai/task-owner.mjs +5 -2
  58. package/runtime/js/cm-ai/task-runner.mjs +343 -52
  59. package/runtime/js/cm-ai/worker-claude-developer.mjs +3 -1
  60. package/runtime/js/cm-ai/worker-claude.mjs +5 -1
  61. package/runtime/js/cm-check/host.mjs +13 -3
  62. package/runtime/js/cm-fix/diagnosis.mjs +16 -3
  63. package/runtime/js/cm-fix/execution.mjs +47 -9
  64. package/runtime/js/cm-fix/finish.mjs +9 -1
  65. package/runtime/js/cm-fix/step-timing.mjs +222 -0
  66. package/runtime/js/cm-idea/session.mjs +22 -3
  67. package/runtime/js/cm-init/review-evidence.mjs +20 -7
  68. package/runtime/js/cm-prd/ai-draft.mjs +260 -0
  69. package/runtime/js/cm-prd/analysis.mjs +27 -9
  70. package/runtime/js/cm-prd/change.mjs +29 -8
  71. package/runtime/js/cm-prd/failed-correction.mjs +24 -4
  72. package/runtime/js/cm-prd/narrow-review.mjs +63 -3
  73. package/runtime/js/cm-prd/review-channels.mjs +5 -0
  74. package/runtime/js/cm-prd/review-correction.mjs +65 -5
  75. package/runtime/js/cm-prd/review-disposition.mjs +10 -1
  76. package/runtime/js/cm-prd/review-publication.mjs +2 -1
  77. package/runtime/js/cm-prd/self-check.mjs +121 -9
  78. package/runtime/js/cm-prd/session.mjs +55 -13
  79. package/runtime/js/cm-prd/summary.mjs +34 -6
  80. package/runtime/js/cm-prd/task-scope-record.mjs +40 -15
  81. package/runtime/js/cm-refactor/records.mjs +82 -11
  82. package/runtime/js/cm-refactor/workflow.mjs +3 -1
  83. package/runtime/js/executor-version.mjs +81 -0
  84. package/runtime/js/python-log-writer.mjs +15 -0
  85. package/runtime/js/run-analysis.mjs +136 -11
  86. package/runtime/logging.md +6 -0
  87. package/runtime/review.md +2 -1
  88. package/scripts/ci-test-weights.json +1 -0
  89. package/scripts/cm-ai-admission.mjs +27 -1
  90. package/scripts/cm-ai-admission.test.mjs +34 -2
  91. package/scripts/cm-ai-answer-gap-recheck.test.mjs +3 -2
  92. package/scripts/cm-ai-batch-drive.mjs +54 -17
  93. package/scripts/cm-ai-batch-drive.test.mjs +123 -6
  94. package/scripts/cm-ai-batch-host.mjs +64 -11
  95. package/scripts/cm-ai-batch-host.test.mjs +23 -3
  96. package/scripts/cm-ai-batch-location.test.mjs +22 -1
  97. package/scripts/cm-ai-batch-merge.mjs +102 -0
  98. package/scripts/cm-ai-batch-plan.mjs +55 -2
  99. package/scripts/cm-ai-batch-plan.test.mjs +228 -6
  100. package/scripts/cm-ai-batch-run-fixture.mjs +239 -15
  101. package/scripts/cm-ai-batch-run-parallel.test.mjs +23 -1
  102. package/scripts/cm-ai-batch-run.mjs +437 -34
  103. package/scripts/cm-ai-batch-session-member.test.mjs +85 -0
  104. package/scripts/cm-ai-check-recheck-cancellation.test.mjs +23 -2
  105. package/scripts/cm-ai-completion-summary.test.mjs +2 -1
  106. package/scripts/cm-ai-control-v2-drive.test.mjs +39 -9
  107. package/scripts/cm-ai-direct-review.test.mjs +1 -1
  108. package/scripts/cm-ai-disk-edits.test.mjs +229 -0
  109. package/scripts/cm-ai-drive-next-step.test.mjs +191 -0
  110. package/scripts/cm-ai-drive.mjs +66 -14
  111. package/scripts/cm-ai-drive.test.mjs +13 -3
  112. package/scripts/cm-ai-host-cli-workflow.test.mjs +4 -2
  113. package/scripts/cm-ai-host.mjs +20 -9
  114. package/scripts/cm-ai-host.test.mjs +12 -0
  115. package/scripts/cm-ai-operator-guidance.test.mjs +132 -1
  116. package/scripts/cm-ai-project-qa-gate.test.mjs +26 -0
  117. package/scripts/cm-ai-qa-fix-cross-session.test.mjs +18 -0
  118. package/scripts/cm-ai-review-continuation.test.mjs +335 -0
  119. package/scripts/cm-ai-review-failure.test.mjs +13 -10
  120. package/scripts/cm-ai-review-timeout.test.mjs +1 -1
  121. package/scripts/cm-ai-run.mjs +42 -11
  122. package/scripts/cm-ai-run.test.mjs +26 -0
  123. package/scripts/cm-ai-supersede.test.mjs +10 -2
  124. package/scripts/cm-capability-gate.test.mjs +1 -1
  125. package/scripts/cm-check-host.test.mjs +54 -0
  126. package/scripts/cm-check-runtime.sh +27 -15
  127. package/scripts/cm-check-update.mjs +83 -8
  128. package/scripts/cm-check-update.test.mjs +114 -1
  129. package/scripts/cm-claude-developer-worker.test.mjs +29 -1
  130. package/scripts/cm-claude-managed-preflight.test.mjs +126 -0
  131. package/scripts/cm-claude-probe.test.mjs +5 -0
  132. package/scripts/cm-claude-review-stream.test.mjs +4 -1
  133. package/scripts/cm-claude-worker.test.mjs +29 -0
  134. package/scripts/cm-codex-prompt-input.test.mjs +2 -1
  135. package/scripts/cm-developer-self-review.test.mjs +27 -0
  136. package/scripts/cm-efficiency-presentation-delta.test.mjs +4 -3
  137. package/scripts/cm-efficiency-response.test.mjs +2 -1
  138. package/scripts/cm-executor-version-draft.test.mjs +251 -0
  139. package/scripts/cm-executor-version-entries.test.mjs +93 -0
  140. package/scripts/cm-executor-version-prd.test.mjs +154 -0
  141. package/scripts/cm-executor-version-records.test.mjs +256 -0
  142. package/scripts/cm-executor-version.test.mjs +250 -0
  143. package/scripts/cm-external-model-host.test.mjs +6 -1
  144. package/scripts/cm-external-review-reconciliation.test.mjs +1 -1
  145. package/scripts/cm-fix-closeout-preflight.test.mjs +123 -0
  146. package/scripts/cm-fix-diagnosis-module-correction.test.mjs +5 -1
  147. package/scripts/cm-fix-drive.mjs +7 -2
  148. package/scripts/cm-fix-drive.test.mjs +45 -0
  149. package/scripts/cm-fix-entry.mjs +5 -2
  150. package/scripts/cm-fix-frozen-baseline.test.mjs +50 -0
  151. package/scripts/cm-fix-host.mjs +9 -2
  152. package/scripts/cm-fix-review-preflight.mjs +2 -0
  153. package/scripts/cm-fix-review-verification-integration.test.mjs +19 -0
  154. package/scripts/cm-fix-test-extension.test.mjs +30 -2
  155. package/scripts/cm-host-check.test.mjs +12 -0
  156. package/scripts/cm-host-qa-executor.test.mjs +172 -1
  157. package/scripts/cm-host-qa-policy.test.mjs +55 -1
  158. package/scripts/cm-idea-drive.mjs +5 -2
  159. package/scripts/cm-idea-entry.mjs +5 -2
  160. package/scripts/cm-idea-host.mjs +3 -1
  161. package/scripts/cm-init-drive.mjs +8 -5
  162. package/scripts/cm-init-entry.mjs +5 -2
  163. package/scripts/cm-init-host.mjs +6 -2
  164. package/scripts/cm-log-event.mjs +10 -2
  165. package/scripts/cm-log-event.test.mjs +29 -0
  166. package/scripts/cm-prd-ai-draft-fixture.mjs +18 -0
  167. package/scripts/cm-prd-ai-draft.test.mjs +505 -0
  168. package/scripts/cm-prd-answer-gaps.test.mjs +110 -5
  169. package/scripts/cm-prd-completion.test.mjs +67 -4
  170. package/scripts/cm-prd-design-phase.test.mjs +48 -13
  171. package/scripts/cm-prd-drive.mjs +91 -21
  172. package/scripts/cm-prd-drive.test.mjs +126 -4
  173. package/scripts/cm-prd-entry.mjs +5 -2
  174. package/scripts/cm-prd-host.mjs +89 -20
  175. package/scripts/cm-prd-host.test.mjs +17 -8
  176. package/scripts/cm-prd-narrow-review.test.mjs +49 -1
  177. package/scripts/cm-prd-review-disposition.test.mjs +94 -1
  178. package/scripts/cm-prd-review-gate.mjs +13 -5
  179. package/scripts/cm-prd-review-publication.test.mjs +34 -0
  180. package/scripts/cm-prd-self-check-rules.test.mjs +175 -10
  181. package/scripts/cm-prd-self-check.test.mjs +1 -1
  182. package/scripts/cm-refactor-drive.mjs +10 -4
  183. package/scripts/cm-refactor-entry.mjs +5 -2
  184. package/scripts/cm-refactor-host.mjs +3 -1
  185. package/scripts/cm-release-smoke.sh +3 -2
  186. package/scripts/cm-run-analysis.test.mjs +373 -1
  187. package/scripts/cm-skill-hints-autowire.test.mjs +1 -1
  188. package/scripts/cm-skill-hints-exam.mjs +3 -1
  189. package/scripts/cm-skill-hints-install.test.mjs +1 -1
  190. package/scripts/cm-skill-hints.mjs +106 -10
  191. package/scripts/cm-skill-hints.test.mjs +162 -6
  192. package/scripts/cm-skill-judge.mjs +2 -1
  193. package/scripts/cm-task-gate.mjs +88 -18
  194. package/scripts/cm-task-scope.test.mjs +1 -1
  195. package/scripts/cm-test-drive.mjs +13 -8
  196. package/scripts/cm-test-entry.mjs +5 -2
  197. package/scripts/cm-test-host.mjs +3 -1
  198. package/scripts/cm-upgrade-compat-batch.test.mjs +62 -9
  199. package/scripts/cm-workflow-config.test.mjs +8 -3
  200. package/scripts/fixtures/fresh-completion-checks.mjs +8 -0
  201. package/scripts/fixtures/prd-review-gate-python-oracle.py +10 -1
  202. package/scripts/policy-binding-compat.test.mjs +3 -2
  203. package/scripts/scan-public-safety.py +1 -0
  204. package/scripts/shell-pipe-early-exit.test.mjs +96 -0
  205. package/scripts/test-cm-prd-review-gate.py +55 -0
  206. package/scripts/test-shell-compat.sh +7 -5
  207. package/skills/cm-ai/SKILL.md +1 -1
  208. package/skills/cm-ai/references/N1-init.md +1 -1
  209. package/skills/cm-ai/references/N4-review.md +2 -2
  210. package/skills/cm-ai/references/N6-qa-eval.md +3 -1
  211. package/skills/cm-ai/references/js-host-recovery.md +5 -1
  212. package/skills/cm-ai/references/js-host.md +17 -8
  213. package/skills/cm-check/SKILL.md +3 -0
  214. package/skills/cm-fix/references/isolated-review.md +1 -1
  215. package/skills/cm-fix/references/js-host.md +20 -0
  216. package/skills/cm-fix/references/test-extension.md +1 -1
  217. package/skills/cm-prd/SKILL.md +8 -6
  218. package/skills/cm-prd/references/ai-draft.md +81 -0
  219. package/skills/cm-prd/references/change-mode.md +2 -0
  220. package/skills/cm-prd/references/greenfield.md +2 -0
  221. package/skills/cm-prd/references/js-change-recovery.md +2 -2
  222. package/skills/cm-prd/references/js-host.md +9 -6
  223. package/skills/cm-prd/references/light-mode.md +19 -0
  224. package/skills/cm-prd/references/requirement-grilling.md +2 -0
  225. package/skills/cm-prd/references/spec-self-check.md +1 -0
  226. package/skills/cm-prd/references/summary-card.md +1 -0
  227. package/templates/auto-update/cm-update.sh +2 -2
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-workflow",
3
- "version": "0.21.7",
3
+ "version": "0.25.1",
4
4
  "description": "Spec-driven product development workflow for Codex: external research, PRD, implementation, read-only feature testing, review, QA, fixes, refactors, and documentation.",
5
5
  "author": {
6
6
  "name": "cm-workflow maintainers",
package/CHANGELOG.md CHANGED
@@ -7,6 +7,70 @@
7
7
 
8
8
  (暂无)
9
9
 
10
+ ## 0.25.1 — 2026-12-03
11
+
12
+ - **cm-check 自动升级遇本机改动时,经你明确同意可直接覆盖**:安装器以 3 停止后,`/cm-check` 用安装器自己的清单核对函数列出被改过的文件(`localEdits`),附上这份清单的摘要(`localEditsDigest`)。你明确同意丢弃这些文件后,它带 `--overwrite-local-edits <摘要>` 重跑同一更新命令。重跑前会重新核对:清单多出或少了文件、安装清单缺失或格式损坏、已没有改动、核对失败,都会停下,不交覆盖参数给安装器。默认仍只传 `--yes`。这份绑定只到安装器启动为止:安装器的覆盖参数对所有改动生效,最后一次核对之后、安装器替换完文件之前新改的文件仍可能被覆盖,同意前先结束其他 CM 会话。
13
+ - **安装自检不再偶发误报**:`cm-check-runtime.sh` 在 `pipefail` 下用 `printf | grep -q` 查文本,`grep` 提前退出时前一个命令会被管道中断,检查偶尔报「cm-prd single-round reviews have no crash-safe disposition recovery gate」等失败,实际文字都在。查文本改用 shell 自带的 `case` 比较,不经管道、不建临时文件;发布冒烟、测试脚本和自动更新脚本里同类写法一并改掉,输出与原来一致。新增 `scripts/shell-pipe-early-exit.test.mjs`:开了 `pipefail` 的脚本里,管道(含跨行)接 `grep -q/-l/-m`、`head`、`awk … exit` 或 `sed … q` 就报错。
14
+ - **托管环境下 Claude 工具预检过不了时,说清可能原因和出路**:预检要把 `ANTHROPIC_BASE_URL` 指向本机探测地址,核对审查时只开放了允许的工具。组织的托管设置固定了接口地址、或不许改这个变量时,Claude 命令行能启动,但用于核对工具的消息请求到不了,预检永远失败,以前只报 `passed:false`。现在命令行已启动、却没收到消息请求时,`cm-ai-host.mjs preflight`、`cm-fix-review-preflight.mjs` 会在 stderr 说明可能原因;单任务的 `tool_preflight_missing` 和批次的 `review_preflight_failed` 也带上同一段原因。出路是在不受托管限制的机器上对同一代码根预检和审查,或新建运行时按角色声明改由 Codex 审查;cm-fix 的隔离审查只支持 Claude,只给第一条出路。命令找不到、模型不认等已有原因的失败不显示这段说明。新预检回执多一个 `cli_started` 字段。CM 没有别的办法确认 Claude 审查时工具已被关掉,所以照旧拦住,不加跳过开关。
15
+ - **只用 Claude 的用户也能完成规格独立审查**:`claude-only` 预设把审查方配成 `claude-cli`,但 `/cm-prd` 的答案检查、审查发布和证据回读只认两个 Codex 通道,规格审查走不下去。现在 `/cm-prd` 的原审查(r1)接受 `claude-cli`,按 Codex 通道同样的规则判定:只核对声明格式和前后一致,不证明审查真是独立做的;独立审查的会话不能是作者会话,原审查遇到未知通道照旧拒绝。`/cm-prd` 的通道清单与任务审查的清单由测试保持一致,以后任一方加减通道,都要先决定 `/cm-prd` 接不接。
16
+ - **`/cm-check` 自动升级被安装器拦下时,说清原因和手动出口**:本机改过 CM 文件、安装清单无效或路径类型变了,安装器会以 3 停止;如已写入文件,会尝试回滚,结果见安装器输出。以前 `/cm-check` 只报「安装器失败」;现在会说明这几种可能,提醒阻断安装的路径异常或未完成的回滚要先按安装器输出处理,并指出怎样在新建的空目录里解包、手动运行安装器加 `--overwrite-local-edits` 丢弃改动。(本版另一条已扩展:经你明确同意后可由 `/cm-check` 代为覆盖。)
17
+ - **Claude 写代码和审查时能走自己的 API 网关**:以前 CM 启动 Claude 子进程时把 `ANTHROPIC_BASE_URL` 去掉了,设了网关地址的用户审查和开发都连不上。现在这一个变量会传下去;代理、Bedrock/Vertex 开关、`NODE_OPTIONS` 等其他路由变量仍不传。工具预检照旧用自己的本机探测地址。
18
+ - **公司统一下发的 SessionStart 钩子不再让 Claude 审查和开发报错**:托管钩子会在 Claude 命令行正式开始前输出 `hook_started` / `hook_response`,以前审查(含工具预检)报 `missing_init`,开发进程在开始前后都会报错。现在把它们当作启动通知:计入通知上限,只上报类型和钩子名这类摘要,钩子输出内容不转发,也不算开始。
19
+ - **Python 3.14 下安装不再因自检失败而回滚**:Python 3.14 在环境里有 `FORCE_COLOR=1`(终端或 Node 测试运行器会设置)时给命令行帮助上色,安装末尾自检里的配置测试按纯文本比对,必定失败并整体回滚,回滚还会删掉刚装的文档范围清单,之后再检查会报「兼容安装缺少范围清单」。现在这条测试调用 Python 时关掉颜色。
20
+ - **`/cm-check` 在 Claude 安装模式下不再被版本文件卡住**:版本号存在没有扩展名的 `templates/cm-VERSION` 里,以前检查工具不收它当证据,语义检查第 7 组一引用就被判「证据无效」。现在 CM 自己 `templates/` 下文件名不带点、不超过 16 MiB 的文字文件(版本文件和钩子模板)能引用,检查期间被改动也会被发现;这类文件若是二进制内容,只查改动、不能引用。
21
+
22
+ ## 0.25.0 — 2026-12-03
23
+
24
+ - **技能自动调用默认不再用 Jev 判断**:handoff、wayfinder、improve-codebase-architecture 三个技能该不该用,默认只看本机关键词,消息一个字都不外发。以前只要有 TypeSafe 密钥就会把消息前 500 字发给 Jev;现在要在 `~/.cm-workflow/skill-hints.local.json` 写 `"judge": true` 才开。已写 `"judge": false` 的不受影响。`/cm-check` 和安装提示同步改了说法。升级没能换掉的旧钩子仍可能按旧规则外发:运行副本复制失败时,安装和 `/cm-check` 会提醒;要立即停止,在旧钩子运行时读取的 CM 目录(宿主进程的 `CM_WORKFLOW_HOME`,未设置时为 `~/.cm-workflow`)下的 `skill-hints.local.json` 写 `"judge": false`,用过几个目录就每个都写。换过 `CM_WORKFLOW_HOME` 的,旧目录挂在 `~/.claude/settings.json`、`~/.codex/hooks.json` 里的钩子,`/cm-check` 和安装时会逐条列出,不需要就删掉。凡是提到这个脚本、又不是规规矩矩跑本目录副本的钩子命令都会列出,可能有误报。已知缺口:把脚本名拆开拼接的命令、命令写的是本目录副本、但名叫 `node` 的程序实为转发旧副本的包装程序,以及 CM 不读的配置(如项目自己的 `.claude/settings.json`)里的钩子查不出来,需要自己检查;`node` 所在路径含单引号时认不出 CM 自己挂的钩子,再次开启会多挂一条。开启 Jev 后发出的前 500 字包含代码块,代码块只在关键词判断时跳过。
25
+ - **cm-fix 提前检查收尾条件**。新建运行同时授权修复和收尾时,缺走查配置会在建档前报错。已配置修复和走查时,驾驶员在启动宿主前检查诊断答案中的调查记录,宿主收到新答案时也核对。旧运行记录沿用原格式回放。
26
+ - **cm-fix 路径清单写错时,建运行就拦下并说清是哪项**:红灯测试文件、存量测试文件、写测试和修复的参考文件、修复范围这几份清单为空、含 `..`、`.env`、依赖目录或规格文件、或只差大小写重名时,以前能建出运行,配置随即冻结,到对应步骤才失败,报错只有「准备失败」,这个运行也救不回来。现在建运行时就按各清单后续步骤的同一规则核对(只当测试证据读取的测试清单照旧可指向依赖目录或规格目录),报出具体是哪一项(如 `repair_requirements_invalid`),不建运行,改好配置重跑即可;视觉红灯和声明无存量测试的空清单照旧允许;已有运行不受影响
27
+ - **cm-fix 步骤计时与修订补测的几处收尾**:规格目录所在磁盘卡住时,驾驶员最多等 10 秒写计时就照常退出,不再拖住会话;规格目录链接在一步中途改指时这一步不计时,不会写到另一个同名运行的目录;写入时计时目录被换走会如实提示可能留下空文件;`cm-run-analysis` 逐行核对计时文件,大量无效行不再撑爆内存,放错文件的行不再重复计入;宿主请求没人应答后又没按时关闭时,计时记的是「没人应答」而不是「关闭超时」;第二轮补测计划选了依赖目录或规格目录下的文件,登记时就报 `fix_test_extension_scope`,不再登记后才卡在 `revision_test_evidence_required`;`cm-run-analysis --run-id` 只打开该运行的计时文件,计时目录只有进入权限、不能列目录时也能读到;已有运行与计时文件照旧可读
28
+ - **cm-fix 冻结基线编码膨胀不再导致保存失败**:修复开始时冻结的基线按落盘后的 JSON 大小选择更省空间的编码,原文件合计超过 1 MiB、编码后能放进 1 MiB 的基线现在能无损保存;编码后仍超过 1 MiB 的照旧报 `limit_exceeded`。
29
+
30
+ ## 0.24.0 — 2026-12-02
31
+
32
+ - **会话走查任务必须写能核对内容的检查**:cm-prd 新写的「开发: 会话」任务要在任务自己下面用「必跑检查:」声明一条执行脚本文件的核对命令(脚本核对每个 AC 都有观察记录、引用的截图日志真实存在);只写「运行:」、只在关联 AC 下写脚本、只查文件存在、只列目录、内联命令或只查语法时,规格自检报 `session_task_evidence_missing`(实跑中审查方只能凭文字判断)。新会话用自检规则 8;已批准且原样未改的会话任务、规则 1–7 的在途记录和回执照旧。
33
+ - **修正提案被机械检查拒收后不再卡死**:cm-prd 修正提案(`prd_correct`)没过机械检查时,以前会话只能原样重放被拒答复,卡死(实跑踩过)。现在新会话可用 `resume` 的 `discard:true` 作废这份答复并重问一次(被拒答复留作历史,每类最多 2 次);驾驶员发送前先跑同一检查,只报文件名与规则码。旧会话不变。
34
+ - **运行分析列出每次审查的耗时**:`cm-run-analysis` 逐次列出每次审查调用从开始到结束的耗时(含失败或中断),缺记录的那次标 unavailable、不估算;日志里没有用量记录时说明原因未知、可能是当前会话模式不上报用量(实跑 2026-12-01 看不出审查花了多久)。
35
+ - **设计窄审两轮不过时,用户可以拍板带风险继续**:cm-prd 设计阶段两轮窄审仍有阻断(或只有降级审查结论)时,以前修正、再审、处置全部拒绝,只能取消重开(实跑 2026-11-30 两次)。现在新增 `narrow_user_decision`:用户看过剩余阻断、明确说继续后,驾驶员原样记下用户原话和全部阻断项,之后可以继续处置;这些阻断项会写进摘要风险点,批准前仍可整批拒绝。只对新的窄审链生效。
36
+ - **审查合同写明非 git 目录怎么调 Codex**:用 `codex exec` 当审查方时用 `-C` 指到被审的根目录;规格目录不是 git 仓库时加 `--skip-git-repo-check`,否则 Codex 拒绝启动(实跑踩过)。
37
+ - **代码根绑在旧规格上时说清原因和出路**:启用外部模型或效率策略的运行会把代码根绑定到一个规格根,换新规格(如 specs8 → specs10)时报 `external_code_specs_conflict`;以前只有错误码(实跑 2026-11-30)。现在错误输出写明当前绑定的规格目录名,并指引用 `git worktree add` 另开代码工作树跑新规格。行为不变,不自动改绑(自动改绑经审查有路径别名、旧证据缺失等绕过风险)。
38
+ - **开工批准多认几种说法**:除「开始」等原有整句外,也认「开工」「开工吧」「批准开工」「同意开工」「批准开始」「同意开始」(实跑中「批准开工」被拒)。单独的「批准」「同意」和带附加条件的句子仍不算。
39
+ - **规格变更漏写版本行时当场提示**:`cm-prd --change` 的需求、设计阶段收稿时就检查本阶段交的文档是否追加了版本表行(代码块里的示例行、重复旧行不算),驾驶员发送前也先拦下;以前要到任务阶段才报错,前两阶段已无法回退,只能取消会话重来。之前阶段已收下的稿子(含升级前旧会话收下的)在后续阶段不重查。
40
+ - **起草规格时验证手段要写成执行方真能用的**:AI 起草与变更模式写验收和用例时,只能人手点的图形工具(如 Accessibility Inspector)换成可机读手段,确需人本人做的写成会话任务或交人的产品决定,避免代理做不到、审查反复拒收;只约束新写的条目,不改既有草稿的自检判定。
41
+ - **第三次受控审查不再因名额用完而不可用(只对新授权)**:以前检查失败的重试会占掉原 6 次调用名额,到 `review_limit` 时续审常显示「名额不够」,只能换新运行全部重做。现在续审从授权时起,单独给开发和审查各一次的名额(原名额剩余更多时按原上限),仍是每个任务最多一次;补正没改代码或检查没过,照旧用完这两次。
42
+ - **create 模式先查状态时提醒配置已冻结**:cm-ai 驾驶员以 create 模式第一次发 `status`,宿主接受启动后就会建出运行记录并冻结当前配置,之后直接改 workflow 配置再启动会报 `fingerprint_mismatch`(实跑踩过)。现在这一步会先提示;只有已启用 QA 的单任务运行能走「QA 配置修订」(`--revise-qa-config`);单任务完成后若原运行没开 QA,可按「补挂 QA」在原 run 补开一次(v2 以 `qa:"disabled"` 创建的只把策略 `qa` 改为 `run`;legacy 原无 workflow 或 `qa:null` 的加 `--allow-qa`);其余改动要以新 runId 重建。行为本身不变。
43
+ - **规格改版后的第二次批准也计入审批等待**:cm-prd 发布待审时,生命周期日志行改用规格状态文件里的发布时间;以前两者常差一秒,审批写入按同一秒找不到对应发布,`cm-run-analysis` 漏记改规格后的那次批准(实跑 2026-12-01)。只对新发布生效。
44
+ - **cm-prd 文档写清依据字段的格式**:设计风险登记与摘要 `designRisk` 的 `evidence`、产品决定与 AI 起草摘要的 `basis`,都要写成数组且至少一项、每项去掉首尾空白后仍非空;以前文档只说「写依据」,写成单个字符串会被拒。设计风险两处(`prd_design_risk_invalid`、`prd_summary_risk_invalid`)回包为 `host_request_failed`,原码见错误输出;产品决定与起草摘要两处(`prd_ai_draft_decisions_invalid`、`prd_ai_draft_summary_invalid`)返回 `result.status: "blocked"`,原码在 `result.reason`。
45
+ - **cm-prd 请求字段对不上时说清是哪个字段**:宿主请求多带或少带字段时,错误输出(驾驶员会原样转出)写明「多余字段:…/缺少字段:…」,以前只有 `invalid_input`,要逐个字段猜(实跑中 `cancel` 带 `reason`、`save_design` 残留上一步字段都踩过)。只列本宿主已知的字段名,其他键只报个数,不回显字段值,返回结果不变;`status`、`read_batch` 照旧不校验多余字段。
46
+ - **决策卡提前提醒重开会被旧改动拦住**:决策卡的 supersede 出口(含旧运行与批次的卡片)和 v2 恢复前提现在写明,旧运行留在代码根、与开工前不一致的文件会让重开报 `supersede_code_drift`:开工前已有的文件要恢复到原路径和原内容,只有新增的文件才可移出,确需保留时经用户确认按报错说明重建;以前要等重开被拒才知道。
47
+ - **决策卡新增「先改规格再重开」出口**:审查意见指向规格本身时,`reviewLimitCard` 给出 `spec_change`(先 `cm-prd --change` 改规格并重新批准,再 supersede 重开);第三次受控审查说明为只修实现、审查只认已批准规格,对话里批准的例外不算。升级前已停在 `review_limit` 的旧运行查看决策卡时也会看到这条出口,和决策卡本身一样只是指引:不改状态、不授权、不加审查轮次,重开仍要新批准的规格和新 runId。
48
+ - **cm-fix 记录每一步花了多久(只对新操作)**:用驾驶员执行的修复,每一步做完、宿主关闭后,驾驶员往本运行单独的计时文件(`.reviews/cm-fix-step-timing/`)追加一行:这一步是什么、成没成、起止时间。`cm-run-analysis` 按步骤汇总两种时间:调用耗时(跑测试、独立审查、宿主处理等),以及两步之间(会话准备诊断、测试或代码,或者在等人)。以前一次修复 20–30 分钟里约一半看不出花在哪,现在可以按步骤看清。计时在宿主关闭、提醒发出后才写,不碰运行日志,不会拖慢宿主或打断别的运行收尾;宿主中途退出的步骤也记到退出为止;路径有符号链接或不是普通文件就不写,写失败不影响修复结果;不走驾驶员的步骤和无 specs 的裸项目不计时,旧运行显示为没有数据
49
+ - **cm-prd 由 AI 起草时,规格里的决定只认标准写法**:标题用顶格 `#`,产品决定写顶格列表行,技术决策写顶格 `- ` 列表项或两端带 `|`、列数一致的顶格表格;下划线式标题和缩进的 `#` 行会结束当前小节,缩进、引用、代码块里的内容不算,代码块外出现 HTML(含注释)整篇不算。拿不准就当没写、要求 AI 重写,不再把 Markdown 显示在别处的内容误算成决定。只影响起草校验与修正预检,不改已批准的规格
50
+ - **修复:批次运行里,只要检查命令有输出就判为检查失败**:批次驾驶员转发检查输出的回调多返回了一个值,宿主把它当成输出捕获失败(`output_capture_failed`),`npm test` 这类会打印内容的检查在批次里一律不通过。现在宿主只拒绝无法等待的异步回调,其他返回值一律忽略,各命令的检查都不会再因此误判;检查照真实退出码判定
51
+ - **批次也能「当前会话写、另一端审」(只对新批次)**:批次入口 `cm-ai-batch-host.mjs` 和批次驾驶员现在接受 `--review-runtime codex|claude`,与单任务同一参数。比如项目声明 Claude 写、Codex 审,在 Claude 会话里加 `--runtime claude --review-runtime codex`,批次里由会话开发的成员(含并行成员的审查预检)都交 Codex 审;之前只能由 Claude 自己审,用 Codex 预检会报 `tool_preflight_missing`。两端须与项目声明一致且不是同一工具,否则开跑前拒绝并写明原因;不能与 `--protected-config`、`--external-models` 同用。选择写进批次计划,开跑后漏传报 `batch_plan_mismatch`,不会半批换审查端。不传时批次与运行记录逐字节不变,旧批次照旧
52
+ - **cm-ai 每一步做完不再停住等你说「继续」**:单任务和批次驾驶员退出时,最后一行固定给出 `[drive] 下一步:继续/需要你/完成`,在宿主关闭、真实退出码确定后才写。`继续` 只给新协议、由当前会话开发且非受保护的运行里会话自己的工作(首轮审查后的修订、宿主标明可由会话修复的交付阻塞、冻结基线后改代码)以及批次接下一个功能,此时 AI 不得结束本轮;单任务收尾是 `完成`,沿用原「会话边界」结论;非零退出、请求被拒和其余情况一律是 `需要你`。Claude Code 里较长的驾驶员改为后台运行,Monitor 只盯请求行,只有后台驾驶员还在跑时才允许结束本轮。只改显示与执行说明,不改运行记录、授权或恢复规则,旧运行照常
53
+ - **cm-ai 批次停住时说清原因和出口**:`cm-ai-batch-plan` 读不了 `.cm-workflow.yml` 时带出具体原因(如 `config.version must equal integer 1`;只显示解析器固定句式,用户写的键名、值和路径不回显),不再只报 `batch_plan_failed`;`PLAN.checks` 写错时指出是第几项、哪个字段、错在哪(参数数组、id 格式、重复 id、多余字段);审查预检对不上(`tool_preflight_missing`)时写明审查端是哪一端、为何不匹配、用哪一端重新预检,批次另注明本批次的审查端由什么选出(`--review-runtime`、宿主 `--runtime`,或受保护批次 provider 成员的项目 roles 声明),受保护批次和已冻结外部模型的批次不提示 `--review-runtime`,单任务入口同样带出原因;必需 QA 已触发但运行没挂 QA 执行器(`qa_triggered`、`pendingAction:qa_execution`)时给出单任务补挂 QA 的步骤,批次说明不能补开及以后怎么规划;完成摘要里「旧运行,未受新合同保护」改为「未启用必验合同」,新建运行的规格没写必验标记时不再被说成旧运行;批次停住却没有指引时,「下一步」不再让你去找不存在的恢复指引。只改提示文字,不改运行记录、授权或恢复规则
54
+
55
+ ## 0.23.0 — 2026-11-29
56
+
57
+ - **cm-prd 出规格时技术细节交给 AI,你只定产品取舍(只对新会话)**:新开的新建模式会话不再逐项问接口、数据结构、任务拆分、测试用例和技术选型,由 AI 直接起草并把依据写进 design.md「技术决策」;只问目标用户、范围、体验优先级、上线门槛、业务规则、数据去留、合规、费用与外部服务、交付形态这类取舍,非阻断的产品默认不再提问,留到人审时一起拍板。原型的 UI 基准档位改在需求分析时问。人审时先看「产品取舍决策清单」(含待拍板数)和「AI 起草摘要」,审查清单换成 5 项产品向检查;查重、依赖、粒度等技术核对照旧由自检和独立审查把关。AI 若问了技术问题或漏标类别会被拒绝,并提示用原来的作废重答出口。审批门禁、规格清单和审批位不变,仍需你明确批准后才开发。之前开的会话、`--change` 变更与已审修订沿原行为;升级后新开的会话降回旧版本无法继续。
58
+ - **开发 AI 交付前按审查同一套标准自查**:开发提示词内嵌审查的严重度规则和自查清单(失败/取消分支、乱序结果、走真实入口、走查不能用单测代替、退回后查同类问题),减少首审退回。
59
+ - **审查通过且代码未变时,完成前不再重跑检查(只对新运行)**:新建运行第一次完成时,若审查包里只有已通过的命令检查、当前代码与已审时逐字节一致,直接复用已审检查。含真机/浏览器类检查、开发检查自己改写/删除/改权限了已有文件、本运行此前已有完成结果、已进入任务写入、多人并行成员合入后完成或旧运行,照旧重跑。注意:检查依赖的代码以外的输入(环境文件、外部服务)在完成前不再复查,由之后的 QA 兜底;这类项目创建运行时设 `CM_AI_COMPLETION_CHECK_REUSE=off` 即可照旧重跑。
60
+ - **QA 不再几乎每个任务都跑(只对新运行)**:「满 5 个任务没做 QA」以前把其他功能里没有 QA 记录的任务也算进去,而 QA 只测当前功能、测完也清不掉,计数永远不低于 5(实跑项目 34 次 QA 里 28 次只因此触发)。现在只算当前功能,其他功能的记录不再计入;本功能里在流程外勾掉、没有 QA 记录的任务照旧计数。只因这条规则触发的定期 QA,功能没做完时不跑浏览器和真机走查,留到功能完成时的 QA;逻辑判断和测试命令照跑,没有其他可跑项时照旧跑浏览器用例。功能完成、改到支付和鉴权等登记路径的 QA 照旧全跑。若功能最后一个任务没走流程就勾掉、而最新一轮正是延后了浏览器用例的定期 QA,收尾时会提示「最新 QA 是定期 QA,浏览器用例未执行」。批次推算单独进 worktree 的任务时同样按功能计数;升级前已开始、或升级前已建过成员运行的批次整批照旧。
61
+ - **QA 开工先列验收对照,被卡住时说清缺什么(只对新运行)**:QA 开始时把每条验收标准对上用例,在报告开头标出本轮测、稍后测、不在测试范围、只关联已废弃任务和没有用例的。QA 结果是 BLOCKED 时,报告开头和返回结果都用中文列出缺什么(例如缺测试命令、执行方说模拟器连不上、实际环境和登记的不一致),并注明涉及哪些用例。这些只是说明,不改变任何用例结论。
62
+ - **两轮审查都没过时给负责人一张只读决策卡**:任务停在 `review_limit` 时,结果里带 `reviewLimitCard`,驾驶员同时打印:检查实跑结果、改动清单、两轮审查意见对照(第 2 轮有几条落在第 1 轮已指出的文件),以及当前能走的出口和走不了的原因。数据只来自运行记录回放,读不到的逐项写「缺少」;卡片不放行、不派发、不加审查轮次。人工补正对 cm-ai 运行明确标为不适用。旧运行也显示这张卡(只是展示,不改状态)。
63
+ - **第三次受控审查(小范围试点)**:新版单任务运行两轮审查都没过、停在 `review_limit` 后,经用户批准,用原 `launchControlTarget` 以 `--mode resume --expected-control FILE --review-continuation --review-continuation-reason 原因` 启动一次(与一次 a2 开发续次一样,不需要创建时开关),即可在第 2 轮已审的同一批文件里补正一次、重跑检查、再做一次全新的独立审查。原两轮回执、次数和 r1/r2 文件都不动;补正证据走已有的受控补正协议(`*-controlled-correction*`),批准后按原完成门禁勾选任务。每个任务最多一次(跨重开运行也算),仍受原 6 次调用上限约束:补正交付没改代码或检查没过就用完名额。第三次仍不过停在 `review_continuation_rejected`,回到决策卡。驾驶员的补正答案单独写在 `answers/develop-a2-continuation.json`,授权与推进分两次调用。批次、旧入口、受保护开发和多代码根不开放。注意:用了这一出口的运行,本版之前的 CM 读到新记录会拒绝继续。
64
+ - **运行日志补记流程数据**:规格审批写入时记录等了多久(只在能对上那次规格发布时记);完成前复用检查记一条;重开任务另记一条旧运行的结束原因。这些都是「诊断行」:只追加到指定运行,不改默认运行、不开新运行,写失败也不影响流程。`cm-run-analysis` 汇总规格阶段时长、审批等待、检查调用返回与复用次数、重开原因分布。只对新记录生效,旧日志显示「未记录」。
65
+ - 新建的多人并行批次会先合入成员交付并核对合并后检查,再勾选任务。合并冲突或检查失败时,受影响的任务仍显示为待办。已有批次沿原顺序恢复。
66
+
67
+ ## 0.22.0 — 2026-11-28
68
+
69
+ - **新运行记下是哪个 CM 版本开的**:`cm-ai`(单任务、批次、QA 中派出的修复)和 `cm-fix` 新建运行时,把当前 CM 发布版本写进运行记录(`createdBy`),批次写进起始记录;之后恢复不改写它。`inspect-history` 显示创建版本,老运行显示为 `null`(未记录)。
70
+ - **另外五个命令的会话也记版本**:`cm-prd`(会话格式 3)、`cm-idea` 与 `cm-init`(会话格式 2)、`cm-test` 与 `cm-refactor`(执行记录首行加格式行)新建时同样记下 `createdBy`,`cm-init` 的审查归档(`--resume-draft` 续写用)也记下,同样拒绝旧版本继续、读不到版本不新建;宿主与驾驶员入口都给出中文原因。安装缺版本文件时,各命令入口直接提示重新安装,不再只报 `skill_path_invalid`。0.21.7 读到这些新格式会拒绝,记录字节不变(`cm-prd`、`cm-idea`、`cm-init` 拒绝前会先写再删一个临时锁文件)。
71
+ - **不能用旧版本继续新版本开的运行**:恢复前先比对版本,旧版本在写入任何记录前拒绝(`run_created_by_newer_executor`),报错给出升级命令;版本记录损坏也拒绝(`run_created_by_invalid`),不会当成老运行,提示检查记录是否被手动改过。安装缺少或损坏版本文件时不能新建运行(`executor_version_unavailable`),提示重新安装。
72
+ - **注意**:升级到本版后新开的运行,降回旧版本无法继续(0.21.7 及更早版本会报 `invalid_input` 拒绝,不会继续写入)。升级前开的运行照常继续,本版不拒绝任何老运行。
73
+
10
74
  ## 0.21.7 — 2026-11-27
11
75
 
12
76
  - **运行时向导默认选 Claude**:安装向导与 `cm-runtime` 直接回车选只用 Claude / Claude 写 Codex 审;保存需每次随机的 8 位确认码,预先粘贴的行丢弃,EOF 无换行尾行取消。
package/README.md CHANGED
@@ -17,6 +17,20 @@
17
17
 
18
18
  ## 最近更新
19
19
 
20
+ **0.25.1**
21
+
22
+ - **只用 Claude 的用户能完成更多环节**:`claude-only` 预设下,规格独立审查接受 `claude-cli`;Claude 子进程带上 `ANTHROPIC_BASE_URL`,走网关的用户能审查和开发;公司下发的 SessionStart 钩子不再让 Claude 审查和开发报 `missing_init`。托管环境固定了接口地址时,Claude 工具预检照旧拦住,只是会说明可能的原因和出路。
23
+ - **升级与自检更稳**:修复 Python 3.14 在 `FORCE_COLOR` 下安装自检失败回滚;修复 `cm-check-runtime.sh` 在 `pipefail` 下偶发误报;Claude 安装下 `cm-check` 可引用 `templates/cm-VERSION`。`/cm-check` 自动升级遇到本机改过的 CM 文件时会列出这些文件,你明确同意后按这份清单重跑覆盖;清单变了就停下。最后一次核对之后、安装器替换完文件之前新改的文件仍可能被覆盖,同意前先结束其他 CM 会话。详见[更新日志](CHANGELOG.md)。
24
+
25
+ **0.25.0**
26
+
27
+ - **技能自动调用默认不再外发**:handoff、wayfinder、improve-codebase-architecture 三个技能默认只用本机关键词判断;要用 TypeSafe 的 Jev 判断,在 `~/.cm-workflow/skill-hints.local.json` 写 `"judge": true`。升级没换掉的旧钩子仍可能外发,`cm-check` 会提示;要立即停止,在旧钩子读取的 CM 目录(`CM_WORKFLOW_HOME`,默认 `~/.cm-workflow`)下的 `skill-hints.local.json` 写 `"judge": false`;换过 `CM_WORKFLOW_HOME` 的,旧目录挂在用户级配置里的钩子 `cm-check` 会逐条列出,项目自己配置里的需要自己检查。详见[更新日志](CHANGELOG.md)。
28
+ - **cm-fix 更早拦住配置错误**:路径清单写错、缺走查配置在建运行时就报出具体哪项;步骤计时在磁盘卡住时最多等 10 秒、不再拖住会话,`cm-run-analysis` 逐行核对计时文件;冻结基线编码后能放进 1 MiB 的都能无损保存。详见[更新日志](CHANGELOG.md)。
29
+
30
+ **0.22.0**
31
+
32
+ - **新运行记下 CM 版本**:`cm-ai`、`cm-fix`、`cm-prd`、`cm-test`、`cm-refactor`、`cm-init`、`cm-idea` 新开的运行和会话会记下是哪个版本开的;旧版本不能继续新版本开的运行,会直接说明要升级到哪个版本。升级前开的运行照常继续。详见[更新日志](CHANGELOG.md)。
33
+
20
34
  **0.21.7**
21
35
 
22
36
  - **运行时向导默认选 Claude**:安装向导和 `cm-runtime` 直接回车就是只用 Claude、Claude 写 Claude 审;保存配置要输入每次随机的 8 位确认码,粘贴的旧输入不会误保存。
@@ -304,7 +318,7 @@ $cm-check
304
318
 
305
319
  仓库直接分发 Skills 和脚本,无需在仓库根目录运行 `npm install` 或构建。完整安装行为、覆盖范围和卸载说明见[安装指南](docs/installation.md)。
306
320
 
307
- 需要固定版本时可使用 `npx @aibyzero/cm-workflow@0.21.7 install`,请在 CM Workflow 源码仓库以外的目录执行,例如用户主目录。npm 安装入口复用原安装器,要求与覆盖范围见[安装指南](docs/installation.md#npm-installation-macos-codex)。
321
+ 需要固定版本时可使用 `npx @aibyzero/cm-workflow@0.25.1 install`,请在 CM Workflow 源码仓库以外的目录执行,例如用户主目录。npm 安装入口复用原安装器,要求与覆盖范围见[安装指南](docs/installation.md#npm-installation-macos-codex)。
308
322
 
309
323
  ## 升级旧版本
310
324
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.21.7
1
+ 0.25.1
@@ -68,6 +68,15 @@ Its three analysis passes are not three independent review attempts.
68
68
  reconstructable mirrors.
69
69
  - Per-feature `test-cases.json` is the optional AI-readable test intent.
70
70
  Execution results stay in `.reviews/`; no competing result database is added.
71
+ - Each run store (`.reviews/.execution/<runId>/state.json`, cm-ai and cm-fix) and
72
+ each batch's first `batch_start` row record `createdBy`, the CM release that
73
+ created them (`runtime/js/executor-version.mjs`, from `VERSION` or
74
+ `templates/cm-VERSION`). It is fixed at creation and is not part of any
75
+ fingerprint. An older executor refuses to resume a run a newer release created;
76
+ runs created before 0.22.0 have no `createdBy` and resume as before. The same
77
+ record is kept by cm-prd sessions (state format 3), cm-idea/cm-init draft
78
+ sessions (format 2) and the cm-test/cm-refactor journal (a first `format` row
79
+ whose `previous` seed makes older executors refuse it before any write).
71
80
  - N3 implementation handoffs and N4 verdicts also stay in `.reviews/` as
72
81
  content-bound evidence. `runtime/task-gates.md` validates their transition; they
73
82
  never replace the checkbox state in `tasks.md`.
@@ -174,10 +174,12 @@ node scripts/cm-run-analysis.mjs --specs "{规格目录}" --run-id "{运行ID}"
174
174
  ```
175
175
 
176
176
  省略 run-id 汇总该日志内可识别运行;省略 json 输出人类摘要。输入仅为规格本地 `运行日志.jsonl` 的一次稳定快照,上限 32 MiB / 100000 行。
177
- Token 复用既有 usage 身份及计数合同,标明 observed/partial/unavailable;Python 3 不可用时只降级 usage。
177
+ Token 复用既有 usage 身份及计数合同,标明 observed/partial/unavailable;Python 3 不可用时只降级 usage。日志里完全没有用量记录时,摘要加一句说明(原因未知(可能是当前会话模式不上报用量)),不估算。
178
178
  阶段时间按实际 CM AI/PRD 日志配对,保留返回、失败、中断等事实;returned 不等于业务通过。
179
+ 审查耗时逐次列出:从 `review_starting` 开始到同一操作的结束事件(含失败或中断),按运行和任务编号第几次审查;缺开始或结束事件的那次显示 unavailable,不估算。
179
180
  活动区间并集避免重复相加,未记录的等待时长保持未知。不同运行的时间分别计算,再汇总可观测工作量。
180
181
  重复信息表示相同路由的多次模型调用声明或同任务多个 QA 启动;不能证明命令相同、执行多余或可跳过。
182
+ 流程数据(2026-11-28 起的新记录):规格阶段已观测活动时长;规格审批次数与等待时长(JS 准入写审批时记,接在发布规格的 cm-prd 运行上);检查调用正常返回次数(不等于命令全部执行)与完成前复用批数;重开次数与被替换旧运行的结束原因(单独的诊断行,按记录去重)。旧日志没有这些字段,显示为未记录。
181
183
  日志损坏、身份冲突和读取漂移拒绝;查询不写状态、不调用模型、不降低检查、验收或重试门槛。
182
184
 
183
185
  ## 尚未提供的能力
@@ -202,6 +202,7 @@ QA 重跑、QA 配置修订、规格换绑、范围追加和一次开发续次
202
202
  | QA 配置修订 | `--revise-qa-config OLD_WORKFLOW.json --qa-config-revision-reason REASON`;当前 `--workflow-config` 提供已核对的新配置 |
203
203
  | 原运行范围追加 | `--revise-scope SCOPE.json --scope-revision-reason REASON`;SCOPE.json 是包含全部原路径的完整 JSON 数组 |
204
204
  | 一次 a2 开发续次 | `--development-rework --development-rework-reason REASON`;不改变 scope |
205
+ | 第三次受控审查(试点) | `--review-continuation --review-continuation-reason REASON`;见下文「第三次受控审查」 |
205
206
  | 已批准规格材料换绑 | `--rebind-spec-material --spec-rebind-reason REASON`;保留原重新批准与漂移门禁 |
206
207
 
207
208
  例如重跑符合原条件的已阻断 QA:
@@ -230,7 +231,7 @@ node "{CM_WORKFLOW_ROOT}/scripts/cm-ai-host.mjs" serve \
230
231
  --supersede-reviewed-evidence --supersede-reason "单行原因" --supersede-target target.json
231
232
  ```
232
233
 
233
- 宿主在建新 journal 前沿用旧版重开的全部前提(tasks.md 未勾选、旧 writer 已关闭、无未结 effect、代码漂移规则不变),并额外要求:只有一条未被取代的直接前驱运行,且它当前的启动投影与 `target.json` 完全一致;宿主先锁住旧运行的 writer,再比较目标并**在锁内重新发现同任务运行**(必须仍只有这一条未被取代的直接前驱,且 `.execution` 下的运行目录集合与本次调用首次发现时完全相同(新增或消失的目录,包括尚无 journal 记录的失败残留目录,都算变化;首次发现之前就存在、无法归属任务的历史空目录不在此保证内)——否则 `snapshot_changed`;错开时间的第二次重开因此也被拒),并一直持有到新运行写完替代记录、归档完成(或失败)才释放;本次调用自己持有的这把锁不会被「旧运行 writer 是否被占用」的检查(含执行优化的 prior-writer guard)误判为外部占用,其他进程同时打开该文件时仍判占用:预览后旧运行已变化返回 `snapshot_changed`;旧运行正被恢复或另一次重开占用时返回 `supersede_unavailable`。两种情况都不自动刷新目标、不归档证据、不建新运行。缺少目标返回 `invalid_input`;legacy 入口带 `--supersede-target` 返回 `invalid_arguments`。新运行从第 1 轮开始,旧运行 journal 原样保留,旧 handoff/回执按旧版规则归档到 `.reviews/.superseded/`,最后一次审查结论作为参考带入。驾驶脚本 PLAN 把三项放进 `permissions`(`--supersede-target` 路径相对 PLAN)。
234
+ 宿主在建新 journal 前沿用旧版重开的全部前提(tasks.md 未勾选、旧 writer 已关闭、无未结 effect、代码漂移规则不变),并额外要求:只有一条未被取代的直接前驱运行,且它当前的启动投影与 `target.json` 完全一致;宿主先锁住旧运行的 writer,再比较目标并**在锁内重新发现同任务运行**(必须仍只有这一条未被取代的直接前驱,且 `.execution` 下的运行目录集合与本次调用首次发现时完全相同(新增或消失的目录,包括尚无 journal 记录的失败残留目录,都算变化;首次发现之前就存在、无法归属任务的历史空目录不在此保证内)——否则 `snapshot_changed`;错开时间的第二次重开因此也被拒),并一直持有到新运行写完替代记录、归档完成(或失败)才释放;本次调用自己持有的这把锁不会被「旧运行 writer 是否被占用」的检查(含执行优化的 prior-writer guard)误判为外部占用,其他进程同时打开该文件时仍判占用:预览后旧运行已变化返回 `snapshot_changed`;旧运行正被恢复或另一次重开占用时返回 `supersede_unavailable`。两种情况都不自动刷新目标、不归档证据、不建新运行。缺少目标返回 `invalid_input`;legacy 入口带 `--supersede-target` 返回 `invalid_arguments`。新运行从第 1 轮开始,旧运行 journal 原样保留,旧 handoff/回执按旧版规则归档到 `.reviews/.superseded/`,最后一次审查结论作为参考带入。驾驶脚本 PLAN 把三项放进 `permissions`(`--supersede-target` 路径相对 PLAN)。旧运行写进代码根、与它开工前基线不一致的文件(如走查记录)会让重开报 `supersede_code_drift`;决策卡的 supersede 出口与恢复前提会先提示:开工前已有的文件恢复到原路径和原内容,只有开工后新增的文件才可移出(删除已有文件也算漂移),确需保留时经用户确认按报错说明重建(实跑教训 2026-12-01)。
234
235
 
235
236
  ## 旧运行与迁移拒绝
236
237
 
@@ -255,10 +256,41 @@ v2 策略随新运行持久化并纳入新版执行指纹。旧 metadata 中该
255
256
  只读 status 可用于核对历史;执行入口仍必须匹配原协议。迁移需要独立的新运行决定,不能就地换入口规避旧证据。
256
257
  单任务 QA 重跑、QA 配置修订、规格换绑、范围追加和一次开发续次使用上节 launchControlTarget;批次出口以实际支持为准(单任务 supersede 见上节),不把单任务恢复合同理解成全部旧出口已开放。
257
258
 
259
+ ### 第三次受控审查(试点)
260
+
261
+ 新版(control policy v2)单任务、当前会话开发、未受保护、单代码根的运行,与一次 a2 开发续次一样不需要创建时开关:
262
+ 是否可用由运行历史推导。批次成员(按批次固定的 `task-` 运行号识别,两代成员都算)、旧入口、provider/外部模型、
263
+ 范围追加或开发续次之后都不提供。
264
+ 两轮独立审查都要求修改、停在 `blocked/review_limit` 后,先读决策卡(`reviewLimitCard`)。续审只修实现,审查仍以已批准规格为准;意见指向规格本身时改走决策卡 `spec_change`(先规格变更再重开);升级前停在 `review_limit` 的旧运行也显示这条只读指引,不改状态或授权。用户批准续审后,
265
+ 把原 `status.launchControlTarget` 保存为文件,以原配置 `serve --mode resume --expected-control FILE
266
+ --review-continuation --review-continuation-reason REASON` 启动一次。原因须为非空单行(最多 500 UTF-8 字节)。
267
+
268
+ 先独占写任务级标记 `{feature}-{task}-review-continuation.json`,再只追加一条 `review-continuation-authorized`,
269
+ 绑定前一条记录、原包、两份 r1/r2 回执摘要和标记摘要;两步之间中断时这一次视为已用掉,不会再给。
270
+ 门禁的 runner-owned 分支(仅库调用,命令行不可用)读取标记指向的本 specs 运行 journal,用运行自己的回放校验整份记录:
271
+ 须是本任务的 v2 运行,且回放得出的授权与标记字节摘要、fromDigest、at 一致,否则拒绝;它不跳过任何兼容入口的检查,只在此时由运行自己核对 Learning。运行回到第 2 轮的 `changes_requested`:attempt 仍为 2,原两份回执、
272
+ 次数和 r1/r2/a2 文件都不改写。之后 `advance` 只派一次补正开发(`develop-2-continuation`):只能改第 2 轮已审的同一批文件,
273
+ 必须真的改了代码;补正 handoff 写到受控补正的固定路径。审查前由运行自己按受控补正协议准备记录(来源 `operator`),
274
+ 再派一次全新的独立审查(`review-2-continuation`),结论投影成受控补正的结构化审查与封存回执。
275
+ 批准后完成门禁按八份证据勾选任务;任何其他结论停在 `blocked/review_continuation_rejected`,回到决策卡,不再开发或审查。
276
+
277
+ 拒绝条件:本任务已有续审标记或任一人工/受控补正证据,含 `.superseded` 归档
278
+ (`review_continuation_used`,跨重开运行也只给一次);
279
+ 有在途操作、范围追加或开发续次、任务已勾选、规格漂移,或不是 `review_limit`(`review_continuation_unavailable`)。
280
+ 名额从授权时起算,正好再开发和审查各一次(原 6 calls / 6 effects 剩余更多时按原上限);原名额已被检查失败的重试用完也照样可用(实跑教训 2026-12-01)。补正交付与第 2 轮相同或检查没过,会直接用完这两次(`develop_retry_limit`)。
281
+ 启动追加一次记录后,从后续 PLAN.permissions 去掉这三项和 `--expected-control`,再按原配置 `advance`。
282
+ 驾驶员的补正答案写在 `answers/develop-a2-continuation.json`,不会复用第 2 轮的 `develop-a2.json`;缺少时启动前停下。
283
+ 授权与推进必须分两次:带授权参数的驾驶员调用只允许 `status`。
284
+ 宿主在写完补正审查文件与封存回执前中断时,`status` 显示 `review_publication_required`(决策卡照常显示并列出缺的文件);
285
+ `advance` 会先按 journal 里的回执补写,也会清掉中断留下的同一文件的临时硬链接。
286
+ 受控补正的记录、handoff 与封存回执都先写临时文件再一次性链接到位,中断不会留下写了一半的证据文件,
287
+ 链接后未删的同一文件临时链接会在下次准备或补写时清掉;
288
+ 决策卡的 `missing` 会列出第三次受控审查缺的补正证据文件。
289
+
258
290
  ## 兼容 taskgate 的一次受控补正
259
291
 
260
- **仅支持没有 JS ownership 的兼容 taskgate 任务。** cm-ai 新单任务和批次的第二轮仍正式 blocked,
261
- 本轮没有 runner-owned correction 入口。它们不能通过这里的 prepare/publish/mark-done 完成原 run。
292
+ **仅支持没有 JS ownership 的兼容 taskgate 任务。** cm-ai 新单任务和批次的第二轮仍正式 blocked;
293
+ 唯一的 runner-owned 用法是上文经显式授权的「第三次受控审查」,由原运行自己准备和封存,不经这里的命令行。它们不能通过这里的 prepare/publish/mark-done 完成原 run。
262
294
  存在保留的 JS journal、JS run 或 unknown ownership 证据时,兼容 writer 正式拒绝;不得删证据、手改 journal/batch 或改走兼容 writer 绕过 owner。
263
295
  准备前先核对该任务没有 JS ownership,准备入口也必须在发现这种证据时拒绝,不能先生成无法完成的半套补正材料。
264
296
  兼容 writer 自己会拒绝的残留(空数据库、缺少或不匹配的 `writer-ready.json`、孤立证书)同样在准备前拒绝,不自动修复或重新初始化。
@@ -6,7 +6,7 @@ The versioned policy is frozen in the new run configuration. PRD uses a separate
6
6
 
7
7
  ## Checks and full review evidence
8
8
 
9
- An explicit `{id, command, sameExecutionAs}` check may share the immediately preceding check's physical execution when the argv, cwd, timeout and execution controls match in that plan. The source must pass. Both check identities remain in the result and the alias names its source. Identical commands without the annotation execute separately. The next plan, including final acceptance, executes fresh checks. There is no generic cache.
9
+ An explicit `{id, command, sameExecutionAs}` check may share the immediately preceding check's physical execution when the argv, cwd, timeout and execution controls match in that plan. The source must pass. Both check identities remain in the result and the alias names its source. Identical commands without the annotation execute separately. The next plan executes fresh checks. There is no generic cache. Separately from this optional policy, new cm-ai task runs whose configuration freezes `completionCheckReuse` complete on the reviewed checks (see `docs/js-workflow-control.md`, completion checks).
10
10
 
11
11
  Review presentation stores identical complete file content once in an inline table. UTF-8 conversion must reproduce the exact bytes; other content stays base64. All acceptance criteria, interfaces, system context, checks, findings and handoff content stay in the same prompt. Reviewers still use no tools. The canonical package and digest remain unchanged. If the presentation is larger in actual UTF-8 bytes, the adapter sends the complete original format. Output evidence and existing limits remain authoritative; no truncation or on-demand fetch is introduced.
12
12
 
@@ -71,6 +71,7 @@ node scripts/cm-model-setup.mjs inspect-run --input {RUN.json}
71
71
  ## 中断与兼容边界
72
72
 
73
73
  新模式按代码根持有现有 SQLite lease,并首次把代码根绑定到唯一规格根。
74
+ 换用新规格根时报 `external_code_specs_conflict`,错误输出写明代码根当前绑定的规格目录名;用 `git worktree add` 另开代码工作树跑新规格,不自动改绑。
74
75
  并行 batch 成员各自绑定隔离工作树,未完成的阻断成员保持原工作树及 run,不走第二代 fallback。
75
76
  同一候选执行器不能用换 runId、关闭新旗标、supersede 或换规格根绕过未知调用;
76
77
  尚无可信终态的外部开发取消也不能作为重派依据。只读核对原调用,不改旧记录。
@@ -2,7 +2,7 @@
2
2
 
3
3
  普通任务最多两轮独立 Review。第二轮 `blocked` 保留原 a1/r1/a2/r2;不得改成第三轮、重置 task/run 或覆盖旧报告。主执行者收到用户对具体补正范围的明确确认后,可使用一次性的人工补正入口。原因与原证据摘要记录补正请求;旧格式的 `authorization: explicit-human-confirmation` 保留为来源标签,不验证实际人工交互,也不自造批准。
4
4
 
5
- 这个入口适用于本地 task-gate 证据链;不会自动改变 cm-ai/cm-fix 宿主 journal 的 blocked 状态、恢复 provider 或提交代码。带宿主的运行仍需其既有恢复合同,不能用 checkbox 反向证明宿主完成。
5
+ cm-ai 运行不用本入口;新版单任务运行改走运行自己的「第三次受控审查」(`docs/cm-control-policy-v2.md`)。这个入口适用于本地 task-gate 证据链;不会自动改变 cm-ai/cm-fix 宿主 journal 的 blocked 状态、恢复 provider 或提交代码。带宿主的运行仍需其既有恢复合同,不能用 checkbox 反向证明宿主完成。
6
6
 
7
7
  先准备最终补正 handoff 草稿:保留原 task、`attempt: 2`、完整且相同的 `changed_files`,所有验证通过,当前实现哈希正确,并完成 Learning。补正可以改这些文件的内容;扩大文件范围需另行确认设计。原始 handoff 和报告留在同一真实 `.reviews` 目录。
8
8
 
@@ -76,7 +76,7 @@ Install or upgrade with the same command:
76
76
  npx @aibyzero/cm-workflow@latest install
77
77
  ```
78
78
 
79
- To pin a version, use `npx @aibyzero/cm-workflow@0.21.7 install` from outside
79
+ To pin a version, use `npx @aibyzero/cm-workflow@0.25.1 install` from outside
80
80
  the CM Workflow source checkout (for example, your home directory). Inside a
81
81
  checkout with the same package name and version, npm can select the local
82
82
  uninstalled package and report `cm-workflow: command not found`.
@@ -209,13 +209,31 @@ and again in the middle of the transaction:
209
209
 
210
210
  | Installer | When the late check finds a change | What is left |
211
211
  | ---- | ---- | ---- |
212
- | `install.sh` | Right before each file is copied (content, file type and parent path) | Exit 3 after files were already written: the files written so far are rolled back; the changed file is untouched |
213
- | `install-codex.sh` | After the old plugin directory is renamed aside | Exit 3: the old directory is moved back and the marketplace restored |
214
-
215
- The npm entry and `$cm-check` automatic upgrades only pass `--yes`. When the
216
- installer stops for local edits, `$cm-check` reports the upgrade as `blocked`
217
- (its CLI exits 1, not 3). Save your edits, then run the Bash installer yourself
218
- with `--overwrite-local-edits` if you want to discard them.
212
+ | `install.sh` | Right before each file is copied (content, file type and parent path) | Exit 3 after files were already written: the installer tries to roll back the files written so far and reports whether that completed; the changed file is untouched |
213
+ | `install-codex.sh` | After the old plugin directory is renamed aside | Exit 3: the installer tries to move the old directory back and restore the marketplace, and reports whether that completed |
214
+
215
+ The npm entry and `$cm-check` automatic upgrades pass only `--yes` by default.
216
+ When the installer stops with status 3 (local edits, an invalid manifest, or a
217
+ path that changed type), `$cm-check` reports the upgrade as `blocked` with
218
+ `installerStatus: 3` (its CLI exits 1, not 3) and names the way out. If files
219
+ were already written, the installer tried to roll them back; its output says
220
+ whether that completed. First follow the installer output for any path problem
221
+ that blocks the install or any unfinished rollback. When the cause is local
222
+ edits, the report lists them in `localEdits` (read with the installer's own
223
+ manifest helper) with a `localEditsDigest`. Save your edits; if you then
224
+ explicitly agree to discard exactly those files, `$cm-check` reruns the same
225
+ update command once with `--overwrite-local-edits <localEditsDigest>`. Before
226
+ passing the option to the installer it lists the edits again and stops, without
227
+ installing, if the list changed, the manifest is missing or malformed, no
228
+ edit is left, or the check fails. This binding ends when the installer starts:
229
+ the installer's option is global, so an edit made, or a manifest damaged, after
230
+ that last check and before the installer replaces the file can still be
231
+ overwritten. Finish other CM sessions before agreeing. It never adds the option on its own. You can also run the Bash installer yourself with
232
+ `--yes --overwrite-local-edits`, from a CM Workflow checkout or from the npm
233
+ package unpacked in a new empty directory (`mkdir` a fresh directory and `cd` into it, run
234
+ `npm pack @aibyzero/cm-workflow@latest`, `tar -xzf` the printed file, then run
235
+ `package/install.sh` or `package/install-codex.sh`). Unpacking over an earlier
236
+ `package/` directory would silently replace any edits made there.
219
237
 
220
238
  **Install lock.** One install per real target at a time. The lock is a
221
239
  directory next to the target named `.<target name>.cm-install.lock`:
@@ -242,7 +260,7 @@ before a rollback writes it back; if a rollback finds the wrong type there, it
242
260
  writes nothing, reports the rollback as incomplete and keeps the marketplace
243
261
  backup.
244
262
 
245
- **Rollback.** A failed install restores what it wrote. It trusts only complete
263
+ **Rollback.** A failed install tries to restore what it wrote and reports whether that completed. It trusts only complete
246
264
  records of its own list of written files that name a file this install manages;
247
265
  a record cut short (for example by a full disk) or an unknown one is not used and
248
266
  makes the rollback incomplete. If a restore step itself
@@ -275,7 +293,7 @@ Known limitations:
275
293
  | SIGKILL, power loss, kernel or storage failure | The exit trap cannot run and there is no persistent recovery journal. The lock and the backup directory may remain; recover by hand using them. |
276
294
  | No manifest yet; deleted and unrecorded files | Without a manifest nothing can be judged. A deleted recorded file is not an edit. Codex replaces the whole directory, so unrecorded files you added there are removed; Claude leaves files it does not install in place. |
277
295
  | Windows and the optional updater | `install.ps1` has none of this protection. `~/.cm-workflow/cm-update.sh` and `cm-announce.sh` are not in the manifest. |
278
- | No forced overwrite from npm or `$cm-check` | Intentional: they stop on local edits; run the Bash installer yourself to discard edits. |
296
+ | No forced overwrite by default from npm or `$cm-check` | Intentional: they stop on local edits. `$cm-check` discards them only after you explicitly agree; otherwise run the Bash installer yourself. |
279
297
  | `~/.cm-workflow/cm-update.sh` deletes first | The optional auto-updater uses its own lock and older path list and deletes files removed upstream before it runs `install.sh`, outside this lock and check. It can delete a file and then stop on a local edit. |
280
298
  | Other marketplace writers and Codex internal state | The lock only coordinates CM installers. Do not manage other Codex plugins while CM installs: a rollback restores the whole previous `marketplace.json`. Cleanup does not undo Codex cache or registration side effects of `codex plugin add`. |
281
299
  | Directories replaced while an install runs | Out of scope (see the boundary above). Partial checks remain: the marketplace structure is re-checked before its directory is first created, before it is written and before a rollback writes it; the Codex local-edit checks stop with status 2 when `~/plugins` is no longer the physical directory resolved at start, and then the lock is not deleted through the replaced path (remove it by hand). Other write points are not re-checked. |
@@ -409,9 +427,11 @@ keyword table and, when a skill fits, shows you a one-line hint such as
409
427
  (`systemMessage`) and is not added to the model's context. For these hints,
410
428
  matching is local keyword and optional regex matching: nothing is sent anywhere
411
429
  and no tokens are spent on it. The three auto-started skills below are the
412
- exception: when a TypeSafe key is available, the first 500 characters of each
413
- message are sent to TypeSafe's Jev to judge them. Messages over 2000 characters and text inside ``` fences are
414
- skipped, at most two skills are hinted per message, and each skill at most once
430
+ exception, and only when you opt in: by default they are judged by keywords too and
431
+ nothing is sent. With `"judge": true` in your local file and a TypeSafe key available, the first 500 characters of each
432
+ message are sent to TypeSafe's Jev to judge them, code blocks included. Messages over 2000 characters are
433
+ skipped, text inside ``` fences is left out of the keyword matching (not out of what Jev is sent),
434
+ at most two skills are hinted per message, and each skill at most once
415
435
  per session. Sessions that CM itself launches set `CM_SKILL_HINTS=off`.
416
436
 
417
437
  Three author skills that the model cannot start on its own (they are marked
@@ -425,10 +445,14 @@ version is installed for that host:
425
445
  first and to read the skill only after you agree
426
446
  (`🤖 技能自动调用:已让模型先问你要不要用 /wayfinder`).
427
447
 
428
- Whether one of them fits is judged by TypeSafe's Jev when a TypeSafe key is
448
+ Whether one of them fits is judged by the keyword table unless you turn Jev on.
449
+ Jev is off by default: write `"judge": true` in
450
+ `~/.cm-workflow/skill-hints.local.json` (or in `skill-hints.local.json` under
451
+ `$CM_WORKFLOW_HOME` when you set it; that directory then replaces `~/.cm-workflow` for
452
+ this switch as for every other setting) to let TypeSafe's Jev judge when a TypeSafe key is
429
453
  available (`TYPESAFE_API_KEY`, or on macOS a keychain item named
430
454
  `TYPESAFE_API_KEY` for your user). Only the first 500 characters of the message
431
- are sent. A message is kept local, and the keyword table decides for it, when:
455
+ are sent, code blocks included. A message is kept local, and the keyword table decides for it, when:
432
456
 
433
457
  - after folding it contains one of a fixed
434
458
  list of credential words: password, passwd, pwd, passcode, token, secret, API key,
@@ -449,13 +473,33 @@ no recognisable shape and no credential word; look-alike letters from other scri
449
473
  swapped or digit-for-letter characters (`passXword`, `t0ken`); escapes and encodings
450
474
  (`pass%77ord`); text reordered with bidirectional controls; other wording or languages. Jev gets at most 3
451
475
  seconds, with a second request when the first fails or has not answered within 1
452
- second. Without a key, on a credential-looking message, or when Jev fails, the
476
+ second. With Jev off (the default), without a key, on a credential-looking message, or when Jev fails, the
453
477
  same keyword table decides. A message that opens with a command (`/handoff …`) is
454
- left to the host. `"judge": false` in your local file keeps it to keywords even
455
- with a key. The log records which skill was started and whether Jev or keywords
478
+ left to the host. A key alone never turns Jev on. The log records which skill was started and whether Jev or keywords
456
479
  decided, never the message or the key.
457
480
 
458
- Installers turn it on by default. `install.sh` and `install.ps1` add the hook to
481
+ Installers wire the hook by default (Jev stays off). If a later install cannot
482
+ refresh the copy the hook runs, the old copy may keep running and, from a version before
483
+ Jev went opt-in, still sends with just a key: the install and `status` warn you, and
484
+ `"judge": false` stops it at once.
485
+
486
+ If you changed `CM_WORKFLOW_HOME` after hints were wired, a hook running the old
487
+ directory's copy may still be in `~/.claude/settings.json` or `~/.codex/hooks.json`, and
488
+ from a version before Jev went opt-in it still sends with just a key. `status` and the
489
+ installers' refresh list, by file and position only (a command may carry a key), every
490
+ command in those two files that names `cm-skill-hints.mjs` and is not one plain line
491
+ running this directory's copy (`node <absolute path of this copy> hook …`): another
492
+ directory's copy, and anything CM cannot read for sure (wrappers, variables, node options,
493
+ globs,
494
+ several commands, other subcommands, `echo`). Some of these are false alarms; remove the
495
+ ones you do not want. Known gaps: a command that builds the file name piece by piece, a
496
+ program named `node` that is really a wrapper running another copy while the command names
497
+ this directory's copy, and
498
+ hooks CM does not read (a project's own `.claude/settings.json`, another user's files),
499
+ are not listed. When the path of `node` itself contains a single quote, CM does not
500
+ recognise the hook it wrote, so running `enable` again adds a second one. Look for such entries yourself, or write `"judge": false` in
501
+ `skill-hints.local.json` under every CM
502
+ directory you use. `install.sh` and `install.ps1` add the hook to
459
503
  `~/.claude/settings.json`, and `install-codex.sh` adds it to `~/.codex/hooks.json`,
460
504
  once per host; the output says so in one line, with how to turn hints off and the
461
505
  TypeSafe note above. Codex asks you to trust the new hook the first time it runs;