cc-devflow 4.1.5 → 4.1.6

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 (111) hide show
  1. package/.claude/CLAUDE.md +87 -1091
  2. package/.claude/commands/core/architecture.md +2 -2
  3. package/.claude/commands/core/guidelines.md +2 -2
  4. package/.claude/commands/core/roadmap.md +4 -4
  5. package/.claude/commands/core/style.md +40 -268
  6. package/.claude/commands/flow/CLAUDE.md +28 -0
  7. package/.claude/commands/flow/archive.md +2 -2
  8. package/.claude/commands/flow/checklist.md +9 -251
  9. package/.claude/commands/flow/clarify.md +9 -127
  10. package/.claude/commands/flow/constitution.md +1 -1
  11. package/.claude/commands/flow/context.md +1 -1
  12. package/.claude/commands/flow/dev.md +19 -395
  13. package/.claude/commands/flow/ideate.md +13 -13
  14. package/.claude/commands/flow/init.md +19 -30
  15. package/.claude/commands/flow/new.md +12 -268
  16. package/.claude/commands/flow/quality.md +10 -153
  17. package/.claude/commands/flow/release.md +18 -81
  18. package/.claude/commands/flow/restart.md +15 -16
  19. package/.claude/commands/flow/spec.md +14 -164
  20. package/.claude/commands/flow/status.md +12 -12
  21. package/.claude/commands/flow/update.md +4 -4
  22. package/.claude/commands/flow/upgrade.md +6 -6
  23. package/.claude/commands/flow/verify.md +19 -78
  24. package/.claude/commands/flow/workspace.md +1 -1
  25. package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +7 -7
  26. package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +44 -96
  27. package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +1 -1
  28. package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +5 -5
  29. package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +1 -1
  30. package/.claude/docs/templates/BACKLOG_TEMPLATE.md +3 -3
  31. package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +5 -5
  32. package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +2 -2
  33. package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +3 -3
  34. package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +33 -64
  35. package/.claude/docs/templates/RESEARCH_TEMPLATE.md +3 -3
  36. package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +2 -2
  37. package/.claude/docs/templates/ROADMAP_TEMPLATE.md +2 -2
  38. package/.claude/docs/templates/STYLE_TEMPLATE.md +3 -3
  39. package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +8 -9
  40. package/.claude/guides/workflow-guides/flow-orchestrator.md +31 -265
  41. package/.claude/hooks/CLAUDE.md +1 -1
  42. package/.claude/hooks/checklist-gate.js +4 -4
  43. package/.claude/hooks/inject-agent-context.ts +2 -2
  44. package/.claude/scripts/calculate-checklist-completion.sh +2 -2
  45. package/.claude/scripts/check-prerequisites.sh +2 -2
  46. package/.claude/scripts/checklist-errors.sh +4 -4
  47. package/.claude/scripts/flow-quality-full.sh +5 -5
  48. package/.claude/scripts/flow-quality-quick.sh +4 -4
  49. package/.claude/scripts/flow-workspace-init.sh +2 -2
  50. package/.claude/scripts/generate-clarification-report.sh +4 -4
  51. package/.claude/scripts/recover-workflow.sh +70 -73
  52. package/.claude/scripts/run-quality-gates.sh +1 -1
  53. package/.claude/scripts/setup-epic.sh +2 -2
  54. package/.claude/scripts/setup-ralph-loop.sh +2 -2
  55. package/.claude/scripts/validate-research.sh +1 -1
  56. package/.claude/scripts/verify-setup.sh +1 -1
  57. package/.claude/skills/cc-devflow-orchestrator/SKILL.md +88 -108
  58. package/.claude/skills/workflow/CLAUDE.md +24 -0
  59. package/.claude/skills/workflow/flow-dev/CLAUDE.md +14 -76
  60. package/.claude/skills/workflow/flow-dev/SKILL.md +29 -67
  61. package/.claude/skills/workflow/flow-dev/context.jsonl +4 -8
  62. package/.claude/skills/workflow/flow-init/SKILL.md +24 -151
  63. package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +1 -1
  64. package/.claude/skills/workflow/flow-init/context.jsonl +3 -3
  65. package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +1 -1
  66. package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +1 -1
  67. package/.claude/skills/workflow/flow-release/SKILL.md +23 -56
  68. package/.claude/skills/workflow/flow-release/context.jsonl +5 -7
  69. package/.claude/skills/workflow/flow-spec/CLAUDE.md +15 -101
  70. package/.claude/skills/workflow/flow-spec/SKILL.md +15 -518
  71. package/.claude/skills/workflow/flow-spec/context.jsonl +5 -7
  72. package/.claude/skills/workflow/flow-verify/CLAUDE.md +10 -0
  73. package/.claude/skills/workflow/flow-verify/SKILL.md +53 -0
  74. package/.claude/skills/workflow/flow-verify/context.jsonl +5 -0
  75. package/.claude/skills/workflow.yaml +72 -267
  76. package/CHANGELOG.md +31 -0
  77. package/README.md +91 -69
  78. package/README.zh-CN.md +90 -67
  79. package/bin/harness.js +22 -0
  80. package/docs/commands/README.md +34 -38
  81. package/docs/commands/README.zh-CN.md +34 -36
  82. package/docs/commands/core-roadmap.md +2 -2
  83. package/docs/commands/core-roadmap.zh-CN.md +2 -2
  84. package/docs/commands/core-style.md +29 -381
  85. package/docs/commands/core-style.zh-CN.md +29 -381
  86. package/docs/commands/flow-init.md +10 -10
  87. package/docs/commands/flow-init.zh-CN.md +11 -11
  88. package/docs/commands/flow-new.md +25 -260
  89. package/docs/commands/flow-new.zh-CN.md +26 -257
  90. package/docs/guides/getting-started.md +16 -15
  91. package/docs/guides/getting-started.zh-CN.md +10 -12
  92. package/lib/compiler/__tests__/manifest.test.js +156 -0
  93. package/lib/compiler/__tests__/parser.test.js +21 -0
  94. package/lib/compiler/index.js +17 -1
  95. package/lib/compiler/manifest.js +68 -6
  96. package/lib/compiler/parser.js +5 -0
  97. package/lib/harness/CLAUDE.md +21 -0
  98. package/lib/harness/cli.js +208 -0
  99. package/lib/harness/index.js +16 -0
  100. package/lib/harness/operations/dispatch.js +285 -0
  101. package/lib/harness/operations/init.js +48 -0
  102. package/lib/harness/operations/janitor.js +74 -0
  103. package/lib/harness/operations/pack.js +100 -0
  104. package/lib/harness/operations/plan.js +29 -0
  105. package/lib/harness/operations/release.js +83 -0
  106. package/lib/harness/operations/resume.js +44 -0
  107. package/lib/harness/operations/verify.js +163 -0
  108. package/lib/harness/planner.js +141 -0
  109. package/lib/harness/schemas.js +108 -0
  110. package/lib/harness/store.js +240 -0
  111. package/package.json +9 -1
