@aibyzero/cm-workflow 0.15.2 → 0.15.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-workflow",
3
- "version": "0.15.2",
3
+ "version": "0.15.4",
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,15 @@
7
7
 
8
8
  (暂无)
9
9
 
10
+ ## 0.15.4 — 2026-09-20
11
+
12
+ - **`cm-check --quick`:约 12 秒收口的快速检查**。完整检查耗时拆分为查更新 0.7 秒、机械检查 12.4 秒,其余几乎全在八组语义检查上——那不是程序在跑,而是执行者逐个文件读取并取证行号,且控制器强制八组齐全、passed 必须附真实行号,慢是设计换来的。日常「装没装对、版本对不对」这类问题机械检查已能回答,`--quick` 让更新与机械检查照常跑、机械通过后直接收口,不进语义检查。结论为 `MECHANICAL_ONLY` 而**不是 PASSED**:八组一组没读,不得据此宣称安装完整无断链;结果带 `semanticChecked:false` 与 `reason:quick_mode_semantic_not_run`。机械失败仍照常报 FAILED/BLOCKED,快速模式不跳过任何失败。默认不带该参数时行为不变。
13
+
14
+ ## 0.15.3 — 2026-09-20
15
+
16
+ - **cm-check 在 Claude 安装上可以拿到 PASSED**:第 1 组查 `.codex-plugin/plugin.json`、第 7 组查根 `VERSION` 与根 `README.md`,三者都是 Codex 插件模式的产物,claude-compat 安装本就不该有(`install.sh` 只写 `templates/cm-VERSION`)。此前这两组只能判 blocked,健康的 Claude 安装永远停在 BLOCKED。现按安装模式分流:控制器推出 `installMode` 并下发给语义检查,语义结果新增 `not_applicable` 状态,仅第 1、7 组可用且必须写明缺的是哪个产物、为何本模式不该有;汇总时它既不算失败也不算阻塞。本模式确实拥有的产物证据不足仍记 blocked,不得借它放行。
17
+ - **修复 cm-check 报告的版本号在 Claude 安装上恒为 null**:结果中的 `version` 此前固定读根 `VERSION`,而 claude-compat 安装没有该文件。现按模式读取,claude-compat 读 `templates/cm-VERSION`。报告另附 `installMode`。
18
+
10
19
  ## 0.15.2 — 2026-09-19
11
20
 
12
21
  - **同 feature 并行开发现在可用**:`parallel` 字段此前只存在于代码,没有任何文档或 Skill 提过它,而执行规则要求「不发明字段」,功能因此从入口够不着。现补齐 `docs/js-workflow-control.md` 的「并行组」一节(字段形状、五条约束与失败码、工作树与分支命名、串行合并、QA 延后、review 前置),并在 `cm-ai` N1 增加提议规则:只对 scope 全为新建文件、互不重叠、无依赖路径的同 feature 任务成组,组不起来就串行,不为组而组。
package/README.md CHANGED
@@ -17,6 +17,15 @@
17
17
 
18
18
  ## 最近更新
19
19
 
20
+ **0.15.4**
21
+
22
+ - **`/cm-check` 新增快速模式**:日常只想确认「装没装对、版本对不对」时,跑快速检查约 12 秒出结果,不再等十几分钟。完整检查的时间几乎全花在逐个文件核对引用关系上,快速模式跳过这一段。结论会明确标为「仅机械检查」而不是「通过」——跳过的部分不会被说成检查过了。机械检查本身发现的问题照常报错,不会被跳过。
23
+
24
+ **0.15.3**
25
+
26
+ - **`/cm-check` 在 Claude 版安装上不再假报 BLOCKED**:有两组检查查的是 Codex 插件专属文件,Claude 版安装本来就没有,此前只能算「查不了」,于是健康的安装也永远拿不到 PASSED。现在按安装方式区分:不属于本安装方式的产物记为「不适用」,而真正证据不足的仍然照常阻塞——不是靠放水换来的通过。
27
+ - 顺带修掉 cm-check 报告里的版本号在 Claude 版安装上总是空的问题。
28
+
20
29
  **0.15.2**
21
30
 
22
31
  - **同 feature 并行开发现在可用**:无依赖、改动文件互不重叠的任务可分组,各自在独立 Git 工作树开发,再串行合并回主分支,成员 QA 延后到该 feature 最后一个任务统一执行。此前这个能力只存在于代码里、没有文档,从正常入口用不到。需要注意的是:当前会话模式下写代码仍是逐个进行,并行重叠的是审查与流程开销,不要按成倍提速预期。
