cc-devflow 1.0.2 → 2.4.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 +123 -4
- package/.claude/agents/code-quality-reviewer.md +205 -0
- package/.claude/agents/spec-reviewer.md +221 -0
- package/.claude/commands/cancel-ralph.md +59 -0
- package/.claude/commands/flow-dev.md +202 -21
- package/.claude/commands/flow-epic.md +33 -0
- package/.claude/commands/flow-fix.md +138 -20
- package/.claude/commands/flow-init.md +104 -15
- package/.claude/commands/flow-new.md +84 -35
- package/.claude/commands/flow-prd.md +16 -3
- package/.claude/commands/flow-release.md +33 -0
- package/.claude/commands/flow-review.md +257 -0
- package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +156 -0
- package/.claude/docs/templates/BRAINSTORM_TEMPLATE.md +148 -0
- package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +80 -0
- package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +22 -14
- package/.claude/guides/workflow-guides/flow-orchestrator.md +2 -2
- package/.claude/hooks/hooks.json +15 -0
- package/.claude/hooks/ralph-stop-hook.sh +190 -0
- package/.claude/rules/devflow-conventions.md +3 -1
- package/.claude/rules/project-constitution.md +256 -2
- package/.claude/rules/rationalization-library.md +282 -0
- package/.claude/scripts/create-requirement.sh +19 -6
- package/.claude/scripts/setup-ralph-loop.sh +155 -0
- package/.claude/scripts/verify-gate.sh +269 -0
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +70 -20
- package/.claude/skills/file-header-guardian/SKILL.md +56 -0
- package/.claude/skills/flow-attention-refresh/SKILL.md +170 -0
- package/.claude/skills/flow-brainstorming/SKILL.md +161 -0
- package/.claude/skills/flow-debugging/SKILL.md +221 -0
- package/.claude/skills/flow-finishing-branch/SKILL.md +189 -0
- package/.claude/skills/flow-receiving-review/SKILL.md +153 -0
- package/.claude/skills/flow-tdd/SKILL.md +218 -0
- package/.claude/skills/fractal-docs-generator/SKILL.md +45 -0
- package/.claude/skills/skill-rules.json +75 -0
- package/.claude/skills/verification-before-completion/SKILL.md +158 -0
- package/.claude/tsc-cache/777aa1de-497e-411b-a40f-13b74efcec58/edited-files.log +2 -1
- package/README.md +104 -19
- package/README.zh-CN.md +79 -1
- package/docs/commands/flow-init.md +3 -1
- package/docs/commands/flow-init.zh-CN.md +3 -1
- package/package.json +2 -2
- package/.claude/tsc-cache/777aa1de-497e-411b-a40f-13b74efcec58/affected-repos.txt +0 -1
|
@@ -11,8 +11,11 @@ scripts:
|
|
|
11
11
|
templates:
|
|
12
12
|
flow: .claude/docs/templates/INIT_FLOW_TEMPLATE.md
|
|
13
13
|
research: .claude/docs/templates/RESEARCH_TEMPLATE.md
|
|
14
|
+
brainstorm: .claude/docs/templates/BRAINSTORM_TEMPLATE.md
|
|
14
15
|
guides:
|
|
15
16
|
troubleshoot: .claude/docs/guides/INIT_TROUBLESHOOTING.md
|
|
17
|
+
skills:
|
|
18
|
+
brainstorming: .claude/skills/flow-brainstorming/SKILL.md
|
|
16
19
|
---
|
|
17
20
|
|
|
18
21
|
<!-- ============================================================
|
|
@@ -97,6 +100,9 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?" 或 --interactive
|
|
|
97
100
|
1. 解析参数: REQ_ID|TITLE|PLAN_URLS
|
|
98
101
|
→ 验证 REQ_ID 格式: ^(REQ|BUG)-[0-9]+$
|
|
99
102
|
→ 提取 TITLE 和 PLAN_URLS
|
|
103
|
+
→ 若 TITLE 含中文/非ASCII,使用模型意译生成 BRANCH_TITLE_EN(英文语义翻译,禁止拼音/音译)
|
|
104
|
+
→ BRANCH_TITLE_EN 仅用于分支名,文档标题仍使用原始 TITLE
|
|
105
|
+
→ 若意译不确定或未生成 ASCII 结果,向用户确认英文分支标题
|
|
100
106
|
|
|
101
107
|
2. 前置条件检查
|
|
102
108
|
→ Run: {SCRIPT:prereq} --json --paths-only
|
|
@@ -112,6 +118,19 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?" 或 --interactive
|
|
|
112
118
|
|
|
113
119
|
---
|
|
114
120
|
|
|
121
|
+
### Stage 1.2: Git Branch Creation
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
创建功能分支:
|
|
125
|
+
→ Requirements: feature/${REQ_ID}-${slug(BRANCH_TITLE_EN)}
|
|
126
|
+
→ Bug Fixes: bugfix/${BUG_ID}-${slug(BRANCH_TITLE_EN)}
|
|
127
|
+
|
|
128
|
+
Where BRANCH_TITLE_EN = TITLE 的英文意译 (语义为准,非拼音,使用模型意译)
|
|
129
|
+
slug() = lowercase, replace spaces/special chars with hyphens
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
115
134
|
### Stage 1.5: Context Loading (路线图与架构)
|
|
116
135
|
|
|
117
136
|
**目标**: 理解需求在项目中的位置
|
|
@@ -132,7 +151,7 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?" 或 --interactive
|
|
|
132
151
|
|
|
133
152
|
```
|
|
134
153
|
创建需求目录结构:
|
|
135
|
-
→ Run: {SCRIPT:create} "${REQ_ID}" --title "${TITLE}" --json
|
|
154
|
+
→ Run: {SCRIPT:create} "${REQ_ID}" --title "${TITLE}" --branch-title "${BRANCH_TITLE_EN}" --json (如有)
|
|
136
155
|
|
|
137
156
|
生成文件:
|
|
138
157
|
- devflow/requirements/${REQ_ID}/README.md
|
|
@@ -145,10 +164,89 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?" 或 --interactive
|
|
|
145
164
|
|
|
146
165
|
---
|
|
147
166
|
|
|
167
|
+
### Stage 2.3: Brainstorming (North Star Capture)
|
|
168
|
+
|
|
169
|
+
**目标**: 捕捉需求的原始意图,确保后续流程有明确的「北极星」可追溯
|
|
170
|
+
|
|
171
|
+
**Iron Law**: `NO FLOW EXECUTION WITHOUT BRAINSTORM ALIGNMENT`
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
触发 flow-brainstorming skill:
|
|
175
|
+
→ 参见 {SKILL:brainstorming} 了解完整流程
|
|
176
|
+
|
|
177
|
+
执行步骤:
|
|
178
|
+
1. Understanding the Idea
|
|
179
|
+
→ 一次问一个问题,不要压垮用户
|
|
180
|
+
→ 优先多选题,更容易回答
|
|
181
|
+
→ 理解: 目的、约束、成功标准
|
|
182
|
+
|
|
183
|
+
2. Exploring Approaches
|
|
184
|
+
→ 提出 2-3 种方案及取舍
|
|
185
|
+
→ 给出推荐方案和理由
|
|
186
|
+
→ 让用户做最终决策
|
|
187
|
+
|
|
188
|
+
3. Presenting the Design
|
|
189
|
+
→ 分段呈现设计 (200-300 字/段)
|
|
190
|
+
→ 每段后确认是否正确
|
|
191
|
+
→ 涵盖: 架构、组件、数据流、测试
|
|
192
|
+
|
|
193
|
+
4. Documentation
|
|
194
|
+
→ 使用 {TEMPLATE:brainstorm} 模板
|
|
195
|
+
→ 输出: devflow/requirements/${REQ_ID}/BRAINSTORM.md
|
|
196
|
+
→ 必须包含: 原始需求、核心问题、成功标准、方案探索、最终决策
|
|
197
|
+
|
|
198
|
+
Rationalization Prevention:
|
|
199
|
+
| Excuse | Reality |
|
|
200
|
+
|--------|---------|
|
|
201
|
+
| "需求已经很清楚了" | Brainstorm 确保没有遗漏假设 |
|
|
202
|
+
| "用户赶时间" | 头脑风暴节省后续返工时间 |
|
|
203
|
+
| "这是小需求" | 小需求也有核心问题和成功标准 |
|
|
204
|
+
|
|
205
|
+
Red Flags - STOP:
|
|
206
|
+
→ 跳过问问题直接开始做
|
|
207
|
+
→ 没有记录方案取舍就选定
|
|
208
|
+
→ 没有写 BRAINSTORM.md 就进入下一阶段
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**输出**: `devflow/requirements/${REQ_ID}/BRAINSTORM.md`
|
|
212
|
+
|
|
213
|
+
**验证**:
|
|
214
|
+
- [ ] BRAINSTORM.md 存在
|
|
215
|
+
- [ ] 包含「原始需求」章节 (用户原话)
|
|
216
|
+
- [ ] 包含「成功标准」章节
|
|
217
|
+
- [ ] 包含「方案探索」章节 (2-3种)
|
|
218
|
+
- [ ] 包含「最终决策」章节
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
148
222
|
### Stage 2.5: Research (MCP Mandatory Flow)
|
|
149
223
|
|
|
150
224
|
**目标**: 收集"真实材料",所有步骤 **MANDATORY**
|
|
151
225
|
|
|
226
|
+
**Manus 研究方法** (Planning-with-files 融合):
|
|
227
|
+
|
|
228
|
+
```yaml
|
|
229
|
+
原则 1: 大内容存文件
|
|
230
|
+
→ 抓取的文档存 research/mcp/$(date +%Y%m%d)/
|
|
231
|
+
→ 上下文只保留路径引用
|
|
232
|
+
→ 避免塞满上下文窗口
|
|
233
|
+
|
|
234
|
+
原则 2: 决策前读取
|
|
235
|
+
→ 每次做研究决策前,先读 research/research.md Decisions 章节
|
|
236
|
+
→ 确保不重复已有决策
|
|
237
|
+
→ 注意力刷新,目标回到窗口
|
|
238
|
+
|
|
239
|
+
原则 3: 失败尝试记录
|
|
240
|
+
→ 研究中放弃的方案写入 research/attempts/
|
|
241
|
+
→ 说明放弃原因和学习(见 ATTEMPT_TEMPLATE 格式)
|
|
242
|
+
→ 失败是学习数据,不要隐藏
|
|
243
|
+
|
|
244
|
+
原则 4: 增量追加
|
|
245
|
+
→ 使用 append 而非 rewrite
|
|
246
|
+
→ 保持研究历史完整
|
|
247
|
+
→ 避免覆盖已有信息
|
|
248
|
+
```
|
|
249
|
+
|
|
152
250
|
```
|
|
153
251
|
S0: Internal Codebase Research (必需)
|
|
154
252
|
→ 分析现有代码库,生成 research/internal/codebase-overview.md
|
|
@@ -198,19 +296,9 @@ Task 1-5: External Learning Materials (MCP)
|
|
|
198
296
|
|
|
199
297
|
---
|
|
200
298
|
|
|
201
|
-
### Stage 3: Git Branch Creation
|
|
202
|
-
|
|
203
|
-
```
|
|
204
|
-
创建功能分支:
|
|
205
|
-
→ Requirements: feature/${REQ_ID}-${slug(title)}
|
|
206
|
-
→ Bug Fixes: bugfix/${BUG_ID}-${slug(title)}
|
|
207
299
|
|
|
208
|
-
Where slug() = lowercase, replace spaces/special chars with hyphens
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
---
|
|
212
300
|
|
|
213
|
-
### Stage
|
|
301
|
+
### Stage 3: README Generation
|
|
214
302
|
|
|
215
303
|
```
|
|
216
304
|
生成工作流指南:
|
|
@@ -220,7 +308,7 @@ Where slug() = lowercase, replace spaces/special chars with hyphens
|
|
|
220
308
|
|
|
221
309
|
---
|
|
222
310
|
|
|
223
|
-
### Stage
|
|
311
|
+
### Stage 4: Exit Gate (5-Level Quality Check)
|
|
224
312
|
|
|
225
313
|
**5层验证**:
|
|
226
314
|
|
|
@@ -244,7 +332,7 @@ Level 5: Git & Status & Constitution
|
|
|
244
332
|
→ orchestration_status.json 正确
|
|
245
333
|
→ Constitution 符合性检查
|
|
246
334
|
|
|
247
|
-
→ 详见 {TEMPLATE:flow} Stage
|
|
335
|
+
→ 详见 {TEMPLATE:flow} Stage 4
|
|
248
336
|
```
|
|
249
337
|
|
|
250
338
|
---
|
|
@@ -256,6 +344,7 @@ Level 5: Git & Status & Constitution
|
|
|
256
344
|
```
|
|
257
345
|
devflow/requirements/${REQ_ID}/
|
|
258
346
|
├── README.md
|
|
347
|
+
├── BRAINSTORM.md # 需求的北极星 (Stage 2.3)
|
|
259
348
|
├── research/
|
|
260
349
|
│ ├── internal/
|
|
261
350
|
│ │ └── codebase-overview.md
|
|
@@ -274,7 +363,7 @@ devflow/requirements/${REQ_ID}/
|
|
|
274
363
|
|
|
275
364
|
### Git
|
|
276
365
|
|
|
277
|
-
- **Branch**: `feature/${REQ_ID}-${slug(
|
|
366
|
+
- **Branch**: `feature/${REQ_ID}-${slug(BRANCH_TITLE_EN)}`
|
|
278
367
|
- **Status**: orchestration_status.json.status = "initialized"
|
|
279
368
|
- **Phase**: orchestration_status.json.phase = "planning"
|
|
280
369
|
|
|
@@ -73,34 +73,42 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
|
73
73
|
|
|
74
74
|
**设计理念**: flow-new 是**编排器**(Orchestrator),串行调用 7-8 个阶段化命令
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
**调用链** (v2.1.0 更新):
|
|
77
77
|
```
|
|
78
78
|
/flow-new "REQ-123|Title|URLs"
|
|
79
79
|
↓
|
|
80
|
-
[1/
|
|
80
|
+
[1/9] /flow-init "REQ-123|Title|URLs"
|
|
81
|
+
→ 包含 Brainstorming,生成 BRAINSTORM.md ⭐ v2.1.0
|
|
81
82
|
↓
|
|
82
|
-
[2/
|
|
83
|
+
[2/9] /flow-prd "REQ-123"
|
|
84
|
+
→ 需要 BRAINSTORM.md 对齐检查 ⭐ v2.1.0
|
|
83
85
|
↓
|
|
84
|
-
[2.3/
|
|
86
|
+
[2.3/9] /flow-checklist "REQ-123" (可选, 80%门禁)
|
|
85
87
|
↓
|
|
86
|
-
[2.5/
|
|
88
|
+
[2.5/9] /flow-ui "REQ-123" (条件触发)
|
|
87
89
|
↓
|
|
88
|
-
[2.7/
|
|
90
|
+
[2.7/9] /flow-tech "REQ-123" (必需)
|
|
89
91
|
↓
|
|
90
|
-
[3/
|
|
92
|
+
[3/9] /flow-epic "REQ-123"
|
|
93
|
+
→ bite-sized tasks (2-5分钟/任务) ⭐ v2.1.0
|
|
91
94
|
↓
|
|
92
|
-
[4/
|
|
95
|
+
[4/9] /flow-dev "REQ-123"
|
|
96
|
+
→ TDD Checkpoint (测试必须先 FAIL) ⭐ v2.1.0
|
|
93
97
|
↓
|
|
94
|
-
[5/
|
|
98
|
+
[5/9] /flow-review "REQ-123" ⭐ v2.1.0 新增
|
|
99
|
+
→ Two-Stage Review (Spec → Quality)
|
|
95
100
|
↓
|
|
96
|
-
[6/
|
|
101
|
+
[6/9] /flow-qa "REQ-123" --full
|
|
102
|
+
↓
|
|
103
|
+
[7/9] /flow-release "REQ-123"
|
|
104
|
+
→ 分支完成决策 ⭐ v2.1.0
|
|
97
105
|
```
|
|
98
106
|
|
|
99
107
|
---
|
|
100
108
|
|
|
101
109
|
## 执行流程骨架
|
|
102
110
|
|
|
103
|
-
### [1/
|
|
111
|
+
### [1/9] 初始化 → /flow-init
|
|
104
112
|
|
|
105
113
|
```
|
|
106
114
|
调用: /flow-init "${REQ_ID}|${TITLE}|${PLAN_URLS}"
|
|
@@ -111,18 +119,24 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
|
111
119
|
```
|
|
112
120
|
|
|
113
121
|
**输出**:
|
|
114
|
-
- Git分支: `feature/${REQ_ID}-${slug(
|
|
122
|
+
- Git分支: `feature/${REQ_ID}-${slug(BRANCH_TITLE_EN)}`
|
|
115
123
|
- 需求目录已创建
|
|
116
124
|
- 研究材料已抓取
|
|
125
|
+
- **BRAINSTORM.md** (需求北极星) ⭐ v2.1.0 新增
|
|
126
|
+
|
|
127
|
+
> BRANCH_TITLE_EN 为 TITLE 的英文意译 (语义为准,非拼音,使用模型意译)
|
|
117
128
|
|
|
118
129
|
---
|
|
119
130
|
|
|
120
|
-
### [2/
|
|
131
|
+
### [2/9] PRD生成 → /flow-prd
|
|
121
132
|
|
|
122
133
|
```
|
|
123
134
|
调用: /flow-prd "${REQ_ID}"
|
|
124
135
|
|
|
125
|
-
检查:
|
|
136
|
+
检查:
|
|
137
|
+
- BRAINSTORM.md 存在 ⭐ v2.1.0 新增
|
|
138
|
+
- PRD.md 存在且完整
|
|
139
|
+
- BRAINSTORM 对齐检查通过 ⭐ v2.1.0 新增
|
|
126
140
|
|
|
127
141
|
→ 详见 {TEMPLATE:orchestration} Stage 2
|
|
128
142
|
```
|
|
@@ -133,7 +147,7 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
|
133
147
|
|
|
134
148
|
---
|
|
135
149
|
|
|
136
|
-
### [2.3/
|
|
150
|
+
### [2.3/9] 需求质量检查 → /flow-checklist (可选)
|
|
137
151
|
|
|
138
152
|
```
|
|
139
153
|
触发条件: quality-rules.yml 中 checklist_gate_enabled: true
|
|
@@ -147,7 +161,7 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
|
147
161
|
|
|
148
162
|
---
|
|
149
163
|
|
|
150
|
-
### [2.5/
|
|
164
|
+
### [2.5/9] UI原型生成 → /flow-ui (条件触发)
|
|
151
165
|
|
|
152
166
|
```
|
|
153
167
|
触发条件 (任一满足):
|
|
@@ -169,7 +183,7 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
|
169
183
|
|
|
170
184
|
---
|
|
171
185
|
|
|
172
|
-
### [2.7/
|
|
186
|
+
### [2.7/9] 技术方案设计 → /flow-tech (必需)
|
|
173
187
|
|
|
174
188
|
```
|
|
175
189
|
调用: /flow-tech "${REQ_ID}"
|
|
@@ -187,7 +201,7 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
|
187
201
|
|
|
188
202
|
---
|
|
189
203
|
|
|
190
|
-
### [3/
|
|
204
|
+
### [3/9] Epic规划 → /flow-epic
|
|
191
205
|
|
|
192
206
|
```
|
|
193
207
|
调用: /flow-epic "${REQ_ID}"
|
|
@@ -195,17 +209,18 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
|
195
209
|
检查:
|
|
196
210
|
- EPIC.md + TASKS.md 存在
|
|
197
211
|
- TASKS 覆盖 TECH_DESIGN.md 所有技术层
|
|
212
|
+
- 任务粒度: 2-5分钟/任务 (bite-sized) ⭐ v2.1.0
|
|
198
213
|
|
|
199
214
|
→ 详见 {TEMPLATE:orchestration} Stage 3
|
|
200
215
|
```
|
|
201
216
|
|
|
202
217
|
**输出**:
|
|
203
218
|
- EPIC.md (Epic描述)
|
|
204
|
-
- TASKS.md (
|
|
219
|
+
- TASKS.md (单文件管理所有任务,bite-sized)
|
|
205
220
|
|
|
206
221
|
---
|
|
207
222
|
|
|
208
|
-
### [4/
|
|
223
|
+
### [4/9] 开发执行 → /flow-dev
|
|
209
224
|
|
|
210
225
|
```
|
|
211
226
|
调用: /flow-dev "${REQ_ID}"
|
|
@@ -213,7 +228,7 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
|
213
228
|
执行模式: TDD (Tests First)
|
|
214
229
|
Phase 1: 分析现有代码
|
|
215
230
|
Phase 2: 编写测试 (Tests First)
|
|
216
|
-
|
|
231
|
+
⚠️ TDD CHECKPOINT (测试必须先 FAIL) ⭐ v2.1.0
|
|
217
232
|
Phase 3: 实现代码
|
|
218
233
|
Phase 4: 测试验证 (测试必须通过)
|
|
219
234
|
Phase 5: Git提交并标记完成
|
|
@@ -229,7 +244,30 @@ $ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
|
229
244
|
|
|
230
245
|
---
|
|
231
246
|
|
|
232
|
-
### [5/
|
|
247
|
+
### [5/9] 代码审查 → /flow-review ⭐ v2.1.0 新增
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
调用: /flow-review "${REQ_ID}"
|
|
251
|
+
|
|
252
|
+
Two-Stage Review:
|
|
253
|
+
Stage 1: Spec Compliance (规格合规)
|
|
254
|
+
→ 不信任实现者报告,读代码验证
|
|
255
|
+
→ 检查 scope creep
|
|
256
|
+
→ BRAINSTORM 对齐检查
|
|
257
|
+
Stage 2: Code Quality (代码质量)
|
|
258
|
+
→ 仅在 Stage 1 通过后执行
|
|
259
|
+
→ 测试质量、Constitution 合规
|
|
260
|
+
|
|
261
|
+
→ 详见 flow-review.md
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**输出**:
|
|
265
|
+
- SPEC_REVIEW.md (Stage 1)
|
|
266
|
+
- CODE_QUALITY_REVIEW.md (Stage 2)
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
### [6/9] 质量保证 → /flow-qa
|
|
233
271
|
|
|
234
272
|
```
|
|
235
273
|
调用: /flow-qa "${REQ_ID}" --full
|
|
@@ -251,12 +289,13 @@ Exit Gate检查:
|
|
|
251
289
|
|
|
252
290
|
---
|
|
253
291
|
|
|
254
|
-
### [
|
|
292
|
+
### [7/9] 发布管理 → /flow-release
|
|
255
293
|
|
|
256
294
|
```
|
|
257
295
|
调用: /flow-release "${REQ_ID}"
|
|
258
296
|
|
|
259
297
|
执行:
|
|
298
|
+
- 分支完成决策 (FF merge / PR / Squash / Cleanup) ⭐ v2.1.0
|
|
260
299
|
- 生成发布计划
|
|
261
300
|
- 更新 CLAUDE.md (如有重要架构变更)
|
|
262
301
|
- 最终构建
|
|
@@ -277,19 +316,20 @@ Exit Gate检查:
|
|
|
277
316
|
**实时进度** (详见 `{TEMPLATE:orchestration}` Progress Display Format):
|
|
278
317
|
|
|
279
318
|
```
|
|
280
|
-
🎯 CC-DevFlow 完整需求开发流程
|
|
319
|
+
🎯 CC-DevFlow 完整需求开发流程 (v2.1.0)
|
|
281
320
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
282
321
|
|
|
283
322
|
需求: REQ-123 | 支持用户下单
|
|
284
323
|
|
|
285
|
-
[1/
|
|
286
|
-
[2/
|
|
287
|
-
[2.5/
|
|
288
|
-
[2.7/
|
|
289
|
-
[3/
|
|
290
|
-
[4/
|
|
291
|
-
[5/
|
|
292
|
-
[6/
|
|
324
|
+
[1/9] ✅ 初始化完成 (含 Brainstorming)
|
|
325
|
+
[2/9] ✅ PRD生成完成 (BRAINSTORM 对齐)
|
|
326
|
+
[2.5/9] ✅ UI原型生成完成 ⚡️
|
|
327
|
+
[2.7/9] ✅ 技术方案设计完成 🔧
|
|
328
|
+
[3/9] ✅ Epic规划完成 (bite-sized tasks)
|
|
329
|
+
[4/9] 🔄 开发执行中... (8/18 已完成)
|
|
330
|
+
[5/9] ⏳ 等待代码审查... ⭐ 新增
|
|
331
|
+
[6/9] ⏳ 等待质量保证...
|
|
332
|
+
[7/9] ⏳ 等待发布管理...
|
|
293
333
|
```
|
|
294
334
|
|
|
295
335
|
---
|
|
@@ -300,6 +340,7 @@ Exit Gate检查:
|
|
|
300
340
|
|
|
301
341
|
```
|
|
302
342
|
devflow/requirements/${REQ_ID}/
|
|
343
|
+
├── BRAINSTORM.md ⭐ v2.1.0 新增
|
|
303
344
|
├── research/ (初始化时生成)
|
|
304
345
|
├── PRD.md
|
|
305
346
|
├── UI_PROTOTYPE.html (条件)
|
|
@@ -308,8 +349,10 @@ devflow/requirements/${REQ_ID}/
|
|
|
308
349
|
├── contracts/openapi.yaml
|
|
309
350
|
├── quickstart.md
|
|
310
351
|
├── EPIC.md
|
|
311
|
-
├── TASKS.md
|
|
352
|
+
├── TASKS.md (bite-sized)
|
|
312
353
|
├── tasks/*.completed
|
|
354
|
+
├── SPEC_REVIEW.md ⭐ v2.1.0 新增
|
|
355
|
+
├── CODE_QUALITY_REVIEW.md ⭐ v2.1.0 新增
|
|
313
356
|
├── TEST_PLAN.md + TEST_REPORT.md
|
|
314
357
|
├── SECURITY_PLAN.md + SECURITY_REPORT.md
|
|
315
358
|
└── RELEASE_PLAN.md
|
|
@@ -390,5 +433,11 @@ gh pr merge <PR_NUMBER>
|
|
|
390
433
|
**Related Documentation**:
|
|
391
434
|
- [NEW_ORCHESTRATION_TEMPLATE.md](../.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md) - 详细编排流程
|
|
392
435
|
- [NEW_TROUBLESHOOTING.md](../.claude/docs/guides/NEW_TROUBLESHOOTING.md) - 故障排查指南
|
|
393
|
-
- [flow-init.md](./flow-init.md) - 初始化阶段
|
|
394
|
-
- [flow-
|
|
436
|
+
- [flow-init.md](./flow-init.md) - 初始化阶段 (含 Brainstorming)
|
|
437
|
+
- [flow-review.md](./flow-review.md) - 代码审查阶段 ⭐ v2.1.0 新增
|
|
438
|
+
- [flow-dev.md](./flow-dev.md) - 开发阶段 (TDD Checkpoint)
|
|
439
|
+
- [flow-fix.md](./flow-fix.md) - Bug 修复流程 ⭐ v2.1.0 增强
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
**[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|
|
@@ -5,6 +5,7 @@ scripts:
|
|
|
5
5
|
prereq: .claude/scripts/check-prerequisites.sh
|
|
6
6
|
validate_research: .claude/scripts/validate-research.sh
|
|
7
7
|
validate_constitution: .claude/scripts/validate-constitution.sh
|
|
8
|
+
verify_gate: .claude/scripts/verify-gate.sh
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
# Flow-PRD - PRD 生成命令
|
|
@@ -30,10 +31,22 @@ $ARGUMENTS = "REQ_ID?"
|
|
|
30
31
|
→ Else: run {SCRIPT:prereq} --json --paths-only
|
|
31
32
|
→ If仍为空: ERROR "No requirement ID found."
|
|
32
33
|
|
|
33
|
-
2.
|
|
34
|
+
2. Brainstorm Alignment Check (新增)
|
|
35
|
+
→ 读取 devflow/requirements/${REQ_ID}/BRAINSTORM.md
|
|
36
|
+
→ 验证存在且包含必需章节:
|
|
37
|
+
• 原始需求
|
|
38
|
+
• 核心问题定义
|
|
39
|
+
• 成功标准
|
|
40
|
+
• 方案探索
|
|
41
|
+
• 最终决策
|
|
42
|
+
→ 缺少 BRAINSTORM.md → ERROR "BRAINSTORM.md missing. Run /flow-init brainstorming."
|
|
43
|
+
→ 加载「原始意图」作为 PRD 生成的北极星
|
|
44
|
+
|
|
45
|
+
3. 校验目录
|
|
34
46
|
→ 使用 {SCRIPT:prereq} --json 获取路径
|
|
35
47
|
→ 必须存在:
|
|
36
48
|
• devflow/requirements/${REQ_ID}/
|
|
49
|
+
• BRAINSTORM.md
|
|
37
50
|
• EXECUTION_LOG.md
|
|
38
51
|
• orchestration_status.json (phase0_complete == true)
|
|
39
52
|
• research/research.md
|
|
@@ -59,10 +72,10 @@ $ARGUMENTS = "REQ_ID?"
|
|
|
59
72
|
3. 直接编辑 research/research.md 补充决策内容
|
|
60
73
|
4. 参考 .claude/docs/templates/RESEARCH_TEMPLATE.md 模板
|
|
61
74
|
|
|
62
|
-
|
|
75
|
+
4. PRD 覆盖提示
|
|
63
76
|
→ 若 PRD.md 已存在 → WARN 并确认是否覆盖
|
|
64
77
|
|
|
65
|
-
|
|
78
|
+
5. 状态校验
|
|
66
79
|
→ orchestration_status.status ∈ {"initialized", "prd_generation_failed"}
|
|
67
80
|
→ 否则提示按流程顺序执行
|
|
68
81
|
```
|
|
@@ -6,10 +6,43 @@ scripts:
|
|
|
6
6
|
check_tasks: .claude/scripts/check-task-status.sh
|
|
7
7
|
validate_constitution: .claude/scripts/validate-constitution.sh
|
|
8
8
|
generate_status: .claude/scripts/generate-status-report.sh
|
|
9
|
+
verify_gate: .claude/scripts/verify-gate.sh
|
|
10
|
+
skills:
|
|
11
|
+
finishing: .claude/skills/flow-finishing-branch/SKILL.md
|
|
12
|
+
verification: .claude/skills/verification-before-completion/SKILL.md
|
|
9
13
|
---
|
|
10
14
|
|
|
11
15
|
# Flow-Release - 发布管理命令
|
|
12
16
|
|
|
17
|
+
## 分支完成决策 (新增)
|
|
18
|
+
|
|
19
|
+
参考 `{SKILL:finishing}` 原则,发布前需要决定分支处理方式:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
决策选项:
|
|
23
|
+
A) Fast-forward merge
|
|
24
|
+
→ 适用: 小改动,单人开发,无需审查记录
|
|
25
|
+
→ 命令: git checkout main && git merge --ff-only feature/xxx
|
|
26
|
+
|
|
27
|
+
B) Create PR (推荐)
|
|
28
|
+
→ 适用: 需要记录,团队审查,CI 验证
|
|
29
|
+
→ 命令: gh pr create
|
|
30
|
+
|
|
31
|
+
C) Squash and merge
|
|
32
|
+
→ 适用: 多个提交需合并为一个
|
|
33
|
+
→ 命令: gh pr merge --squash
|
|
34
|
+
|
|
35
|
+
D) Cleanup only
|
|
36
|
+
→ 适用: 工作被废弃,只需清理分支
|
|
37
|
+
→ 命令: git checkout main && git branch -D feature/xxx
|
|
38
|
+
|
|
39
|
+
决策依据:
|
|
40
|
+
- 改动大小 (>10 files → PR)
|
|
41
|
+
- 是否需要审查 (团队项目 → PR)
|
|
42
|
+
- 提交历史是否清晰 (混乱 → Squash)
|
|
43
|
+
- 是否需要 CI 验证 (生产代码 → PR)
|
|
44
|
+
```
|
|
45
|
+
|
|
13
46
|
## User Input
|
|
14
47
|
```text
|
|
15
48
|
$ARGUMENTS = "REQ_ID?"
|