cc-devflow 4.1.5 → 4.2.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 +87 -1091
- package/.claude/commands/core/architecture.md +32 -2
- package/.claude/commands/core/guidelines.md +27 -2
- package/.claude/commands/core/roadmap.md +33 -4
- package/.claude/commands/core/style.md +53 -263
- package/.claude/commands/flow/CLAUDE.md +28 -0
- package/.claude/commands/flow/archive.md +2 -2
- package/.claude/commands/flow/checklist.md +9 -251
- package/.claude/commands/flow/clarify.md +9 -127
- package/.claude/commands/flow/constitution.md +1 -1
- package/.claude/commands/flow/context.md +1 -1
- package/.claude/commands/flow/dev.md +19 -395
- package/.claude/commands/flow/ideate.md +13 -13
- package/.claude/commands/flow/init.md +19 -30
- package/.claude/commands/flow/new.md +12 -268
- package/.claude/commands/flow/quality.md +10 -153
- package/.claude/commands/flow/release.md +18 -81
- package/.claude/commands/flow/restart.md +15 -16
- package/.claude/commands/flow/spec.md +14 -164
- package/.claude/commands/flow/status.md +12 -12
- package/.claude/commands/flow/update.md +4 -4
- package/.claude/commands/flow/upgrade.md +6 -6
- package/.claude/commands/flow/verify.md +19 -78
- package/.claude/commands/flow/workspace.md +1 -1
- package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +7 -7
- package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +44 -96
- package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +1 -1
- package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +5 -5
- package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +1 -1
- package/.claude/docs/templates/BACKLOG_TEMPLATE.md +3 -3
- package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +5 -5
- package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +2 -2
- package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +3 -3
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +33 -64
- package/.claude/docs/templates/RESEARCH_TEMPLATE.md +3 -3
- package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +2 -2
- package/.claude/docs/templates/ROADMAP_TEMPLATE.md +2 -2
- package/.claude/docs/templates/STYLE_TEMPLATE.md +3 -3
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +8 -9
- package/.claude/guides/workflow-guides/flow-orchestrator.md +31 -265
- package/.claude/hooks/CLAUDE.md +1 -1
- package/.claude/hooks/checklist-gate.js +4 -4
- package/.claude/hooks/inject-agent-context.ts +2 -2
- package/.claude/scripts/calculate-checklist-completion.sh +2 -2
- package/.claude/scripts/check-prerequisites.sh +2 -2
- package/.claude/scripts/checklist-errors.sh +4 -4
- package/.claude/scripts/flow-quality-full.sh +5 -5
- package/.claude/scripts/flow-quality-quick.sh +4 -4
- package/.claude/scripts/flow-workspace-init.sh +2 -2
- package/.claude/scripts/generate-clarification-report.sh +4 -4
- package/.claude/scripts/recover-workflow.sh +70 -73
- package/.claude/scripts/run-quality-gates.sh +1 -1
- package/.claude/scripts/setup-epic.sh +2 -2
- package/.claude/scripts/setup-ralph-loop.sh +2 -2
- package/.claude/scripts/validate-research.sh +1 -1
- package/.claude/scripts/verify-setup.sh +1 -1
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +113 -108
- package/.claude/skills/workflow/CLAUDE.md +24 -0
- package/.claude/skills/workflow/flow-dev/CLAUDE.md +14 -76
- package/.claude/skills/workflow/flow-dev/SKILL.md +58 -60
- package/.claude/skills/workflow/flow-dev/context.jsonl +4 -8
- package/.claude/skills/workflow/flow-init/SKILL.md +46 -144
- package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +1 -1
- package/.claude/skills/workflow/flow-init/context.jsonl +3 -3
- package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +1 -1
- package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +1 -1
- package/.claude/skills/workflow/flow-release/SKILL.md +23 -56
- package/.claude/skills/workflow/flow-release/context.jsonl +5 -7
- package/.claude/skills/workflow/flow-spec/CLAUDE.md +15 -101
- package/.claude/skills/workflow/flow-spec/SKILL.md +40 -511
- package/.claude/skills/workflow/flow-spec/context.jsonl +5 -7
- package/.claude/skills/workflow/flow-verify/CLAUDE.md +10 -0
- package/.claude/skills/workflow/flow-verify/SKILL.md +53 -0
- package/.claude/skills/workflow/flow-verify/context.jsonl +5 -0
- package/.claude/skills/workflow.yaml +72 -267
- package/CHANGELOG.md +72 -0
- package/README.md +96 -69
- package/README.zh-CN.md +95 -67
- package/bin/cc-devflow-cli.js +154 -0
- package/bin/harness.js +22 -0
- package/docs/commands/README.md +34 -38
- package/docs/commands/README.zh-CN.md +34 -36
- package/docs/commands/core-roadmap.md +2 -2
- package/docs/commands/core-roadmap.zh-CN.md +2 -2
- package/docs/commands/core-style.md +29 -381
- package/docs/commands/core-style.zh-CN.md +29 -381
- package/docs/commands/flow-init.md +10 -10
- package/docs/commands/flow-init.zh-CN.md +11 -11
- package/docs/commands/flow-new.md +25 -260
- package/docs/commands/flow-new.zh-CN.md +26 -257
- package/docs/guides/getting-started.md +16 -15
- package/docs/guides/getting-started.zh-CN.md +10 -12
- package/lib/compiler/__tests__/manifest.test.js +156 -0
- package/lib/compiler/__tests__/parser.test.js +21 -0
- package/lib/compiler/index.js +17 -1
- package/lib/compiler/manifest.js +68 -6
- package/lib/compiler/parser.js +5 -0
- package/lib/harness/CLAUDE.md +21 -0
- package/lib/harness/cli.js +208 -0
- package/lib/harness/index.js +16 -0
- package/lib/harness/operations/dispatch.js +285 -0
- package/lib/harness/operations/init.js +48 -0
- package/lib/harness/operations/janitor.js +74 -0
- package/lib/harness/operations/pack.js +100 -0
- package/lib/harness/operations/plan.js +29 -0
- package/lib/harness/operations/release.js +83 -0
- package/lib/harness/operations/resume.js +44 -0
- package/lib/harness/operations/verify.js +163 -0
- package/lib/harness/planner.js +141 -0
- package/lib/harness/schemas.js +108 -0
- package/lib/harness/store.js +240 -0
- package/package.json +9 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mainline Troubleshooting Guide
|
|
2
2
|
|
|
3
|
-
> Quick reference for `/flow
|
|
3
|
+
> Quick reference for canonical `/flow:*` delivery errors and recovery.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,144 +8,92 @@
|
|
|
8
8
|
|
|
9
9
|
### E1: Stage Command Not Found
|
|
10
10
|
```bash
|
|
11
|
-
❌ ERROR: Command /flow
|
|
11
|
+
❌ ERROR: Command /flow:init not found
|
|
12
12
|
```
|
|
13
|
-
**Fix**:
|
|
14
|
-
|
|
15
|
-
---
|
|
13
|
+
**Fix**: 检查 `.claude/commands/flow/` 是否完整;确认当前分支已同步最新命令目录。
|
|
16
14
|
|
|
17
15
|
### E2: Status File Corrupted
|
|
18
16
|
```bash
|
|
19
17
|
❌ ERROR: Invalid orchestration_status.json
|
|
20
18
|
```
|
|
21
19
|
**Diagnose**: `jq . devflow/requirements/REQ-123/orchestration_status.json`
|
|
22
|
-
**Fix**:
|
|
23
|
-
|
|
24
|
-
---
|
|
20
|
+
**Fix**: 重建状态文件后执行 `/flow:status "REQ-123"` 并从建议阶段恢复。
|
|
25
21
|
|
|
26
22
|
### E3: Interrupted, Cannot Resume
|
|
27
23
|
```bash
|
|
28
|
-
❌ ERROR:
|
|
29
|
-
```
|
|
30
|
-
**Diagnose**: `/flow-status REQ-123`
|
|
31
|
-
**Fix**: `/flow-restart "REQ-123"` 或手动从特定阶段继续
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
### E4: UI Detection False Positive
|
|
36
|
-
```bash
|
|
37
|
-
✅ UI原型生成完成 (但项目是纯后端)
|
|
24
|
+
❌ ERROR: development_in_progress but checkpoint missing
|
|
38
25
|
```
|
|
39
|
-
**
|
|
40
|
-
|
|
41
|
-
---
|
|
26
|
+
**Diagnose**: `/flow:status "REQ-123"`
|
|
27
|
+
**Fix**: `/flow:dev "REQ-123" --resume`
|
|
42
28
|
|
|
43
|
-
###
|
|
29
|
+
### E4: Task Manifest Missing
|
|
44
30
|
```bash
|
|
45
|
-
|
|
31
|
+
❌ ERROR: TASKS.md not found
|
|
46
32
|
```
|
|
47
|
-
**
|
|
48
|
-
**Fix**: 手动补充缺失任务或重新生成 `/flow-epic "REQ-123"`
|
|
49
|
-
|
|
50
|
-
---
|
|
33
|
+
**Fix**: 重新执行 `/flow:spec "REQ-123"` 生成规划产物。
|
|
51
34
|
|
|
52
|
-
###
|
|
35
|
+
### E5: Verify Gate Failure
|
|
53
36
|
```bash
|
|
54
|
-
❌
|
|
55
|
-
❌
|
|
37
|
+
❌ Coverage below threshold
|
|
38
|
+
❌ High severity security issue
|
|
56
39
|
```
|
|
57
40
|
**Fix**:
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
### E7: Build Failure
|
|
64
|
-
```bash
|
|
65
|
-
❌ error TS2345: Argument of type 'string | undefined'...
|
|
66
|
-
```
|
|
67
|
-
**Fix**: `npm run typecheck` → 修复类型错误 → `npm run build`
|
|
68
|
-
|
|
69
|
-
---
|
|
41
|
+
- 修复代码与测试后重跑 `/flow:verify "REQ-123" --strict`
|
|
42
|
+
- 通过后再执行 `/flow:release "REQ-123"`
|
|
70
43
|
|
|
71
|
-
###
|
|
44
|
+
### E6: Release Blocked
|
|
72
45
|
```bash
|
|
73
|
-
❌
|
|
46
|
+
❌ Missing strict verify report-card
|
|
74
47
|
```
|
|
75
|
-
**Fix**:
|
|
48
|
+
**Fix**: 先执行 `/flow:verify "REQ-123" --strict`,再执行 `/flow:release "REQ-123"`。
|
|
76
49
|
|
|
77
50
|
---
|
|
78
51
|
|
|
79
52
|
## Recovery Procedures
|
|
80
53
|
|
|
81
|
-
###
|
|
54
|
+
### Full Rebuild
|
|
82
55
|
```bash
|
|
83
56
|
rm -rf devflow/requirements/REQ-123/
|
|
84
|
-
|
|
85
|
-
/flow
|
|
57
|
+
/flow:init "REQ-123|Title|URLs"
|
|
58
|
+
/flow:spec "REQ-123"
|
|
59
|
+
/flow:dev "REQ-123"
|
|
60
|
+
/flow:verify "REQ-123" --strict
|
|
86
61
|
```
|
|
87
62
|
|
|
88
|
-
###
|
|
63
|
+
### Resume From Current Stage
|
|
89
64
|
```bash
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
# 从特定任务继续
|
|
94
|
-
/flow-dev "REQ-123" --task T008
|
|
65
|
+
/flow:status "REQ-123"
|
|
66
|
+
/flow:dev "REQ-123" --resume
|
|
95
67
|
```
|
|
96
68
|
|
|
97
|
-
### State File Rebuild
|
|
69
|
+
### State File Rebuild (Minimal)
|
|
98
70
|
```bash
|
|
99
71
|
REQ_DIR="devflow/requirements/REQ-123"
|
|
100
|
-
|
|
101
|
-
HAS_TECH=$([ -f "$REQ_DIR/TECH_DESIGN.md" ] && echo true || echo false)
|
|
102
|
-
|
|
103
|
-
# 重建状态文件
|
|
104
|
-
cat > $REQ_DIR/orchestration_status.json <<EOF
|
|
72
|
+
cat > "$REQ_DIR/orchestration_status.json" <<EOF_JSON
|
|
105
73
|
{
|
|
106
74
|
"reqId": "REQ-123",
|
|
107
|
-
"status": "
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
75
|
+
"status": "spec_complete",
|
|
76
|
+
"phase": "planning",
|
|
77
|
+
"spec_complete": true,
|
|
78
|
+
"development_complete": false,
|
|
79
|
+
"quality_complete": false,
|
|
80
|
+
"release_complete": false
|
|
112
81
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
jq . $REQ_DIR/orchestration_status.json # 验证
|
|
116
|
-
/flow-restart "REQ-123"
|
|
117
|
-
```
|
|
82
|
+
EOF_JSON
|
|
118
83
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
## Configuration
|
|
122
|
-
|
|
123
|
-
### Environment Variables
|
|
124
|
-
| Variable | Default | Purpose |
|
|
125
|
-
|----------|---------|---------|
|
|
126
|
-
| `SKIP_UI_DETECTION` | `false` | 强制跳过 UI 生成 |
|
|
127
|
-
| `COVERAGE_THRESHOLD` | `80` | 代码覆盖率要求 |
|
|
128
|
-
| `FLOW_DEBUG` | `false` | 启用调试日志 |
|
|
129
|
-
|
|
130
|
-
### Command-Line Flags
|
|
131
|
-
```bash
|
|
132
|
-
/flow-new "REQ-123|..." --skip-ui # 跳过 UI
|
|
133
|
-
/flow-new "REQ-123|..." --resume # 恢复执行
|
|
84
|
+
jq . "$REQ_DIR/orchestration_status.json"
|
|
85
|
+
/flow:status "REQ-123"
|
|
134
86
|
```
|
|
135
87
|
|
|
136
88
|
---
|
|
137
89
|
|
|
138
90
|
## FAQ
|
|
139
91
|
|
|
140
|
-
**Q:
|
|
141
|
-
A:
|
|
142
|
-
|
|
143
|
-
**Q: 如何从特定阶段重新开始?**
|
|
144
|
-
A: 使用对应阶段命令重新执行,如 `/flow-prd "REQ-123"` 或 `/flow-epic "REQ-123"`
|
|
92
|
+
**Q: 如何从特定阶段重启?**
|
|
93
|
+
A: 用 `/flow:status` 先确认状态,然后执行对应阶段命令(通常是 `/flow:dev --resume` 或 `/flow:verify --strict`)。
|
|
145
94
|
|
|
146
|
-
**Q: flow
|
|
147
|
-
A:
|
|
148
|
-
|
|
149
|
-
---
|
|
95
|
+
**Q: 什么时候需要重跑 `/flow:spec`?**
|
|
96
|
+
A: `TASKS.md` 缺失、规格有重大变更、或 manifest 与实现明显漂移时。
|
|
150
97
|
|
|
151
|
-
**
|
|
98
|
+
**Q: 可以继续使用 `/flow-new` 吗?**
|
|
99
|
+
A: 不建议。`/flow-new` 仅兼容保留,主链是 `/flow:init -> /flow:spec -> /flow:dev -> /flow:verify -> /flow:release`。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 问题描述
|
|
4
4
|
|
|
5
|
-
在执行 `/flow
|
|
5
|
+
在执行 `/flow:dev` 时,主代理完成了代码实现,但没有同步更新 TASKS.md 中的待办事项复选框。这导致:
|
|
6
6
|
|
|
7
7
|
- ❌ TASKS.md 显示任务未完成 `[ ]`,但代码已经实现
|
|
8
8
|
- ❌ 进度追踪不准确,无法知道真实进度
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
### 1. 强制执行标记流程
|
|
15
15
|
|
|
16
|
-
在 `/flow
|
|
16
|
+
在 `/flow:dev` 命令文档中,已经强化了任务完成标记的要求:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
# 每完成一个任务后,必须立即执行
|
|
@@ -73,7 +73,7 @@ bash .claude/scripts/sync-task-marks.sh --dry-run
|
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
# 1. 开始开发
|
|
76
|
-
/flow
|
|
76
|
+
/flow:dev "REQ-123"
|
|
77
77
|
|
|
78
78
|
# 2. Claude 完成任务 T001
|
|
79
79
|
# (写代码、运行测试等)
|
|
@@ -223,7 +223,7 @@ bash .claude/scripts/sync-task-marks.sh --auto-mark
|
|
|
223
223
|
2. **使用脚本**: 始终用脚本,不要手动编辑 TASKS.md
|
|
224
224
|
3. **验证输出**: 检查脚本输出确认标记成功
|
|
225
225
|
4. **定期检查**: 在开发过程中定期运行 `sync-task-marks.sh --dry-run`
|
|
226
|
-
5. **Exit Gate**: 在 `/flow
|
|
226
|
+
5. **Exit Gate**: 在 `/flow:dev` 结束前验证所有任务已标记
|
|
227
227
|
|
|
228
228
|
### DON'T ❌
|
|
229
229
|
|
|
@@ -333,6 +333,6 @@ bash .claude/tests/scripts/test_sync_task_marks.sh
|
|
|
333
333
|
|
|
334
334
|
- [mark-task-complete.sh 源码](.claude/scripts/mark-task-complete.sh)
|
|
335
335
|
- [sync-task-marks.sh 源码](.claude/scripts/sync-task-marks.sh)
|
|
336
|
-
- [/flow
|
|
336
|
+
- [/flow:dev 命令文档](.claude/commands/flow/dev.md)
|
|
337
337
|
- [TASKS_TEMPLATE.md 模板](.claude/docs/templates/TASKS_TEMPLATE.md)
|
|
338
338
|
- [测试框架](.claude/tests/test-framework.sh)
|
|
@@ -146,7 +146,7 @@ LIMIT 20 OFFSET 40
|
|
|
146
146
|
|
|
147
147
|
| | research/attempts/ | ERROR_LOG.md |
|
|
148
148
|
|--|-------------------|--------------|
|
|
149
|
-
| 阶段 | 研究阶段(Phase 0) | 执行阶段(flow
|
|
149
|
+
| 阶段 | 研究阶段(Phase 0) | 执行阶段(flow:dev, flow:verify) |
|
|
150
150
|
| 内容 | 方案尝试与放弃 | 代码错误与修复 |
|
|
151
151
|
| 格式 | Markdown 文件 | 结构化错误日志 |
|
|
152
152
|
| 目的 | 避免重复研究 | 避免重复错误 |
|
|
@@ -201,7 +201,7 @@ _说明: 此矩阵用于快速识别需求间的依赖关系,避免优先级
|
|
|
201
201
|
|
|
202
202
|
### 准入标准 (Definition of Ready)
|
|
203
203
|
|
|
204
|
-
一个 backlog item 准备好进入开发 (运行 /flow
|
|
204
|
+
一个 backlog item 准备好进入开发 (运行 /flow:init) 的标准:
|
|
205
205
|
- [ ] Description 清晰明确
|
|
206
206
|
- [ ] Business Value 已明确
|
|
207
207
|
- [ ] Effort 已评估
|
|
@@ -213,9 +213,9 @@ _说明: 此矩阵用于快速识别需求间的依赖关系,避免优先级
|
|
|
213
213
|
### 完成标准 (Definition of Done)
|
|
214
214
|
|
|
215
215
|
一个 backlog item 被认为完成的标准:
|
|
216
|
-
- [ ] 通过 /flow
|
|
216
|
+
- [ ] 通过 /flow:init, /flow:spec, /flow:dev 流程
|
|
217
217
|
- [ ] 所有 TASKS.md 中的任务完成
|
|
218
|
-
- [ ] 通过 /flow
|
|
218
|
+
- [ ] 通过 /flow:verify (测试 + 安全审查)
|
|
219
219
|
- [ ] 代码已合并到主分支
|
|
220
220
|
- [ ] 文档已更新
|
|
221
221
|
- [ ] 用户验收通过
|
|
@@ -162,15 +162,15 @@ No outstanding items.
|
|
|
162
162
|
{{#ALL_RESOLVED}}
|
|
163
163
|
✅ **Clarification complete**. All critical ambiguities have been resolved.
|
|
164
164
|
|
|
165
|
-
Recommended next command: `/flow
|
|
165
|
+
Recommended next command: `/flow:spec {{REQ_ID}}`
|
|
166
166
|
{{/ALL_RESOLVED}}
|
|
167
167
|
|
|
168
168
|
{{#HAS_OUTSTANDING}}
|
|
169
169
|
⚠️ **Clarification partially complete**. Some low-impact items remain.
|
|
170
170
|
|
|
171
171
|
Options:
|
|
172
|
-
1. Proceed with `/flow
|
|
173
|
-
2. Re-run `/flow
|
|
172
|
+
1. Proceed with `/flow:spec {{REQ_ID}}` (acceptable risk)
|
|
173
|
+
2. Re-run `/flow:spec {{REQ_ID}} --overwrite` after planning phase
|
|
174
174
|
{{/HAS_OUTSTANDING}}
|
|
175
175
|
|
|
176
176
|
{{#HAS_DEFERRED}}
|
|
@@ -179,13 +179,13 @@ Options:
|
|
|
179
179
|
- {{ITEM}}
|
|
180
180
|
{{/DEFERRED_SUMMARY}}
|
|
181
181
|
|
|
182
|
-
These will be addressed during `/flow
|
|
182
|
+
These will be addressed during `/flow:spec` task planning or `/flow:dev` implementation.
|
|
183
183
|
{{/HAS_DEFERRED}}
|
|
184
184
|
|
|
185
185
|
{{#NO_QUESTIONS}}
|
|
186
186
|
✅ **No critical ambiguities detected**. research.md is sufficiently specified.
|
|
187
187
|
|
|
188
|
-
Recommended next command: `/flow
|
|
188
|
+
Recommended next command: `/flow:spec {{REQ_ID}}`
|
|
189
189
|
{{/NO_QUESTIONS}}
|
|
190
190
|
|
|
191
191
|
---
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
```markdown
|
|
13
13
|
## [TIMESTAMP] E###: TITLE
|
|
14
14
|
|
|
15
|
-
**Phase**: flow
|
|
15
|
+
**Phase**: flow:dev / T### 或 flow:verify / 测试名
|
|
16
16
|
**Error Type**: Test Failure | Build Error | Runtime Error | Type Error | Lint Error
|
|
17
17
|
**Error Message**:
|
|
18
18
|
\`\`\`
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
## [2026-01-08T10:30:00] E001: Test Failure - Email Validation
|
|
32
32
|
|
|
33
|
-
**Phase**: flow
|
|
33
|
+
**Phase**: flow:dev / T003
|
|
34
34
|
**Error Type**: Test Failure
|
|
35
35
|
**Error Message**:
|
|
36
36
|
```
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# Flow-Init Execution Flow Template
|
|
2
2
|
|
|
3
|
-
> Detailed stages for `/flow
|
|
3
|
+
> Detailed stages for `/flow:init` requirement initialization
|
|
4
4
|
|
|
5
5
|
<!-- ============================================================
|
|
6
6
|
调用上下文声明 (Invocation Context Declaration)
|
|
7
7
|
============================================================
|
|
8
8
|
|
|
9
|
-
本模板由 `/flow
|
|
9
|
+
本模板由 `/flow:init` 命令通过 {TEMPLATE:flow} 引用加载。
|
|
10
10
|
|
|
11
11
|
模板中的 {SCRIPT:xxx} 占位符引用 flow-init.md 头文件中的 scripts 定义:
|
|
12
12
|
```yaml
|
|
13
|
-
# 来源: .claude/commands/flow
|
|
13
|
+
# 来源: .claude/commands/flow/init.md 头文件
|
|
14
14
|
scripts:
|
|
15
15
|
create: .claude/scripts/create-requirement.sh
|
|
16
16
|
prereq: .claude/scripts/check-prerequisites.sh
|
|
@@ -1,107 +1,76 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mainline Orchestration Template
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Canonical execution flow for requirement delivery (`/flow:init -> /flow:spec -> /flow:dev -> /flow:verify -> /flow:release`)
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Stage Execution Skeleton
|
|
8
8
|
|
|
9
|
-
### [1/
|
|
10
|
-
- 创建需求目录 +
|
|
11
|
-
-
|
|
12
|
-
- Exit Gate: `orchestration_status.status == initialized`
|
|
9
|
+
### [1/5] /flow:init
|
|
10
|
+
- 创建需求目录 + 运行时上下文
|
|
11
|
+
- Exit Gate: `status in {initialized, context_packed}`
|
|
13
12
|
|
|
14
|
-
### [2/
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
- 若跳过: 标记 `clarify_skipped: true`
|
|
13
|
+
### [2/5] /flow:spec
|
|
14
|
+
- 统一规格阶段(PRD/Tech/UI/Task Manifest)
|
|
15
|
+
- Exit Gate: `status = spec_complete` 或 `phase = planning`
|
|
18
16
|
|
|
19
|
-
### [3/
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
- Exit Gate: 规格产物完整,`status = spec_complete`
|
|
17
|
+
### [3/5] /flow:dev
|
|
18
|
+
- 按 manifest 执行开发,支持 `--resume`
|
|
19
|
+
- Exit Gate: `status in {development_complete, development_in_progress}`
|
|
23
20
|
|
|
24
|
-
### [4/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Phase 1: 分析现有代码
|
|
28
|
-
Phase 2: 编写测试 (Tests First)
|
|
29
|
-
↓
|
|
30
|
-
TDD CHECKPOINT → 测试必须先失败
|
|
31
|
-
↓
|
|
32
|
-
Phase 3: 实现代码
|
|
33
|
-
Phase 4: 测试验证 → 测试必须通过
|
|
34
|
-
```
|
|
35
|
-
- 输出: 实现代码 + 测试代码 + `TASKS.md` 勾选更新
|
|
21
|
+
### [4/5] /flow:verify
|
|
22
|
+
- 快速/严格质量闸
|
|
23
|
+
- 严格模式输出 `report-card.json` 作为发布准入依据
|
|
36
24
|
|
|
37
|
-
### [5/
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
- 代码质量审查
|
|
41
|
-
- 安全扫描与测试门禁
|
|
42
|
-
- 输出: `SPEC_REVIEW.md`, `CODE_QUALITY_REVIEW.md`, `SECURITY_REPORT.md`
|
|
43
|
-
|
|
44
|
-
### [6/6] /flow-release
|
|
45
|
-
- 生成 `RELEASE_PLAN.md`
|
|
46
|
-
- 执行发布分支策略(PR/merge/squash 等)
|
|
47
|
-
- 必要时更新 `CLAUDE.md`
|
|
25
|
+
### [5/5] /flow:release
|
|
26
|
+
- 读取 verify 结果并完成发布收口
|
|
27
|
+
- 生成发布计划并清理运行时噪音
|
|
48
28
|
|
|
49
29
|
---
|
|
50
30
|
|
|
51
31
|
## Progress Display Format
|
|
52
32
|
|
|
53
|
-
```
|
|
54
|
-
🎯 CC-DevFlow
|
|
33
|
+
```text
|
|
34
|
+
🎯 CC-DevFlow 主链交付
|
|
55
35
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
56
36
|
|
|
57
37
|
需求: REQ-123 | 支持用户下单
|
|
58
38
|
|
|
59
|
-
[1/
|
|
60
|
-
[2/
|
|
61
|
-
[3/
|
|
62
|
-
[4/
|
|
63
|
-
[5/
|
|
64
|
-
[6/6] ⏳ 等待发布管理...
|
|
39
|
+
[1/5] ✅ 初始化完成
|
|
40
|
+
[2/5] ✅ 规格完成
|
|
41
|
+
[3/5] 🔄 开发执行中... (8/18 已完成)
|
|
42
|
+
[4/5] ⏳ 等待质量闸...
|
|
43
|
+
[5/5] ⏳ 等待发布...
|
|
65
44
|
```
|
|
66
45
|
|
|
67
46
|
---
|
|
68
47
|
|
|
69
48
|
## Output Structure
|
|
70
49
|
|
|
71
|
-
```
|
|
50
|
+
```text
|
|
72
51
|
devflow/requirements/${REQ_ID}/
|
|
73
|
-
├── BRAINSTORM.md
|
|
74
|
-
├── research/
|
|
75
|
-
├── clarifications/ # 可选
|
|
76
52
|
├── PRD.md
|
|
77
|
-
├── TECH_DESIGN.md
|
|
78
|
-
├── UI_PROTOTYPE.html
|
|
53
|
+
├── TECH_DESIGN.md
|
|
54
|
+
├── UI_PROTOTYPE.html # 条件生成
|
|
79
55
|
├── EPIC.md
|
|
80
56
|
├── TASKS.md
|
|
81
|
-
├──
|
|
82
|
-
├──
|
|
83
|
-
├── SECURITY_REPORT.md # flow-quality --full
|
|
57
|
+
├── report-card.json # /flow:verify 产物
|
|
58
|
+
├── SECURITY_REPORT.md
|
|
84
59
|
└── RELEASE_PLAN.md
|
|
85
60
|
```
|
|
86
61
|
|
|
87
62
|
---
|
|
88
63
|
|
|
89
|
-
## Status Tracking
|
|
64
|
+
## Status Tracking (Suggested)
|
|
90
65
|
|
|
91
|
-
**orchestration_status.json 推荐字段**:
|
|
92
66
|
```json
|
|
93
67
|
{
|
|
94
|
-
"status": "
|
|
95
|
-
"phase": "
|
|
68
|
+
"status": "development_in_progress",
|
|
69
|
+
"phase": "development",
|
|
96
70
|
"initialized": true,
|
|
97
|
-
"clarify_complete": true,
|
|
98
71
|
"spec_complete": true,
|
|
99
|
-
"
|
|
72
|
+
"development_complete": false,
|
|
100
73
|
"quality_complete": false,
|
|
101
74
|
"release_complete": false
|
|
102
75
|
}
|
|
103
76
|
```
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
**Last Updated**: 2026-02-07
|
|
@@ -124,7 +124,7 @@ Generated: {GENERATED_AT}
|
|
|
124
124
|
1. **Manual Research Workflow**:
|
|
125
125
|
```bash
|
|
126
126
|
# 1. Run flow-init (generates tasks.json)
|
|
127
|
-
/flow
|
|
127
|
+
/flow:init "REQ-123|Feature Name"
|
|
128
128
|
|
|
129
129
|
# 2. Research each task
|
|
130
130
|
# - Check existing codebase
|
|
@@ -145,7 +145,7 @@ Generated: {GENERATED_AT}
|
|
|
145
145
|
2. **Direct Editing**:
|
|
146
146
|
- Copy this template to `research/research.md`
|
|
147
147
|
- Fill in decisions based on your research
|
|
148
|
-
- Run validation script before proceeding to /flow
|
|
148
|
+
- Run validation script before proceeding to /flow:spec
|
|
149
149
|
|
|
150
150
|
---
|
|
151
151
|
|
|
@@ -271,6 +271,6 @@ Generated: {GENERATED_AT}
|
|
|
271
271
|
**Maintained By**: CC-DevFlow Team
|
|
272
272
|
**Last Updated**: 2025-01-26
|
|
273
273
|
**Related Docs**:
|
|
274
|
-
- [flow
|
|
274
|
+
- [flow/init.md](../../commands/flow/init.md) - 需求初始化流程
|
|
275
275
|
- [validate-research.sh](../../scripts/validate-research.sh) - 验证脚本
|
|
276
276
|
- [flow-init-optimization-plan.md](../../../flow-init-optimization-plan.md) - 优化方案
|
|
@@ -177,9 +177,9 @@ Prompt: "Generate ARCHITECTURE.md with 4 diagrams..."
|
|
|
177
177
|
|
|
178
178
|
下一步建议:
|
|
179
179
|
1. 审查路线图
|
|
180
|
-
2. 开始首个需求: /flow
|
|
180
|
+
2. 开始首个需求: /flow:init "REQ-XXX|{RM-title}"
|
|
181
181
|
3. 定期更新: /core-roadmap --regenerate
|
|
182
|
-
4. 监控进度: /flow
|
|
182
|
+
4. 监控进度: /flow:status --all
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
---
|
|
@@ -234,7 +234,7 @@ _填充规则:_
|
|
|
234
234
|
- Feature: 功能简短标题
|
|
235
235
|
- Derived From: 来源需求 ID (REQ-001) 或其他来源 (Tech Stack, User Feedback)
|
|
236
236
|
- Status: Planned | In Progress | Completed | Blocked | Cancelled
|
|
237
|
-
- Mapped REQ: 关联的正式需求 ID(初始为 "-",运行 /flow
|
|
237
|
+
- Mapped REQ: 关联的正式需求 ID(初始为 "-",运行 /flow:init 后填充)
|
|
238
238
|
- Progress: 完成百分比 (0%, 20%, 80%, 100%)
|
|
239
239
|
|
|
240
240
|
_说明: 此表用于追踪路线图项到正式需求的映射,以及进度同步_
|
|
@@ -295,7 +295,7 @@ _填充规则:_
|
|
|
295
295
|
- **RM-ID**: Roadmap Item ID,路线图意向项标识符(如 RM-001)
|
|
296
296
|
- **REQ-ID**: Requirement ID,正式需求标识符(如 REQ-010)
|
|
297
297
|
- **Derived From**: 来源,标注该意向项从哪个已有需求或来源延伸而来
|
|
298
|
-
- **Mapped REQ**: 映射需求,当意向项通过 /flow
|
|
298
|
+
- **Mapped REQ**: 映射需求,当意向项通过 /flow:init 正式创建为需求后,记录其 REQ-ID
|
|
299
299
|
- **Feature Cluster**: 功能集群,将相关的意向项分组便于理解和管理
|
|
300
300
|
- **Milestone**: 里程碑,一个季度内要完成的一组功能集群
|
|
301
301
|
- **Velocity**: 速度,团队完成需求的平均速率(天数/需求)
|
|
@@ -1225,17 +1225,17 @@ module.exports = {
|
|
|
1225
1225
|
- 如需新增变体,确保与现有变体一致
|
|
1226
1226
|
|
|
1227
1227
|
3. **生成 UI 原型时**:
|
|
1228
|
-
- `/flow
|
|
1228
|
+
- `/flow:spec` 阶段会自动引用本指南
|
|
1229
1229
|
- 确保原型中的所有样式符合本指南
|
|
1230
1230
|
|
|
1231
1231
|
4. **前端开发时**:
|
|
1232
|
-
- `/flow
|
|
1232
|
+
- `/flow:dev` 命令会自动引用本指南
|
|
1233
1233
|
- 所有组件实现必须遵循本指南的样式定义
|
|
1234
1234
|
|
|
1235
1235
|
### 更新本指南
|
|
1236
1236
|
|
|
1237
1237
|
- **何时更新**: 新增组件、调整设计系统、发现不一致
|
|
1238
|
-
- **如何更新**: 使用 `/
|
|
1238
|
+
- **如何更新**: 使用 `/core-style --update` 命令
|
|
1239
1239
|
- **版本控制**: 每次更新增加版本号,记录变更内容
|
|
1240
1240
|
|
|
1241
1241
|
---
|
|
@@ -1254,7 +1254,7 @@ Found keywords: 0 matches for "用户界面|前端|Web页面|UI"
|
|
|
1254
1254
|
Recommendation:
|
|
1255
1255
|
1. This appears to be a backend-only requirement
|
|
1256
1256
|
2. Skipping UI prototype generation
|
|
1257
|
-
3. Continuing
|
|
1257
|
+
3. Continuing within /flow:spec
|
|
1258
1258
|
|
|
1259
1259
|
Action: EXIT with status "ui_skipped"
|
|
1260
1260
|
```
|
|
@@ -1310,17 +1310,17 @@ Recovery:
|
|
|
1310
1310
|
|
|
1311
1311
|
### Workflow Position:
|
|
1312
1312
|
```text
|
|
1313
|
-
/flow
|
|
1313
|
+
/flow:spec → PRD.md 生成完成
|
|
1314
1314
|
↓
|
|
1315
|
-
/flow
|
|
1315
|
+
/flow:spec → 检测UI需求 → 生成UI_PROTOTYPE.html ← YOU ARE HERE
|
|
1316
1316
|
↓
|
|
1317
|
-
/flow
|
|
1317
|
+
/flow:spec → 参考UI原型生成EPIC.md和TASKS.md
|
|
1318
1318
|
↓
|
|
1319
|
-
/flow
|
|
1319
|
+
/flow:dev → 基于UI原型实现代码
|
|
1320
1320
|
```
|
|
1321
1321
|
|
|
1322
1322
|
### Conditional Trigger Logic:
|
|
1323
|
-
在 `/flow
|
|
1323
|
+
在 `/flow:spec` 执行期间自动触发:
|
|
1324
1324
|
|
|
1325
1325
|
```bash
|
|
1326
1326
|
# 检测是否需要UI原型
|
|
@@ -1328,11 +1328,10 @@ has_ui_keywords=$(grep -iE "用户界面|前端|Web页面|UI|界面设计|交互
|
|
|
1328
1328
|
has_frontend_stack=$(ls -d src/components 2>/dev/null || ls package.json 2>/dev/null)
|
|
1329
1329
|
|
|
1330
1330
|
if [[ -n "$has_ui_keywords" || -n "$has_frontend_stack" ]]; then
|
|
1331
|
-
echo "✅ UI requirements detected,
|
|
1332
|
-
/flow-ui "$REQ_ID"
|
|
1331
|
+
echo "✅ UI requirements detected, continue UI prototype generation in /flow:spec"
|
|
1333
1332
|
else
|
|
1334
1333
|
echo "ℹ️ No UI requirements detected, skipping UI prototype"
|
|
1335
|
-
#
|
|
1334
|
+
# 继续 /flow:spec 后续任务规划
|
|
1336
1335
|
fi
|
|
1337
1336
|
```
|
|
1338
1337
|
|