@@ -1,279 +1,23 @@
1
1
  ---
2
2
  name: flow-new
3
- description: 'One-shot requirement flow. Usage: /flow-new "REQ-123|支持用户下单|https://plan.example.com/Q1"'
4
- templates:
5
- orchestration: .claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md
6
- guides:
7
- troubleshoot: .claude/docs/guides/NEW_TROUBLESHOOTING.md
3
+ description: 'Deprecated. Use /flow:init -> /flow:spec -> /flow:dev -> /flow:verify -> /flow:release.'
8
4
  ---
9
5
 
10
- <!-- ============================================================
11
- 头文件引用语法规范 (Header File Reference Syntax)
12
- ============================================================
6
+ # /flow:new (Deprecated)
13
7
 
14
- 命令头文件格式:
15
- ```yaml
16
- templates:
17
- orchestration: .claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md
18
- guides:
19
- troubleshoot: .claude/docs/guides/NEW_TROUBLESHOOTING.md
20
- ```
21
-
22
- 引用语法:
23
- - {TEMPLATE:orchestration} → 加载 .claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md
24
- - {GUIDE:troubleshoot} → 参考 .claude/docs/guides/NEW_TROUBLESHOOTING.md
25
-
26
- 规则: 遇到 {TYPE:key} 占位符时,去头文件 YAML 中找对应类型的 key,获取文件路径并加载。
27
- ============================================================ -->
28
-
29
- # Flow-New - 一键需求开发流
30
-
31
- ## User Input
32
- ```text
33
- $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
34
- ```
35
-
36
- **格式**:
37
- - REQ_ID: 需求编号 (例如: REQ-123)
38
- - TITLE: 需求标题
39
- - PLAN_URLS: 计划文档 URL,多个用逗号分隔 (可选)
40
-
41
- **示例**:
42
- ```
43
- /flow-new "REQ-123|支持用户下单|https://plan.example.com/Q1"
44
- /flow-new "REQ-124|用户权限管理"
45
- ```
46
-
47
- ---
48
-
49
- ## 执行前加载
50
-
51
- **详细编排流程**:
52
- → 参见 `{TEMPLATE:orchestration}` 获取完整编排逻辑
53
-
54
- **故障排查**:
55
- → 遇到问题参考 `{GUIDE:troubleshoot}`
56
-
57
- ---
58
-
59
- ## 架构说明
60
-
61
- **设计理念**: `flow-new` 是编排器(Orchestrator),串行调用当前主干命令,避免人工串接阶段。
62
-
63
- **调用链** (v4.1):
64
- ```
65
- /flow-new "REQ-123|Title|URLs"
66
-
67
- [1/6] /flow-init "REQ-123|Title|URLs"
68
- → 创建需求目录 + research + BRAINSTORM
69
-
70
- [2/6] /flow-clarify "REQ-123" (可选)
71
- → 仅在需求存在歧义时触发
72
-
73
- [3/6] /flow-spec "REQ-123"
74
- → PRD → Tech+UI(并行) → Epic/TASKS
75
-
76
- [4/6] /flow-dev "REQ-123"
77
- → TDD 执行 (测试先失败,再实现)
78
-
79
- [5/6] /flow-quality "REQ-123" --full
80
- → 规格合规 + 代码质量 + 安全验证
81
-
82
- [6/6] /flow-release "REQ-123"
83
- → 发布计划 + PR 创建 + 分支收尾
84
- ```
85
-
86
- ---
87
-
88
- ## 执行流程骨架
89
-
90
- ### [1/6] 初始化 → /flow-init
8
+ `/flow:new` 已停止作为默认入口。
91
9
 
