@aibyzero/cm-workflow 0.15.2 → 0.15.3
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.
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +5 -0
- package/README.md +6 -1
- package/VERSION +1 -1
- package/docs/installation.md +1 -1
- package/package.json +1 -1
- package/runtime/js/cm-check/host.mjs +15 -4
- package/scripts/cm-check-host.test.mjs +58 -0
- package/skills/cm-check/SKILL.md +6 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cm-workflow",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
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,11 @@
|
|
|
7
7
|
|
|
8
8
|
(暂无)
|
|
9
9
|
|
|
10
|
+
## 0.15.3 — 2026-09-20
|
|
11
|
+
|
|
12
|
+
- **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,不得借它放行。
|
|
13
|
+
- **修复 cm-check 报告的版本号在 Claude 安装上恒为 null**:结果中的 `version` 此前固定读根 `VERSION`,而 claude-compat 安装没有该文件。现按模式读取,claude-compat 读 `templates/cm-VERSION`。报告另附 `installMode`。
|
|
14
|
+
|
|
10
15
|
## 0.15.2 — 2026-09-19
|
|
11
16
|
|
|
12
17
|
- **同 feature 并行开发现在可用**:`parallel` 字段此前只存在于代码,没有任何文档或 Skill 提过它,而执行规则要求「不发明字段」,功能因此从入口够不着。现补齐 `docs/js-workflow-control.md` 的「并行组」一节(字段形状、五条约束与失败码、工作树与分支命名、串行合并、QA 延后、review 前置),并在 `cm-ai` N1 增加提议规则:只对 scope 全为新建文件、互不重叠、无依赖路径的同 feature 任务成组,组不起来就串行,不为组而组。
|
package/README.md
CHANGED
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
|
|
18
18
|
## 最近更新
|
|
19
19
|
|
|
20
|
+
**0.15.3**
|
|
21
|
+
|
|
22
|
+
- **`/cm-check` 在 Claude 版安装上不再假报 BLOCKED**:有两组检查查的是 Codex 插件专属文件,Claude 版安装本来就没有,此前只能算「查不了」,于是健康的安装也永远拿不到 PASSED。现在按安装方式区分:不属于本安装方式的产物记为「不适用」,而真正证据不足的仍然照常阻塞——不是靠放水换来的通过。
|
|
23
|
+
- 顺带修掉 cm-check 报告里的版本号在 Claude 版安装上总是空的问题。
|
|
24
|
+
|
|
20
25
|
**0.15.2**
|
|
21
26
|
|
|
22
27
|
- **同 feature 并行开发现在可用**:无依赖、改动文件互不重叠的任务可分组,各自在独立 Git 工作树开发,再串行合并回主分支,成员 QA 延后到该 feature 最后一个任务统一执行。此前这个能力只存在于代码里、没有文档,从正常入口用不到。需要注意的是:当前会话模式下写代码仍是逐个进行,并行重叠的是审查与流程开销,不要按成倍提速预期。
|
|
@@ -134,7 +139,7 @@ $cm-check
|
|
|
134
139
|
|
|
135
140
|
仓库直接分发 Skills 和脚本,无需在仓库根目录运行 `npm install` 或构建。完整安装行为、覆盖范围和卸载说明见[安装指南](docs/installation.md)。
|
|
136
141
|
|
|
137
|
-
需要固定版本时可使用 `npx @aibyzero/cm-workflow@0.15.
|
|
142
|
+
需要固定版本时可使用 `npx @aibyzero/cm-workflow@0.15.3 install`,请在 CM Workflow 源码仓库以外的目录执行,例如用户主目录。npm 安装入口复用原安装器,要求与覆盖范围见[安装指南](docs/installation.md#npm-installation-macos-codex)。
|
|
138
143
|
|
|
139
144
|
## 升级旧版本
|
|
140
145
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.15.
|
|
1
|
+
0.15.3
|
package/docs/installation.md
CHANGED
|
@@ -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.
|
|
76
|
+
To pin a version, use `npx @aibyzero/cm-workflow@0.15.3 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
|
@@ -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');
|
|
@@ -51,6 +55,9 @@ export function createCmCheckHost(raw,{call}){
|
|
|
51
55
|
const baseline=capture(),skill=readCmInitSource(root,'skills/cm-check/SKILL.md').toString('utf8');
|
|
52
56
|
const checklist=skill.split('\n').filter(line=>/^[1-8]\. \*\*/.test(line));
|
|
53
57
|
need(checklist.length===8&&checklist.every((line,index)=>line.startsWith(`${index+1}. `)),'check_checklist_invalid');
|
|
58
|
+
// The mechanical checker already distinguishes the installation mode; derive it from the
|
|
59
|
+
// same marker so the assessor is told which mode it is in instead of inferring it.
|
|
60
|
+
const installMode=fs.existsSync(path.join(root,'.codex-plugin/plugin.json'))?'plugin':'claude-compat';
|
|
54
61
|
const windows=path.join(root,'scripts/cm-check-runtime.ps1');
|
|
55
62
|
const response=json(await call('check_runtime',{invocation,
|
|
56
63
|
windows:{script:windows,args:invocation.args},
|
|
@@ -63,16 +70,19 @@ export function createCmCheckHost(raw,{call}){
|
|
|
63
70
|
semanticChecked:false,completionAuthorized:false};return status();}
|
|
64
71
|
stage='semantic';
|
|
65
72
|
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));
|
|
73
|
+
scope:{directories,files:topFiles},checklist,optionalIds,installMode,
|
|
74
|
+
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
75
|
need(!controller.signal.aborted,'cancelled');current(baseline);
|
|
69
76
|
shape(assessment,['sourceDigest','checks','optional']);need(assessment.sourceDigest===baseline.digest,'check_assessment_stale');
|
|
70
77
|
need(Array.isArray(assessment.checks)&&assessment.checks.length===8&&new Set(assessment.checks.map(row=>row.id)).size===8,'check_coverage_incomplete');
|
|
71
78
|
for(const row of assessment.checks){
|
|
72
79
|
shape(row,['id','status','evidence','findings']);
|
|
73
|
-
need(Number.isInteger(row.id)&&row.id>=1&&row.id<=8&&['passed','failed','blocked'].includes(row.status)
|
|
80
|
+
need(Number.isInteger(row.id)&&row.id>=1&&row.id<=8&&['passed','failed','blocked','not_applicable'].includes(row.status)
|
|
74
81
|
&&Array.isArray(row.evidence)&&Array.isArray(row.findings)&&row.findings.every(nonempty),'check_result_invalid');
|
|
75
82
|
need(row.status==='passed'?row.findings.length===0&&row.evidence.length>0:row.findings.length>0,'check_result_invalid');
|
|
83
|
+
// Only the groups the checklist splits by installation mode may be waived, so a
|
|
84
|
+
// missing artefact elsewhere still has to be reported as blocked.
|
|
85
|
+
need(row.status!=='not_applicable'||modeScopedChecks.has(row.id),'check_result_invalid');
|
|
76
86
|
if(row.status==='failed')need(row.evidence.length>0,'check_evidence_required');
|
|
77
87
|
for(const evidence of row.evidence){
|
|
78
88
|
shape(evidence,['path','line']);const file=baseline.files[evidence.path];
|
|
@@ -85,7 +95,8 @@ export function createCmCheckHost(raw,{call}){
|
|
|
85
95
|
for(const row of assessment.optional){shape(row,['id','status','reason']);
|
|
86
96
|
need(optionalIds.includes(row.id)&&['configured','degraded','unknown'].includes(row.status)&&nonempty(row.reason),'check_optional_invalid');}
|
|
87
97
|
result={overall:assessment.checks.some(row=>row.status==='failed')?'FAILED':assessment.checks.some(row=>row.status==='blocked')?'BLOCKED':'PASSED',
|
|
88
|
-
version:readCmInitSource(root,'VERSION'
|
|
98
|
+
version:(readCmInitSource(root,installMode==='plugin'?'VERSION':'templates/cm-VERSION')
|
|
99
|
+
?.toString('utf8').trim())??null,installMode,mechanical,
|
|
89
100
|
source:'current_host_semantic_report',sourceDigest:baseline.digest,checks:[...assessment.checks].sort((a,b)=>a.id-b.id),optional:assessment.optional,
|
|
90
101
|
findingsCount:assessment.checks.filter(row=>row.status==='failed').reduce((sum,row)=>sum+row.findings.length,0),
|
|
91
102
|
semanticChecked:true,completionAuthorized:false};
|
|
@@ -75,3 +75,61 @@ 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
|
+
});
|
package/skills/cm-check/SKILL.md
CHANGED
|
@@ -55,13 +55,13 @@ node "{CM_WORKFLOW_ROOT}/scripts/cm-check-host.mjs" serve \
|
|
|
55
55
|
|
|
56
56
|
## 语义检查
|
|
57
57
|
|
|
58
|
-
1. **Codex
|
|
58
|
+
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
59
|
2. **共享真相**:十个核心 Skill 引用 `runtime/` 合同;`external-expert` 引用共享外部专家合同;`compat/claude-commands/cm-*.md` 只是 macOS/Linux 旧入口薄包装,不再复制业务规则。
|
|
60
60
|
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
61
|
4. **角色链路**:N3 引用的 `cm-*-engineer/manager/expert` Skill 存在;Claude `agents/` 中每个兼容角色能找到对应工种 Skill。Codex 不依赖这些 `.md` agent 文件;配套完整性核对用户级 `runtimes.yml` 的安装器/cm-runtime 生成方与 cm-workflow-config 消费方,cm-runtime 是独立工具、不配工种。
|
|
62
62
|
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
63
|
6. **模板路径**:所有 `{CM_WORKFLOW_ROOT}/templates/...` 引用都对应真实文件,重点核对 `templates/rules/`、`templates/ui-lens/`、`templates/hooks/`、`templates/refactor/`。
|
|
64
|
-
7.
|
|
64
|
+
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
65
|
8. **私有调用清零**:Codex 核心 Skill 不得残留 `TaskCreate`、`TodoWrite`、`codex:review`、`~/.claude/commands`;兼容包装中出现 `/cm:*` 是合法的 macOS/Linux 旧入口。
|
|
66
66
|
|
|
67
67
|
传入 `--project` 时机械检查额外输出「运行时声明对照」:按项目 > 用户级默认 > 未声明读取
|
|
@@ -83,9 +83,12 @@ Claude 兼容: {通过/失败}
|
|
|
83
83
|
状态与审查: {通过/断链清单}
|
|
84
84
|
模板与版本: {通过/不一致清单}
|
|
85
85
|
可选增强: {已配置/降级项}
|
|
86
|
-
结论: PASSED / FAILED ({N} 处)
|
|
86
|
+
结论: PASSED / FAILED ({N} 处) / BLOCKED(附未查完的组)
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
第 1、7 组的 `not_applicable` 只适用于另一种安装模式独有的产物,且必须写明缺的是哪个文件、为何本模式不该有;
|
|
90
|
+
其余各组以及本模式确实拥有的产物,证据不足一律记 blocked,不得借 `not_applicable` 放行。
|
|
91
|
+
|
|
89
92
|
除上述安装升级外,只报告可复现的断链,不自动修复项目文件或配置。
|
|
90
93
|
独立的 `cm-check-host.mjs`、`cm-check-entry.mjs`、`cm-check-runtime.sh/.ps1` 仍只检查,
|
|
91
94
|
不会联网升级;CI、安装器与发版校验调用这些入口,不递归触发更新。
|