@@ -134,7 +143,7 @@ $cm-check
134
143
 
135
144
  仓库直接分发 Skills 和脚本,无需在仓库根目录运行 `npm install` 或构建。完整安装行为、覆盖范围和卸载说明见[安装指南](docs/installation.md)。
136
145
 
137
- 需要固定版本时可使用 `npx @aibyzero/cm-workflow@0.15.2 install`,请在 CM Workflow 源码仓库以外的目录执行,例如用户主目录。npm 安装入口复用原安装器,要求与覆盖范围见[安装指南](docs/installation.md#npm-installation-macos-codex)。
146
+ 需要固定版本时可使用 `npx @aibyzero/cm-workflow@0.15.4 install`,请在 CM Workflow 源码仓库以外的目录执行,例如用户主目录。npm 安装入口复用原安装器,要求与覆盖范围见[安装指南](docs/installation.md#npm-installation-macos-codex)。
138
147
 
139
148
  ## 升级旧版本
140
149
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.15.2
1
+ 0.15.4
@@ -73,7 +73,7 @@ Install or upgrade with the same command:
73
73
  npx @aibyzero/cm-workflow@latest install
74
74
  ```
75
75
 
76
- To pin a version, use `npx @aibyzero/cm-workflow@0.15.2 install` from outside
76
+ To pin a version, use `npx @aibyzero/cm-workflow@0.15.4 install` from outside
77
77
  the CM Workflow source checkout (for example, your home directory). Inside a
78
78
  checkout with the same package name and version, npm can select the local
79
79
  uninstalled package and report `cm-workflow: command not found`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibyzero/cm-workflow",
3
- "version": "0.15.2",
3
+ "version": "0.15.4",
4
4
  "description": "Spec-driven business development workflow for Pi, Codex, and Claude Code",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -9,6 +9,10 @@ import {need,shape,json,digest} from '../cm-ai/effect-contract.mjs';
9
9
  const directories=['skills','runtime','agents','compat/claude-commands','templates','scripts','.codex-plugin'];
10
10
  const topFiles=['VERSION','README.md','package.json','install.sh','install.ps1','install-codex.sh','install-codex.ps1'];
11
11
  const optionalIds=['statusline','updater','subagents','isolated_review','external_browser'];
12
+ // Groups 1 and 7 inspect the Codex plugin manifest, the root VERSION and the root README.
13
+ // A Claude-compatible installation legitimately owns none of them, so only these two may be
14
+ // waived as not_applicable; every other group must still reach a real verdict.
15
+ const modeScopedChecks=new Set([1,7]);
12
16
  const nonempty=value=>typeof value==='string'&&value.trim().length>0;
13
17
  function snapshot(root){
14
18
  need(fs.realpathSync(root)===root,'check_source_path_changed');
@@ -34,7 +38,10 @@ function snapshot(root){
34
38
  return {files,digest:digest(files)};
35
39
  }
36
40
  export function createCmCheckHost(raw,{call}){
37
- const invocation=createCmCheckInvocation(raw),root=invocation.workflowRoot;
41
+ // --quick is a host launch choice, not part of the checker invocation contract.
42
+ const {quick=false,...invocationInput}=raw&&typeof raw==='object'&&!Array.isArray(raw)?raw:{};
43
+ need(typeof quick==='boolean','invalid_input');
44
+ const invocation=createCmCheckInvocation(invocationInput),root=invocation.workflowRoot;
38
45
  need(typeof call==='function','check_host_required');
39
46
  const controller=new AbortController();let stage='ready',mechanical=null,result=null;
40
47
  const capture=()=>{
@@ -51,6 +58,9 @@ export function createCmCheckHost(raw,{call}){
51
58
  const baseline=capture(),skill=readCmInitSource(root,'skills/cm-check/SKILL.md').toString('utf8');
52
59
  const checklist=skill.split('\n').filter(line=>/^[1-8]\. \*\*/.test(line));
53
60
  need(checklist.length===8&&checklist.every((line,index)=>line.startsWith(`${index+1}. `)),'check_checklist_invalid');
61
+ // The mechanical checker already distinguishes the installation mode; derive it from the
62
+ // same marker so the assessor is told which mode it is in instead of inferring it.
63
+ const installMode=fs.existsSync(path.join(root,'.codex-plugin/plugin.json'))?'plugin':'claude-compat';
54
64
  const windows=path.join(root,'scripts/cm-check-runtime.ps1');
55
65
  const response=json(await call('check_runtime',{invocation,
56
66
  windows:{script:windows,args:invocation.args},
@@ -61,18 +71,27 @@ export function createCmCheckHost(raw,{call}){
61
71
  mechanical={source:'current_host_execution_report',...response};current(baseline);
62
72
  if(response.exitCode!==0){stage='reported';result={overall:response.exitCode===null?'BLOCKED':'FAILED',mechanical,checks:[],optional:[],
63
73
  semanticChecked:false,completionAuthorized:false};return status();}
74
+ // Quick mode stops here. MECHANICAL_ONLY is deliberately not PASSED: the eight
75
+ // semantic groups were never read, so the verdict must not be quotable as a full pass.
76
+ if(quick){stage='reported';result={overall:'MECHANICAL_ONLY',installMode,
77
+ version:(readCmInitSource(root,installMode==='plugin'?'VERSION':'templates/cm-VERSION')?.toString('utf8').trim())??null,
78
+ mechanical,checks:[],optional:[],semanticChecked:false,
79
+ reason:'quick_mode_semantic_not_run',completionAuthorized:false};return status();}
64
80
  stage='semantic';
65
81
  const assessment=json(await call('check_semantic',{workflowRoot:root,project:invocation.project,sourceDigest:baseline.digest,
66
- scope:{directories,files:topFiles},checklist,optionalIds,
67
- instructions:'Read the original eight cm-check semantic groups and relevant local files in this scope. Reuse actual mechanical findings; do not rerun it or its tests. No business testing, file writes, installs, provider calls, private directories or secrets. Return {sourceDigest,checks:[{id:1..8,status:passed|failed|blocked,evidence:[{path:workflow-relative,line:positive integer}],findings:[specific reproducible issue or evidence gap]}],optional:[{id,status:configured|degraded|unknown,reason}]}. Cover every group and optional id exactly once. Passed requires actual cited evidence and no findings; failed requires cited reproducible defects. Missing ability/evidence is blocked, not passed. Optional tools may be degraded, never core failures. No invented executions. Evidence refers to existing local text; missing targets are described with their referring file/line. Compatibility aliases are not private Codex calls. This is current-host semantic assessment, not independent review or completion approval.'},controller.signal));
82
+ scope:{directories,files:topFiles},checklist,optionalIds,installMode,
83
+ instructions:'Read the original eight cm-check semantic groups and relevant local files in this scope. Reuse actual mechanical findings; do not rerun it or its tests. No business testing, file writes, installs, provider calls, private directories or secrets. Return {sourceDigest,checks:[{id:1..8,status:passed|failed|blocked|not_applicable,evidence:[{path:workflow-relative,line:positive integer}],findings:[specific reproducible issue or evidence gap]}],optional:[{id,status:configured|degraded|unknown,reason}]}. installMode names this installation: only a group the checklist itself splits by mode may be not_applicable, and only for the artefacts the other mode owns; state in findings which artefact does not exist in this mode and why. not_applicable never covers an artefact this mode does own, and never substitutes for blocked when evidence is merely missing. Cover every group and optional id exactly once. Passed requires actual cited evidence and no findings; failed requires cited reproducible defects. Missing ability/evidence is blocked, not passed. Optional tools may be degraded, never core failures. No invented executions. Evidence refers to existing local text; missing targets are described with their referring file/line. Compatibility aliases are not private Codex calls. This is current-host semantic assessment, not independent review or completion approval.'},controller.signal));
68
84
  need(!controller.signal.aborted,'cancelled');current(baseline);
69
85
  shape(assessment,['sourceDigest','checks','optional']);need(assessment.sourceDigest===baseline.digest,'check_assessment_stale');
70
86
  need(Array.isArray(assessment.checks)&&assessment.checks.length===8&&new Set(assessment.checks.map(row=>row.id)).size===8,'check_coverage_incomplete');
71
87
  for(const row of assessment.checks){
72
88
  shape(row,['id','status','evidence','findings']);
73
- need(Number.isInteger(row.id)&&row.id>=1&&row.id<=8&&['passed','failed','blocked'].includes(row.status)
89
+ need(Number.isInteger(row.id)&&row.id>=1&&row.id<=8&&['passed','failed','blocked','not_applicable'].includes(row.status)
74
90
  &&Array.isArray(row.evidence)&&Array.isArray(row.findings)&&row.findings.every(nonempty),'check_result_invalid');
75
91
  need(row.status==='passed'?row.findings.length===0&&row.evidence.length>0:row.findings.length>0,'check_result_invalid');
92
+ // Only the groups the checklist splits by installation mode may be waived, so a
93
+ // missing artefact elsewhere still has to be reported as blocked.
94
+ need(row.status!=='not_applicable'||modeScopedChecks.has(row.id),'check_result_invalid');
76
95
  if(row.status==='failed')need(row.evidence.length>0,'check_evidence_required');
77
96
  for(const evidence of row.evidence){
78
97
  shape(evidence,['path','line']);const file=baseline.files[evidence.path];
@@ -85,7 +104,8 @@ export function createCmCheckHost(raw,{call}){
85
104
  for(const row of assessment.optional){shape(row,['id','status','reason']);
86
105
  need(optionalIds.includes(row.id)&&['configured','degraded','unknown'].includes(row.status)&&nonempty(row.reason),'check_optional_invalid');}
87
106
  result={overall:assessment.checks.some(row=>row.status==='failed')?'FAILED':assessment.checks.some(row=>row.status==='blocked')?'BLOCKED':'PASSED',
88
- version:readCmInitSource(root,'VERSION')?.toString('utf8').trim()??null,mechanical,
107
+ version:(readCmInitSource(root,installMode==='plugin'?'VERSION':'templates/cm-VERSION')
108
+ ?.toString('utf8').trim())??null,installMode,mechanical,
89
109
  source:'current_host_semantic_report',sourceDigest:baseline.digest,checks:[...assessment.checks].sort((a,b)=>a.id-b.id),optional:assessment.optional,
90
110
  findingsCount:assessment.checks.filter(row=>row.status==='failed').reduce((sum,row)=>sum+row.findings.length,0),
91
111
  semanticChecked:true,completionAuthorized:false};
@@ -11,13 +11,15 @@ export async function main(argv=process.argv.slice(2),{input=process.stdin,outpu
11
11
  let bridge;
12
12
  try{
13
13
  if(argv.length===1&&argv[0]==='--help'){
14
- output.write('cm-check-host.mjs serve --skill-dir ABS_PATH --project ABS_PATH [--config ABS_PATH]\nJSONL start/status/cancel. Current host executes check_runtime once using the existing platform checker; only exitCode 0 permits check_semantic. Eight original groups + optional degradation; complete coverage and local evidence required. No provider, install, repair, task completion or persistent state. Unknown/disconnected operations never retry.\n');return 0;
14
+ output.write('cm-check-host.mjs serve --skill-dir ABS_PATH --project ABS_PATH [--config ABS_PATH] [--quick]\n--quick stops after the mechanical checker and reports MECHANICAL_ONLY; it never claims PASSED and never skips a failure.\nJSONL start/status/cancel. Current host executes check_runtime once using the existing platform checker; only exitCode 0 permits check_semantic. Eight original groups + optional degradation; complete coverage and local evidence required. No provider, install, repair, task completion or persistent state. Unknown/disconnected operations never retry.\n');return 0;
15
15
  }
16
- need(argv[0]==='serve'&&(argv.length===5||argv.length===7),'invalid_arguments');const request={};
17
- for(let i=1;i<argv.length;i+=2){
16
+ need(argv[0]==='serve','invalid_arguments');const request={};
17
+ for(let i=1;i<argv.length;){
18
+ if(argv[i]==='--quick'){need(!Object.hasOwn(request,'quick'),'invalid_arguments');request.quick=true;i+=1;continue;}
18
19
  need(['--skill-dir','--project','--config'].includes(argv[i])&&argv[i+1],'invalid_arguments');
19
- const key=argv[i]==='--skill-dir'?'skillDir':argv[i].slice(2);need(!Object.hasOwn(request,key),'invalid_arguments');request[key]=argv[i+1];
20
+ const key=argv[i]==='--skill-dir'?'skillDir':argv[i].slice(2);need(!Object.hasOwn(request,key),'invalid_arguments');request[key]=argv[i+1];i+=2;
20
21
  }
22
+ need(request.skillDir&&request.project,'invalid_arguments');
21
23
  need(path.resolve(request.skillDir??'', '../..','scripts/cm-check-host.mjs')===fileURLToPath(import.meta.url),'entry_path_invalid');
22
24
  bridge=createHostToolBridge();const host=createCmCheckHost(request,{call:(...args)=>bridge.call(...args)});
23
25
  const rawMode=input.isTTY&&typeof input.setRawMode==='function';if(rawMode)input.setRawMode(true);
@@ -75,3 +75,92 @@ test('coverage, evidence, stale source/config, core findings and cancellation pr
75
75
  if(mode==='failed')assert.equal(value.result.findingsCount,1);
76
76
  }
77
77
  });
78
+
79
+ test('a Claude-compatible installation waives only the Codex-owned halves and still reaches PASSED',{timeout:5000},async t=>{
80
+ const f=fixture(t);
81
+ // A claude-compat installation: no .codex-plugin manifest, the version marker is templates/cm-VERSION.
82
+ fs.mkdirSync(path.join(f.dir,'templates'),{recursive:true});
83
+ fs.writeFileSync(path.join(f.dir,'templates/cm-VERSION'),'9.9.9\n');
84
+ let seenMode=null;
85
+ const host=createCmCheckHost(f.input,{call:async(kind,payload)=>{
86
+ if(kind==='check_runtime')return mechanical(payload);
87
+ seenMode=payload.installMode;
88
+ const value=assessment(payload);
89
+ for(const id of [1,7]){
90
+ const row=value.checks.find(check=>check.id===id);
91
+ row.status='not_applicable';row.evidence=[];
92
+ row.findings=[`installMode=${payload.installMode}: the Codex-owned artefact is absent by install mode`];
93
+ }
94
+ return value;
95
+ }});
96
+ const report=await host.handle({requestId:'na-1',operation:'start'});
97
+ assert.equal(seenMode,'claude-compat','the assessor must be told the mode, not left to guess');
98
+ assert.equal(report.result.overall,'PASSED',JSON.stringify(report.result));
99
+ assert.equal(report.result.installMode,'claude-compat');
100
+ assert.equal(report.result.version,'9.9.9','claude-compat reports templates/cm-VERSION, not the root VERSION');
101
+ assert.equal(report.result.findingsCount,0);
102
+ assert.deepEqual(report.result.checks.filter(row=>row.status==='not_applicable').map(row=>row.id),[1,7]);
103
+ });
104
+
105
+ test('not_applicable is refused outside the mode-scoped groups and when findings are missing',{timeout:5000},async t=>{
106
+ for(const mutate of [
107
+ value=>{const row=value.checks.find(check=>check.id===3);row.status='not_applicable';row.evidence=[];row.findings=['not a mode-scoped group'];},
108
+ value=>{const row=value.checks.find(check=>check.id===1);row.status='not_applicable';row.evidence=[];row.findings=[];},
109
+ ]){
110
+ const f=fixture(t);
111
+ const host=createCmCheckHost(f.input,{call:async(kind,payload)=>{
112
+ if(kind==='check_runtime')return mechanical(payload);
113
+ const value=assessment(payload);mutate(value);return value;
114
+ }});
115
+ const report=await host.handle({requestId:'na-2',operation:'start'});
116
+ assert.equal(report.result.overall,'BLOCKED',JSON.stringify(report.result));
117
+ assert.equal(report.result.reason,'check_result_invalid');
118
+ }
119
+ });
120
+
121
+ test('a plugin installation keeps reporting the root VERSION', {timeout:5000}, async t=>{
122
+ const f=fixture(t);
123
+ fs.mkdirSync(path.join(f.dir,'.codex-plugin'),{recursive:true});
124
+ fs.writeFileSync(path.join(f.dir,'.codex-plugin/plugin.json'),JSON.stringify({name:'cm-workflow',version:'0.0.0'}));
125
+ let seenMode=null;
126
+ const host=createCmCheckHost(f.input,{call:async(kind,payload)=>{
127
+ if(kind==='check_runtime')return mechanical(payload);
128
+ seenMode=payload.installMode;return assessment(payload);
129
+ }});
130
+ const report=await host.handle({requestId:'na-3',operation:'start'});
131
+ assert.equal(seenMode,'plugin');
132
+ assert.equal(report.result.installMode,'plugin');
133
+ assert.equal(report.result.version,'0.0.0');
134
+ assert.equal(report.result.overall,'PASSED');
135
+ });
136
+
137
+ test('quick mode stops after the mechanical checker and never claims PASSED',{timeout:5000},async t=>{
138
+ const f=fixture(t);
139
+ fs.mkdirSync(path.join(f.dir,'templates'),{recursive:true});
140
+ fs.writeFileSync(path.join(f.dir,'templates/cm-VERSION'),'7.7.7\n');
141
+ const kinds=[];
142
+ const host=createCmCheckHost({...f.input,quick:true},{call:async(kind,payload)=>{
143
+ kinds.push(kind);
144
+ if(kind==='check_runtime')return mechanical(payload);
145
+ throw Error('quick mode must not request the semantic groups');
146
+ }});
147
+ const report=await host.handle({requestId:'q-1',operation:'start'});
148
+ assert.deepEqual(kinds,['check_runtime'],'the eight groups must never be requested');
149
+ assert.equal(report.result.overall,'MECHANICAL_ONLY');
150
+ assert.notEqual(report.result.overall,'PASSED','a quick run must not be quotable as a full pass');
151
+ assert.equal(report.result.semanticChecked,false);
152
+ assert.equal(report.result.reason,'quick_mode_semantic_not_run');
153
+ assert.equal(report.result.version,'7.7.7');
154
+ assert.deepEqual(report.result.checks,[]);
155
+ assert.equal(report.result.completionAuthorized,false);
156
+ });
157
+
158
+ test('quick mode still reports an actual mechanical failure',{timeout:5000},async t=>{
159
+ const f=fixture(t,3);
160
+ const host=createCmCheckHost({...f.input,quick:true},{call:async(kind,payload)=>{
161
+ assert.equal(kind,'check_runtime');return mechanical(payload);
162
+ }});
163
+ const report=await host.handle({requestId:'q-2',operation:'start'});
164
+ assert.equal(report.result.overall,'FAILED','quick mode must not swallow a failing checker');
165
+ assert.equal(report.result.semanticChecked,false);
166
+ });
@@ -46,6 +46,12 @@ node "{CM_WORKFLOW_ROOT}/scripts/cm-check-host.mjs" serve \
46
46
  --skill-dir "{CM_WORKFLOW_ROOT}/skills/cm-check" --project "$PWD"
47
47
  ```
48
48
 
49
+ 用户说「快速检查」「只看装没装对」「别跑全套」时追加 `--quick`:更新与机械检查照常跑,
50
+ 机械通过后直接收口,不进八组语义检查。结论为 `MECHANICAL_ONLY`,**不是 PASSED**——
51
+ 语义八组一组没读,不得据此宣称安装完整无断链。机械失败仍照常报 FAILED/BLOCKED,
52
+ 快速模式不跳过任何失败。默认(不带该参数)仍是完整检查。
53
+ 耗时差别很大:更新约 1 秒、机械检查约 12 秒,其余时间几乎全在语义八组逐文件取证上。
54
+
49
55
  如果配置文件不在项目根目录,可额外传 `--config {CONFIG_PATH}`;不传时会读取项目根
50
56
  目录的 `.cm-workflow.yml` / `.yaml` / `.json`。
51
57
 
@@ -55,13 +61,13 @@ node "{CM_WORKFLOW_ROOT}/scripts/cm-check-host.mjs" serve \
55
61
 
56
62
  ## 语义检查
57
63
 
58
- 1. **Codex 入口**:`.codex-plugin/plugin.json` 的 `skills` 指向 `./skills/`;`cm-idea/cm-init/cm-prd/cm-ai/cm-test/cm-security/cm-fix/cm-refactor/cm-check/cm-runtime` 十个核心 Skill 与独立 `external-expert` Skill 均有合法 frontmatter。
64
+ 1. **Codex 入口**(按 `installMode` 分流):`cm-idea/cm-init/cm-prd/cm-ai/cm-test/cm-security/cm-fix/cm-refactor/cm-check/cm-runtime` 十个核心 Skill 与独立 `external-expert` Skill 均有合法 frontmatter,两种模式都查。`plugin` 模式另查 `.codex-plugin/plugin.json` 的 `skills` 指向 `./skills/`;`claude-compat` 模式没有该清单文件(安装器不生成),这一半记 `not_applicable` 并说明,不记 blocked。
59
65
  2. **共享真相**:十个核心 Skill 引用 `runtime/` 合同;`external-expert` 引用共享外部专家合同;`compat/claude-commands/cm-*.md` 只是 macOS/Linux 旧入口薄包装,不再复制业务规则。
60
66
  3. **流程链路**:`cm-ai` 的 N1–N8 引用全部存在;`cm-prd` 的 greenfield/brownfield/change-mode 全部存在;`cm-idea` 引用 `idea-to-prd`;`cm-prd/cm-ai/cm-test/cm-qa-engineer` 共用 `runtime/test-contract.md`;`cm-prd/cm-ai/cm-test/cm-security/cm-fix/cm-refactor/external-expert` 共用 `runtime/logging.md` 与统一 writer;`cm-test --generate-cases` 生成校验后的 inferred 草稿并硬停止。
61
67
  4. **角色链路**:N3 引用的 `cm-*-engineer/manager/expert` Skill 存在;Claude `agents/` 中每个兼容角色能找到对应工种 Skill。Codex 不依赖这些 `.md` agent 文件;配套完整性核对用户级 `runtimes.yml` 的安装器/cm-runtime 生成方与 cm-workflow-config 消费方,cm-runtime 是独立工具、不配工种。
62
68
  5. **状态与审查**:`.cm-specs-status`、`.cm-status.json`、`.cm-run.json`、`tasks.md`、可选 `test-cases.json`、`METRICS.md`、`LESSONS.md`、`运行日志.jsonl` 及 `.reviews/` 的生成方与消费方配对;项目日志保持权威,全局日志只是私有可重建镜像;N4 凭证头包含 reviewer/independent/task/round/at/scope;`cm-fix` 收口前机械检查修后审查凭证;`.external/` 不得冒充 N4/N5 凭证。
63
69
  6. **模板路径**:所有 `{CM_WORKFLOW_ROOT}/templates/...` 引用都对应真实文件,重点核对 `templates/rules/`、`templates/ui-lens/`、`templates/hooks/`、`templates/refactor/`。
64
- 7. **版本**:根 `VERSION` 与 plugin manifest 一致;README 不得宣称不存在的入口或安装路径。
70
+ 7. **版本**(按 `installMode` 分流):`plugin` 模式核对根 `VERSION` 与 `.codex-plugin/plugin.json` 一致,并核对根 `README.md` 不宣称不存在的入口或安装路径;`claude-compat` 模式的版本标志是 `templates/cm-VERSION`,根 `VERSION` 与根 `README.md` 均不由安装器生成(`install.sh` 只写 `templates/cm-VERSION`),这两项记 `not_applicable` 并说明,不记 blocked。
65
71
  8. **私有调用清零**:Codex 核心 Skill 不得残留 `TaskCreate`、`TodoWrite`、`codex:review`、`~/.claude/commands`;兼容包装中出现 `/cm:*` 是合法的 macOS/Linux 旧入口。
66
72
 
67
73
  传入 `--project` 时机械检查额外输出「运行时声明对照」:按项目 > 用户级默认 > 未声明读取
@@ -83,9 +89,12 @@ Claude 兼容: {通过/失败}
83
89
  状态与审查: {通过/断链清单}
84
90
  模板与版本: {通过/不一致清单}
85
91
  可选增强: {已配置/降级项}
86
- 结论: PASSED / FAILED ({N} 处)
92
+ 结论: PASSED / FAILED ({N} 处) / BLOCKED(附未查完的组) / MECHANICAL_ONLY(--quick,未做语义检查)
87
93
  ```
88
94
 
95
+ 第 1、7 组的 `not_applicable` 只适用于另一种安装模式独有的产物,且必须写明缺的是哪个文件、为何本模式不该有;
96
+ 其余各组以及本模式确实拥有的产物,证据不足一律记 blocked,不得借 `not_applicable` 放行。
97
+
89
98
  除上述安装升级外,只报告可复现的断链,不自动修复项目文件或配置。
90
99
  独立的 `cm-check-host.mjs`、`cm-check-entry.mjs`、`cm-check-runtime.sh/.ps1` 仍只检查,
91
100
  不会联网升级;CI、安装器与发版校验调用这些入口,不递归触发更新。