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,260 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-checklist
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Deprecated. Checklist stage merged into /flow:verify gates.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /flow
|
|
6
|
+
# /flow:checklist (Deprecated)
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
/flow-checklist [OPTIONS]
|
|
11
|
-
```
|
|
8
|
+
`/flow:checklist` 已废弃。
|
|
12
9
|
|
|
13
|
-
##
|
|
14
|
-
生成和管理需求质量检查清单 - "Unit Tests for English"。
|
|
15
|
-
对需求文档进行质量测试,确保需求完整性、清晰性、一致性、可测量性和场景覆盖。
|
|
10
|
+
## Migration
|
|
16
11
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|--------|------|---------|-------------|
|
|
20
|
-
| `--type` | string | `general` | Checklist 类型,支持逗号分隔多类型 |
|
|
21
|
-
| `--status` | flag | - | 显示完成度统计 |
|
|
22
|
-
| `--mark` | string | - | 批量标记检查项为完成 (CHK001,CHK002) |
|
|
23
|
-
| `--mark-all` | flag | - | 标记所有检查项为完成 |
|
|
24
|
-
| `--file` | string | - | 指定操作的 Checklist 文件 |
|
|
25
|
-
| `--help` | flag | - | 显示帮助信息 |
|
|
12
|
+
- 使用:`/flow:verify "REQ-123"`
|
|
13
|
+
- 严格模式:`/flow:verify "REQ-123" --strict`
|
|
26
14
|
|
|
27
|
-
##
|
|
28
|
-
- `ux`: UX/UI 需求检查
|
|
29
|
-
- `api`: API 需求检查
|
|
30
|
-
- `security`: 安全需求检查
|
|
31
|
-
- `performance`: 性能需求检查
|
|
32
|
-
- `data`: 数据需求检查
|
|
33
|
-
- `general`: 通用需求检查 (默认)
|
|
15
|
+
## Reason
|
|
34
16
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
2. 验证 `orchestration_status.json.prd_complete == true`
|
|
38
|
-
3. 创建 `checklists/` 目录 (如不存在)
|
|
39
|
-
|
|
40
|
-
## Execution Flow
|
|
41
|
-
|
|
42
|
-
### Generate Checklist (--type)
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
1. Parse --type parameter
|
|
46
|
-
→ Split by comma if multiple types
|
|
47
|
-
→ Validate each type against valid_types
|
|
48
|
-
|
|
49
|
-
2. For each type:
|
|
50
|
-
a. Read PRD.md content
|
|
51
|
-
b. Invoke checklist-agent.md with:
|
|
52
|
-
- prd_content: PRD.md 内容
|
|
53
|
-
- type: Checklist 类型
|
|
54
|
-
- config: quality-rules.yml 配置
|
|
55
|
-
c. Agent generates checklist items (15-30 items)
|
|
56
|
-
d. Write to checklists/{type}.md
|
|
57
|
-
e. If file exists: Append mode (继续编号)
|
|
58
|
-
|
|
59
|
-
3. Output summary:
|
|
60
|
-
→ Items generated per type
|
|
61
|
-
→ Dimension coverage (5/5)
|
|
62
|
-
→ Traceability percentage
|
|
63
|
-
|
|
64
|
-
4. Update orchestration_status.json:
|
|
65
|
-
→ checklist.generated_types[]
|
|
66
|
-
→ checklist.total_items
|
|
67
|
-
→ checklist.generated_at
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Check Status (--status)
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
1. Run calculate-checklist-completion.sh --json
|
|
74
|
-
→ Scan checklists/*.md
|
|
75
|
-
→ Count [x] and [ ] items
|
|
76
|
-
|
|
77
|
-
2. Display completion table:
|
|
78
|
-
| Checklist | Complete | Total | Percentage |
|
|
79
|
-
|-----------|----------|-------|------------|
|
|
80
|
-
| ux.md | 16 | 20 | 80% |
|
|
81
|
-
| OVERALL | 46 | 57 | 81% |
|
|
82
|
-
|
|
83
|
-
3. Compare to threshold (from quality-rules.yml)
|
|
84
|
-
→ PASS: completion >= threshold
|
|
85
|
-
→ FAIL: completion < threshold
|
|
86
|
-
|
|
87
|
-
4. Update orchestration_status.json:
|
|
88
|
-
→ checklist.checked_items
|
|
89
|
-
→ checklist.completion_percentage
|
|
90
|
-
→ checklist.last_check_at
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Mark Items (--mark)
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
1. Parse --mark parameter
|
|
97
|
-
→ Split by comma
|
|
98
|
-
→ Validate each ID format (CHK + 3 digits)
|
|
99
|
-
|
|
100
|
-
2. For each ID:
|
|
101
|
-
a. Search checklists/*.md for CHK{NNN}
|
|
102
|
-
b. If found: Replace "- [ ]" with "- [x]"
|
|
103
|
-
c. If not found: Output warning
|
|
104
|
-
|
|
105
|
-
3. Output:
|
|
106
|
-
→ "Updated completion: N items marked"
|
|
107
|
-
→ "Run /flow-checklist --status to see updated completion"
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Mark All (--mark-all --file)
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
1. Validate --file parameter exists
|
|
114
|
-
2. Read specified file
|
|
115
|
-
3. Replace all "- [ ]" with "- [x]"
|
|
116
|
-
4. Output item count
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Exit Gate
|
|
120
|
-
1. 如果生成了新 Checklist:
|
|
121
|
-
- 更新 `orchestration_status.json.checklist`
|
|
122
|
-
- 追加事件到 `EXECUTION_LOG.md`
|
|
123
|
-
2. 输出下一步提示
|
|
124
|
-
|
|
125
|
-
## Output Examples
|
|
126
|
-
|
|
127
|
-
### Generate Single Type
|
|
128
|
-
```
|
|
129
|
-
Generating UX Checklist...
|
|
130
|
-
Reading PRD.md...
|
|
131
|
-
Analyzing UX requirements...
|
|
132
|
-
Applying Anti-Example rules...
|
|
133
|
-
|
|
134
|
-
✅ Generated: checklists/ux.md
|
|
135
|
-
Items: 18
|
|
136
|
-
Dimensions: 5/5 (Completeness, Clarity, Consistency, Measurability, Coverage)
|
|
137
|
-
Traceability: 85% (>=80% required)
|
|
138
|
-
|
|
139
|
-
Next: Review and check items, then run /flow-checklist --status
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Generate Multiple Types
|
|
143
|
-
```
|
|
144
|
-
Generating multiple Checklists...
|
|
145
|
-
|
|
146
|
-
[1/3] UX Checklist...
|
|
147
|
-
✅ Generated: checklists/ux.md (18 items)
|
|
148
|
-
|
|
149
|
-
[2/3] API Checklist...
|
|
150
|
-
✅ Generated: checklists/api.md (22 items)
|
|
151
|
-
|
|
152
|
-
[3/3] Security Checklist...
|
|
153
|
-
✅ Generated: checklists/security.md (15 items)
|
|
154
|
-
|
|
155
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
156
|
-
Summary:
|
|
157
|
-
| Type | Items Generated | Coverage |
|
|
158
|
-
|----------|-----------------|----------|
|
|
159
|
-
| ux | 18 | 5/5 |
|
|
160
|
-
| api | 22 | 5/5 |
|
|
161
|
-
| security | 15 | 4/5 |
|
|
162
|
-
| TOTAL | 55 | - |
|
|
163
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
164
|
-
|
|
165
|
-
Next: Review and check items, then run /flow-checklist --status
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Check Status
|
|
169
|
-
```
|
|
170
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
171
|
-
Checklist Completion Status
|
|
172
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
173
|
-
| Checklist | Complete | Total | Percentage |
|
|
174
|
-
|-----------|----------|-------|------------|
|
|
175
|
-
| ux.md | 16 | 20 | 80% |
|
|
176
|
-
| api.md | 18 | 22 | 82% |
|
|
177
|
-
| security | 12 | 15 | 80% |
|
|
178
|
-
|-----------|----------|-------|------------|
|
|
179
|
-
| OVERALL | 46 | 57 | 81% |
|
|
180
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
181
|
-
|
|
182
|
-
Gate Threshold: 80%
|
|
183
|
-
Status: ✅ PASS (81% >= 80%)
|
|
184
|
-
|
|
185
|
-
Ready for: /flow-epic
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
## Error Handling
|
|
189
|
-
|
|
190
|
-
### MISSING_PRD
|
|
191
|
-
```
|
|
192
|
-
ERROR: MISSING_PRD
|
|
193
|
-
PRD.md not found in requirement directory.
|
|
194
|
-
|
|
195
|
-
Run /flow-prd first.
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### INVALID_TYPE
|
|
199
|
-
```
|
|
200
|
-
ERROR: INVALID_TYPE
|
|
201
|
-
Invalid checklist type: {type}
|
|
202
|
-
|
|
203
|
-
Valid types: ux, api, security, performance, data, general
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### NO_CHECKLISTS
|
|
207
|
-
```
|
|
208
|
-
ERROR: NO_CHECKLISTS
|
|
209
|
-
No checklists found in checklists/ directory.
|
|
210
|
-
|
|
211
|
-
Run /flow-checklist --type <type> first.
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
## Append Mode (T011)
|
|
215
|
-
|
|
216
|
-
When running `--type {type}` and `checklists/{type}.md` already exists:
|
|
217
|
-
|
|
218
|
-
1. Read existing file
|
|
219
|
-
2. Find highest CHK number (e.g., CHK018)
|
|
220
|
-
3. Generate new items starting from next number (CHK019)
|
|
221
|
-
4. Append new items to existing file
|
|
222
|
-
5. Preserve existing structure and checked items
|
|
223
|
-
|
|
224
|
-
## EXECUTION_LOG Events (T012)
|
|
225
|
-
|
|
226
|
-
### Checklist Generated
|
|
227
|
-
```markdown
|
|
228
|
-
### 2025-12-15 23:55:00 (周日)
|
|
229
|
-
**Event**: Checklist Generated
|
|
230
|
-
**Type**: ux
|
|
231
|
-
**Items**: 18
|
|
232
|
-
**Dimensions**: 5/5
|
|
233
|
-
**Traceability**: 85%
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### Status Checked
|
|
237
|
-
```markdown
|
|
238
|
-
### 2025-12-15 23:58:00 (周日)
|
|
239
|
-
**Event**: Checklist Status Checked
|
|
240
|
-
**Completion**: 81%
|
|
241
|
-
**Threshold**: 80%
|
|
242
|
-
**Status**: PASS
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
## Related Commands
|
|
246
|
-
|
|
247
|
-
| Command | Relationship |
|
|
248
|
-
|---------|--------------|
|
|
249
|
-
| `/flow-prd` | Prerequisite (generates PRD.md) |
|
|
250
|
-
| `/flow-epic` | Consumer (uses checklist gate) |
|
|
251
|
-
| `/flow-status` | Reader (displays checklist status) |
|
|
252
|
-
|
|
253
|
-
## Configuration
|
|
254
|
-
|
|
255
|
-
Config file: `config/quality-rules.yml`
|
|
256
|
-
|
|
257
|
-
Key settings:
|
|
258
|
-
- `gate.threshold`: Minimum completion % (default: 80)
|
|
259
|
-
- `types.{type}.min_items`: Minimum items per type (default: 15)
|
|
260
|
-
- `types.{type}.max_items`: Maximum items per type (default: 30)
|
|
17
|
+
- Checklist 功能已并入 report-card 门禁模型。
|
|
18
|
+
- 统一 gate 输出为 `devflow/requirements/<REQ_ID>/report-card.json`。
|
|
@@ -1,136 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-clarify
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Deprecated. Clarification step removed from default workflow. Use /flow:spec directly.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /flow
|
|
6
|
+
# /flow:clarify (Deprecated)
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
/flow-clarify [REQ-XXX] [--skip] [--history]
|
|
11
|
-
```
|
|
8
|
+
`/flow:clarify` 已从默认主链移除。
|
|
12
9
|
|
|
13
|
-
##
|
|
14
|
-
在 PRD 生成前通过 11 维度歧义扫描系统化消除需求模糊性。
|
|
10
|
+
## Migration
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
- `
|
|
18
|
-
- `--skip`: 跳过澄清,直接进入下一阶段
|
|
19
|
-
- `--history`: 查看历史澄清记录
|
|
12
|
+
- 直接执行:`/flow:spec "REQ-123"`
|
|
13
|
+
- 如需补充澄清,请将澄清结果写入:`devflow/requirements/<REQ_ID>/context-package.md`
|
|
20
14
|
|
|
21
|
-
##
|
|
22
|
-
1. 验证 `research/research.md` 存在
|
|
23
|
-
2. 验证 `orchestration_status.json.phase0_complete == true`
|
|
24
|
-
3. 检查 `.session.json` 是否有未完成会话(断点恢复)
|
|
15
|
+
## Reason
|
|
25
16
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### Phase 1: Scan (自动执行)
|
|
29
|
-
```bash
|
|
30
|
-
# 调用 run-clarify-scan.sh 执行 11 维度并行扫描
|
|
31
|
-
.claude/scripts/run-clarify-scan.sh REQ-XXX --parallel
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
输出: scan_result.json (内存)
|
|
35
|
-
|
|
36
|
-
### Phase 2: Question Generation (自动执行)
|
|
37
|
-
```bash
|
|
38
|
-
# 基于扫描结果生成 ≤5 个优先级排序问题
|
|
39
|
-
.claude/scripts/generate-clarification-questions.sh --input scan_result.json --max 5
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
输出: questions[] with AI recommendations
|
|
43
|
-
|
|
44
|
-
### Phase 3: Interactive Q&A (用户交互)
|
|
45
|
-
For each question:
|
|
46
|
-
1. Display question + options + AI recommendation (⭐ RECOMMENDED)
|
|
47
|
-
2. Read user input
|
|
48
|
-
3. Validate answer (A-E or ≤5 words)
|
|
49
|
-
4. Generate rationale (Claude Haiku)
|
|
50
|
-
5. Save to .session.json (incremental)
|
|
51
|
-
|
|
52
|
-
### Phase 4: Report Generation (自动执行)
|
|
53
|
-
```bash
|
|
54
|
-
# 生成澄清报告
|
|
55
|
-
.claude/scripts/generate-clarification-report.sh --session .session.json
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
输出: research/clarifications/[timestamp]-flow-clarify.md
|
|
59
|
-
|
|
60
|
-
## Exit Gate
|
|
61
|
-
1. 验证报告完整性
|
|
62
|
-
2. 更新 `orchestration_status.json`:
|
|
63
|
-
- `clarify_complete = true`
|
|
64
|
-
- `clarify_session_id = [sessionId]`
|
|
65
|
-
3. 删除 `.session.json`
|
|
66
|
-
4. 输出: "✅ Ready for /flow-prd"
|
|
67
|
-
|
|
68
|
-
## Session Recovery
|
|
69
|
-
如果检测到 `.session.json`:
|
|
70
|
-
1. 显示恢复提示
|
|
71
|
-
2. 从 `currentQuestionIndex` 继续
|
|
72
|
-
3. 不重复已回答的问题
|
|
73
|
-
|
|
74
|
-
## User Abort (Ctrl+C)
|
|
75
|
-
1. 捕获 SIGINT
|
|
76
|
-
2. 保存当前进度到 `.session.json`
|
|
77
|
-
3. 输出恢复命令: `/flow-clarify REQ-XXX`
|
|
78
|
-
|
|
79
|
-
## Output Format
|
|
80
|
-
|
|
81
|
-
### Question Display
|
|
82
|
-
```
|
|
83
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
84
|
-
📝 Q1: 关于 Functional Scope
|
|
85
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
86
|
-
用户权限应如何划分?
|
|
87
|
-
|
|
88
|
-
A) RBAC 角色模型 - 基于角色的访问控制
|
|
89
|
-
B) ABAC 属性模型 - 基于属性的访问控制
|
|
90
|
-
C) 简单二元权限 - admin/user 两级
|
|
91
|
-
|
|
92
|
-
⭐ RECOMMENDED: A (RBAC 是企业级应用最常见模式)
|
|
93
|
-
|
|
94
|
-
Your choice (A-C, or press Enter for recommended):
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Report Structure
|
|
98
|
-
```markdown
|
|
99
|
-
# Clarification Report: REQ-XXX
|
|
100
|
-
|
|
101
|
-
## Metadata
|
|
102
|
-
- Session ID: 20251215-143000-REQ-001
|
|
103
|
-
- Date: 2025-12-15
|
|
104
|
-
- Questions: 3 / 5
|
|
105
|
-
|
|
106
|
-
## Scan Summary
|
|
107
|
-
| Dimension | Status | Issues |
|
|
108
|
-
|-----------|--------|--------|
|
|
109
|
-
| Functional Scope | ambiguous | 2 |
|
|
110
|
-
| ...
|
|
111
|
-
|
|
112
|
-
## Clarification Session
|
|
113
|
-
### Q1: Functional Scope
|
|
114
|
-
**Question**: 用户权限应如何划分?
|
|
115
|
-
**Answer**: A (RBAC 角色模型)
|
|
116
|
-
**Rationale**: RBAC 提供灵活的权限管理...
|
|
117
|
-
|
|
118
|
-
## Next Command
|
|
119
|
-
✅ Run `/flow-prd` to generate PRD
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Error Handling
|
|
123
|
-
- `MISSING_RESEARCH`: research.md 不存在 → 提示先运行 `/flow-init`
|
|
124
|
-
- `INVALID_PHASE`: phase0_complete != true → 提示完成研究阶段
|
|
125
|
-
- `API_ERROR`: Claude API 错误 → 降级到规则引擎
|
|
126
|
-
- `SESSION_CORRUPT`: .session.json 损坏 → 提示删除重试
|
|
127
|
-
|
|
128
|
-
## Related Commands
|
|
129
|
-
- **前置**: `/flow-init` (生成 research.md)
|
|
130
|
-
- **后续**: `/flow-prd` (生成 PRD)
|
|
131
|
-
- **可选**: `/flow-clarify --history` (查看历史)
|
|
132
|
-
|
|
133
|
-
## Constitution Compliance
|
|
134
|
-
- **Article I**: 完整实现,无 TODO
|
|
135
|
-
- **Article III**: API Key 使用环境变量
|
|
136
|
-
- **Article VI**: TDD 顺序正确
|
|
17
|
+
- 独立澄清阶段导致链路变长且可恢复点分散。
|
|
18
|
+
- 主链改为 `init -> spec -> dev -> verify -> release`。
|
|
@@ -102,7 +102,7 @@ Overall: 12/13 paths valid (92%)
|
|
|
102
102
|
|
|
103
103
|
### With flow-init
|
|
104
104
|
|
|
105
|
-
When `/flow
|
|
105
|
+
When `/flow:init` creates a new requirement, it automatically runs:
|
|
106
106
|
```bash
|
|
107
107
|
/flow-context init {REQ-ID} --type {detected-type}
|
|
108
108
|
```
|