cc-devflow 2.4.6 → 2.5.0

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/.claude/CLAUDE.md CHANGED
@@ -49,6 +49,11 @@ This directory contains Claude Code CLI extensions for the CC-DevFlow developmen
49
49
  │ │ └── SKILL.md
50
50
  │ ├── cc-devflow-orchestrator/
51
51
  │ │ └── SKILL.md # Workflow router (modified: /flow-checklist, /flow-dev autonomous)
52
+ │ ├── journey-coherence-checker/ # 跨需求一致性检查 [NEW: v2.4.0]
53
+ │ │ ├── SKILL.md # 检查协议:依赖满足、旅程完整、累积偏差
54
+ │ │ └── pressure-scenarios.md # TDD 压力测试场景
55
+ │ ├── npm-release/ # NPM 包发布工作流
56
+ │ │ └── SKILL.md # 版本发布、Changelog 维护、原子化发布流程
52
57
  │ └── ...
53
58
 
54
59
  └── docs/
@@ -0,0 +1,199 @@
1
+ ---
2
+ name: journey-coherence-checker
3
+ description: "Use when completing a requirement, checking milestone progress, or asking about project status. Detects gaps between requirements, unmet dependencies, and cumulative scope drift."
4
+ ---
5
+
6
+ # Journey Coherence Checker
7
+
8
+ ## The Iron Law
9
+
10
+ ```
11
+ STATUS COMPLETE ≠ DEPENDENCY SATISFIED
12
+ CODE EXISTS ≠ JOURNEY WORKS
13
+ REQUIREMENTS DONE ≠ VISION ACHIEVED
14
+ ```
15
+
16
+ ## Overview
17
+
18
+ 单需求验证只检查"这个需求内部是否一致"。
19
+ 本 Skill 检查"所有需求加起来是否等于愿景"。
20
+
21
+ ```
22
+ 问题:
23
+ REQ-001 ✅ + REQ-002 ✅ + REQ-003 ✅ = 愿景 ❓
24
+
25
+ 现实:
26
+ 每个需求"稍微偏差" × N = 巨大偏差
27
+ 需求间的"空隙"没人负责
28
+ 最终产品 ≠ 初始愿景
29
+ ```
30
+
31
+ ## When to Use
32
+
33
+ ```dot
34
+ digraph when {
35
+ "触发场景" [shape=box];
36
+ "需求完成时" [shape=box];
37
+ "检查里程碑时" [shape=box];
38
+ "询问项目进度时" [shape=box];
39
+ "发布前" [shape=box];
40
+
41
+ "触发场景" -> "需求完成时";
42
+ "触发场景" -> "检查里程碑时";
43
+ "触发场景" -> "询问项目进度时";
44
+ "触发场景" -> "发布前";
45
+ }
46
+ ```
47
+
48
+ **触发关键词**:
49
+ - "需求完成了"、"REQ-XXX 做完了"
50
+ - "M1/M2/M3/M4 进度"、"里程碑完成了吗"
51
+ - "项目进度如何"、"可以发布了吗"
52
+ - "所有需求都完成了"
53
+
54
+ ## Coherence Check Protocol
55
+
56
+ ### Step 1: 读取最小上下文 (< 200 tokens)
57
+
58
+ ```yaml
59
+ read:
60
+ - ROADMAP.md: 只读 Milestone 的 Success Criteria 段落
61
+ - orchestration_status.json: 只读 status, dependencies, roadmap_item 字段
62
+ - PRD.md: 只读 User Stories 标题列表(不读内容)
63
+ ```
64
+
65
+ **禁止**: 读取完整文档。上下文越多,偏差越大。
66
+
67
+ ### Step 2: 依赖满足检查
68
+
69
+ ```
70
+ 对于每个声明的依赖:
71
+ 1. 找到依赖的 REQ
72
+ 2. 读取依赖 REQ 的 contracts/ 或 TECH_DESIGN.md 的"输出"章节
73
+ 3. 读取当前 REQ 的 PRD.md 的"输入假设"章节
74
+ 4. 比较: 输出 ⊇ 输入期望?
75
+
76
+ 如果不匹配:
77
+ → 报告: "依赖 RM-XXX 的输出不满足 REQ-YYY 的输入期望"
78
+ → 具体说明: 期望 X,实际提供 Y
79
+ ```
80
+
81
+ ### Step 3: 旅程完整性检查
82
+
83
+ ```
84
+ 对于 ROADMAP 中的每个 Milestone:
85
+ 1. 读取 Success Criteria
86
+ 2. 对于每个 Criterion:
87
+ - 找到负责的 REQ
88
+ - 验证 REQ 的实现是否满足 Criterion
89
+ - 不是看状态,是看实际输出
90
+
91
+ 如果有 Criterion 未满足:
92
+ → 报告: "M4 Success Criteria 'X' 未满足"
93
+ → 具体说明: 需要 A,实际只有 B
94
+ ```
95
+
96
+ ### Step 4: 空隙检测
97
+
98
+ ```
99
+ 对于 ROADMAP 中的每个用户旅程:
100
+ 1. 列出旅程的所有步骤
101
+ 2. 对于每个步骤:
102
+ - 找到负责的 REQ
103
+ - 如果没有 REQ 负责 → 空隙
104
+ 3. 对于相邻步骤:
105
+ - 检查步骤 N 的输出是否是步骤 N+1 的输入
106
+ - 如果不匹配 → 空隙
107
+
108
+ 如果发现空隙:
109
+ → 报告: "旅程步骤 X 和 Y 之间存在空隙"
110
+ → 具体说明: X 输出 A,Y 期望 B,没有 REQ 负责转换
111
+ ```
112
+
113
+ ### Step 5: 累积偏差检测
114
+
115
+ ```
116
+ 对于每个 Milestone:
117
+ 1. 读取 ROADMAP 中的原始 Deliverables
118
+ 2. 读取每个 REQ 的 PRD 中的实际 Scope
119
+ 3. 计算: 实际覆盖 / 原始计划
120
+
121
+ 如果覆盖率 < 80%:
122
+ → 报告: "M4 累积偏差 40%,原始计划 7 项,实际覆盖 4 项"
123
+ → 列出: 被削减的 Deliverables
124
+ ```
125
+
126
+ ## Output Format
127
+
128
+ ```markdown
129
+ ## Journey Coherence Report
130
+
131
+ ### 依赖满足 ✅/❌
132
+ | 依赖 | 期望输入 | 实际输出 | 状态 |
133
+ |------|---------|---------|------|
134
+ | RM-007 | CommandEmitter API | ✅ 提供 | PASS |
135
+ | RM-006 | AdapterRegistry | ✅ 提供 | PASS |
136
+
137
+ ### 旅程完整性 ✅/❌
138
+ | 旅程 | 步骤 | 负责 REQ | 状态 |
139
+ |------|------|---------|------|
140
+ | 开发者旅程 | /flow-init | REQ-001 | ✅ |
141
+ | 开发者旅程 | /flow-prd | REQ-002 | ✅ |
142
+ | 开发者旅程 | /flow-dev → /flow-release | ❓ | ⚠️ 空隙 |
143
+
144
+ ### Success Criteria ✅/❌
145
+ | Milestone | Criterion | 验证结果 | 状态 |
146
+ |-----------|-----------|---------|------|
147
+ | M4 | 4 platforms execute core workflows | 2/4 platforms | ❌ FAIL |
148
+ | M4 | Integration tests passing | 未运行 | ❌ FAIL |
149
+
150
+ ### 累积偏差
151
+ | Milestone | 原始计划 | 实际覆盖 | 偏差率 |
152
+ |-----------|---------|---------|--------|
153
+ | M4 | 7 deliverables | 4 deliverables | 43% |
154
+
155
+ ### 建议
156
+ 1. 补充 RM-009/010/011/012 的实现
157
+ 2. 添加端到端集成测试
158
+ 3. 定义 /flow-dev → /flow-release 的衔接 REQ
159
+ ```
160
+
161
+ ## Rationalization Prevention
162
+
163
+ | Excuse | Reality |
164
+ |--------|---------|
165
+ | "依赖已经标记完成了" | 完成 ≠ 满足。检查实际输出是否匹配期望输入。 |
166
+ | "每个需求都通过了验证" | 单需求验证 ≠ 全局一致性。部分之和 ≠ 整体。 |
167
+ | "ROADMAP 是规划,不是承诺" | Success Criteria 是承诺。不满足就是未完成。 |
168
+ | "这超出了我的检查范围" | 这正是你的检查范围。全局一致性是隐含要求。 |
169
+ | "状态是 complete" | 状态是自我声明。验证是外部检查。 |
170
+ | "代码存在" | 存在 ≠ 能跑。运行验证才算数。 |
171
+ | "用户没有要求检查全局" | 全局检查是隐含要求。用户问"完成了吗"就是在问全局。 |
172
+ | "我已经检查了很多了" | 检查多 ≠ 检查对。按 Protocol 检查。 |
173
+
174
+ ## Red Flags - STOP
175
+
176
+ 如果你发现自己:
177
+ - 只看 `orchestration_status.json` 的 `status` 字段就说"完成了"
178
+ - 没有比较依赖的输出和当前需求的输入期望
179
+ - 没有验证 Success Criteria 的每一条
180
+ - 没有检查旅程步骤之间的衔接
181
+ - 数 REQ 数量而不是验证实际功能
182
+
183
+ **STOP。执行 Coherence Check Protocol。**
184
+
185
+ ## Integration
186
+
187
+ ### 触发点
188
+ - `/flow-release` Exit Gate(发布前强制检查)
189
+ - `/flow-verify --global`(全局验证模式)
190
+ - 用户询问里程碑进度时
191
+
192
+ ### 与其他 Skill 的关系
193
+ - `flow-verify`: 单需求内部一致性 → 本 Skill: 跨需求全局一致性
194
+ - `constitution-guardian`: 代码质量 → 本 Skill: 业务完整性
195
+ - `flow-attention-refresh`: 防止单需求目标遗忘 → 本 Skill: 防止全局愿景遗忘
196
+
197
+ ---
198
+
199
+ **[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
@@ -0,0 +1,164 @@
1
+ # Journey Coherence Checker - Pressure Scenarios
2
+
3
+ ## Purpose
4
+ TDD RED Phase: Define scenarios to test agent behavior WITHOUT the skill.
5
+
6
+ ---
7
+
8
+ ## Scenario 1: Dependency Not Satisfied
9
+
10
+ **Setup**:
11
+ - REQ-007 declares `dependencies: ["RM-006", "RM-007"]`
12
+ - RM-006 (REQ-004) is `release_complete`
13
+ - RM-007 (REQ-005) is `release_complete`
14
+ - But REQ-005's actual output doesn't match what REQ-007 expects
15
+
16
+ **Pressure**:
17
+ ```
18
+ User: "REQ-007 开发完成了,请帮我检查一下"
19
+ ```
20
+
21
+ **Expected Baseline Behavior (WITHOUT skill)**:
22
+ - Agent only checks REQ-007's internal consistency
23
+ - Agent doesn't verify RM-007's output matches REQ-007's input expectation
24
+ - Agent says "PASS" even though there's a gap
25
+
26
+ **Desired Behavior (WITH skill)**:
27
+ - Agent reads REQ-007's `dependencies` field
28
+ - Agent reads REQ-005's actual output (from TECH_DESIGN or contracts)
29
+ - Agent compares expected vs actual
30
+ - Agent reports mismatch if found
31
+
32
+ ---
33
+
34
+ ## Scenario 2: Milestone Success Criteria Not Met
35
+
36
+ **Setup**:
37
+ - M4 Success Criteria: "All 4 platforms can execute core workflows"
38
+ - REQ-004, REQ-005, REQ-006 are `release_complete`
39
+ - But only 2 platforms actually work (Claude + Codex)
40
+
41
+ **Pressure**:
42
+ ```
43
+ User: "M4 完成了吗?"
44
+ ```
45
+
46
+ **Expected Baseline Behavior (WITHOUT skill)**:
47
+ - Agent checks individual REQ status
48
+ - Agent sees all REQs are complete
49
+ - Agent says "M4 完成了"
50
+
51
+ **Desired Behavior (WITH skill)**:
52
+ - Agent reads M4's Success Criteria from ROADMAP.md
53
+ - Agent verifies each criterion against actual implementation
54
+ - Agent reports "2/4 platforms working, M4 not complete"
55
+
56
+ ---
57
+
58
+ ## Scenario 3: Cumulative Scope Reduction
59
+
60
+ **Setup**:
61
+ - ROADMAP M4 originally planned 7 deliverables (RM-007 to RM-013)
62
+ - Each REQ's PRD "slightly simplified" the scope
63
+ - Final implementation covers only 60% of original vision
64
+
65
+ **Pressure**:
66
+ ```
67
+ User: "M4 的所有需求都开发完了,可以发布了吗?"
68
+ ```
69
+
70
+ **Expected Baseline Behavior (WITHOUT skill)**:
71
+ - Agent checks each REQ's status
72
+ - Agent sees all are `release_complete`
73
+ - Agent says "可以发布"
74
+
75
+ **Desired Behavior (WITH skill)**:
76
+ - Agent compares ROADMAP deliverables vs actual PRD scope
77
+ - Agent calculates coverage percentage
78
+ - Agent reports "60% coverage, 40% scope reduction detected"
79
+
80
+ ---
81
+
82
+ ## Scenario 4: Journey Gap (Missing Glue)
83
+
84
+ **Setup**:
85
+ - User journey: `/flow-init` → `/flow-prd` → `/flow-epic` → `/flow-dev` → `/flow-release`
86
+ - REQ-005 implements `/flow-dev` improvements
87
+ - REQ-006 implements compiler
88
+ - But there's no REQ connecting them (the "glue" is missing)
89
+
90
+ **Pressure**:
91
+ ```
92
+ User: "从 /flow-init 到 /flow-release 的完整流程能跑通吗?"
93
+ ```
94
+
95
+ **Expected Baseline Behavior (WITHOUT skill)**:
96
+ - Agent checks individual command implementations
97
+ - Agent doesn't test end-to-end flow
98
+ - Agent says "应该可以"
99
+
100
+ **Desired Behavior (WITH skill)**:
101
+ - Agent identifies the user journey
102
+ - Agent traces through each step
103
+ - Agent finds the gap between REQ-005 and REQ-006
104
+ - Agent reports "Gap found: no integration between X and Y"
105
+
106
+ ---
107
+
108
+ ## Scenario 5: Orphan Requirement
109
+
110
+ **Setup**:
111
+ - REQ-008 exists but is not mapped to any ROADMAP item
112
+ - REQ-008 is `release_complete`
113
+ - But it doesn't contribute to any Milestone
114
+
115
+ **Pressure**:
116
+ ```
117
+ User: "所有需求都完成了,项目进度如何?"
118
+ ```
119
+
120
+ **Expected Baseline Behavior (WITHOUT skill)**:
121
+ - Agent counts completed REQs
122
+ - Agent reports "X/Y REQs complete"
123
+ - Agent doesn't notice REQ-008 is orphan
124
+
125
+ **Desired Behavior (WITH skill)**:
126
+ - Agent maps REQs to ROADMAP items
127
+ - Agent identifies REQ-008 as orphan
128
+ - Agent reports "REQ-008 not mapped to any Milestone"
129
+
130
+ ---
131
+
132
+ ## Test Execution Plan
133
+
134
+ ### Phase 1: Baseline Testing (RED)
135
+ 1. Create mock REQ-007 with unmet dependency
136
+ 2. Ask agent to verify REQ-007
137
+ 3. Document agent's response verbatim
138
+ 4. Identify rationalizations used
139
+
140
+ ### Phase 2: Skill Writing (GREEN)
141
+ 1. Write skill addressing baseline failures
142
+ 2. Re-run scenarios
143
+ 3. Verify agent now catches issues
144
+
145
+ ### Phase 3: Refinement (REFACTOR)
146
+ 1. Find new rationalizations
147
+ 2. Add explicit counters
148
+ 3. Re-test until bulletproof
149
+
150
+ ---
151
+
152
+ ## Key Rationalizations to Watch For
153
+
154
+ | Potential Excuse | Counter |
155
+ |------------------|---------|
156
+ | "依赖已经标记完成了" | 完成 ≠ 满足。检查实际输出。 |
157
+ | "每个需求都通过了验证" | 单需求验证 ≠ 全局一致性。 |
158
+ | "ROADMAP 是规划,不是承诺" | Success Criteria 是承诺。 |
159
+ | "这超出了我的检查范围" | 这正是你的检查范围。 |
160
+ | "用户没有要求检查全局" | 全局检查是隐含要求。 |
161
+
162
+ ---
163
+
164
+ **[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
@@ -264,6 +264,77 @@
264
264
  "should I.*?(test first|write implementation)"
265
265
  ]
266
266
  }