92
- ```
93
- 调用: /flow-init "${REQ_ID}|${TITLE}|${PLAN_URLS}"
94
- 检查: orchestration_status.json.status === "initialized"
95
- → 详见 {TEMPLATE:orchestration} Stage 1
96
- ```
97
-
98
- **输出**:
99
- - Git 分支: `feature/${REQ_ID}-${slug(BRANCH_TITLE_EN)}`
100
- - 需求目录与 research 上下文
101
- - `BRAINSTORM.md`
102
-
103
- ---
104
-
105
- ### [2/6] 需求澄清(可选)→ /flow-clarify
106
-
107
- ```
108
- 触发条件: 需求存在歧义、边界不清、验收标准冲突
109
- 调用: /flow-clarify "${REQ_ID}"
110
- → 详见 .claude/commands/flow/clarify.md
111
- ```
112
-
113
- **输出**:
114
- - `clarifications/*.md` (如触发)
115
-
116
- ---
117
-
118
- ### [3/6] 统一规格阶段 → /flow-spec
119
-
120
- ```
121
- 调用: /flow-spec "${REQ_ID}" [--skip-tech] [--skip-ui]
122
- 默认: PRD + Tech + UI + Epic/TASKS
123
- → 详见 .claude/commands/flow/spec.md
124
- ```
125
-
126
- **输出**:
127
- - `PRD.md`
128
- - `TECH_DESIGN.md` / `UI_PROTOTYPE.html` (按模式)
129
- - `EPIC.md` + `TASKS.md`
130
-
131
- ---
132
-
133
- ### [4/6] 开发执行 → /flow-dev
134
-
135
- ```
136
- 调用: /flow-dev "${REQ_ID}"
137
- 执行模式: TDD
138
- 1) 先写测试并确认失败
139
- 2) 再实现功能
140
- 3) 最终测试通过
141
- → 详见 .claude/commands/flow/dev.md
142
- ```
143
-
144
- **输出**:
145
- - 实现代码 + 测试代码
146
- - `TASKS.md` 勾选状态更新
147
-
148
- ---
149
-
150
- ### [5/6] 质量验证 → /flow-quality
151
-
152
- ```
153
- 调用: /flow-quality "${REQ_ID}" --full
154
- 检查: 规格一致性、代码质量、安全与测试门禁
155
- → 详见 .claude/commands/flow/quality.md
156
- ```
157
-
158
- **输出**:
159
- - `SPEC_REVIEW.md`
160
- - `CODE_QUALITY_REVIEW.md`
161
- - `SECURITY_REPORT.md`
162
-
163
- ---
164
-
165
- ### [6/6] 发布管理 → /flow-release
166
-
167
- ```
168
- 调用: /flow-release "${REQ_ID}"
169
- 执行: 生成 RELEASE_PLAN、创建 PR、执行收尾策略
170
- → 详见 .claude/commands/flow/release.md
171
- ```
172
-
173
- **输出**:
174
- - `RELEASE_PLAN.md`
175
- - Pull Request / 合并策略决策
176
-
177
- ---
178
-
179
- ## 进度展示
180
-
181
- **实时进度**:
182
-
183
- ```
184
- 🎯 CC-DevFlow 完整需求开发流程 (v4.1)
185
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
186
-
187
- 需求: REQ-123 | 支持用户下单
188
-
189
- [1/6] ✅ 初始化完成
190
- [2/6] ✅ 澄清完成 (可选)
191
- [3/6] ✅ 统一规格完成
192
- [4/6] 🔄 开发执行中... (8/18 已完成)
193
- [5/6] ⏳ 等待质量验证...
194
- [6/6] ⏳ 等待发布管理...
195
- ```
196
-
197
- ---
198
-
199
- ## 输出产物
200
-
201
- ```
202
- devflow/requirements/${REQ_ID}/
203
- ├── BRAINSTORM.md
204
- ├── research/
205
- ├── PRD.md
206
- ├── TECH_DESIGN.md # 若未跳过 tech
207
- ├── UI_PROTOTYPE.html # 若未跳过 ui 且识别到 UI 需求
208
- ├── EPIC.md
209
- ├── TASKS.md
210
- ├── SPEC_REVIEW.md # flow-quality --full
211
- ├── CODE_QUALITY_REVIEW.md # flow-quality --full
212
- ├── SECURITY_REPORT.md # flow-quality --full
213
- └── RELEASE_PLAN.md
214
- ```
215
-
216
- ---
217
-
218
- ## 中断与恢复
10
+ ## Migration Path
219
11
 
