@aibyzero/cm-workflow 0.10.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 (448) hide show
  1. package/.codex-plugin/plugin.json +30 -0
  2. package/AGENTS.md +74 -0
  3. package/CONTRIBUTING.md +62 -0
  4. package/LICENSE +21 -0
  5. package/README.md +263 -0
  6. package/SECURITY.md +49 -0
  7. package/THIRD_PARTY_NOTICES.md +29 -0
  8. package/VERSION +1 -0
  9. package/agents/cm-backend-agent.md +34 -0
  10. package/agents/cm-contract-agent.md +34 -0
  11. package/agents/cm-database-agent.md +34 -0
  12. package/agents/cm-frontend-agent.md +33 -0
  13. package/agents/cm-miniprogram-agent.md +33 -0
  14. package/agents/cm-ui-agent.md +34 -0
  15. package/assets/docs/command-picker-mobile.svg +56 -0
  16. package/assets/docs/command-picker.svg +56 -0
  17. package/assets/docs/user-guide-hero-mobile.svg +35 -0
  18. package/assets/docs/user-guide-hero.svg +36 -0
  19. package/assets/readme/delivery-flow.svg +86 -0
  20. package/assets/readme/hero.svg +77 -0
  21. package/assets/readme/recovery-record.svg +73 -0
  22. package/assets/readme/test-evidence.svg +64 -0
  23. package/compat/claude-commands/cm-ai.md +3 -0
  24. package/compat/claude-commands/cm-check.md +3 -0
  25. package/compat/claude-commands/cm-fix.md +3 -0
  26. package/compat/claude-commands/cm-idea.md +3 -0
  27. package/compat/claude-commands/cm-init.md +3 -0
  28. package/compat/claude-commands/cm-prd.md +3 -0
  29. package/compat/claude-commands/cm-refactor.md +3 -0
  30. package/compat/claude-commands/cm-test.md +3 -0
  31. package/docs/architecture.md +155 -0
  32. package/docs/fixes/.reviews/fix-cancel-throw-T-FIX-cancel-throw-a1-handoff.json +57 -0
  33. package/docs/fixes/.reviews/fix-cancel-throw-T-FIX-cancel-throw-a2-handoff.json +58 -0
  34. package/docs/fixes/.reviews/fix-cancel-throw-T-FIX-cancel-throw-r1.md +121 -0
  35. package/docs/fixes/.reviews/fix-cancel-throw-v2-T-FIX-cancel-throw-v2-a1-handoff.json +56 -0
  36. package/docs/fixes/.reviews/fix-cancel-throw-v2-T-FIX-cancel-throw-v2-r1.md +100 -0
  37. package/docs/fixes/.reviews/fix-cm-js-n1n2-admission-successor-T-FIX-cm-js-n1n2-admission-successor-a1-handoff.json +61 -0
  38. package/docs/fixes/.reviews/fix-cm-js-n1n2-admission-successor-T-FIX-cm-js-n1n2-admission-successor-a2-handoff.json +63 -0
  39. package/docs/fixes/.reviews/fix-cm-js-n1n2-admission-successor-T-FIX-cm-js-n1n2-admission-successor-r1.md +58 -0
  40. package/docs/fixes/.reviews/fix-cm-js-n1n2-admission-successor-T-FIX-cm-js-n1n2-admission-successor-r2.md +55 -0
  41. package/docs/fixes/.reviews/fix-f01-dual-failure-terminal-T-FIX-f01-dual-failure-terminal-a1-handoff.json +65 -0
  42. package/docs/fixes/.reviews/fix-f01-dual-failure-terminal-T-FIX-f01-dual-failure-terminal-r1.md +88 -0
  43. package/docs/fixes/.reviews/fix-manifest-runtime-checkbox-drift-r1.md +33 -0
  44. package/docs/fixes/.reviews/fix-manifest-runtime-checkbox-drift-r2.md +31 -0
  45. package/docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-a1-handoff.json +56 -0
  46. package/docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-a2-handoff.json +85 -0
  47. package/docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-r1.md +53 -0
  48. package/docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-r2.md +80 -0
  49. package/docs/fixes/.reviews/fix-review-evidence-scope-honesty-T-FIX-review-evidence-scope-honesty-a1-handoff.json +35 -0
  50. package/docs/fixes/.reviews/fix-review-evidence-scope-honesty-T-FIX-review-evidence-scope-honesty-r1.md +33 -0
  51. package/docs/fixes/.reviews/fix-windows-cp1252-log-output-r1.md +30 -0
  52. package/docs/fixes/.reviews/fix-windows-cp1252-log-output-r2.md +16 -0
  53. package/docs/fixes/.reviews/openai-compatible-depth-fixture-T-FIX-openai-compatible-depth-fixture-a1-handoff.json +40 -0
  54. package/docs/fixes/.reviews/openai-compatible-depth-fixture-T-FIX-openai-compatible-depth-fixture-r1.md +30 -0
  55. package/docs/fixes/20260729-windows-cp1252-log-output.md +65 -0
  56. package/docs/fixes/20260804-manifest-runtime-checkbox-drift.md +67 -0
  57. package/docs/fixes/20260806-model-call-boundary-identity.md +80 -0
  58. package/docs/fixes/20260807-prelanding-integrity.md +58 -0
  59. package/docs/fixes/20260826-openai-compatible-depth-fixture.md +39 -0
  60. package/docs/fixes/20260903-cm-js-n1n2-admission-r1.md +64 -0
  61. package/docs/fixes/20260903-cm-js-n1n2-admission-successor.md +83 -0
  62. package/docs/fixes/20260903-s4c1b-v3-cancel-throw.md +89 -0
  63. package/docs/fixes/20260904-f01-codex-dual-failure-terminal.md +89 -0
  64. package/docs/fixes/20260907-wip-triage-log.md +44 -0
  65. package/docs/installation.md +202 -0
  66. package/docs/js-workflow-control.md +1010 -0
  67. package/docs/sample-prd/prd-funding-rate-alert.md +42 -0
  68. package/docs/sample-specs/docs//351/234/200/346/261/202/347/244/272/344/276/213.md +24 -0
  69. package/docs/user-guide.md +526 -0
  70. package/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/README.md +19 -0
  71. package/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/refactor-flow.excalidraw +3650 -0
  72. package/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/refactor-flow.mp4 +0 -0
  73. package/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/refactor-flow.png +0 -0
  74. package/docs//351/207/215/346/236/204/346/265/201/347/250/213/350/256/276/350/256/241/refactor-flow.spec.json +223 -0
  75. package/install-codex.sh +184 -0
  76. package/install.ps1 +206 -0
  77. package/install.sh +244 -0
  78. package/package.json +58 -0
  79. package/runtime/external-expert.md +302 -0
  80. package/runtime/js/cm-ai/accepted-fix.mjs +28 -0
  81. package/runtime/js/cm-ai/claude-developer-adapter.mjs +6 -0
  82. package/runtime/js/cm-ai/claude-review-adapter.mjs +16 -0
  83. package/runtime/js/cm-ai/claude-review-stream.mjs +53 -0
  84. package/runtime/js/cm-ai/claude-tool-preview.mjs +107 -0
  85. package/runtime/js/cm-ai/cm-ai-admission.mjs +353 -0
  86. package/runtime/js/cm-ai/cm-ai-context-refresh.mjs +217 -0
  87. package/runtime/js/cm-ai/cm-ai-conversation-entry.mjs +538 -0
  88. package/runtime/js/cm-ai/cm-ai-learning-handoff-writer.mjs +119 -0
  89. package/runtime/js/cm-ai/cm-ai-learning-writer.mjs +172 -0
  90. package/runtime/js/cm-ai/cm-ai-qa-log.mjs +320 -0
  91. package/runtime/js/cm-ai/cm-ai-run-finalizer.mjs +107 -0
  92. package/runtime/js/cm-ai/code-projects.mjs +85 -0
  93. package/runtime/js/cm-ai/codex-config.mjs +48 -0
  94. package/runtime/js/cm-ai/codex-developer-adapter.mjs +5 -0
  95. package/runtime/js/cm-ai/codex-developer-basic-output.schema.json +6 -0
  96. package/runtime/js/cm-ai/codex-developer-output.schema.json +37 -0
  97. package/runtime/js/cm-ai/codex-review-adapter.mjs +73 -0
  98. package/runtime/js/cm-ai/contracts.mjs +156 -0
  99. package/runtime/js/cm-ai/developer-adapter.mjs +93 -0
  100. package/runtime/js/cm-ai/durable-runner-state.mjs +504 -0
  101. package/runtime/js/cm-ai/effect-contract.mjs +102 -0
  102. package/runtime/js/cm-ai/execution-platform.mjs +7 -0
  103. package/runtime/js/cm-ai/execution-store.mjs +211 -0
  104. package/runtime/js/cm-ai/fix-code-association.mjs +40 -0
  105. package/runtime/js/cm-ai/gate-bridge.mjs +25 -0
  106. package/runtime/js/cm-ai/host-bootstrap.mjs +170 -0
  107. package/runtime/js/cm-ai/host-check.mjs +89 -0
  108. package/runtime/js/cm-ai/host-conversation-execution.mjs +125 -0
  109. package/runtime/js/cm-ai/host-documentation.mjs +40 -0
  110. package/runtime/js/cm-ai/host-handoff.mjs +71 -0
  111. package/runtime/js/cm-ai/host-project-execution.mjs +58 -0
  112. package/runtime/js/cm-ai/host-qa-executor.mjs +238 -0
  113. package/runtime/js/cm-ai/host-qa-fix-owner.mjs +131 -0
  114. package/runtime/js/cm-ai/host-qa-fix.mjs +30 -0
  115. package/runtime/js/cm-ai/host-qa-policy.mjs +70 -0
  116. package/runtime/js/cm-ai/host-review-authority.mjs +36 -0
  117. package/runtime/js/cm-ai/host-review-file.mjs +56 -0
  118. package/runtime/js/cm-ai/host-role-routing.mjs +41 -0
  119. package/runtime/js/cm-ai/host-session.mjs +96 -0
  120. package/runtime/js/cm-ai/host-tool-bridge.mjs +53 -0
  121. package/runtime/js/cm-ai/host-workflow-capabilities.mjs +45 -0
  122. package/runtime/js/cm-ai/host.mjs +20 -0
  123. package/runtime/js/cm-ai/index.mjs +7 -0
  124. package/runtime/js/cm-ai/provider-review-observation.mjs +86 -0
  125. package/runtime/js/cm-ai/qa-fix-definition.mjs +21 -0
  126. package/runtime/js/cm-ai/review-evidence-file.mjs +38 -0
  127. package/runtime/js/cm-ai/review-package.mjs +426 -0
  128. package/runtime/js/cm-ai/review-result.schema.json +40 -0
  129. package/runtime/js/cm-ai/review-runner.mjs +35 -0
  130. package/runtime/js/cm-ai/task-commit-codec.mjs +54 -0
  131. package/runtime/js/cm-ai/task-commit.mjs +201 -0
  132. package/runtime/js/cm-ai/task-owner.mjs +97 -0
  133. package/runtime/js/cm-ai/task-runner.mjs +766 -0
  134. package/runtime/js/cm-ai/tool-preview.mjs +205 -0
  135. package/runtime/js/cm-ai/worker-claude.mjs +104 -0
  136. package/runtime/js/cm-ai/worker-codex-developer.mjs +124 -0
  137. package/runtime/js/cm-ai/worker-codex.mjs +143 -0
  138. package/runtime/js/cm-check/host.mjs +101 -0
  139. package/runtime/js/cm-fix/baseline.mjs +70 -0
  140. package/runtime/js/cm-fix/cause-evidence.mjs +24 -0
  141. package/runtime/js/cm-fix/cause-invocation.mjs +40 -0
  142. package/runtime/js/cm-fix/cause-package.mjs +68 -0
  143. package/runtime/js/cm-fix/dossier.mjs +140 -0
  144. package/runtime/js/cm-fix/execution.mjs +1549 -0
  145. package/runtime/js/cm-fix/final-review-evidence.mjs +20 -0
  146. package/runtime/js/cm-fix/final-review.mjs +156 -0
  147. package/runtime/js/cm-fix/finish.mjs +124 -0
  148. package/runtime/js/cm-fix/handoff.mjs +64 -0
  149. package/runtime/js/cm-fix/host-review.mjs +38 -0
  150. package/runtime/js/cm-fix/host.mjs +96 -0
  151. package/runtime/js/cm-fix/investigation.mjs +25 -0
  152. package/runtime/js/cm-fix/layout.mjs +17 -0
  153. package/runtime/js/cm-fix/learning-writeback.mjs +86 -0
  154. package/runtime/js/cm-fix/learning.mjs +31 -0
  155. package/runtime/js/cm-fix/metrics.mjs +75 -0
  156. package/runtime/js/cm-fix/progress.mjs +64 -0
  157. package/runtime/js/cm-fix/protected-edits.mjs +95 -0
  158. package/runtime/js/cm-fix/qa-source.mjs +58 -0
  159. package/runtime/js/cm-fix/red-test.mjs +92 -0
  160. package/runtime/js/cm-fix/regression-evidence.mjs +64 -0
  161. package/runtime/js/cm-fix/regression.mjs +41 -0
  162. package/runtime/js/cm-fix/repair.mjs +95 -0
  163. package/runtime/js/cm-fix/reproduce.mjs +54 -0
  164. package/runtime/js/cm-fix/retrospective.mjs +41 -0
  165. package/runtime/js/cm-fix/review-baseline.mjs +47 -0
  166. package/runtime/js/cm-fix/start.mjs +49 -0
  167. package/runtime/js/cm-fix/test-author.mjs +63 -0
  168. package/runtime/js/cm-fix/visual.mjs +72 -0
  169. package/runtime/js/cm-fix/walkthrough.mjs +126 -0
  170. package/runtime/js/cm-idea/session.mjs +79 -0
  171. package/runtime/js/cm-init/draft-generation.mjs +66 -0
  172. package/runtime/js/cm-init/draft-inspection.mjs +70 -0
  173. package/runtime/js/cm-init/project-analysis.mjs +60 -0
  174. package/runtime/js/cm-init/project-scan.mjs +55 -0
  175. package/runtime/js/cm-init/review-evidence.mjs +80 -0
  176. package/runtime/js/cm-prd/accepted-design.mjs +46 -0
  177. package/runtime/js/cm-prd/analysis.mjs +260 -0
  178. package/runtime/js/cm-prd/change.mjs +268 -0
  179. package/runtime/js/cm-prd/correction-check.mjs +49 -0
  180. package/runtime/js/cm-prd/design-risk.mjs +30 -0
  181. package/runtime/js/cm-prd/disposition-plan.mjs +33 -0
  182. package/runtime/js/cm-prd/draft-save.mjs +122 -0
  183. package/runtime/js/cm-prd/draft.mjs +70 -0
  184. package/runtime/js/cm-prd/materials.mjs +48 -0
  185. package/runtime/js/cm-prd/review-correction.mjs +158 -0
  186. package/runtime/js/cm-prd/review-disposition.mjs +96 -0
  187. package/runtime/js/cm-prd/review-findings.mjs +36 -0
  188. package/runtime/js/cm-prd/review-host.mjs +48 -0
  189. package/runtime/js/cm-prd/review-preparation.mjs +49 -0
  190. package/runtime/js/cm-prd/review-publication.mjs +56 -0
  191. package/runtime/js/cm-prd/self-check.mjs +75 -0
  192. package/runtime/js/cm-prd/session.mjs +74 -0
  193. package/runtime/js/cm-prd/summary.mjs +133 -0
  194. package/runtime/js/cm-refactor/host.mjs +2 -0
  195. package/runtime/js/cm-refactor/records.mjs +86 -0
  196. package/runtime/js/cm-refactor/workflow.mjs +478 -0
  197. package/runtime/js/cm-test/declared-command.mjs +32 -0
  198. package/runtime/js/cm-test/host.mjs +319 -0
  199. package/runtime/js/cm-test/logic-results.mjs +39 -0
  200. package/runtime/js/cm-test/recovery.mjs +58 -0
  201. package/runtime/js/cm-test/session.mjs +56 -0
  202. package/runtime/js/cm-test/source-snapshot.mjs +136 -0
  203. package/runtime/logging.md +207 -0
  204. package/runtime/model-efficiency.md +201 -0
  205. package/runtime/orchestration.md +113 -0
  206. package/runtime/project-context.md +43 -0
  207. package/runtime/project-learning.md +49 -0
  208. package/runtime/review.md +140 -0
  209. package/runtime/steelman-review.md +111 -0
  210. package/runtime/task-gates.md +283 -0
  211. package/runtime/task-handoff.schema.json +103 -0
  212. package/runtime/test-contract.md +212 -0
  213. package/runtime/workflow-config.md +118 -0
  214. package/runtime/workflow-routing.md +82 -0
  215. package/scripts/cm-ai-admission.mjs +50 -0
  216. package/scripts/cm-ai-admission.test.mjs +38 -0
  217. package/scripts/cm-ai-batch-host.mjs +77 -0
  218. package/scripts/cm-ai-batch-host.test.mjs +155 -0
  219. package/scripts/cm-ai-batch-run.mjs +136 -0
  220. package/scripts/cm-ai-batch-run.test.mjs +128 -0
  221. package/scripts/cm-ai-bootstrap.test.mjs +228 -0
  222. package/scripts/cm-ai-fix-integration.test.mjs +233 -0
  223. package/scripts/cm-ai-host.mjs +175 -0
  224. package/scripts/cm-ai-host.test.mjs +368 -0
  225. package/scripts/cm-ai-multi-root.test.mjs +289 -0
  226. package/scripts/cm-ai-nested-execution.test.mjs +313 -0
  227. package/scripts/cm-ai-run.mjs +293 -0
  228. package/scripts/cm-ai-run.test.mjs +336 -0
  229. package/scripts/cm-check-entry.mjs +120 -0
  230. package/scripts/cm-check-host.mjs +29 -0
  231. package/scripts/cm-check-host.test.mjs +71 -0
  232. package/scripts/cm-check-runtime.ps1 +69 -0
  233. package/scripts/cm-check-runtime.sh +910 -0
  234. package/scripts/cm-claude-probe.test.mjs +54 -0
  235. package/scripts/cm-claude-review-stream.test.mjs +45 -0
  236. package/scripts/cm-claude-worker.test.mjs +92 -0
  237. package/scripts/cm-codex-developer-adapter.test.mjs +85 -0
  238. package/scripts/cm-codex-developer-worker.test.mjs +128 -0
  239. package/scripts/cm-codex-review-progress.test.mjs +96 -0
  240. package/scripts/cm-execution-platform.test.mjs +47 -0
  241. package/scripts/cm-fix-cause-invocation.test.mjs +72 -0
  242. package/scripts/cm-fix-cause-package.test.mjs +68 -0
  243. package/scripts/cm-fix-code-association.test.mjs +55 -0
  244. package/scripts/cm-fix-entry.mjs +132 -0
  245. package/scripts/cm-fix-execution.test.mjs +63 -0
  246. package/scripts/cm-fix-final-review.test.mjs +124 -0
  247. package/scripts/cm-fix-host-review-assembly.test.mjs +34 -0
  248. package/scripts/cm-fix-host-review.test.mjs +261 -0
  249. package/scripts/cm-fix-host-sequence.test.mjs +26 -0
  250. package/scripts/cm-fix-host.mjs +89 -0
  251. package/scripts/cm-fix-host.test.mjs +105 -0
  252. package/scripts/cm-fix-learning-writeback.test.mjs +73 -0
  253. package/scripts/cm-fix-learning.test.mjs +66 -0
  254. package/scripts/cm-fix-metrics.test.mjs +58 -0
  255. package/scripts/cm-fix-no-existing-tests.test.mjs +92 -0
  256. package/scripts/cm-fix-observation-dossier.test.mjs +452 -0
  257. package/scripts/cm-fix-progress.test.mjs +45 -0
  258. package/scripts/cm-fix-protected-edits.test.mjs +54 -0
  259. package/scripts/cm-fix-qa-source.test.mjs +206 -0
  260. package/scripts/cm-fix-red-owner.test.mjs +143 -0
  261. package/scripts/cm-fix-red-test.test.mjs +38 -0
  262. package/scripts/cm-fix-regression.test.mjs +57 -0
  263. package/scripts/cm-fix-repair-owner.test.mjs +370 -0
  264. package/scripts/cm-fix-repair.test.mjs +68 -0
  265. package/scripts/cm-fix-reproduce.test.mjs +31 -0
  266. package/scripts/cm-fix-retrospective.test.mjs +46 -0
  267. package/scripts/cm-fix-review-baseline.test.mjs +54 -0
  268. package/scripts/cm-fix-review-recovery.test.mjs +197 -0
  269. package/scripts/cm-fix-test-author.test.mjs +105 -0
  270. package/scripts/cm-fix-visual-bare.test.mjs +171 -0
  271. package/scripts/cm-fix-walkthrough.test.mjs +45 -0
  272. package/scripts/cm-host-check.test.mjs +113 -0
  273. package/scripts/cm-host-documentation.test.mjs +45 -0
  274. package/scripts/cm-host-handoff.test.mjs +58 -0
  275. package/scripts/cm-host-qa-executor.test.mjs +156 -0
  276. package/scripts/cm-host-qa-policy.test.mjs +59 -0
  277. package/scripts/cm-host-review-authority.test.mjs +60 -0
  278. package/scripts/cm-host-role-routing.test.mjs +33 -0
  279. package/scripts/cm-idea-entry.mjs +104 -0
  280. package/scripts/cm-idea-host.mjs +144 -0
  281. package/scripts/cm-idea-host.test.mjs +75 -0
  282. package/scripts/cm-idea-recovery.test.mjs +90 -0
  283. package/scripts/cm-init-analysis-host.test.mjs +50 -0
  284. package/scripts/cm-init-draft-generation.test.mjs +52 -0
  285. package/scripts/cm-init-draft-inspection.test.mjs +41 -0
  286. package/scripts/cm-init-entry.mjs +170 -0
  287. package/scripts/cm-init-host.mjs +284 -0
  288. package/scripts/cm-init-host.test.mjs +231 -0
  289. package/scripts/cm-init-project-analysis.test.mjs +47 -0
  290. package/scripts/cm-init-project-scan.test.mjs +41 -0
  291. package/scripts/cm-init-revision-host.test.mjs +61 -0
  292. package/scripts/cm-init-session.test.mjs +122 -0
  293. package/scripts/cm-log-event.mjs +538 -0
  294. package/scripts/cm-log-event.py +133 -0
  295. package/scripts/cm-log-event.test.mjs +70 -0
  296. package/scripts/cm-openai-compatible-call.py +661 -0
  297. package/scripts/cm-prd-analysis.test.mjs +67 -0
  298. package/scripts/cm-prd-completion.test.mjs +190 -0
  299. package/scripts/cm-prd-design-phase.test.mjs +296 -0
  300. package/scripts/cm-prd-draft-save.test.mjs +63 -0
  301. package/scripts/cm-prd-draft.test.mjs +39 -0
  302. package/scripts/cm-prd-entry.mjs +245 -0
  303. package/scripts/cm-prd-host.mjs +273 -0
  304. package/scripts/cm-prd-host.test.mjs +169 -0
  305. package/scripts/cm-prd-materials.test.mjs +41 -0
  306. package/scripts/cm-prd-review-claim.test.mjs +42 -0
  307. package/scripts/cm-prd-review-disposition.test.mjs +196 -0
  308. package/scripts/cm-prd-review-gate.mjs +194 -0
  309. package/scripts/cm-prd-review-gate.py +26 -0
  310. package/scripts/cm-prd-review-host.test.mjs +30 -0
  311. package/scripts/cm-prd-review-preparation.test.mjs +69 -0
  312. package/scripts/cm-prd-review-publication.test.mjs +95 -0
  313. package/scripts/cm-prd-revision.test.mjs +32 -0
  314. package/scripts/cm-prd-self-check.test.mjs +23 -0
  315. package/scripts/cm-prd-sources.test.mjs +76 -0
  316. package/scripts/cm-prd-timing.py +272 -0
  317. package/scripts/cm-refactor-entry.mjs +145 -0
  318. package/scripts/cm-refactor-host.mjs +26 -0
  319. package/scripts/cm-refactor-host.test.mjs +201 -0
  320. package/scripts/cm-review-dependency-snapshot.test.mjs +67 -0
  321. package/scripts/cm-review-inventory.test.mjs +109 -0
  322. package/scripts/cm-spec-manifest.mjs +104 -0
  323. package/scripts/cm-spec-manifest.py +26 -0
  324. package/scripts/cm-task-gate.mjs +879 -0
  325. package/scripts/cm-task-gate.py +312 -0
  326. package/scripts/cm-task-gate.test.mjs +202 -0
  327. package/scripts/cm-test-declared-command.test.mjs +18 -0
  328. package/scripts/cm-test-entry.mjs +231 -0
  329. package/scripts/cm-test-host.mjs +40 -0
  330. package/scripts/cm-test-host.test.mjs +169 -0
  331. package/scripts/cm-test-logic-results.test.mjs +26 -0
  332. package/scripts/cm-test-session.test.mjs +138 -0
  333. package/scripts/cm-usage-report.py +516 -0
  334. package/scripts/cm-workflow-config.mjs +463 -0
  335. package/scripts/cm-workflow-config.test.mjs +181 -0
  336. package/scripts/cm-workflow.mjs +36 -0
  337. package/scripts/cm-workflow.test.mjs +51 -0
  338. package/scripts/cm_workflow_config.py +52 -0
  339. package/scripts/fixtures/claude-review-process.mjs +35 -0
  340. package/scripts/fixtures/codex-review-process.mjs +22 -0
  341. package/scripts/fixtures/prd-review-gate-python-oracle.py +320 -0
  342. package/scripts/fixtures/spec-manifest-python-oracle.py +172 -0
  343. package/scripts/scan-public-safety.py +117 -0
  344. package/scripts/test-cm-log-event.py +1213 -0
  345. package/scripts/test-cm-openai-compatible-call.py +1185 -0
  346. package/scripts/test-cm-prd-review-gate.py +272 -0
  347. package/scripts/test-cm-prd-timing.py +168 -0
  348. package/scripts/test-cm-usage-report.py +584 -0
  349. package/scripts/test-npm-install.py +171 -0
  350. package/scripts/test-scan-public-safety.py +76 -0
  351. package/scripts/test-shell-compat.sh +365 -0
  352. package/scripts/test-spec-manifest.py +263 -0
  353. package/scripts/test-task-gate.py +46 -0
  354. package/scripts/test-workflow-config.py +30 -0
  355. package/scripts/validate-public-repo.py +245 -0
  356. package/scripts/validate-test-cases.mjs +71 -0
  357. package/scripts/validate-test-cases.py +27 -0
  358. package/scripts/validate-test-cases.test.mjs +36 -0
  359. package/skills/cm-ai/SKILL.md +137 -0
  360. package/skills/cm-ai/references/N1-init.md +108 -0
  361. package/skills/cm-ai/references/N2-enter-feature.md +38 -0
  362. package/skills/cm-ai/references/N3-execute-task.md +123 -0
  363. package/skills/cm-ai/references/N4-review.md +103 -0
  364. package/skills/cm-ai/references/N5-mark-done.md +117 -0
  365. package/skills/cm-ai/references/N6-qa-eval.md +102 -0
  366. package/skills/cm-ai/references/N7-context.md +23 -0
  367. package/skills/cm-ai/references/N8-finish.md +103 -0
  368. package/skills/cm-ai/references/js-host.md +126 -0
  369. package/skills/cm-backend-engineer/SKILL.md +100 -0
  370. package/skills/cm-check/SKILL.md +52 -0
  371. package/skills/cm-check/references/js-host.md +44 -0
  372. package/skills/cm-contract-engineer/SKILL.md +136 -0
  373. package/skills/cm-database-engineer/SKILL.md +89 -0
  374. package/skills/cm-devops-engineer/SKILL.md +137 -0
  375. package/skills/cm-doc-syncer/SKILL.md +150 -0
  376. package/skills/cm-finance-expert/SKILL.md +85 -0
  377. package/skills/cm-fix/SKILL.md +199 -0
  378. package/skills/cm-fix/references/cross-boundary-debugging.md +44 -0
  379. package/skills/cm-fix/references/js-host.md +135 -0
  380. package/skills/cm-frontend-engineer/SKILL.md +127 -0
  381. package/skills/cm-idea/SKILL.md +55 -0
  382. package/skills/cm-idea/references/domains/trading.md +97 -0
  383. package/skills/cm-idea/references/example-prd.md +92 -0
  384. package/skills/cm-idea/references/idea-to-prd.md +282 -0
  385. package/skills/cm-idea/references/js-host.md +63 -0
  386. package/skills/cm-init/SKILL.md +191 -0
  387. package/skills/cm-init/references/js-host.md +123 -0
  388. package/skills/cm-miniprogram-engineer/SKILL.md +141 -0
  389. package/skills/cm-miniprogram-engineer/references/platform-readiness.md +58 -0
  390. package/skills/cm-miniprogram-engineer/references/release-checklist.md +59 -0
  391. package/skills/cm-prd/SKILL.md +548 -0
  392. package/skills/cm-prd/references/brownfield.md +13 -0
  393. package/skills/cm-prd/references/change-mode.md +145 -0
  394. package/skills/cm-prd/references/context-scope.md +62 -0
  395. package/skills/cm-prd/references/greenfield.md +80 -0
  396. package/skills/cm-prd/references/js-change-recovery.md +57 -0
  397. package/skills/cm-prd/references/js-host.md +98 -0
  398. package/skills/cm-prd/references/phase-timing.md +68 -0
  399. package/skills/cm-prd/references/spec-self-check.md +22 -0
  400. package/skills/cm-product-manager/SKILL.md +83 -0
  401. package/skills/cm-qa-engineer/SKILL.md +142 -0
  402. package/skills/cm-refactor/SKILL.md +236 -0
  403. package/skills/cm-refactor/references/js-batch.md +75 -0
  404. package/skills/cm-refactor/references/js-host.md +78 -0
  405. package/skills/cm-test/SKILL.md +288 -0
  406. package/skills/cm-test/references/js-host.md +118 -0
  407. package/skills/cm-ui-engineer/SKILL.md +105 -0
  408. package/skills/codebase-context/SKILL.md +489 -0
  409. package/skills/darwin-skill/NOTICE.md +26 -0
  410. package/skills/darwin-skill/README.md +272 -0
  411. package/skills/darwin-skill/SKILL.md +492 -0
  412. package/skills/darwin-skill/references/runtime-neutrality.md +68 -0
  413. package/skills/darwin-skill/references/skilllens-evidence.md +142 -0
  414. package/skills/darwin-skill/scripts/screenshot.mjs +71 -0
  415. package/skills/darwin-skill/templates/result-card-dark.html +698 -0
  416. package/skills/darwin-skill/templates/result-card-white.html +444 -0
  417. package/skills/darwin-skill/templates/result-card.html +616 -0
  418. package/skills/external-expert/SKILL.md +250 -0
  419. package/templates/arch-reference.md +68 -0
  420. package/templates/auto-update/cm-announce.sh +19 -0
  421. package/templates/auto-update/cm-update.sh +274 -0
  422. package/templates/cm-workflow.yml +52 -0
  423. package/templates/dashboard/dashboard.html +153 -0
  424. package/templates/dashboard/serve.sh +10 -0
  425. package/templates/hooks/pre-commit-cm-task-check +67 -0
  426. package/templates/pixel/cm-pixel.html +388 -0
  427. package/templates/pixel/cm-pixel.sh +212 -0
  428. package/templates/pixel/dev/README.md +20 -0
  429. package/templates/pixel/dev/atlas-preview.png +0 -0
  430. package/templates/pixel/dev/build.py +55 -0
  431. package/templates/pixel/dev/sheets/roguelikeChar_transparent.png +0 -0
  432. package/templates/pixel/dev/sheets/roguelikeCity_tilemap.png +0 -0
  433. package/templates/pixel/dev/sheets/roguelikeIndoor_transparent.png +0 -0
  434. package/templates/pixel/dev/template.html +388 -0
  435. package/templates/pixel/serve.sh +12 -0
  436. package/templates/refactor/cm-refactor-denies.json +14 -0
  437. package/templates/rules/backend-api.md +36 -0
  438. package/templates/rules/coding-style.md +44 -0
  439. package/templates/rules/database.md +27 -0
  440. package/templates/rules/finance.md +32 -0
  441. package/templates/rules/frontend.md +32 -0
  442. package/templates/rules/git-workflow.md +25 -0
  443. package/templates/rules/miniprogram.md +31 -0
  444. package/templates/rules/security.md +31 -0
  445. package/templates/rules/smart-contract.md +28 -0
  446. package/templates/rules/testing.md +36 -0
  447. package/templates/statusline/cm-statusline.sh +73 -0
  448. package/templates/ui-lens/cm-ui-lens-extract.mjs +55 -0