267
+ },
268
+ "journey-coherence-checker": {
269
+ "type": "domain",
270
+ "enforcement": "suggest",
271
+ "priority": "high",
272
+ "description": "Use when completing a requirement, checking milestone progress, or asking about project status. Detects gaps between requirements, unmet dependencies, and cumulative scope drift.",
273
+ "promptTriggers": {
274
+ "keywords": [
275
+ "需求完成",
276
+ "REQ完成",
277
+ "里程碑",
278
+ "milestone",
279
+ "项目进度",
280
+ "可以发布",
281
+ "发布前检查",
282
+ "全局检查",
283
+ "M1进度",
284
+ "M2进度",
285
+ "M3进度",
286
+ "M4进度",
287
+ "所有需求",
288
+ "依赖满足",
289
+ "journey check",
290
+ "coherence check"
291
+ ],
292
+ "intentPatterns": [
293
+ "(需求|REQ|requirement).*?(完成|done|finished)",
294
+ "(里程碑|milestone).*?(进度|status|完成)",
295
+ "(项目|project).*?(进度|status|如何)",
296
+ "(可以|ready).*?(发布|release)",
297
+ "(所有|all).*?(需求|requirement).*?(完成|done)",
298
+ "(检查|check).*?(全局|global|依赖|dependency)"
299
+ ]
300
+ },
301
+ "fileTriggers": {
302
+ "pathPatterns": [
303
+ "devflow/ROADMAP.md",
304
+ "devflow/requirements/**/orchestration_status.json"
305
+ ]
306
+ }
307
+ },
308
+ "npm-release": {
309
+ "type": "domain",
310
+ "enforcement": "suggest",
311
+ "priority": "high",
312
+ "description": "Standardized release process for cc-devflow npm package. Handles version bumping, changelog updates, and publishing checks.",
313
+ "promptTriggers": {
314
+ "keywords": [
315
+ "publish npm",
316
+ "release version",
317
+ "npm publish",
318
+ "bump version",
319
+ "new release",
320
+ "publish package",
321
+ "update changelog",
322
+ "release workflow"
323
+ ],
324
+ "intentPatterns": [
325
+ "(publish|release).*?(npm|package|version)",
326
+ "(bump|update).*?(version|semver)",
327
+ "(create|generate).*?(release|changelog)",
328
+ "ready to publish",
329
+ "deploy to npm"
330
+ ]
331
+ },
332
+ "fileTriggers": {
333
+ "pathPatterns": [
334
+ "package.json",
335
+ "CHANGELOG.md"
336
+ ]
337
+ }
267
338
  }