220
12
  ```bash
221
- # 查看当前状态
222
- /flow-status REQ-123
223
-
224
- # 从中断点恢复
225
- /flow-restart "REQ-123"
226
-
227
- # 手动执行后续阶段
228
- /flow-spec "REQ-123"
229
- /flow-dev "REQ-123" --resume
230
- /flow-quality "REQ-123" --full
13
+ /flow:init "REQ-123|Feature|URLs?"
14
+ /flow:spec "REQ-123"
15
+ /flow:dev "REQ-123"
16
+ /flow:verify "REQ-123" --strict
17
+ /flow:release "REQ-123"
231
18
  ```
232
19
 
233
- ---
234
-
235
- ## 使用建议
236
-
237
- ### ✅ 适合使用 flow-new
238
-
239
- - 明确需求,需要一口气走完整条流水线
240
- - 团队希望减少阶段切换的上下文开销
241
- - 希望快速拿到可评审发布结果
242
-
243
- ### ❌ 建议使用阶段化命令
244
-
245
- - 需求高度不确定,需频繁往返讨论
246
- - 规格阶段需要多人异步审阅
247
- - 开发阶段需要多次暂停/切换优先级
248
-
249
- ---
250
-
251
- ## Next Step
252
-
253
- ```bash
254
- # 查看 PR 状态
255
- cat devflow/requirements/${REQ_ID}/RELEASE_PLAN.md | grep "PR URL"
256
-
257
- # 审查 PR
258
- gh pr view <PR_NUMBER>
259
-
260
- # 合并 PR
261
- gh pr merge <PR_NUMBER>
262
- ```
263
-
264
- ---
265
-
266
- **Related Documentation**:
267
- - [NEW_ORCHESTRATION_TEMPLATE.md](../../docs/templates/NEW_ORCHESTRATION_TEMPLATE.md) - 详细编排流程
268
- - [NEW_TROUBLESHOOTING.md](../../docs/guides/NEW_TROUBLESHOOTING.md) - 故障排查指南
269
- - [flow-init.md](./init.md) - 初始化阶段
270
- - [flow-clarify.md](./clarify.md) - 需求澄清阶段
271
- - [flow-spec.md](./spec.md) - 统一规格阶段
272
- - [flow-dev.md](./dev.md) - 开发阶段 (TDD)
273
- - [flow-quality.md](./quality.md) - 统一质量验证阶段
274
- - [flow-release.md](./release.md) - 发布阶段
275
- - [flow-fix.md](./fix.md) - Bug 修复流程
276
-
277
- ---
20
+ ## Why
278
21
 
