cc-devflow 2.5.0 → 4.1.1
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 +1065 -53
- package/.claude/agents/dev-implementer.md +195 -0
- package/.claude/commands/{flow-archive.md → flow/archive.md} +46 -11
- package/.claude/commands/flow/context.md +150 -0
- package/.claude/commands/flow/delta.md +245 -0
- package/.claude/commands/{flow-dev.md → flow/dev.md} +112 -11
- package/.claude/commands/flow/init.md +45 -0
- package/.claude/commands/flow/new.md +279 -0
- package/.claude/commands/flow/quality.md +159 -0
- package/.claude/commands/flow/spec.md +186 -0
- package/.claude/commands/flow/workspace.md +146 -0
- package/.claude/commands/{cancel-ralph.md → util/cancel-ralph.md} +1 -0
- package/.claude/config/quality-gates.yml +305 -0
- package/.claude/docs/guides/TEAM_MODE_GUIDE.md +313 -0
- package/.claude/docs/templates/DELTA_SPEC_TEMPLATE.md +91 -0
- package/.claude/docs/templates/DESIGN_DECISIONS_TEMPLATE.md +151 -0
- package/.claude/docs/templates/JOURNAL_TEMPLATE.md +75 -0
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +51 -91
- package/.claude/docs/templates/_shared/CLAUDE.md +36 -0
- package/.claude/docs/templates/_shared/CONSTITUTION_CHECK.md +125 -0
- package/.claude/docs/templates/_shared/VALIDATION_CHECKLIST.md +187 -0
- package/.claude/docs/templates/_shared/YAML_FRONTMATTER.md +164 -0
- package/.claude/docs/templates/context/dev.jsonl.template +6 -0
- package/.claude/docs/templates/context/epic.jsonl.template +5 -0
- package/.claude/docs/templates/context/prd.jsonl.template +4 -0
- package/.claude/docs/templates/context/research.jsonl.template +4 -0
- package/.claude/docs/templates/context/review.jsonl.template +5 -0
- package/.claude/docs/templates/context/tech.jsonl.template +5 -0
- package/.claude/hooks/CLAUDE.md +342 -0
- package/.claude/hooks/inject-agent-context.ts +480 -0
- package/.claude/hooks/inject-skill-context.ts +359 -0
- package/.claude/hooks/ralph-loop.ts +931 -0
- package/.claude/hooks/task-completed-hook.ts +593 -0
- package/.claude/hooks/teammate-idle-hook.ts +690 -0
- package/.claude/hooks/types/team-types.d.ts +238 -0
- package/.claude/rules/devflow-conventions.md +82 -9
- package/.claude/scripts/archive-requirement.sh +44 -1
- package/.claude/scripts/common.sh +670 -3
- package/.claude/scripts/delta-parser.ts +527 -0
- package/.claude/scripts/detect-file-conflicts.sh +151 -0
- package/.claude/scripts/flow-context-add.sh +134 -0
- package/.claude/scripts/flow-context-init.sh +133 -0
- package/.claude/scripts/flow-context-validate.sh +144 -0
- package/.claude/scripts/flow-delta-apply.sh +297 -0
- package/.claude/scripts/flow-delta-archive.sh +71 -0
- package/.claude/scripts/flow-delta-create.sh +202 -0
- package/.claude/scripts/flow-delta-list.sh +142 -0
- package/.claude/scripts/flow-delta-status.sh +235 -0
- package/.claude/scripts/flow-quality-full.sh +184 -0
- package/.claude/scripts/flow-quality-quick.sh +64 -0
- package/.claude/scripts/flow-workspace-init.sh +117 -0
- package/.claude/scripts/flow-workspace-record.sh +164 -0
- package/.claude/scripts/flow-workspace-start.sh +88 -0
- package/.claude/scripts/get-workflow-status.sh +415 -0
- package/.claude/scripts/parse-task-dependencies.js +334 -0
- package/.claude/scripts/record-quality-error.sh +165 -0
- package/.claude/scripts/run-quality-gates.sh +242 -0
- package/.claude/scripts/team-dev-init.sh +319 -0
- package/.claude/scripts/team-state-recovery.sh +229 -0
- package/.claude/scripts/workflow-status.ts +433 -0
- package/.claude/settings.json +19 -0
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +85 -200
- package/.claude/skills/domain/using-git-worktrees/SKILL.md +252 -0
- package/.claude/skills/domain/using-git-worktrees/assets/SHELL_ALIASES.md +133 -0
- package/.claude/skills/domain/using-git-worktrees/context.jsonl +4 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-cleanup.sh +218 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-create.sh +232 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-list.sh +130 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-status.sh +140 -0
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-switch.sh +70 -0
- package/.claude/skills/utility/skill-creator/LICENSE.txt +202 -0
- package/.claude/skills/utility/skill-creator/SKILL.md +356 -0
- package/.claude/skills/utility/skill-creator/references/output-patterns.md +82 -0
- package/.claude/skills/utility/skill-creator/references/workflows.md +28 -0
- package/.claude/skills/utility/skill-creator/scripts/init_skill.py +303 -0
- package/.claude/skills/utility/skill-creator/scripts/package_skill.py +110 -0
- package/.claude/skills/utility/skill-creator/scripts/quick_validate.py +95 -0
- package/.claude/skills/workflow/flow-dev/CLAUDE.md +78 -0
- package/.claude/skills/workflow/flow-dev/SKILL.md +96 -0
- package/.claude/skills/workflow/flow-dev/assets/IMPLEMENTATION_PLAN_TEMPLATE.md +71 -0
- package/.claude/skills/workflow/flow-dev/context.jsonl +8 -0
- package/.claude/skills/workflow/flow-dev/dev-implementer.jsonl +8 -0
- package/.claude/skills/workflow/flow-dev/scripts/entry-gate.sh +116 -0
- package/.claude/skills/workflow/flow-dev/scripts/exit-gate.sh +101 -0
- package/.claude/skills/workflow/flow-dev/scripts/task-orchestrator.sh +106 -0
- package/.claude/skills/workflow/flow-fix/SKILL.md +105 -0
- package/.claude/skills/workflow/flow-fix/context.jsonl +6 -0
- package/.claude/skills/workflow/flow-fix/references/bug-analyzer.md +381 -0
- package/.claude/skills/workflow/flow-init/SKILL.md +211 -0
- package/.claude/skills/workflow/flow-init/assets/BRAINSTORM_TEMPLATE.md +148 -0
- package/.claude/skills/workflow/flow-init/assets/INIT_FLOW_TEMPLATE.md +198 -0
- package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +276 -0
- package/.claude/skills/workflow/flow-init/context.jsonl +5 -0
- package/.claude/skills/workflow/flow-init/references/flow-researcher.md +132 -0
- package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +240 -0
- package/.claude/skills/workflow/flow-init/scripts/consolidate-research.sh +182 -0
- package/.claude/skills/workflow/flow-init/scripts/create-requirement.sh +523 -0
- package/.claude/skills/workflow/flow-init/scripts/generate-research-tasks.sh +157 -0
- package/.claude/skills/workflow/flow-init/scripts/populate-research-tasks.sh +284 -0
- package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +340 -0
- package/.claude/skills/workflow/flow-quality/SKILL.md +94 -0
- package/.claude/skills/workflow/flow-quality/context.jsonl +6 -0
- package/.claude/skills/workflow/flow-quality/references/code-quality-reviewer.md +205 -0
- package/.claude/skills/workflow/flow-quality/references/qa-tester.md +313 -0
- package/.claude/skills/workflow/flow-quality/references/security-reviewer.md +314 -0
- package/.claude/skills/workflow/flow-quality/references/spec-reviewer.md +221 -0
- package/.claude/skills/workflow/flow-release/SKILL.md +126 -0
- package/.claude/skills/workflow/flow-release/context.jsonl +7 -0
- package/.claude/skills/workflow/flow-release/references/release-manager.md +295 -0
- package/.claude/skills/workflow/flow-spec/CLAUDE.md +103 -0
- package/.claude/skills/workflow/flow-spec/SKILL.md +545 -0
- package/.claude/skills/workflow/flow-spec/context.jsonl +7 -0
- package/.claude/skills/workflow/flow-spec/scripts/entry-gate.sh +194 -0
- package/.claude/skills/workflow/flow-spec/scripts/exit-gate.sh +244 -0
- package/.claude/skills/workflow/flow-spec/scripts/parallel-orchestrator.sh +205 -0
- package/.claude/skills/workflow/flow-spec/scripts/team-communication.sh +353 -0
- package/.claude/skills/workflow/flow-spec/scripts/team-init.sh +195 -0
- package/.claude/skills/workflow/flow-spec/scripts/test-team-mode.sh +496 -0
- package/.claude/skills/workflow/flow-spec/team-config.json +165 -0
- package/.claude/skills/workflow.yaml +417 -0
- package/CHANGELOG.md +268 -0
- package/README.md +206 -50
- package/README.zh-CN.md +219 -57
- package/lib/compiler/CLAUDE.md +77 -46
- package/lib/compiler/__tests__/multi-module-emitters.test.js +508 -0
- package/lib/compiler/context-expander.js +179 -0
- package/lib/compiler/emitters/antigravity-emitter.js +195 -5
- package/lib/compiler/emitters/base-emitter.js +217 -2
- package/lib/compiler/emitters/codex-emitter.js +200 -4
- package/lib/compiler/emitters/cursor-emitter.js +307 -3
- package/lib/compiler/emitters/qwen-emitter.js +196 -4
- package/lib/compiler/index.js +197 -2
- package/lib/compiler/platforms.js +270 -21
- package/package.json +2 -2
- package/.claude/commands/flow-epic.md +0 -183
- package/.claude/commands/flow-init.md +0 -370
- package/.claude/commands/flow-new.md +0 -442
- package/.claude/commands/flow-prd.md +0 -144
- package/.claude/commands/flow-qa.md +0 -93
- package/.claude/commands/flow-review.md +0 -257
- package/.claude/commands/flow-tech.md +0 -142
- package/.claude/commands/flow-ui.md +0 -189
- package/.claude/skills/file-header-guardian/SKILL.md +0 -56
- package/.claude/skills/skill-developer/ADVANCED.md +0 -197
- package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +0 -306
- package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +0 -152
- package/.claude/skills/skill-developer/SKILL.md +0 -426
- package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +0 -315
- package/.claude/skills/skill-developer/TRIGGER_TYPES.md +0 -305
- package/.claude/skills/skill-developer/TROUBLESHOOTING.md +0 -514
- package/.claude/skills/writing-skills/SKILL.md +0 -655
- package/.claude/skills/writing-skills/anthropic-best-practices.md +0 -1150
- package/.claude/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
- package/.claude/skills/writing-skills/graphviz-conventions.dot +0 -172
- package/.claude/skills/writing-skills/persuasion-principles.md +0 -187
- package/.claude/skills/writing-skills/render-graphs.js +0 -168
- package/.claude/skills/writing-skills/testing-skills-with-subagents.md +0 -384
- package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/affected-repos.txt +0 -1
- package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/affected-repos.txt +0 -1
- /package/.claude/commands/{core-architecture.md → core/architecture.md} +0 -0
- /package/.claude/commands/{core-guidelines.md → core/guidelines.md} +0 -0
- /package/.claude/commands/{core-roadmap.md → core/roadmap.md} +0 -0
- /package/.claude/commands/{core-style.md → core/style.md} +0 -0
- /package/.claude/commands/{flow-checklist.md → flow/checklist.md} +0 -0
- /package/.claude/commands/{flow-clarify.md → flow/clarify.md} +0 -0
- /package/.claude/commands/{flow-constitution.md → flow/constitution.md} +0 -0
- /package/.claude/commands/{flow-fix.md → flow/fix.md} +0 -0
- /package/.claude/commands/{flow-ideate.md → flow/ideate.md} +0 -0
- /package/.claude/commands/{flow-release.md → flow/release.md} +0 -0
- /package/.claude/commands/{flow-restart.md → flow/restart.md} +0 -0
- /package/.claude/commands/{flow-status.md → flow/status.md} +0 -0
- /package/.claude/commands/{flow-update.md → flow/update.md} +0 -0
- /package/.claude/commands/{flow-upgrade.md → flow/upgrade.md} +0 -0
- /package/.claude/commands/{flow-verify.md → flow/verify.md} +0 -0
- /package/.claude/commands/{code-review-high.md → util/code-review.md} +0 -0
- /package/.claude/commands/{git-commit.md → util/git-commit.md} +0 -0
- /package/.claude/commands/{problem-analyzer.md → util/problem-analyzer.md} +0 -0
- /package/.claude/skills/{flow-attention-refresh → domain/attention-refresh}/SKILL.md +0 -0
- /package/.claude/skills/{flow-brainstorming → domain/brainstorming}/SKILL.md +0 -0
- /package/.claude/skills/{flow-debugging → domain/debugging}/SKILL.md +0 -0
- /package/.claude/skills/{flow-finishing-branch → domain/finishing-branch}/SKILL.md +0 -0
- /package/.claude/skills/{flow-receiving-review → domain/receiving-review}/SKILL.md +0 -0
- /package/.claude/skills/{flow-tdd → domain/tdd}/SKILL.md +0 -0
- /package/.claude/skills/{verification-before-completion → domain/verification}/SKILL.md +0 -0
- /package/.claude/skills/{constitution-guardian → guardrail/constitution-guardian}/SKILL.md +0 -0
- /package/.claude/skills/{devflow-tdd-enforcer → guardrail/tdd-enforcer}/SKILL.md +0 -0
- /package/.claude/skills/{devflow-constitution-quick-ref → utility/constitution-quick-ref}/SKILL.md +0 -0
- /package/.claude/skills/{devflow-file-standards → utility/file-standards}/SKILL.md +0 -0
- /package/.claude/skills/{fractal-docs-generator → utility/fractal-docs}/SKILL.md +0 -0
- /package/.claude/skills/{journey-coherence-checker → utility/journey-checker}/SKILL.md +0 -0
- /package/.claude/skills/{journey-coherence-checker → utility/journey-checker}/pressure-scenarios.md +0 -0
- /package/.claude/skills/{npm-release → utility/npm-release}/SKILL.md +0 -0
|
@@ -1,442 +0,0 @@
|
|
|
1
|
-
---
|
|
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
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<!-- ============================================================
|
|
11
|
-
头文件引用语法规范 (Header File Reference Syntax)
|
|
12
|
-
============================================================
|
|
13
|
-
|
|
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
|
-
使用案例:
|
|
27
|
-
```markdown
|
|
28
|
-
# 正文中遇到:
|
|
29
|
-
→ 详见 {TEMPLATE:orchestration} Stage 4
|
|
30
|
-
# 解释为:
|
|
31
|
-
→ 打开并阅读 .claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md 中的 Stage 4 章节
|
|
32
|
-
|
|
33
|
-
# 正文中遇到:
|
|
34
|
-
→ 常见错误参见 {GUIDE:troubleshoot} Error 3
|
|
35
|
-
# 解释为:
|
|
36
|
-
→ 打开并阅读 .claude/docs/guides/NEW_TROUBLESHOOTING.md 中的 Error 3 章节
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
规则: 遇到 {TYPE:key} 占位符时,去头文件 YAML 中找对应类型的 key,获取文件路径并加载。
|
|
40
|
-
============================================================ -->
|
|
41
|
-
|
|
42
|
-
# Flow-New - 一键需求开发流
|
|
43
|
-
|
|
44
|
-
## User Input
|
|
45
|
-
```text
|
|
46
|
-
$ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**格式**:
|
|
50
|
-
- REQ_ID: 需求编号 (例如: REQ-123)
|
|
51
|
-
- TITLE: 需求标题
|
|
52
|
-
- PLAN_URLS: 计划文档URL,多个用逗号分隔 (可选)
|
|
53
|
-
|
|
54
|
-
**示例**:
|
|
55
|
-
```
|
|
56
|
-
/flow-new "REQ-123|支持用户下单|https://plan.example.com/Q1"
|
|
57
|
-
/flow-new "REQ-124|用户权限管理"
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## 执行前加载
|
|
63
|
-
|
|
64
|
-
**详细编排流程**:
|
|
65
|
-
→ 参见 `{TEMPLATE:orchestration}` 获取完整编排逻辑
|
|
66
|
-
|
|
67
|
-
**故障排查**:
|
|
68
|
-
→ 遇到问题参考 `{GUIDE:troubleshoot}`
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## 架构说明
|
|
73
|
-
|
|
74
|
-
**设计理念**: flow-new 是**编排器**(Orchestrator),串行调用 7-8 个阶段化命令
|
|
75
|
-
|
|
76
|
-
**调用链** (v2.1.0 更新):
|
|
77
|
-
```
|
|
78
|
-
/flow-new "REQ-123|Title|URLs"
|
|
79
|
-
↓
|
|
80
|
-
[1/9] /flow-init "REQ-123|Title|URLs"
|
|
81
|
-
→ 包含 Brainstorming,生成 BRAINSTORM.md ⭐ v2.1.0
|
|
82
|
-
↓
|
|
83
|
-
[2/9] /flow-prd "REQ-123"
|
|
84
|
-
→ 需要 BRAINSTORM.md 对齐检查 ⭐ v2.1.0
|
|
85
|
-
↓
|
|
86
|
-
[2.3/9] /flow-checklist "REQ-123" (可选, 80%门禁)
|
|
87
|
-
↓
|
|
88
|
-
[2.5/9] /flow-ui "REQ-123" (条件触发)
|
|
89
|
-
↓
|
|
90
|
-
[2.7/9] /flow-tech "REQ-123" (必需)
|
|
91
|
-
↓
|
|
92
|
-
[3/9] /flow-epic "REQ-123"
|
|
93
|
-
→ bite-sized tasks (2-5分钟/任务) ⭐ v2.1.0
|
|
94
|
-
↓
|
|
95
|
-
[4/9] /flow-dev "REQ-123"
|
|
96
|
-
→ TDD Checkpoint (测试必须先 FAIL) ⭐ v2.1.0
|
|
97
|
-
↓
|
|
98
|
-
[5/9] /flow-review "REQ-123" ⭐ v2.1.0 新增
|
|
99
|
-
→ Two-Stage Review (Spec → Quality)
|
|
100
|
-
↓
|
|
101
|
-
[6/9] /flow-qa "REQ-123" --full
|
|
102
|
-
↓
|
|
103
|
-
[7/9] /flow-release "REQ-123"
|
|
104
|
-
→ 分支完成决策 ⭐ v2.1.0
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## 执行流程骨架
|
|
110
|
-
|
|
111
|
-
### [1/9] 初始化 → /flow-init
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
调用: /flow-init "${REQ_ID}|${TITLE}|${PLAN_URLS}"
|
|
115
|
-
|
|
116
|
-
检查: orchestration_status.json.status === "initialized"
|
|
117
|
-
|
|
118
|
-
→ 详见 {TEMPLATE:orchestration} Stage 1
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
**输出**:
|
|
122
|
-
- Git分支: `feature/${REQ_ID}-${slug(BRANCH_TITLE_EN)}`
|
|
123
|
-
- 需求目录已创建
|
|
124
|
-
- 研究材料已抓取
|
|
125
|
-
- **BRAINSTORM.md** (需求北极星) ⭐ v2.1.0 新增
|
|
126
|
-
|
|
127
|
-
> BRANCH_TITLE_EN 为 TITLE 的英文意译 (语义为准,非拼音,使用模型意译)
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
### [2/9] PRD生成 → /flow-prd
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
调用: /flow-prd "${REQ_ID}"
|
|
135
|
-
|
|
136
|
-
检查:
|
|
137
|
-
- BRAINSTORM.md 存在 ⭐ v2.1.0 新增
|
|
138
|
-
- PRD.md 存在且完整
|
|
139
|
-
- BRAINSTORM 对齐检查通过 ⭐ v2.1.0 新增
|
|
140
|
-
|
|
141
|
-
→ 详见 {TEMPLATE:orchestration} Stage 2
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**输出**:
|
|
145
|
-
- PRD.md (用户故事 + GWT验收标准)
|
|
146
|
-
- Constitution检查通过
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
### [2.3/9] 需求质量检查 → /flow-checklist (可选)
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
触发条件: quality-rules.yml 中 checklist_gate_enabled: true
|
|
154
|
-
|
|
155
|
-
调用: /flow-checklist "${REQ_ID}"
|
|
156
|
-
|
|
157
|
-
闸门: 完成度 ≥ 80%
|
|
158
|
-
|
|
159
|
-
→ 详见 {TEMPLATE:orchestration} Stage 2.3
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
### [2.5/9] UI原型生成 → /flow-ui (条件触发)
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
触发条件 (任一满足):
|
|
168
|
-
- PRD包含UI关键词 ("页面"/"表单"/"按钮" etc.)
|
|
169
|
-
- 项目包含 package.json 或 src/components/
|
|
170
|
-
- 用户显式请求
|
|
171
|
-
|
|
172
|
-
调用: /flow-ui "${REQ_ID}"
|
|
173
|
-
|
|
174
|
-
→ 详见 {TEMPLATE:orchestration} Stage 2.5 (包含 UI Detection Logic)
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
**输出** (如有UI需求):
|
|
178
|
-
- UI_PROTOTYPE.html (响应式单文件原型)
|
|
179
|
-
- research/ui_design_strategy.md
|
|
180
|
-
|
|
181
|
-
**跳过** (无UI需求):
|
|
182
|
-
- orchestration_status.json.ui_skipped = true
|
|
183
|
-
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
### [2.7/9] 技术方案设计 → /flow-tech (必需)
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
调用: /flow-tech "${REQ_ID}"
|
|
190
|
-
|
|
191
|
-
检查: TECH_DESIGN.md 完整 (所有 Section 1-7)
|
|
192
|
-
|
|
193
|
-
→ 详见 {TEMPLATE:orchestration} Stage 2.7
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
**输出**:
|
|
197
|
-
- TECH_DESIGN.md (完整技术方案)
|
|
198
|
-
- data-model.md (数据模型)
|
|
199
|
-
- contracts/openapi.yaml (API契约)
|
|
200
|
-
- quickstart.md (快速开始)
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
### [3/9] Epic规划 → /flow-epic
|
|
205
|
-
|
|
206
|
-
```
|
|
207
|
-
调用: /flow-epic "${REQ_ID}"
|
|
208
|
-
|
|
209
|
-
检查:
|
|
210
|
-
- EPIC.md + TASKS.md 存在
|
|
211
|
-
- TASKS 覆盖 TECH_DESIGN.md 所有技术层
|
|
212
|
-
- 任务粒度: 2-5分钟/任务 (bite-sized) ⭐ v2.1.0
|
|
213
|
-
|
|
214
|
-
→ 详见 {TEMPLATE:orchestration} Stage 3
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
**输出**:
|
|
218
|
-
- EPIC.md (Epic描述)
|
|
219
|
-
- TASKS.md (单文件管理所有任务,bite-sized)
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
### [4/9] 开发执行 → /flow-dev
|
|
224
|
-
|
|
225
|
-
```
|
|
226
|
-
调用: /flow-dev "${REQ_ID}"
|
|
227
|
-
|
|
228
|
-
执行模式: TDD (Tests First)
|
|
229
|
-
Phase 1: 分析现有代码
|
|
230
|
-
Phase 2: 编写测试 (Tests First)
|
|
231
|
-
⚠️ TDD CHECKPOINT (测试必须先 FAIL) ⭐ v2.1.0
|
|
232
|
-
Phase 3: 实现代码
|
|
233
|
-
Phase 4: 测试验证 (测试必须通过)
|
|
234
|
-
Phase 5: Git提交并标记完成
|
|
235
|
-
|
|
236
|
-
→ 详见 {TEMPLATE:orchestration} Stage 4
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
**输出**:
|
|
240
|
-
- 实现代码
|
|
241
|
-
- 测试代码
|
|
242
|
-
- TASKS.md 更新 (checkbox 标记)
|
|
243
|
-
- Git commits (每个任务一个)
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
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
|
|
271
|
-
|
|
272
|
-
```
|
|
273
|
-
调用: /flow-qa "${REQ_ID}" --full
|
|
274
|
-
|
|
275
|
-
Exit Gate检查:
|
|
276
|
-
- ✅ 所有测试通过
|
|
277
|
-
- ✅ 代码覆盖率 ≥ 80%
|
|
278
|
-
- ✅ 无高危安全问题
|
|
279
|
-
- ✅ TypeScript类型检查通过
|
|
280
|
-
|
|
281
|
-
→ 详见 {TEMPLATE:orchestration} Stage 5
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
**输出**:
|
|
285
|
-
- TEST_PLAN.md
|
|
286
|
-
- TEST_REPORT.md
|
|
287
|
-
- SECURITY_PLAN.md
|
|
288
|
-
- SECURITY_REPORT.md
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
### [7/9] 发布管理 → /flow-release
|
|
293
|
-
|
|
294
|
-
```
|
|
295
|
-
调用: /flow-release "${REQ_ID}"
|
|
296
|
-
|
|
297
|
-
执行:
|
|
298
|
-
- 分支完成决策 (FF merge / PR / Squash / Cleanup) ⭐ v2.1.0
|
|
299
|
-
- 生成发布计划
|
|
300
|
-
- 更新 CLAUDE.md (如有重要架构变更)
|
|
301
|
-
- 最终构建
|
|
302
|
-
- 创建 GitHub Pull Request
|
|
303
|
-
|
|
304
|
-
→ 详见 {TEMPLATE:orchestration} Stage 6
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
**输出**:
|
|
308
|
-
- RELEASE_PLAN.md
|
|
309
|
-
- CLAUDE.md (更新技术架构,如有)
|
|
310
|
-
- GitHub Pull Request
|
|
311
|
-
|
|
312
|
-
---
|
|
313
|
-
|
|
314
|
-
## 进度展示
|
|
315
|
-
|
|
316
|
-
**实时进度** (详见 `{TEMPLATE:orchestration}` Progress Display Format):
|
|
317
|
-
|
|
318
|
-
```
|
|
319
|
-
🎯 CC-DevFlow 完整需求开发流程 (v2.1.0)
|
|
320
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
321
|
-
|
|
322
|
-
需求: REQ-123 | 支持用户下单
|
|
323
|
-
|
|
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] ⏳ 等待发布管理...
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
---
|
|
336
|
-
|
|
337
|
-
## 输出产物
|
|
338
|
-
|
|
339
|
-
**完整目录结构** (详见 `{TEMPLATE:orchestration}` Output Structure):
|
|
340
|
-
|
|
341
|
-
```
|
|
342
|
-
devflow/requirements/${REQ_ID}/
|
|
343
|
-
├── BRAINSTORM.md ⭐ v2.1.0 新增
|
|
344
|
-
├── research/ (初始化时生成)
|
|
345
|
-
├── PRD.md
|
|
346
|
-
├── UI_PROTOTYPE.html (条件)
|
|
347
|
-
├── TECH_DESIGN.md
|
|
348
|
-
├── data-model.md
|
|
349
|
-
├── contracts/openapi.yaml
|
|
350
|
-
├── quickstart.md
|
|
351
|
-
├── EPIC.md
|
|
352
|
-
├── TASKS.md (bite-sized, checkbox 标记)
|
|
353
|
-
├── SPEC_REVIEW.md ⭐ v2.1.0 新增
|
|
354
|
-
├── CODE_QUALITY_REVIEW.md ⭐ v2.1.0 新增
|
|
355
|
-
├── TEST_PLAN.md + TEST_REPORT.md
|
|
356
|
-
├── SECURITY_PLAN.md + SECURITY_REPORT.md
|
|
357
|
-
└── RELEASE_PLAN.md
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
---
|
|
361
|
-
|
|
362
|
-
## 中断与恢复
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
# 查看当前状态
|
|
366
|
-
/flow-status REQ-123
|
|
367
|
-
|
|
368
|
-
# 从中断点恢复
|
|
369
|
-
/flow-restart "REQ-123"
|
|
370
|
-
|
|
371
|
-
# 或手动执行特定阶段
|
|
372
|
-
/flow-tech "REQ-123"
|
|
373
|
-
/flow-epic "REQ-123"
|
|
374
|
-
/flow-dev "REQ-123" --resume
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
---
|
|
378
|
-
|
|
379
|
-
## 错误处理
|
|
380
|
-
|
|
381
|
-
**常见错误**:
|
|
382
|
-
→ 详见 `{GUIDE:troubleshoot}`
|
|
383
|
-
|
|
384
|
-
**主要错误场景**:
|
|
385
|
-
1. Stage command not found → 检查命令文件
|
|
386
|
-
2. Status file corrupted → 重建或修复
|
|
387
|
-
3. 中途中断无法恢复 → 使用 /flow-restart
|
|
388
|
-
4. UI detection false positive → 在PRD明确标注
|
|
389
|
-
5. Epic 未覆盖所有技术层 → 重新生成或手动补充
|
|
390
|
-
6. QA gate failure → 补充测试/修复安全问题
|
|
391
|
-
7. Build failure → 修复类型错误
|
|
392
|
-
8. PR creation failed → 认证 gh CLI 或手动创建
|
|
393
|
-
|
|
394
|
-
**恢复步骤**:
|
|
395
|
-
→ 详见 `{GUIDE:troubleshoot}` Recovery Procedures
|
|
396
|
-
|
|
397
|
-
---
|
|
398
|
-
|
|
399
|
-
## 使用建议
|
|
400
|
-
|
|
401
|
-
### ✅ 适合使用 flow-new
|
|
402
|
-
|
|
403
|
-
- 简单明确的需求
|
|
404
|
-
- 演示和学习工作流程
|
|
405
|
-
- 快速原型开发
|
|
406
|
-
- 熟悉的需求类型
|
|
407
|
-
|
|
408
|
-
### ❌ 建议使用阶段化命令
|
|
409
|
-
|
|
410
|
-
- 复杂需求,需要每个阶段审查
|
|
411
|
-
- 需要在PRD阶段与需求方确认
|
|
412
|
-
- 需要在Epic阶段调整任务分解
|
|
413
|
-
- 开发过程中可能需要暂停调整
|
|
414
|
-
|
|
415
|
-
---
|
|
416
|
-
|
|
417
|
-
## Next Step
|
|
418
|
-
|
|
419
|
-
```
|
|
420
|
-
# 查看PR状态
|
|
421
|
-
cat devflow/requirements/${REQ_ID}/RELEASE_PLAN.md | grep "PR URL"
|
|
422
|
-
|
|
423
|
-
# 审查PR
|
|
424
|
-
gh pr view <PR_NUMBER>
|
|
425
|
-
|
|
426
|
-
# 合并PR
|
|
427
|
-
gh pr merge <PR_NUMBER>
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
---
|
|
431
|
-
|
|
432
|
-
**Related Documentation**:
|
|
433
|
-
- [NEW_ORCHESTRATION_TEMPLATE.md](../.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md) - 详细编排流程
|
|
434
|
-
- [NEW_TROUBLESHOOTING.md](../.claude/docs/guides/NEW_TROUBLESHOOTING.md) - 故障排查指南
|
|
435
|
-
- [flow-init.md](./flow-init.md) - 初始化阶段 (含 Brainstorming)
|
|
436
|
-
- [flow-review.md](./flow-review.md) - 代码审查阶段 ⭐ v2.1.0 新增
|
|
437
|
-
- [flow-dev.md](./flow-dev.md) - 开发阶段 (TDD Checkpoint)
|
|
438
|
-
- [flow-fix.md](./flow-fix.md) - Bug 修复流程 ⭐ v2.1.0 增强
|
|
439
|
-
|
|
440
|
-
---
|
|
441
|
-
|
|
442
|
-
**[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: flow-prd
|
|
3
|
-
description: 'Generate Product Requirements Document. Usage: /flow-prd "REQ-123" or /flow-prd'
|
|
4
|
-
scripts:
|
|
5
|
-
prereq: .claude/scripts/check-prerequisites.sh
|
|
6
|
-
validate_research: .claude/scripts/validate-research.sh
|
|
7
|
-
validate_constitution: .claude/scripts/validate-constitution.sh
|
|
8
|
-
verify_gate: .claude/scripts/verify-gate.sh
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Flow-PRD - PRD 生成命令
|
|
12
|
-
|
|
13
|
-
## User Input
|
|
14
|
-
```text
|
|
15
|
-
$ARGUMENTS = "REQ_ID?"
|
|
16
|
-
```
|
|
17
|
-
若未提供则根据当前分支或 `DEVFLOW_REQ_ID` 自动解析。
|
|
18
|
-
|
|
19
|
-
## 命令格式
|
|
20
|
-
```text
|
|
21
|
-
/flow-prd "REQ_ID"
|
|
22
|
-
/flow-prd # Auto-detect from current branch
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## 执行流程
|
|
26
|
-
|
|
27
|
-
### 阶段 1: Entry Gate
|
|
28
|
-
```
|
|
29
|
-
1. 解析 REQ_ID
|
|
30
|
-
→ If argument provided: use it
|
|
31
|
-
→ Else: run {SCRIPT:prereq} --json --paths-only
|
|
32
|
-
→ If仍为空: ERROR "No requirement ID found."
|
|
33
|
-
|
|
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. 校验目录
|
|
46
|
-
→ 使用 {SCRIPT:prereq} --json 获取路径
|
|
47
|
-
→ 必须存在:
|
|
48
|
-
• devflow/requirements/${REQ_ID}/
|
|
49
|
-
• BRAINSTORM.md
|
|
50
|
-
• EXECUTION_LOG.md
|
|
51
|
-
• orchestration_status.json (phase0_complete == true)
|
|
52
|
-
• research/research.md
|
|
53
|
-
• research/tasks.json
|
|
54
|
-
→ 缺少任何研究产物 → ERROR "Research artifacts missing. Run /flow-init consolidation."
|
|
55
|
-
|
|
56
|
-
**研究材料质量验证** (新增 - 2025-01-26):
|
|
57
|
-
→ Run: {SCRIPT:validate_research} "${REQ_DIR}" --strict
|
|
58
|
-
→ 验证 research.md 质量(5-Level 检查):
|
|
59
|
-
• LEVEL 1: research.md 文件存在
|
|
60
|
-
• LEVEL 2: 必需章节完整 (Research Summary, Decisions)
|
|
61
|
-
• LEVEL 3: 无 TODO/PLACEHOLDER 占位符
|
|
62
|
-
• LEVEL 4: tasks.json 格式有效
|
|
63
|
-
• LEVEL 5: Constitution 合规
|
|
64
|
-
→ 验证失败 → ERROR "research.md quality check failed. Fix issues before /flow-prd."
|
|
65
|
-
|
|
66
|
-
**CRITICAL**: 如果 research.md 包含 "TODO - fill decision outcome",
|
|
67
|
-
说明 /flow-init 的研究任务未完成。prd-writer 无法使用不完整的研究材料。
|
|
68
|
-
|
|
69
|
-
**Fix Options**:
|
|
70
|
-
1. 手动填充 research/tasks.json 的 decision/rationale/alternatives 字段
|
|
71
|
-
2. 重新运行 consolidate-research.sh
|
|
72
|
-
3. 直接编辑 research/research.md 补充决策内容
|
|
73
|
-
4. 参考 .claude/docs/templates/RESEARCH_TEMPLATE.md 模板
|
|
74
|
-
|
|
75
|
-
4. PRD 覆盖提示
|
|
76
|
-
→ 若 PRD.md 已存在 → WARN 并确认是否覆盖
|
|
77
|
-
|
|
78
|
-
5. 状态校验
|
|
79
|
-
→ orchestration_status.status ∈ {"initialized", "prd_generation_failed"}
|
|
80
|
-
→ 否则提示按流程顺序执行
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### 阶段 2: 生成准备
|
|
84
|
-
```
|
|
85
|
-
1. Load PRD 模板 (.claude/docs/templates/PRD_TEMPLATE.md)
|
|
86
|
-
2. 汇总上下文:
|
|
87
|
-
→ research/research.md(Decision/Rationale/Alternatives)
|
|
88
|
-
→ research/internal/codebase-overview.md
|
|
89
|
-
→ research/mcp/*.md(如有)
|
|
90
|
-
3. 更新 orchestration_status:
|
|
91
|
-
→ status = "prd_generation_in_progress"
|
|
92
|
-
→ phase = "planning"
|
|
93
|
-
4. EXECUTION_LOG.md 记录启动条目
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### 阶段 3: 调用 prd-writer Agent
|
|
97
|
-
```
|
|
98
|
-
Prompt 关键要点:
|
|
99
|
-
- 输入: REQ_ID, Title, research 集合, PRD 模板
|
|
100
|
-
- 要求:
|
|
101
|
-
• 按模板 Execution Flow 输出背景、目标、用户故事 (GWT)、NFR、技术约束、成功指标
|
|
102
|
-
• 记录 Constitution Check,确保无硬编码密钥、无部分实现
|
|
103
|
-
• 验证清单必须填写
|
|
104
|
-
- 输出: 完整 PRD.md
|
|
105
|
-
- 日志: log_event "${REQ_ID}" "PRD generation completed"
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### 阶段 4: Exit Gate
|
|
109
|
-
```
|
|
110
|
-
1. 文件存在
|
|
111
|
-
→ PRD.md 必须生成
|
|
112
|
-
|
|
113
|
-
2. 结构检查
|
|
114
|
-
→ 无 {{PLACEHOLDER}}
|
|
115
|
-
→ 包含: 背景/目标、用户故事+GWT、NFR、技术约束、成功指标、Constitution Check、验证清单
|
|
116
|
-
|
|
117
|
-
3. 宪法校验
|
|
118
|
-
→ Run: {SCRIPT:validate_constitution} --type prd --severity warning
|
|
119
|
-
→ 出现 ERROR 级违规时终止
|
|
120
|
-
|
|
121
|
-
4. 状态更新
|
|
122
|
-
→ orchestration_status:
|
|
123
|
-
status = "prd_complete"
|
|
124
|
-
phase = "epic_planning"
|
|
125
|
-
completedSteps append "prd"
|
|
126
|
-
→ EXECUTION_LOG.md 记录完成
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## 输出
|
|
130
|
-
```
|
|
131
|
-
✅ PRD.md (≥100 行、完整模板)
|
|
132
|
-
✅ orchestration_status.json 更新 (prd_complete)
|
|
133
|
-
✅ EXECUTION_LOG.md 记录
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## 错误处理
|
|
137
|
-
- 缺少研究产物 → 返回指令让用户重复 `/flow-init` consolidation。
|
|
138
|
-
- PRD 生成失败 → 将 status 设为 `prd_generation_failed`,方便重试。
|
|
139
|
-
- 宪法检查失败 → 显示违规列表并终止,待修复后重跑。
|
|
140
|
-
|
|
141
|
-
## 下一步
|
|
142
|
-
1. 审阅 PRD.md,确认需求准确。
|
|
143
|
-
2. 运行 `/flow-tech` 生成技术方案及 data-model/contracts/quickstart。
|
|
144
|
-
3. 使用 `/flow-epic` 做 Epic/TASKS 规划。
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: flow-qa
|
|
3
|
-
description: 'Execute quality assurance and security review. Usage: /flow-qa "REQ-123" or /flow-qa'
|
|
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
|
-
---
|
|
9
|
-
|
|
10
|
-
# Flow-QA - 质量保证命令
|
|
11
|
-
|
|
12
|
-
## User Input
|
|
13
|
-
```text
|
|
14
|
-
$ARGUMENTS = "REQ_ID?"
|
|
15
|
-
```
|
|
16
|
-
未提供则根据当前分支或 `DEVFLOW_REQ_ID` 自动解析。
|
|
17
|
-
|
|
18
|
-
## 执行流程
|
|
19
|
-
|
|
20
|
-
### 阶段 1: Entry Gate
|
|
21
|
-
```
|
|
22
|
-
1. 解析 REQ_ID
|
|
23
|
-
2. {SCRIPT:prereq} --json 验证:
|
|
24
|
-
→ 存在 PRD.md、TECH_DESIGN.md、data-model.md、contracts/、quickstart.md、EPIC.md、TASKS.md
|
|
25
|
-
→ orchestration_status.status ∈ {"development_complete", "qa_failed"}
|
|
26
|
-
→ phase1_complete == true
|
|
27
|
-
3. {SCRIPT:check_tasks} --json 确认 remaining == 0
|
|
28
|
-
4. quickstart.md 中的测试命令必须全部通过(先 dry-run)
|
|
29
|
-
5. TEST_REPORT.md / SECURITY_REPORT.md 已存在时提示是否覆盖
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### 阶段 2: QA 准备
|
|
33
|
-
```
|
|
34
|
-
1. 执行 quickstart 中的覆盖率命令(如有)
|
|
35
|
-
2. 收集上下文:
|
|
36
|
-
→ PRD 用户故事、验收标准
|
|
37
|
-
→ TECH_DESIGN 决策(安全、性能)
|
|
38
|
-
→ data-model / contracts
|
|
39
|
-
→ TASKS DoD、提交记录
|
|
40
|
-
3. 更新 orchestration_status:
|
|
41
|
-
→ status = "qa_in_progress"
|
|
42
|
-
→ phase = "quality_assurance"
|
|
43
|
-
4. EXECUTION_LOG.md 记录 QA 启动(含测试覆盖率)
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### 阶段 3: Agents
|
|
47
|
-
```
|
|
48
|
-
1. qa-tester
|
|
49
|
-
→ 输入: PRD, TECH_DESIGN, TASKS, test results, coverage
|
|
50
|
-
→ 产出: TEST_PLAN.md (如缺失) / TEST_REPORT.md
|
|
51
|
-
→ 覆盖内容: 覆盖率、TDD 合规、AC 覆盖、DoD 复核、缺失测试建议
|
|
52
|
-
|
|
53
|
-
2. security-reviewer
|
|
54
|
-
→ 输入: TECH_DESIGN 安全节、contracts、实现 diff、ENV/secret 配置
|
|
55
|
-
→ 产出: SECURITY_PLAN.md (如缺失) / SECURITY_REPORT.md
|
|
56
|
-
→ 检查: 认证/授权、输入验证、敏感信息、依赖风险、基础设施配置
|
|
57
|
-
|
|
58
|
-
3. 可选: performance-reviewer(若 TECH_DESIGN 有性能方案)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### 阶段 4: Exit Gate
|
|
62
|
-
```
|
|
63
|
-
1. 验证报告存在:
|
|
64
|
-
→ TEST_REPORT.md、SECURITY_REPORT.md
|
|
65
|
-
2. 质量结论:
|
|
66
|
-
→ 所有 gate (Coverage、TDD、Security) 均为 PASS;否则状态设为 qa_failed
|
|
67
|
-
3. 宪法检查:
|
|
68
|
-
→ {SCRIPT:validate_constitution} --type qa --severity warning
|
|
69
|
-
4. 状态更新:
|
|
70
|
-
→ orchestration_status.status = "qa_complete"
|
|
71
|
-
→ completedSteps append "qa"
|
|
72
|
-
→ lastQaAt = timestamp
|
|
73
|
-
5. EXECUTION_LOG 记录完成
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## 输出
|
|
77
|
-
```
|
|
78
|
-
✅ TEST_REPORT.md
|
|
79
|
-
✅ SECURITY_REPORT.md
|
|
80
|
-
✅ (可选)PERFORMANCE_REPORT.md
|
|
81
|
-
✅ orchestration_status.json 更新 (qa_complete)
|
|
82
|
-
✅ EXECUTION_LOG.md QA 记录
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## 错误处理
|
|
86
|
-
- quickstart 测试失败 → 返回错误并保持 qa_failed。
|
|
87
|
-
- 报告中存在 BLOCKER → 阶段终止,需返回 `/flow-dev` 修复。
|
|
88
|
-
- Constitution 违规 → 将问题标记为阻断项。
|
|
89
|
-
|
|
90
|
-
## 下一步
|
|
91
|
-
1. 处理 QA 报告中的问题(若有)。
|
|
92
|
-
2. 确认验证通过后运行 `/flow-release`。
|
|
93
|
-
3. 将报告随 PR 一并提交,供代码审阅与发布审批使用。
|