@@ -0,0 +1,85 @@
1
+ {
2
+ "schema_version": 1,
3
+ "task_id": "T-FIX-model-call-boundary-identity",
4
+ "attempt": 2,
5
+ "status": "ready_for_review",
6
+ "changed_files": [
7
+ ".claude/CLAUDE.md",
8
+ ".claude/rules/security.md",
9
+ ".claude/rules/testing.md",
10
+ "README.md",
11
+ "docs/fixes/.reviews/fix-manifest-runtime-checkbox-drift-r2.md",
12
+ "docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-a1-handoff.json",
13
+ "docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-r1.md",
14
+ "docs/fixes/20260804-manifest-runtime-checkbox-drift.md",
15
+ "docs/fixes/20260806-model-call-boundary-identity.md",
16
+ "docs/fixes/20260807-prelanding-integrity.md",
17
+ "docs/user-guide.md",
18
+ "runtime/logging.md",
19
+ "runtime/model-efficiency.md",
20
+ "runtime/orchestration.md",
21
+ "runtime/review.md",
22
+ "runtime/task-gates.md",
23
+ "runtime/task-handoff.schema.json",
24
+ "runtime/workflow-config.md",
25
+ "runtime/workflow-routing.md",
26
+ "scripts/cm-check-runtime.sh",
27
+ "scripts/cm-log-event.py",
28
+ "scripts/cm-openai-compatible-call.py",
29
+ "scripts/cm-task-gate.py",
30
+ "scripts/cm-usage-report.py",
31
+ "scripts/cm_workflow_config.py",
32
+ "scripts/scan-public-safety.py",
33
+ "scripts/test-cm-openai-compatible-call.py",
34
+ "scripts/test-cm-usage-report.py",
35
+ "scripts/test-task-gate.py",
36
+ "scripts/test-workflow-config.py",
37
+ "scripts/validate-public-repo.py",
38
+ "skills/cm-ai/SKILL.md",
39
+ "skills/cm-ai/references/N3-execute-task.md",
40
+ "skills/cm-ai/references/N4-review.md",
41
+ "skills/cm-ai/references/N5-mark-done.md",
42
+ "skills/cm-fix/SKILL.md",
43
+ "skills/cm-prd/SKILL.md",
44
+ "skills/cm-refactor/SKILL.md",
45
+ "skills/cm-test/SKILL.md",
46
+ "templates/cm-workflow.yml"
47
+ ],
48
+ "implementation_sha256": "b7e6fcf18221012f08ba9d46c657d7c40831ccb49fe2903fbababa7d65ae356d",
49
+ "verification": [
50
+ {
51
+ "command": "python3 scripts/test-cm-usage-report.py && python3 scripts/test-cm-openai-compatible-call.py && python3 scripts/test-workflow-config.py && python3 scripts/test-task-gate.py",
52
+ "status": "passed",
53
+ "evidence": "Managed usage requires a claim, stdout delivery is outcome-safe, unsupported managed reviewer config is rejected, and implementation mutations invalidate content-bound review evidence."
54
+ },
55
+ {
56
+ "command": "python3 -m py_compile scripts/cm-log-event.py scripts/cm-usage-report.py scripts/cm-openai-compatible-call.py scripts/cm-task-gate.py scripts/cm_workflow_config.py scripts/test-cm-usage-report.py scripts/test-cm-openai-compatible-call.py scripts/test-workflow-config.py scripts/test-task-gate.py",
57
+ "status": "passed",
58
+ "evidence": "All modified Python runtime and fixture files compiled successfully."
59
+ },
60
+ {
61
+ "command": "./scripts/cm-check-runtime.sh",
62
+ "status": "passed",
63
+ "evidence": "Runtime, log, timing, usage, adapter, config, task-gate, manifest and review recovery fixtures passed for plugin v0.10.4."
64
+ },
65
+ {
66
+ "command": "python3 scripts/validate-public-repo.py && python3 scripts/scan-public-safety.py",
67
+ "status": "passed",
68
+ "evidence": "Public repository validation and safety scan passed after the optional handoff digest contract was added."
69
+ },
70
+ {
71
+ "command": "/bin/bash scripts/test-shell-compat.sh && plugin validator && git diff --check",
72
+ "status": "passed",
73
+ "evidence": "Shell compatibility, Codex plugin validation and whitespace validation passed."
74
+ }
75
+ ],
76
+ "evidence": [
77
+ "docs/fixes/20260806-model-call-boundary-identity.md",
78
+ "docs/fixes/20260807-prelanding-integrity.md",
79
+ "round 1 recorded four blocking findings and verdict changes_requested",
80
+ "attempt 2 covers every currently modified or untracked landing path",
81
+ "implementation digest was generated by cm-task-gate.py hash-implementation"
82
+ ],
83
+ "blockers": [],
84
+ "scope_deviation": []
85
+ }
@@ -0,0 +1,53 @@
1
+ ---
2
+ at: 2026-08-07T00:02:49-07:00
3
+ reviewer: self-degraded
4
+ independent: false
5
+ degraded_reason: fresh codex-cli review started in an isolated repository but the account weekly limit was 100 percent; subagent delegation was not authorized for this task
6
+ task: T-FIX-model-call-boundary-identity
7
+ attempt: 1
8
+ round: 1
9
+ verdict: changes_requested
10
+ blocking_findings: 4
11
+ handoff: fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-a1-handoff.json
12
+ handoff_sha256: 27dd0d380030d27dda39dc4754b1199283c7872693dfd57b2fccf124f448ea3a
13
+ scope:
14
+ - .claude/rules/security.md
15
+ - .claude/rules/testing.md
16
+ - .omx/logs/execution-ledger.md
17
+ - .omx/plans/model-usage-adapter.md
18
+ - README.md
19
+ - docs/fixes/20260806-model-call-boundary-identity.md
20
+ - runtime/logging.md
21
+ - runtime/model-efficiency.md
22
+ - scripts/cm-log-event.py
23
+ - scripts/cm-openai-compatible-call.py
24
+ - scripts/cm-usage-report.py
25
+ - scripts/test-cm-openai-compatible-call.py
26
+ - scripts/test-cm-usage-report.py
27
+ ---
28
+
29
+ Verdict: changes requested. This is a self-degraded review, not an independent
30
+ review.
31
+
32
+ Blocking findings:
33
+
34
+ 1. The handoff listed only 13 paths and bound the review to the handoff JSON SHA,
35
+ not to the implementation bytes. Additional current changes were outside the
36
+ review scope, and an implementation file could change after review without
37
+ invalidating N5. Red fixture: `cm-task-gate.py hash-implementation` was an
38
+ unknown command and an unbound handoff remained eligible for N4/N5.
39
+ 2. A bundled `openai-compatible` `model_usage` event could be written without a
40
+ preceding claim, then counted as verified usage. Red fixture observed one call
41
+ and 999 input tokens from a claimless managed completion.
42
+ 3. The provider could return successfully and log `outcome: success`, after which
43
+ writing the model result to stdout raised an unhandled `BrokenPipeError`. The
44
+ process traceback and success usage contradicted each other.
45
+ 4. Configuration accepted `reviewer.adapter: openai-compatible`, but N4 recognizes
46
+ only `codex-subagent`, `codex-cli`, or `self-degraded` review evidence. The API
47
+ call therefore spent tokens without being able to satisfy the review gate.
48
+
49
+ Required correction: bind each new handoff to the exact changed-file contents,
50
+ reject claimless managed usage in both writer and reporter, make stdout delivery
51
+ part of the adapter outcome boundary, and reject the unsupported managed reviewer
52
+ route before any call. A complete attempt-2 handoff must cover the entire landing
53
+ scope and rerun all focused and repository gates.
@@ -0,0 +1,80 @@
1
+ ---
2
+ at: 2026-08-07T01:08:00-07:00
3
+ reviewer: codex-subagent
4
+ independent: true
5
+ task: T-FIX-model-call-boundary-identity
6
+ attempt: 2
7
+ round: 2
8
+ verdict: blocked
9
+ blocking_findings: 1
10
+ handoff: fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-a2-handoff.json
11
+ handoff_sha256: 11ca8a55a4f0fd17d2cefbd98281c0f5cfac437709b4ba23c15e35d98c785145
12
+ scope:
13
+ - .claude/CLAUDE.md
14
+ - .claude/rules/security.md
15
+ - .claude/rules/testing.md
16
+ - README.md
17
+ - docs/fixes/.reviews/fix-manifest-runtime-checkbox-drift-r2.md
18
+ - docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-a1-handoff.json
19
+ - docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-r1.md
20
+ - docs/fixes/20260804-manifest-runtime-checkbox-drift.md
21
+ - docs/fixes/20260806-model-call-boundary-identity.md
22
+ - docs/fixes/20260807-prelanding-integrity.md
23
+ - docs/user-guide.md
24
+ - runtime/logging.md
25
+ - runtime/model-efficiency.md
26
+ - runtime/orchestration.md
27
+ - runtime/review.md
28
+ - runtime/task-gates.md
29
+ - runtime/task-handoff.schema.json
30
+ - runtime/workflow-config.md
31
+ - runtime/workflow-routing.md
32
+ - scripts/cm-check-runtime.sh
33
+ - scripts/cm-log-event.py
34
+ - scripts/cm-openai-compatible-call.py
35
+ - scripts/cm-task-gate.py
36
+ - scripts/cm-usage-report.py
37
+ - scripts/cm_workflow_config.py
38
+ - scripts/scan-public-safety.py
39
+ - scripts/test-cm-openai-compatible-call.py
40
+ - scripts/test-cm-usage-report.py
41
+ - scripts/test-task-gate.py
42
+ - scripts/test-workflow-config.py
43
+ - scripts/validate-public-repo.py
44
+ - skills/cm-ai/SKILL.md
45
+ - skills/cm-ai/references/N3-execute-task.md
46
+ - skills/cm-ai/references/N4-review.md
47
+ - skills/cm-ai/references/N5-mark-done.md
48
+ - skills/cm-fix/SKILL.md
49
+ - skills/cm-prd/SKILL.md
50
+ - skills/cm-refactor/SKILL.md
51
+ - skills/cm-test/SKILL.md
52
+ - templates/cm-workflow.yml
53
+ ---
54
+
55
+ Verdict: blocked with one blocking finding.
56
+
57
+ The four round-1 functional defects are fixed: implementation content binding passes,
58
+ claimless managed usage is rejected and not counted, stdout write/flush failures record
59
+ only error outcomes without traceback, and managed reviewer configuration is rejected
60
+ before API dispatch. All focused and repository-level gates passed.
61
+
62
+ Blocking finding:
63
+
64
+ - `docs/fixes/20260806-model-call-boundary-identity.md` still names the round-1
65
+ `changes_requested` file as the authoritative review conclusion instead of identifying
66
+ it as historical and pointing to this final disposition. In addition, the attempt-2
67
+ handoff and prior review prose call the 40 content-bound paths “all currently modified
68
+ or untracked landing paths”, while the a2 handoff and r2 review files themselves are
69
+ intentionally outside that digest to avoid self-reference. The implementation scope is
70
+ complete, but the evidence wording is not honest about that boundary.
71
+
72
+ Required disposition: correct the archive to distinguish historical r1 from final r2,
73
+ describe the 40 paths as the pre-handoff implementation/landing scope, and explicitly
74
+ state that a2/r2 evidence files are excluded from their own content digest. Because the
75
+ archive is content-bound, that correction invalidates this attempt-2 implementation hash.
76
+ The two-round contract forbids silently creating attempt 3; this requires human disposition
77
+ or a separately scoped follow-up fix.
78
+
79
+ Residual risk: no live third-party provider call was made; full task-diff completeness
80
+ still depends on N3's explicit working-tree comparison.
@@ -0,0 +1,35 @@
1
+ {
2
+ "schema_version": 1,
3
+ "task_id": "T-FIX-review-evidence-scope-honesty",
4
+ "attempt": 1,
5
+ "status": "ready_for_review",
6
+ "changed_files": [
7
+ "docs/fixes/20260806-model-call-boundary-identity.md",
8
+ "docs/fixes/20260807-prelanding-integrity.md"
9
+ ],
10
+ "implementation_sha256": "37072fa0aec0fd4faa33724199ccfab845209f3d7d02102a3b59f52c3ec06007",
11
+ "verification": [
12
+ {
13
+ "command": "rg final-disposition and digest-boundary assertions in both archives",
14
+ "status": "passed",
15
+ "evidence": "The archives now identify r1 as historical, r2 as final blocked, the 40 pre-handoff paths as content-bound, and a2/r2 evidence as excluded to avoid self-reference."
16
+ },
17
+ {
18
+ "command": "./scripts/cm-check-runtime.sh",
19
+ "status": "passed",
20
+ "evidence": "All CM runtime and fixture groups passed for plugin v0.10.4."
21
+ },
22
+ {
23
+ "command": "python3 scripts/validate-public-repo.py && python3 scripts/scan-public-safety.py && git diff --check",
24
+ "status": "passed",
25
+ "evidence": "Public repository validation, safety scan and whitespace validation passed."
26
+ }
27
+ ],
28
+ "evidence": [
29
+ "independent round-2 finding: final disposition and self-referential digest boundary were described inaccurately",
30
+ "human disposition: open a separately scoped small fix rather than create attempt 3",
31
+ "the historical a2 handoff and blocked r2 review were not rewritten or disguised"
32
+ ],
33
+ "blockers": [],
34
+ "scope_deviation": []
35
+ }
@@ -0,0 +1,33 @@
1
+ ---
2
+ at: 2026-08-07T01:21:09-07:00
3
+ reviewer: codex-subagent
4
+ independent: true
5
+ task: T-FIX-review-evidence-scope-honesty
6
+ attempt: 1
7
+ round: 1
8
+ verdict: approved
9
+ blocking_findings: 0
10
+ handoff: fix-review-evidence-scope-honesty-T-FIX-review-evidence-scope-honesty-a1-handoff.json
11
+ handoff_sha256: c4eb262bb26c1231c389018b41cbdd5b0a241ab55959b3d9cc2dcdfe6ff2abfc
12
+ scope:
13
+ - docs/fixes/20260806-model-call-boundary-identity.md
14
+ - docs/fixes/20260807-prelanding-integrity.md
15
+ ---
16
+
17
+ Zero findings. Verdict: approved.
18
+
19
+ The independent review confirmed that r1 is identified as historical
20
+ `changes_requested`, r2 remains the original task's final `blocked` disposition,
21
+ and the 40 content-bound paths are accurately limited to the pre-a2-handoff
22
+ implementation and landing scope. The archives explicitly explain that a2/r2
23
+ evidence files cannot participate in their own implementation digest without
24
+ self-reference.
25
+
26
+ The historical a2 handoff was not rewritten, its SHA-256 still matches the digest
27
+ recorded by the blocked r2 review, and the new follow-up handoff covers exactly the
28
+ two authorized archive files. Its recomputed implementation digest matches the
29
+ handoff. Runtime consistency, public repository validation, safety scan, handoff
30
+ validation and `git diff --check` passed.
31
+
32
+ Residual non-blocking risk: the historical evidence is currently untracked and has
33
+ no immutable Git baseline; internal handoff/review digest consistency is intact.
@@ -0,0 +1,30 @@
1
+ ---
2
+ at: 2026-07-29T02:41:49-07:00
3
+ reviewer: codex-cli
4
+ independent: true
5
+ task: fix-windows-cp1252-log-output
6
+ round: 1
7
+ scope:
8
+ - scripts/cm-log-event.py
9
+ - scripts/test-cm-log-event.py
10
+ ---
11
+
12
+ The production change appears appropriate, but the added regression test does not
13
+ exercise non-ASCII stdout and therefore cannot detect the bug it is intended to
14
+ prevent.
15
+
16
+ Review comment:
17
+
18
+ - [P2] Exercise Unicode in a returned field —
19
+ `scripts/test-cm-log-event.py:121-124`
20
+
21
+ The Chinese `--detail` value is written only to the logs and is absent from the
22
+ result printed to stdout; since every returned path and identifier here is
23
+ ASCII, this test still passes with the previous `ensure_ascii=False`
24
+ implementation. Use a non-ASCII specs or log path, then verify the result, so
25
+ the fixture actually reproduces the cp1252 encoding failure.
26
+
27
+ Disposition: accepted. The fixed project-log filename was already non-ASCII and
28
+ the test had produced the expected red failure, but the trigger was implicit.
29
+ The fixture now uses an explicitly non-ASCII specs path and checks both the raw
30
+ ASCII escape and the decoded Unicode path.
@@ -0,0 +1,16 @@
1
+ ---
2
+ at: 2026-07-29T02:43:32-07:00
3
+ reviewer: codex-cli
4
+ independent: true
5
+ task: fix-windows-cp1252-log-output
6
+ round: 2
7
+ scope:
8
+ - scripts/cm-log-event.py
9
+ - scripts/test-cm-log-event.py
10
+ ---
11
+
12
+ The ASCII-escaped JSON output prevents legacy console encoding failures while
13
+ remaining valid machine-readable JSON. The added regression coverage and runtime
14
+ log fixtures pass.
15
+
16
+ Verdict: approved; no actionable findings.
@@ -0,0 +1,40 @@
1
+ {
2
+ "schema_version": 1,
3
+ "task_id": "T-FIX-openai-compatible-depth-fixture",
4
+ "attempt": 1,
5
+ "status": "ready_for_review",
6
+ "changed_files": [
7
+ "docs/fixes/20260826-openai-compatible-depth-fixture.md",
8
+ "scripts/test-cm-openai-compatible-call.py"
9
+ ],
10
+ "implementation_sha256": "1fca3ebade7f68d1e3d6a706f30499ef91f2e5c3431defdf0dad6b993250c7dd",
11
+ "verification": [
12
+ {
13
+ "command": "python3 scripts/test-cm-openai-compatible-call.py",
14
+ "status": "passed",
15
+ "evidence": "Python 3.9.6: cm openai-compatible adapter fixture: PASS"
16
+ },
17
+ {
18
+ "command": "python3.12 scripts/test-cm-openai-compatible-call.py",
19
+ "status": "passed",
20
+ "evidence": "Python 3.12: cm openai-compatible adapter fixture: PASS"
21
+ },
22
+ {
23
+ "command": "env PATH=<python-3.12-bin>:$PATH ./scripts/cm-check-runtime.sh",
24
+ "status": "passed",
25
+ "evidence": "Python 3.12 runtime contracts: cm runtime check: PASSED (plugin v0.10.4)"
26
+ },
27
+ {
28
+ "command": "CI-equivalent public, safety, Bash, shell, config, task-gate and diff checks",
29
+ "status": "passed",
30
+ "evidence": "All commands exited 0; shell compatibility fixtures: PASSED"
31
+ }
32
+ ],
33
+ "evidence": [
34
+ "Python 3.12 baseline failed at the deep request assertion used by Linux and Windows CI.",
35
+ "Python 3.9 classified 2000 levels as parser recursion failure; Python 3.12 reached the adapter depth guard.",
36
+ "Both request and provider-response fixtures now exercise the explicit 128-level product boundary."
37
+ ],
38
+ "blockers": [],
39
+ "scope_deviation": []
40
+ }
@@ -0,0 +1,30 @@
1
+ ---
2
+ at: 2026-08-26T05:40:41-07:00
3
+ reviewer: codex-subagent
4
+ independent: true
5
+ task: T-FIX-openai-compatible-depth-fixture
6
+ attempt: 1
7
+ round: 1
8
+ verdict: approved
9
+ blocking_findings: 0
10
+ handoff: openai-compatible-depth-fixture-T-FIX-openai-compatible-depth-fixture-a1-handoff.json
11
+ handoff_sha256: 8204c3f5ae1ec8296935c7c9e39d7e18697680e7ae340a7829184ce5a98c1dec
12
+ scope:
13
+ - docs/fixes/20260826-openai-compatible-depth-fixture.md
14
+ - scripts/test-cm-openai-compatible-call.py
15
+ ---
16
+
17
+ Zero findings. Verdict: approved.
18
+
19
+ The independent review confirmed that both 256-level fixtures parse on Python
20
+ 3.9 and Python 3.12, exceed the adapter's explicit 128-level product boundary,
21
+ and cover both `parse_strict_json()` entry points without changing runtime
22
+ behavior. No other 2000-level fixture or omitted strict-JSON entry path was found.
23
+
24
+ The defect archive matches the diff and distinguishes the Python parser recursion
25
+ limit from the adapter depth contract. The handoff schema, recomputed
26
+ implementation digest, targeted fixtures and `git diff --check` passed.
27
+
28
+ Residual non-blocking risks: the independent review ran on macOS rather than the
29
+ GitHub Linux and Windows runners, and this repair does not add exact 128/129
30
+ adjacent-boundary tests. The parent run completed the broader CI-equivalent checks.
@@ -0,0 +1,65 @@
1
+ # Windows cp1252 日志结果输出失败
2
+
3
+ ## 现象
4
+
5
+ GitHub Actions 的 `windows-install` 检查在 Claude PowerShell 安装后的运行时
6
+ 自检中失败。`cm-log-event.py` 已写入日志,但在最终打印机器可读结果时退出 1:
7
+
8
+ ```text
9
+ UnicodeEncodeError: 'charmap' codec can't encode characters
10
+ File "scripts/cm-log-event.py", line 670, in main
11
+ print(json.dumps(result, ensure_ascii=False, separators=(",", ":")))
12
+ ```
13
+
14
+ ## 复现
15
+
16
+ 在行为夹具中以 `PYTHONIOENCODING=cp1252` 启动日志写入器,并让返回的
17
+ `project_log` 包含中文目录与 `运行日志.jsonl` 文件名。
18
+
19
+ 修复前的红灯证据:
20
+
21
+ ```text
22
+ AssertionError: expected exit 0, got 1
23
+ UnicodeEncodeError: 'charmap' codec can't encode characters in position 205-208
24
+ ```
25
+
26
+ ## 根因
27
+
28
+ 日志文件始终显式按 UTF-8 写入,不受控制台代码页影响;但 CLI 的最终 stdout
29
+ 使用 `ensure_ascii=False` 输出原始中文。Windows GitHub Actions 的 Python stdout
30
+ 采用 cp1252,无法编码返回路径中的中文,因此在所有写入完成后仍以失败状态退出。
31
+
32
+ ## 修法
33
+
34
+ 仅把 CLI 结果的 JSON 序列化改为 `ensure_ascii=True`。stdout 因而只包含 ASCII,
35
+ 任何标准 JSON 解析器都会把 `\uXXXX` 还原为原始 Unicode 字符。磁盘 JSONL、
36
+ 事件 ID、索引和指针继续使用原有 UTF-8 表示。
37
+
38
+ 放弃的方案:修改 PowerShell code page 或注入全局 `PYTHONIOENCODING=utf-8`。
39
+ 这些方案依赖调用方环境,无法覆盖 CMD、第三方启动器或其他传统代码页。
40
+
41
+ ## 波及面
42
+
43
+ - `scripts/cm-log-event.py` 的 stdout 机器接口;
44
+ - `scripts/test-cm-log-event.py` 的跨代码页行为夹具;
45
+ - 不改变日志文件格式、字段语义、路径值、权限或安全过滤。
46
+
47
+ ## 回归结果
48
+
49
+ - `python3 scripts/test-cm-log-event.py`:PASSED;
50
+ - `pwsh -NoProfile -File scripts/cm-check-runtime.ps1 --log-fixtures`:PASSED;
51
+ - `./scripts/cm-check-runtime.sh`:PASSED,plugin v0.10.3;
52
+ - `python3 scripts/validate-public-repo.py`:PASSED;
53
+ - `python3 scripts/scan-public-safety.py`:PASSED;
54
+ - 官方 Codex plugin validator:PASSED;
55
+ - Python 编译与 `git diff --check`:PASSED;
56
+ - 独立 Codex CLI 审查:第 1 轮 1 项已修正,第 2 轮 approved。
57
+
58
+ ## 防护网
59
+
60
+ 测试文件:`scripts/test-cm-log-event.py`。夹具显式验证:
61
+
62
+ 1. cp1252 环境下进程成功退出;
63
+ 2. 原始 stdout 使用 ASCII Unicode 转义;
64
+ 3. JSON 解析后仍得到中文 specs 目录和 `运行日志.jsonl` 文件名;
65
+ 4. 全局日志写入状态保持成功。
@@ -0,0 +1,67 @@
1
+ # 已审批规格被执行勾选误判为漂移
2
+
3
+ ## 现象
4
+
5
+ 真实需求按 CM PRD → CM AI 跑完后,功能测试已经通过,但再次进入流程时
6
+ `cm-spec-manifest.py` 报告:
7
+
8
+ ```text
9
+ cm-spec-manifest: approved spec manifest does not match current spec files
10
+ ```
11
+
12
+ 对比后确认,规格内容没有变化;只有 N5 把 `tasks.md` 中完成的任务从 `[ ]`
13
+ 写成 `[x]`,N6 把 `requirements.md` 中通过的 AC 从 `[ ]` 写成 `[x]`。
14
+
15
+ ## 根因
16
+
17
+ 审批 manifest 原先对规格文件做逐字节 SHA-256。任务和 AC 的完成勾选既是 CM
18
+ 运行时的权威状态,又位于受审批保护的规格文件中,因此正常执行会让自身制造
19
+ manifest 漂移。
20
+
21
+ ## 红灯证据
22
+
23
+ 行为夹具先锁定两类失败:
24
+
25
+ 1. 普通 `T-*` / `AC-*` 完成后,旧实现返回 mismatch;
26
+ 2. 第一版简单正则会把 fenced code 和四空格缩进代码里的示例也归一化,导致
27
+ 示例内容变化错误地返回 matched。
28
+
29
+ 真实项目复现使用隔离的 dogfood specs fixture;该临时路径不写入公开修复记录。
30
+
31
+ ## 修法
32
+
33
+ manifest schema 保持为 v1,只调整计算摘要前的语义规范化:
34
+
35
+ - 仅在 `tasks.md` 正文中把标准 `T-*` 完成标记规范化为 `[ ]`;
36
+ - 仅在 `requirements.md` 正文中把标准 `[AC-*]` 完成标记规范化为 `[ ]`;
37
+ - fenced code、四空格或 Tab 缩进代码完全按原始字节参与哈希;
38
+ - 普通 checklist、ID、文案、设计与测试用例仍按原内容参与哈希。
39
+
40
+ 初始规格本来就是 `[ ]`,因此已有 `.cm-specs-status` 中的 raw SHA-256 无需迁移。
41
+
42
+ 没有引入 manifest v2、额外状态文件或每次勾选后重写审批凭证;这些做法会增加
43
+ 双重状态和迁移成本,不符合本次最小修复边界。
44
+
45
+ ## 波及面
46
+
47
+ - `scripts/cm-spec-manifest.py`:摘要规范化;
48
+ - `scripts/test-spec-manifest.py`:行为与回归夹具;
49
+ - N1、PRD、测试契约、架构和用户指南:同步 manifest 语义说明;
50
+ - 不改变 `.cm-specs-status` schema、任务状态权威来源或审批流程。
51
+
52
+ ## 回归结果
53
+
54
+ - `python3 scripts/test-spec-manifest.py`:PASSED;
55
+ - 真实 dogfood manifest:`status: matched`;
56
+ - `./scripts/cm-check-runtime.sh`:PASSED;
57
+ - `bash scripts/test-shell-compat.sh`:PASSED;
58
+ - public repository validation:PASSED;
59
+ - public safety scan:PASSED;
60
+ - 官方 Codex plugin validator:PASSED;
61
+ - Python 3.9 compile 与 `git diff --check`:PASSED;
62
+ - 独立审查:第 1 轮 1 项已修正,第 2 轮 approved。
63
+
64
+ 审查凭证:
65
+
66
+ - `.reviews/fix-manifest-runtime-checkbox-drift-r1.md`
67
+ - `.reviews/fix-manifest-runtime-checkbox-drift-r2.md`
@@ -0,0 +1,80 @@
1
+ # Model call boundary and identity closure
2
+
3
+ ## 现象
4
+
5
+ 1. 2000 层 JSON 角色包触发 `RecursionError`,进程以 exit 1 输出 traceback,
6
+ 而不是在 HTTP/claim 前以 exit 2 拒绝。非标准 JSON 数字、孤立 Unicode
7
+ surrogate、控制字符 URL 和 Unicode 主机名存在同类边界。
8
+ 2. `model_call` 和 `model_usage` 只按 `run_id + call_id` 关联。不同
9
+ workflow/stage/role/adapter 的 usage 可错误解除 claim;已有 usage 时,
10
+ 同 call id 仍可创建 claim 并发出 HTTP。
11
+
12
+ ## 复现与红灯证据
13
+
14
+ - 修复前两个存量夹具均 PASS,说明原防护网未覆盖该边界。
15
+ - 深层角色包实跑:`exit 1`,stderr 包含
16
+ `RecursionError: maximum recursion depth exceeded while decoding a JSON array`。
17
+ - 身份冲突实跑:writer 接受 reviewer claim 后又接受 planner usage;
18
+ report 输出 `observed_calls: 1` 且 `unresolved_claims: 0`。
19
+ - 新夹具首次运行分别因为非法 URL 返回 exit 1、已完成 call id 仍可
20
+ claim 而失败,与上述缺陷一致。
21
+
22
+ ## 根因
23
+
24
+ - 适配器仅捕获常见 JSON/HTTP 异常,没有把严格 JSON、Unicode、嵌套深度与
25
+ URL 安全字符统一收口,provider 边界也缺少最终失败 outcome 保障。
26
+ - writer 没有强制 claim/completion 的完整安全路由身份,reporter 又以
27
+ `run_id + call_id` 作为“已完成”的充分条件。
28
+
29
+ ## 修法
30
+
31
+ - 在 claim/HTTP 前使用严格 UTF-8 JSON 解析,拒绝非有限数字、无效
32
+ Unicode、过深结构和非可见 ASCII endpoint;provider 回包复用同一解析器。
33
+ - provider 边界的未预期异常统一写 error usage;写入失败返回 exit 4。
34
+ - writer 强制 `workflow/runtime/stage/role/adapter/requested_model/source/purpose`
35
+ 完整且匹配,已完成 call id 禁止再 claim。
36
+ - reporter 先收集 claim 再处理 usage,身份冲突、冲突 claim 和
37
+ usage-before-claim 都不计用量,claim 保持 unresolved。
38
+
39
+ 放弃方案:不引入模型网关、数据库或新的长期服务;继续使用现有
40
+ JSONL + 标准库边界。
41
+
42
+ ## 波及面
43
+
44
+ - `scripts/cm-openai-compatible-call.py`
45
+ - `scripts/cm-log-event.py`
46
+ - `scripts/cm-usage-report.py`
47
+ - 两个对应 fixture
48
+ - 模型调用/日志合同、README 安全描述和 OMX 当前状态
49
+
50
+ ## 回归结果
51
+
52
+ - `python3 scripts/test-cm-openai-compatible-call.py`: PASS(含 exit 3/4)
53
+ - `python3 scripts/test-cm-usage-report.py`: PASS
54
+ - `./scripts/cm-check-runtime.sh`: PASS
55
+ - `python3 scripts/validate-public-repo.py`: PASS
56
+ - `python3 scripts/scan-public-safety.py`: PASS
57
+ - `/bin/bash scripts/test-shell-compat.sh`: PASS
58
+ - plugin validator: PASS
59
+ - `git diff --check`: PASS
60
+
61
+ ## 测试路径
62
+
63
+ - `scripts/test-cm-openai-compatible-call.py`
64
+ - `scripts/test-cm-usage-report.py`
65
+
66
+ ## 审查
67
+
68
+ 审查生命周期而非单个历史文件才是最终状态:
69
+
70
+ - round 1 的
71
+ `docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-r1.md`
72
+ 是历史 `changes_requested`,记录四个被后续修复的 finding;
73
+ - round 2 的
74
+ `docs/fixes/.reviews/fix-model-call-boundary-identity-T-FIX-model-call-boundary-identity-r2.md`
75
+ 是该任务最终 disposition:四个功能问题已收口,但因证据 scope 文案不准确而
76
+ `blocked`;
77
+ - 证据文案的人工处置与独立收口记录在后续小修复任务
78
+ `fix-review-evidence-scope-honesty-T-FIX-review-evidence-scope-honesty-*` 中。
79
+
80
+ 不得把 r1 当成最终批准,也不得把任何 `self-degraded` 结果描述为独立审查。