@aibyzero/cm-workflow 0.15.3 → 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.3",
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,10 @@
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
+
10
14
  ## 0.15.3 — 2026-09-20
11
15
 
12
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,不得借它放行。
package/README.md CHANGED
@@ -17,6 +17,10 @@
17
17
 
18
18
  ## 最近更新
19
19
 
20
+ **0.15.4**
21
+
22
+ - **`/cm-check` 新增快速模式**:日常只想确认「装没装对、版本对不对」时,跑快速检查约 12 秒出结果,不再等十几分钟。完整检查的时间几乎全花在逐个文件核对引用关系上,快速模式跳过这一段。结论会明确标为「仅机械检查」而不是「通过」——跳过的部分不会被说成检查过了。机械检查本身发现的问题照常报错,不会被跳过。
23
+
20
24
  **0.15.3**
21
25
 
22
26
  - **`/cm-check` 在 Claude 版安装上不再假报 BLOCKED**:有两组检查查的是 Codex 插件专属文件,Claude 版安装本来就没有,此前只能算「查不了」,于是健康的安装也永远拿不到 PASSED。现在按安装方式区分:不属于本安装方式的产物记为「不适用」,而真正证据不足的仍然照常阻塞——不是靠放水换来的通过。
@@ -139,7 +143,7 @@ $cm-check
139
143
 
140
144
  仓库直接分发 Skills 和脚本,无需在仓库根目录运行 `npm install` 或构建。完整安装行为、覆盖范围和卸载说明见[安装指南](docs/installation.md)。
141
145
 
142
- 需要固定版本时可使用 `npx @aibyzero/cm-workflow@0.15.3 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)。
143
147
 
144
148
  ## 升级旧版本
145
149
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.15.3
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.3 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.3",
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": {
@@ -38,7 +38,10 @@ function snapshot(root){
38
38
  return {files,digest:digest(files)};
39
39
  }
40
40
  export function createCmCheckHost(raw,{call}){
41
- 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;
42
45
  need(typeof call==='function','check_host_required');
43
46
  const controller=new AbortController();let stage='ready',mechanical=null,result=null;
44
47
  const capture=()=>{
@@ -68,6 +71,12 @@ export function createCmCheckHost(raw,{call}){
68
71
  mechanical={source:'current_host_execution_report',...response};current(baseline);
69
72
  if(response.exitCode!==0){stage='reported';result={overall:response.exitCode===null?'BLOCKED':'FAILED',mechanical,checks:[],optional:[],
70
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();}
71
80
  stage='semantic';
72
81
  const assessment=json(await call('check_semantic',{workflowRoot:root,project:invocation.project,sourceDigest:baseline.digest,
73
82
  scope:{directories,files:topFiles},checklist,optionalIds,installMode,
@@ -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);
@@ -133,3 +133,34 @@ test('a plugin installation keeps reporting the root VERSION', {timeout:5000}, a
133
133
  assert.equal(report.result.version,'0.0.0');
134
134
  assert.equal(report.result.overall,'PASSED');
135
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
 
@@ -83,7 +89,7 @@ Claude 兼容: {通过/失败}
83
89
  状态与审查: {通过/断链清单}
84
90
  模板与版本: {通过/不一致清单}
85
91
  可选增强: {已配置/降级项}
86
- 结论: PASSED / FAILED ({N} 处) / BLOCKED(附未查完的组)
92
+ 结论: PASSED / FAILED ({N} 处) / BLOCKED(附未查完的组) / MECHANICAL_ONLY(--quick,未做语义检查)
87
93
  ```
88
94
 
89
95
  第 1、7 组的 `not_applicable` 只适用于另一种安装模式独有的产物,且必须写明缺的是哪个文件、为何本模式不该有;