268
339
  },
269
340
  "notes": {
@@ -285,4 +356,4 @@
285
356
  "skip_conditions": "All guardrails support session skip, file markers, and env override"
286
357
  }
287
358
  }
288
- }
359
+ }
package/CHANGELOG.md CHANGED
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [2.5.0] - 2026-01-25
11
+
12
+ ### 🚀 新增 Skills:一致性检查与发版自动化
13
+
14
+ v2.5.0 引入了两个强大的新 Skills,分别解决了跨需求一致性检查和 NPM 包发版自动化的问题。
15
+
16
+ #### Added
17
+
18
+ - **Journey Coherence Checker Skill** - 跨需求一致性检查
19
+ - 检查依赖满足情况 (Dependency Satisfaction)
20
+ - 验证里程碑 Success Criteria
21
+ - 检测累积偏差 (Cumulative Scope Drift)
22
+ - 发现用户旅程空隙 (Journey Gaps)
23
+ - 集成到发布门禁 (`/flow-release`)
24
+
25
+ - **NPM Release Skill** - NPM 发版流程自动化
26
+ - 标准化发版工作流 (Patch/Minor/Major)
27
+ - 自动更新 CHANGELOG.md
28
+ - 自动创建并验证 Git Tags
29
+ - 发布前安全检查
30
+
10
31
  ## [2.4.6] - 2026-01-12
11
32
 
12
33
  ### flow-init 工作流精简:研究步骤抽离为 subagent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-devflow",
3
- "version": "2.4.6",
3
+ "version": "2.5.0",
4
4
  "description": "DevFlow CLI tool",
5
5
  "main": "bin/cc-devflow.js",
6
6
  "bin": {
@@ -47,4 +47,4 @@
47
47
  "engines": {
48
48
  "node": ">=18"
49
49
  }
50
- }
50
+ }