279
- **[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
22
+ - 旧一键编排耦合了已下线阶段(clarify/checklist/quality)。
23
+ - 新主链将复杂度收敛到 harness 引擎,支持 checkpoint 恢复与分层门禁。
@@ -1,164 +1,21 @@
1
1
  ---
2
2
  name: flow-quality
3
- description: Combined quality verification (replaces flow-review + flow-qa)
4
- version: 3.0.0
3
+ description: 'Deprecated. Use /flow:verify for quick/strict quality gates.'
5
4
  ---
6
5
 
7
- # /flow-quality
6
+ # /flow:quality (Deprecated)
8
7
 
9
- > **[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
8
+ `/flow:quality` 已废弃。
10
9
 
11
- ## Purpose
12
-
13
- Combined quality verification command that replaces the separate `/flow-review` and `/flow-qa` commands.
14
- Provides both quick programmatic verification and full comprehensive review.
15
-
16
- ## Usage
10
+ ## Migration
17
11
 
18
12
  ```bash
19
- # Quick mode (default) - programmatic verification only
20
- /flow-quality [REQ-ID]
21
-
22
- # Full mode - comprehensive review including spec compliance
23
- /flow-quality [REQ-ID] --full
24
- ```
25
-
26
- ## Modes
27
-
28
- ### Quick Mode (Default)
29
-
30
- Fast programmatic verification using quality-gates.yml:
31
-
32
- 1. **Lint Check** - `npm run lint`
33
- 2. **Type Check** - `npm run typecheck`
34
- 3. **Unit Tests** - `npm test`
35
-
36
- **Use Case**: Rapid iteration during development, CI/CD pipelines.
37
-
38
- **Duration**: ~1-2 minutes
39
-
40
- ### Full Mode (`--full`)
41
-
42
- Comprehensive review including:
43
-
44
- 1. **Programmatic Checks** (same as quick mode)
45
- 2. **Spec Compliance Review** - Verify implementation matches PRD/TECH_DESIGN
46
- 3. **Code Quality Review** - Structure, patterns, Constitution compliance
47
- 4. **Security Scan** - `npm audit`, secret detection
48
- 5. **Integration Tests** - `npm run test:integration` (if available)
49
-
50
- **Use Case**: Before PR creation, milestone completion.
51
-
52
- **Duration**: ~5-10 minutes
53
-
54
- ## Entry Gate
55
-
56
- ```yaml
57
- prerequisites:
58
- - development_complete: true
59
- - TASKS.md: All tasks marked [x]
60
- - Tests: All passing
61
- ```
62
-
63
- ## Exit Gate
64
-
65
- ### Quick Mode
66
- ```yaml
67
- exit_criteria:
68
- - lint: pass
69
- - typecheck: pass
70
- - tests: pass
71
- ```
72
-
73
- ### Full Mode
74
- ```yaml
75
- exit_criteria:
76
- - lint: pass
77
- - typecheck: pass
78
- - tests: pass
79
- - spec_review: PASS
80
- - code_quality: PASS
81
- - security: no high-severity issues
82
- ```
83
-
84
- ## Output
85
-
86
- ### Quick Mode
13
+ /flow:verify "REQ-123"
14
+ /flow:verify "REQ-123" --strict
15
+ /flow:verify "REQ-123" --strict --skip-review
87
16
  ```
88
- ✅ Quality Gate PASSED (Quick Mode)
89
-
90
- ✓ Lint Check
91
- ✓ Type Check
92
- ✓ Unit Tests (42 passed)
93
-
94
- Reports Generated (when REQ-ID resolved):
95
- - TEST_REPORT.md
96
- - SECURITY_REPORT.md
97
-
98
- Duration: 1m 23s
99
- ```
100
-
101
- ### Full Mode
102
- ```
103
- ✅ Quality Gate PASSED (Full Mode)
104
-
105
- Programmatic Checks:
106
- ✓ Lint Check
107
- ✓ Type Check
108
- ✓ Unit Tests (42 passed)
109
- ✓ Integration Tests (8 passed)
110
-
111
- Reviews:
112
- ✓ Spec Compliance: PASS
113
- ✓ Code Quality: PASS
114
- ✓ Security: No issues
115
-
116
- Reports Generated:
117
- - SPEC_REVIEW.md
118
- - CODE_QUALITY_REVIEW.md
119
- - SECURITY_REPORT.md
120
- - TEST_REPORT.md
121
-
122
- Duration: 7m 45s
123
- ```
124
-
125
- ## Integration
126
-
127
- ### With flow-dev
128
-
129
- After `/flow-dev` completes, the orchestrator recommends:
130
- ```
131
- status: "development_complete"
132
- → Recommend: /flow-quality (quick verification)
133
- → Alternative: /flow-quality --full (comprehensive review)
134
- ```
135
-
136
- ### With flow-release
137
-
138
- `/flow-release` requires quality gate to pass:
139
- ```yaml
140
- flow-release:
141
- prerequisites:
142
- - quality_complete: true
143
- ```
144
-
145
- ## Deprecation Notice
146
-
147
- The following commands are deprecated in v3.0:
148
-
149
- - `/flow-review` → Use `/flow-quality --full`
150
- - `/flow-qa` → Use `/flow-quality --full`
151
-
152
- These commands still work for backward compatibility but will show a deprecation warning.
153
-
154
- ## Scripts
155
-
156
- - `.claude/scripts/flow-quality-quick.sh` - Quick verification
157
- - `.claude/scripts/flow-quality-full.sh` - Full verification
158
- - `.claude/scripts/run-quality-gates.sh` - Core gate execution
159
17
 
160
- ## Related
18
+ ## Reason
161
19
 
162
- - **Config**: `.claude/config/quality-gates.yml`
163
- - **Error Log**: `ERROR_LOG.md` (errors recorded here)
164
- - **Orchestrator**: Updates `orchestration_status.json` on completion
20
+ - 质量验证统一收口到 harness verify。
21
+ - 门禁结果统一输出到 `report-card.json` 并作为 `/flow:release` 唯一准入条件。
@@ -1,99 +1,36 @@
1
1
  ---
2
2
  name: flow-release
3
- description: 'Complete requirement and update progress. Usage: /flow-release "REQ-123" or /flow-release'
4
- scripts:
5
- prereq: .claude/scripts/check-prerequisites.sh
6
- check_tasks: .claude/scripts/check-task-status.sh
7
- validate_constitution: .claude/scripts/validate-constitution.sh
8
- generate_status: .claude/scripts/generate-status-report.sh
9
- verify_gate: .claude/scripts/verify-gate.sh
10
- skills:
11
- verification: .claude/skills/verification-before-completion/SKILL.md
3
+ description: 'Release requirement after verify pass. Usage: /flow:release "REQ-123" [--janitor-hours N]'
4
+ skill: workflow/flow-release
12
5
  ---
13
6
 
14
- # Flow-Release - 发布管理命令
7
+ # Flow-Release Command (Harness Release)
15
8
 
16
- > Git 分支/PR/合并由用户自行管理,DevFlow 仅负责进度更新和提交。
9
+ > 触发入口:执行细节由 `.claude/skills/workflow/flow-release/SKILL.md` 定义。
17
10
 
18
11
  ## User Input
12
+
19
13
  ```text
20
- $ARGUMENTS = "REQ_ID?"
14
+ $ARGUMENTS = "REQ_ID [--janitor-hours N]"
21
15
  ```
22
- 未提供则根据 `DEVFLOW_REQ_ID` 或 `.current-req` 自动解析。
23
16
 
24
- ## 执行流程
17
+ ## Usage
25
18
 
26
- ### 阶段 1: Entry Gate
27
- ```
28
- 1. 解析 REQ_ID
29
- 2. {SCRIPT:prereq} --json 校验:
30
- → 存在 PRD.md、EPIC.md、TASKS.md、TEST_REPORT.md、SECURITY_REPORT.md
31
- → orchestration_status.status ∈ {"quality_complete", "qa_complete", "release_failed"}
32
- 3. {SCRIPT:check_tasks} --json 确认 remaining == 0
33
- 4. 验证 Quality gate:
34
- → TEST_REPORT.md / SECURITY_REPORT.md 中的 Gate 均为 PASS
35
- 5. Commit 规范门禁(工作区不干净时):
36
- → 必须先执行 `/util/git-commit`(规则见 `.claude/commands/util/git-commit.md`)
37
- → Commit message 必须遵循 Conventional Commits;多文件按同类变更拆分提交
38
- → 提交完成后重新执行 Entry Gate,直到工作区干净
19
+ ```bash
20
+ /flow:release "REQ-123"
21
+ /flow:release "REQ-123" --janitor-hours 72
39
22
  ```
40
23
 
41
- ### 阶段 2: 发布上下文准备
42
- ```
43
- 1. 收集元数据:
44
- → REQ_ID, TITLE, commits, changed files, coverage, security 状态
45
- 2. 汇总文档:
46
- → PRD 成功指标、EPIC 范围、TASKS DoD
47
- 3. 更新 orchestration_status:
48
- → status = "release_in_progress"
49
- → phase = "release"
50
- 4. EXECUTION_LOG.md 记录发布启动
51
- ```
24
+ ## Internal Execution
52
25
 
53
- ### 阶段 3: release-manager Agent
54
- ```
55
- Prompt 核心要求:
56
- - 确认 Constitution 校验无 ERROR:
57
- {SCRIPT:validate_constitution} --type all --severity error
58
- - 生成 RELEASE_PLAN.md:
59
- • 范围概览、风险评估、回滚策略、监控计划
60
- - 建议标签、检查清单
61
- ```
26
+ 1. `npm run harness:release -- --change-id <REQ_ID>`
27
+ 2. `npm run harness:janitor -- --hours <N>` (default: `72`)
62
28
 
63
- ### 阶段 4: Progress Update
64
- ```
65
- 1. 更新 BACKLOG.md:
66
- → 找到对应 REQ 条目,更新状态为 completed/released
67
- 2. 更新 ROADMAP.md:
68
- → 找到对应 REQ 条目,更新进度
69
- 3. 更新 orchestration_status:
70
- → status = "release_complete"
71
- → completedSteps append "release"
72
- 4. EXECUTION_LOG.md 记录发布完成
73
- ```
74
-
75
- ### 阶段 5: Commit Gate
76
- ```
77
- 1. 若 `git status --porcelain` 非空:
78
- → 按 `/util/git-commit` 规范提交
79
- → 格式: chore(release): complete ${REQ_ID} - ${TITLE}
80
- 2. 可选: {SCRIPT:generate_status} 生成状态报告
81
- ```
29
+ ## Output
82
30
 
83
- ## 输出
84
- ```
85
- ✅ RELEASE_PLAN.md
86
- ✅ BACKLOG.md (进度更新)
87
- ✅ ROADMAP.md (进度更新)
88
- ✅ orchestration_status.json 更新 (release_complete)
89
- ✅ EXECUTION_LOG.md 发布记录
90
- ✅ Changes committed (用户自行处理分支/PR/合并)
91
- ```
31
+ - `devflow/requirements/<REQ_ID>/RELEASE_NOTE.md`
32
+ - `devflow/requirements/<REQ_ID>/harness-state.json` (`status: released`)
92
33
 
93
- ## 错误处理
94
- - Quality Gate 失败或 Constitution ERROR → 立即终止,标记 status="release_failed"。
95
- - 工作区存在未提交改动且未按 `/util/git-commit` 规则处理 → 阻断发布。
34
+ ## Completion
96
35
 
97
- ## 下一步
98
- 1. 用户自行处理分支合并 / PR 创建。
99
- 2. 反馈验证结果,必要时触发 `/flow-verify` 复检。
36
+ - 主链闭环:`init → spec → dev → verify → release`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: flow-restart
3
- description: 'Restart interrupted cc-devflow requirement development. Usage: /flow-restart "REQ-123" [--from=stage]'
3
+ description: 'Restart interrupted cc-devflow requirement development. Usage: /flow:restart "REQ-123" [--from=stage]'
4
4
  scripts:
5
5
  prereq: .claude/scripts/check-prerequisites.sh
6
6
  recover: .claude/scripts/recover-workflow.sh
@@ -16,8 +16,9 @@ $ARGUMENTS = "REQ_ID [--from=stage] [--force] [--backup]"
16
16
 
17
17
  ## 支持阶段
18
18
  ```
19
- research | prd | planning | development | qa | release
19
+ init | spec | dev | verify | release
20
20
  ```
21
+ 兼容别名:`research->init`、`prd/planning->spec`、`development->dev`、`qa/quality->verify`。
21
22
 
22
23
  ## 执行流程
23
24
 
@@ -43,11 +44,10 @@ research | prd | planning | development | qa | release
43
44
  ### 阶段 2: 清理与重置
44
45
  ```
45
46
  1. 根据阶段执行清理动作:
46
- research: 清理临时 research/mcp 缓存、保留 summary
47
- prd: 备份 PRD.md,重置 status=initialized
48
- planning: 备份 EPIC.md/TASKS.md,清理规划中间状态
49
- development: 检查未完成任务、生成 git stash 建议
50
- • qa: 删除过期 TEST_REPORT/SECURITY_REPORT
47
+ init: 清理临时 research/mcp 缓存、保留 summary
48
+ spec: 备份 PRD.md/EPIC.md/TASKS.md,重置 planning 状态
49
+ dev: 检查未完成任务、生成 git stash 建议
50
+ verify: 删除过期 TEST_REPORT/SECURITY_REPORT
51
51
  • release: 关闭未完成 PR 草稿、重置 release 状态
52
52
 
53
53
  2. 更新 orchestration_status:
@@ -61,12 +61,11 @@ research | prd | planning | development | qa | release
61
61
  ### 阶段 3: 恢复执行
62
62
  ```
63
63
  1. 根据 stage 自动触发后续命令提示:
64
- → research → 建议运行 /flow-init --resume
65
- → prd /flow-prd
66
- planning /flow-epic
67
- development /flow-dev
68
- quality/flow-quality(必要时追加 --full)
69
- → release → /flow-release
64
+ init(兼容 research)→ `/flow:init "REQ_ID|TITLE|URLS?"`
65
+ spec(兼容 prd/planning)→ `/flow:spec "REQ_ID"`
66
+ dev(兼容 development)→ `/flow:dev "REQ_ID" --resume`
67
+ verify(兼容 qa/quality)→ `/flow:verify "REQ_ID" --strict`
68
+ release`/flow:release "REQ_ID"`
70
69
 
71
70
  2. 若 {SCRIPT:recover} 支持自动修复(如重建 TASKS),执行对应脚本。
72
71
  ```
@@ -81,7 +80,7 @@ research | prd | planning | development | qa | release
81
80
  ```
82
81
 
83
82
  ## 错误处理
84
- - 检测不到中断 → 提示使用 `/flow-status` 查看当前状态,或需 --force。
83
+ - 检测不到中断 → 提示使用 `/flow:status` 查看当前状态,或需 --force。
85
84
  - 备份失败 → 终止并保留原样。
86
85
  - 清理动作报错 → 输出日志路径,允许用户手动处理后重试。
87
86
 
@@ -94,5 +93,5 @@ research | prd | planning | development | qa | release
94
93
 
95
94
  ## 下一步
96
95
  1. 按提示执行下一阶段命令。
97
- 2. 使用 `/flow-status REQ_ID --detailed` 确认状态恢复正确。
98
- 3. 如多次失败,考虑跑 `/flow-verify` 或手动 review 产物。
96
+ 2. 使用 `/flow:status REQ_ID --detailed` 确认状态恢复正确。
97
+ 3. 如多次失败,考虑跑 `/flow:verify` 或手动 review 产物。