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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-dev
|
|
3
|
-
description: 'Execute development tasks following TDD order. Usage: /flow-dev "REQ-123" [--manual] [--max-iterations N]'
|
|
3
|
+
description: 'Execute development tasks following TDD order. Usage: /flow-dev "REQ-123" [--manual] [--max-iterations N] [--team] [--agents N]'
|
|
4
4
|
scripts:
|
|
5
5
|
prereq: .claude/scripts/check-prerequisites.sh
|
|
6
6
|
check_tasks: .claude/scripts/check-task-status.sh
|
|
@@ -8,6 +8,9 @@ scripts:
|
|
|
8
8
|
validate_constitution: .claude/scripts/validate-constitution.sh
|
|
9
9
|
verify_gate: .claude/scripts/verify-gate.sh
|
|
10
10
|
setup_loop: .claude/scripts/setup-ralph-loop.sh
|
|
11
|
+
team_init: .claude/scripts/team-dev-init.sh
|
|
12
|
+
parse_tasks: .claude/scripts/parse-task-dependencies.js
|
|
13
|
+
detect_conflicts: .claude/scripts/detect-file-conflicts.sh
|
|
11
14
|
skills:
|
|
12
15
|
tdd: .claude/skills/flow-tdd/SKILL.md
|
|
13
16
|
verification: .claude/skills/verification-before-completion/SKILL.md
|
|
@@ -55,25 +58,28 @@ NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
|
|
|
55
58
|
|
|
56
59
|
## User Input
|
|
57
60
|
```text
|
|
58
|
-
$ARGUMENTS = "REQ_ID? [--task T###] [--manual] [--max-iterations N]"
|
|
61
|
+
$ARGUMENTS = "REQ_ID? [--task T###] [--manual] [--max-iterations N] [--team] [--agents N]"
|
|
59
62
|
```
|
|
60
63
|
|
|
61
64
|
- **REQ_ID**: 未提供时从当前分支或 `DEVFLOW_REQ_ID` 推断
|
|
62
65
|
- **--task T###**: 指定起始任务(从该任务开始执行)
|
|
63
66
|
- **--manual**: Manual模式,遇错停止等待人工修复(向后兼容)
|
|
64
67
|
- **--max-iterations N**: Autonomous模式最大迭代次数(默认10)
|
|
68
|
+
- **--team**: Team模式,启用多 Agent 并行执行 [NEW: v4.7]
|
|
69
|
+
- **--agents N**: Team模式下的 Agent 数量(默认3,范围2-5)[NEW: v4.7]
|
|
65
70
|
|
|
66
71
|
**默认行为**: Autonomous模式(自动重试直到完成)
|
|
67
72
|
|
|
68
73
|
### 运行模式对比
|
|
69
74
|
|
|
70
|
-
| | Manual模式 | Autonomous模式(默认) |
|
|
71
|
-
|
|
72
|
-
| 触发方式 | `--manual` |
|
|
73
|
-
| 遇到错误 | 停止,等待人工修复 |
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
75
|
+
| | Manual模式 | Autonomous模式(默认) | Team模式 [NEW] |
|
|
76
|
+
|--|------------|----------------------|----------------|
|
|
77
|
+
| 触发方式 | `--manual` | 默认 | `--team` |
|
|
78
|
+
| 遇到错误 | 停止,等待人工修复 | 自动重试 | 分布式重试 |
|
|
79
|
+
| 并行执行 | 否 | 否 | 是(多 Agent) |
|
|
80
|
+
| 注意力刷新 | Protocol 2 | Protocol 2+3+4 | 每 Agent 独立 |
|
|
81
|
+
| 适用场景 | 复杂需求 | 清晰需求 | 大量并行任务 |
|
|
82
|
+
| 退出条件 | 任务失败可停止 | 迭代直到完成 | 所有 Agent 完成 |
|
|
77
83
|
|
|
78
84
|
**示例**:
|
|
79
85
|
```bash
|
|
@@ -82,6 +88,8 @@ $ARGUMENTS = "REQ_ID? [--task T###] [--manual] [--max-iterations N]"
|
|
|
82
88
|
/flow-dev "REQ-123" --manual # Manual模式,遇错停止
|
|
83
89
|
/flow-dev "REQ-123" --task T005 # 从 T005 开始(Autonomous模式)
|
|
84
90
|
/flow-dev "REQ-123" --task T005 --manual # 从 T005 开始(Manual模式)
|
|
91
|
+
/flow-dev "REQ-123" --team # Team模式,3 个 Agent 并行
|
|
92
|
+
/flow-dev "REQ-123" --team --agents 5 # Team模式,5 个 Agent 并行
|
|
85
93
|
```
|
|
86
94
|
|
|
87
95
|
## 执行流程
|
|
@@ -89,9 +97,10 @@ $ARGUMENTS = "REQ_ID? [--task T###] [--manual] [--max-iterations N]"
|
|
|
89
97
|
### 阶段 1: Entry Gate
|
|
90
98
|
```
|
|
91
99
|
1. 解析参数
|
|
92
|
-
→ Parse: REQ_ID, --task, --manual, --max-iterations
|
|
100
|
+
→ Parse: REQ_ID, --task, --manual, --max-iterations, --team, --agents
|
|
93
101
|
→ If REQ_ID not provided: run {SCRIPT:prereq} --json --paths-only
|
|
94
102
|
→ Determine mode:
|
|
103
|
+
• --team flag present → Team mode
|
|
95
104
|
• --manual flag present → Manual mode
|
|
96
105
|
• Otherwise → Autonomous mode (default max_iterations = 10)
|
|
97
106
|
|
|
@@ -115,6 +124,12 @@ $ARGUMENTS = "REQ_ID? [--task T###] [--manual] [--max-iterations N]"
|
|
|
115
124
|
→ 任务格式 `- [ ] T### [P?] [US?] Description (path)`
|
|
116
125
|
|
|
117
126
|
4. 模式初始化
|
|
127
|
+
→ If Team mode:
|
|
128
|
+
• Run: {SCRIPT:team_init} init "${REPO_ROOT}" "${REQ_ID}" ${NUM_AGENTS}
|
|
129
|
+
• Analyze tasks: {SCRIPT:team_init} analyze "${REPO_ROOT}" "${REQ_ID}"
|
|
130
|
+
• Check conflicts: {SCRIPT:team_init} conflicts "${REPO_ROOT}" "${REQ_ID}"
|
|
131
|
+
• Assign tasks: {SCRIPT:team_init} assign "${REPO_ROOT}" "${REQ_ID}" ${NUM_AGENTS}
|
|
132
|
+
• Log to EXECUTION_LOG.md: "Starting Team mode with N agents"
|
|
118
133
|
→ If Autonomous mode:
|
|
119
134
|
• Run: {SCRIPT:setup_loop} "${REQ_ID}" --max-iterations ${MAX_ITERATIONS}
|
|
120
135
|
• Creates .claude/ralph-loop.local.md (state file for Stop Hook)
|
|
@@ -158,6 +173,84 @@ $ARGUMENTS = "REQ_ID? [--task T###] [--manual] [--max-iterations N]"
|
|
|
158
173
|
|
|
159
174
|
### 阶段 3: 执行循环
|
|
160
175
|
|
|
176
|
+
**Team 模式循环** (--team) [NEW: v4.7]:
|
|
177
|
+
```
|
|
178
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
179
|
+
│ Team Mode Execution Flow │
|
|
180
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
181
|
+
│ │
|
|
182
|
+
│ 1. 任务分析与分配 │
|
|
183
|
+
│ → Run: {SCRIPT:team_init} analyze "${REPO_ROOT}" "${REQ_ID}" │
|
|
184
|
+
│ → Run: {SCRIPT:team_init} conflicts "${REPO_ROOT}" "${REQ_ID}"│
|
|
185
|
+
│ → Run: {SCRIPT:team_init} assign "${REPO_ROOT}" "${REQ_ID}" N │
|
|
186
|
+
│ │
|
|
187
|
+
│ 2. 并行执行 │
|
|
188
|
+
│ → 每个 Agent 独立执行分配的任务 │
|
|
189
|
+
│ → 文件冲突的任务分配给同一 Agent 串行执行 │
|
|
190
|
+
│ → 无冲突的任务可并行执行 │
|
|
191
|
+
│ │
|
|
192
|
+
│ 3. 任务完成处理 │
|
|
193
|
+
│ → TeammateIdle Hook 验证任务完成 │
|
|
194
|
+
│ → 验证通过 → 标记完成,分配下一任务 │
|
|
195
|
+
│ → 验证失败 → 继续修复 │
|
|
196
|
+
│ │
|
|
197
|
+
│ 4. 阶段转换 │
|
|
198
|
+
│ → 当前阶段所有任务完成 → 进入下一阶段 │
|
|
199
|
+
│ → 重新分析任务并行性和冲突 │
|
|
200
|
+
│ │
|
|
201
|
+
│ 5. 完成条件 │
|
|
202
|
+
│ → 所有任务完成 → 所有 Agent shutdown │
|
|
203
|
+
│ → 更新 orchestration_status.json │
|
|
204
|
+
│ │
|
|
205
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
206
|
+
|
|
207
|
+
Task Assignment Strategy:
|
|
208
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
209
|
+
│ 1. 解析 TASKS.md 获取当前阶段任务 │
|
|
210
|
+
│ → node {SCRIPT:parse_tasks} next TASKS.md │
|
|
211
|
+
│ │
|
|
212
|
+
│ 2. 检测文件冲突 │
|
|
213
|
+
│ → {SCRIPT:detect_conflicts} < tasks.json │
|
|
214
|
+
│ │
|
|
215
|
+
│ 3. 分配策略 │
|
|
216
|
+
│ → 有冲突: 冲突任务分配给同一 Agent │
|
|
217
|
+
│ → 无冲突: Round-robin 分配给各 Agent │
|
|
218
|
+
│ │
|
|
219
|
+
│ 4. 输出分配计划 │
|
|
220
|
+
│ { │
|
|
221
|
+
│ "assignments": [ │
|
|
222
|
+
│ {"agent": "dev-1", "tasks": ["T001", "T002"]}, │
|
|
223
|
+
│ {"agent": "dev-2", "tasks": ["T003"]}, │
|
|
224
|
+
│ {"agent": "dev-3", "tasks": ["T004"]} │
|
|
225
|
+
│ ], │
|
|
226
|
+
│ "hasConflicts": false │
|
|
227
|
+
│ } │
|
|
228
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
229
|
+
|
|
230
|
+
Conflict Resolution:
|
|
231
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
232
|
+
│ 文件冲突检测示例: │
|
|
233
|
+
│ │
|
|
234
|
+
│ Input: │
|
|
235
|
+
│ T001 [P] 修改 src/user.ts │
|
|
236
|
+
│ T002 [P] 修改 src/user.ts │
|
|
237
|
+
│ T003 [P] 修改 src/order.ts │
|
|
238
|
+
│ │
|
|
239
|
+
│ Output: │
|
|
240
|
+
│ { │
|
|
241
|
+
│ "hasConflicts": true, │
|
|
242
|
+
│ "conflicts": [ │
|
|
243
|
+
│ {"file": "src/user.ts", "tasks": ["T001", "T002"]} │
|
|
244
|
+
│ ], │
|
|
245
|
+
│ "safeGroups": [{"tasks": ["T003"]}] │
|
|
246
|
+
│ } │
|
|
247
|
+
│ │
|
|
248
|
+
│ Assignment: │
|
|
249
|
+
│ dev-1: T001, T002 (串行,因为冲突) │
|
|
250
|
+
│ dev-2: T003 (独立) │
|
|
251
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
252
|
+
```
|
|
253
|
+
|
|
161
254
|
**Manual 模式循环** (--manual):
|
|
162
255
|
```
|
|
163
256
|
For each remaining task (顺序严格遵循 TASKS.md):
|
|
@@ -281,10 +374,11 @@ Note: Stop Hook (.claude/hooks/ralph-stop-hook.sh) 会在 Autonomous 模式下:
|
|
|
281
374
|
## 运行提示
|
|
282
375
|
- **默认 Autonomous 模式**: 遇错自动重试,无需人工干预
|
|
283
376
|
- **使用 `--manual` 退出**: 适合需要人工判断的复杂场景
|
|
377
|
+
- **使用 `--team` 并行**: 适合大量可并行任务的需求 [NEW: v4.7]
|
|
284
378
|
- **使用 `/cancel-ralph` 停止**: 紧急停止 Autonomous 循环
|
|
285
379
|
- 始终使用 quickstart 中提供的命令(测试、lint、db migrate 等)
|
|
286
380
|
- Phase 2 的所有测试必须在实现前失败;若某测试直接通过,回滚并修正
|
|
287
|
-
- 遵循 TASKS.md 标注的 `[P]`
|
|
381
|
+
- 遵循 TASKS.md 标注的 `[P]` 表示可并行,Team 模式下会真正并行执行
|
|
288
382
|
- 如需恢复,可使用 `/flow-dev --task TXYZ` 指向首个未完成任务
|
|
289
383
|
|
|
290
384
|
## 错误处理
|
|
@@ -301,6 +395,13 @@ Note: Stop Hook (.claude/hooks/ralph-stop-hook.sh) 会在 Autonomous 模式下:
|
|
|
301
395
|
- 达到 max_iterations → 输出状态报告(已完成/剩余任务),保持 development_in_progress
|
|
302
396
|
- 紧急停止 → 使用 `/cancel-ralph` 删除状态文件,立即终止循环
|
|
303
397
|
|
|
398
|
+
**Team 模式** [NEW: v4.7]:
|
|
399
|
+
- 缺少资产 → 同 Manual 模式(Entry Gate 阻止)
|
|
400
|
+
- 文件冲突 → 自动检测并分配给同一 Agent 串行执行
|
|
401
|
+
- Agent 任务失败 → TeammateIdle Hook 触发重试
|
|
402
|
+
- 所有 Agent 空闲但任务未完成 → 重新分配任务
|
|
403
|
+
- 紧急停止 → 清理 Team 状态,所有 Agent shutdown
|
|
404
|
+
|
|
304
405
|
## 取消 Autonomous 循环
|
|
305
406
|
|
|
306
407
|
```bash
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-init
|
|
3
|
+
description: 'Initialize requirement structure. Usage: /flow-init "REQ-123|Title|URLs"'
|
|
4
|
+
skill: workflow/flow-init
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Flow-Init Command (Trigger Entry)
|
|
8
|
+
|
|
9
|
+
> 此文件为触发入口,详细实现见 `.claude/skills/workflow/flow-init/SKILL.md`
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
/flow-init "REQ-123|User Authentication"
|
|
15
|
+
/flow-init "REQ-124|数据导出|https://docs.example.com/export-spec.md"
|
|
16
|
+
/flow-init --interactive
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Reference
|
|
20
|
+
|
|
21
|
+
| Stage | Purpose | Output |
|
|
22
|
+
|-------|---------|--------|
|
|
23
|
+
| 1 | Entry Gate | 参数验证 |
|
|
24
|
+
| 1.2 | Git Branch | feature/REQ-xxx-title |
|
|
25
|
+
| 1.5 | Context Loading | ROADMAP/ARCHITECTURE |
|
|
26
|
+
| 2 | Directory Init | 目录结构 |
|
|
27
|
+
| 2.3 | Brainstorming | BRAINSTORM.md |
|
|
28
|
+
| 2.5 | Research | research/* |
|
|
29
|
+
| 3 | README | README.md |
|
|
30
|
+
| 4 | Exit Gate | 5-Level 验证 |
|
|
31
|
+
|
|
32
|
+
## Skill Location
|
|
33
|
+
|
|
34
|
+
**Full Implementation**: `.claude/skills/workflow/flow-init/SKILL.md`
|
|
35
|
+
|
|
36
|
+
**Resources**:
|
|
37
|
+
- Scripts: `.claude/skills/workflow/flow-init/scripts/`
|
|
38
|
+
- References: `.claude/skills/workflow/flow-init/references/`
|
|
39
|
+
- Assets: `.claude/skills/workflow/flow-init/assets/`
|
|
40
|
+
|
|
41
|
+
## Next Step
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
/flow-prd "${REQ_ID}"
|
|
45
|
+
```
|
|
@@ -0,0 +1,279 @@
|
|
|
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
|
+
规则: 遇到 {TYPE:key} 占位符时,去头文件 YAML 中找对应类型的 key,获取文件路径并加载。
|
|
27
|
+
============================================================ -->
|
|
28
|
+
|
|
29
|
+
# Flow-New - 一键需求开发流
|
|
30
|
+
|
|
31
|
+
## User Input
|
|
32
|
+
```text
|
|
33
|
+
$ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**格式**:
|
|
37
|
+
- REQ_ID: 需求编号 (例如: REQ-123)
|
|
38
|
+
- TITLE: 需求标题
|
|
39
|
+
- PLAN_URLS: 计划文档 URL,多个用逗号分隔 (可选)
|
|
40
|
+
|
|
41
|
+
**示例**:
|
|
42
|
+
```
|
|
43
|
+
/flow-new "REQ-123|支持用户下单|https://plan.example.com/Q1"
|
|
44
|
+
/flow-new "REQ-124|用户权限管理"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 执行前加载
|
|
50
|
+
|
|
51
|
+
**详细编排流程**:
|
|
52
|
+
→ 参见 `{TEMPLATE:orchestration}` 获取完整编排逻辑
|
|
53
|
+
|
|
54
|
+
**故障排查**:
|
|
55
|
+
→ 遇到问题参考 `{GUIDE:troubleshoot}`
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 架构说明
|
|
60
|
+
|
|
61
|
+
**设计理念**: `flow-new` 是编排器(Orchestrator),串行调用当前主干命令,避免人工串接阶段。
|
|
62
|
+
|
|
63
|
+
**调用链** (v4.1):
|
|
64
|
+
```
|
|
65
|
+
/flow-new "REQ-123|Title|URLs"
|
|
66
|
+
↓
|
|
67
|
+
[1/6] /flow-init "REQ-123|Title|URLs"
|
|
68
|
+
→ 创建需求目录 + research + BRAINSTORM
|
|
69
|
+
↓
|
|
70
|
+
[2/6] /flow-clarify "REQ-123" (可选)
|
|
71
|
+
→ 仅在需求存在歧义时触发
|
|
72
|
+
↓
|
|
73
|
+
[3/6] /flow-spec "REQ-123"
|
|
74
|
+
→ PRD → Tech+UI(并行) → Epic/TASKS
|
|
75
|
+
↓
|
|
76
|
+
[4/6] /flow-dev "REQ-123"
|
|
77
|
+
→ TDD 执行 (测试先失败,再实现)
|
|
78
|
+
↓
|
|
79
|
+
[5/6] /flow-quality "REQ-123" --full
|
|
80
|
+
→ 规格合规 + 代码质量 + 安全验证
|
|
81
|
+
↓
|
|
82
|
+
[6/6] /flow-release "REQ-123"
|
|
83
|
+
→ 发布计划 + PR 创建 + 分支收尾
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 执行流程骨架
|
|
89
|
+
|
|
90
|
+
### [1/6] 初始化 → /flow-init
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
调用: /flow-init "${REQ_ID}|${TITLE}|${PLAN_URLS}"
|
|
94
|
+
检查: orchestration_status.json.status === "initialized"
|
|
95
|
+
→ 详见 {TEMPLATE:orchestration} Stage 1
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**输出**:
|
|
99
|
+
- Git 分支: `feature/${REQ_ID}-${slug(BRANCH_TITLE_EN)}`
|
|
100
|
+
- 需求目录与 research 上下文
|
|
101
|
+
- `BRAINSTORM.md`
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### [2/6] 需求澄清(可选)→ /flow-clarify
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
触发条件: 需求存在歧义、边界不清、验收标准冲突
|
|
109
|
+
调用: /flow-clarify "${REQ_ID}"
|
|
110
|
+
→ 详见 .claude/commands/flow/clarify.md
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**输出**:
|
|
114
|
+
- `clarifications/*.md` (如触发)
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### [3/6] 统一规格阶段 → /flow-spec
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
调用: /flow-spec "${REQ_ID}" [--skip-tech] [--skip-ui]
|
|
122
|
+
默认: PRD + Tech + UI + Epic/TASKS
|
|
123
|
+
→ 详见 .claude/commands/flow/spec.md
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**输出**:
|
|
127
|
+
- `PRD.md`
|
|
128
|
+
- `TECH_DESIGN.md` / `UI_PROTOTYPE.html` (按模式)
|
|
129
|
+
- `EPIC.md` + `TASKS.md`
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### [4/6] 开发执行 → /flow-dev
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
调用: /flow-dev "${REQ_ID}"
|
|
137
|
+
执行模式: TDD
|
|
138
|
+
1) 先写测试并确认失败
|
|
139
|
+
2) 再实现功能
|
|
140
|
+
3) 最终测试通过
|
|
141
|
+
→ 详见 .claude/commands/flow/dev.md
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**输出**:
|
|
145
|
+
- 实现代码 + 测试代码
|
|
146
|
+
- `TASKS.md` 勾选状态更新
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### [5/6] 质量验证 → /flow-quality
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
调用: /flow-quality "${REQ_ID}" --full
|
|
154
|
+
检查: 规格一致性、代码质量、安全与测试门禁
|
|
155
|
+
→ 详见 .claude/commands/flow/quality.md
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**输出**:
|
|
159
|
+
- `SPEC_REVIEW.md`
|
|
160
|
+
- `CODE_QUALITY_REVIEW.md`
|
|
161
|
+
- `SECURITY_REPORT.md`
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### [6/6] 发布管理 → /flow-release
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
调用: /flow-release "${REQ_ID}"
|
|
169
|
+
执行: 生成 RELEASE_PLAN、创建 PR、执行收尾策略
|
|
170
|
+
→ 详见 .claude/commands/flow/release.md
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**输出**:
|
|
174
|
+
- `RELEASE_PLAN.md`
|
|
175
|
+
- Pull Request / 合并策略决策
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 进度展示
|
|
180
|
+
|
|
181
|
+
**实时进度**:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
🎯 CC-DevFlow 完整需求开发流程 (v4.1)
|
|
185
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
186
|
+
|
|
187
|
+
需求: REQ-123 | 支持用户下单
|
|
188
|
+
|
|
189
|
+
[1/6] ✅ 初始化完成
|
|
190
|
+
[2/6] ✅ 澄清完成 (可选)
|
|
191
|
+
[3/6] ✅ 统一规格完成
|
|
192
|
+
[4/6] 🔄 开发执行中... (8/18 已完成)
|
|
193
|
+
[5/6] ⏳ 等待质量验证...
|
|
194
|
+
[6/6] ⏳ 等待发布管理...
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## 输出产物
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
devflow/requirements/${REQ_ID}/
|
|
203
|
+
├── BRAINSTORM.md
|
|
204
|
+
├── research/
|
|
205
|
+
├── PRD.md
|
|
206
|
+
├── TECH_DESIGN.md # 若未跳过 tech
|
|
207
|
+
├── UI_PROTOTYPE.html # 若未跳过 ui 且识别到 UI 需求
|
|
208
|
+
├── EPIC.md
|
|
209
|
+
├── TASKS.md
|
|
210
|
+
├── SPEC_REVIEW.md # flow-quality --full
|
|
211
|
+
├── CODE_QUALITY_REVIEW.md # flow-quality --full
|
|
212
|
+
├── SECURITY_REPORT.md # flow-quality --full
|
|
213
|
+
└── RELEASE_PLAN.md
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## 中断与恢复
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# 查看当前状态
|
|
222
|
+
/flow-status REQ-123
|
|
223
|
+
|
|
224
|
+
# 从中断点恢复
|
|
225
|
+
/flow-restart "REQ-123"
|
|
226
|
+
|
|
227
|
+
# 手动执行后续阶段
|
|
228
|
+
/flow-spec "REQ-123"
|
|
229
|
+
/flow-dev "REQ-123" --resume
|
|
230
|
+
/flow-quality "REQ-123" --full
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 使用建议
|
|
236
|
+
|
|
237
|
+
### ✅ 适合使用 flow-new
|
|
238
|
+
|
|
239
|
+
- 明确需求,需要一口气走完整条流水线
|
|
240
|
+
- 团队希望减少阶段切换的上下文开销
|
|
241
|
+
- 希望快速拿到可评审发布结果
|
|
242
|
+
|
|
243
|
+
### ❌ 建议使用阶段化命令
|
|
244
|
+
|
|
245
|
+
- 需求高度不确定,需频繁往返讨论
|
|
246
|
+
- 规格阶段需要多人异步审阅
|
|
247
|
+
- 开发阶段需要多次暂停/切换优先级
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Next Step
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
# 查看 PR 状态
|
|
255
|
+
cat devflow/requirements/${REQ_ID}/RELEASE_PLAN.md | grep "PR URL"
|
|
256
|
+
|
|
257
|
+
# 审查 PR
|
|
258
|
+
gh pr view <PR_NUMBER>
|
|
259
|
+
|
|
260
|
+
# 合并 PR
|
|
261
|
+
gh pr merge <PR_NUMBER>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
**Related Documentation**:
|
|
267
|
+
- [NEW_ORCHESTRATION_TEMPLATE.md](../../docs/templates/NEW_ORCHESTRATION_TEMPLATE.md) - 详细编排流程
|
|
268
|
+
- [NEW_TROUBLESHOOTING.md](../../docs/guides/NEW_TROUBLESHOOTING.md) - 故障排查指南
|
|
269
|
+
- [flow-init.md](./init.md) - 初始化阶段
|
|
270
|
+
- [flow-clarify.md](./clarify.md) - 需求澄清阶段
|
|
271
|
+
- [flow-spec.md](./spec.md) - 统一规格阶段
|
|
272
|
+
- [flow-dev.md](./dev.md) - 开发阶段 (TDD)
|
|
273
|
+
- [flow-quality.md](./quality.md) - 统一质量验证阶段
|
|
274
|
+
- [flow-release.md](./release.md) - 发布阶段
|
|
275
|
+
- [flow-fix.md](./fix.md) - Bug 修复流程
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
**[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-quality
|
|
3
|
+
description: Combined quality verification (replaces flow-review + flow-qa)
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /flow-quality
|
|
8
|
+
|
|
9
|
+
> **[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Combined quality verification command that replaces the separate `/flow-review` and `/flow-qa` commands.
|
|
14
|
+
Provides both quick programmatic verification and full comprehensive review.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Quick mode (default) - programmatic verification only
|
|
20
|
+
/flow-quality [REQ-ID]
|
|
21
|
+
|
|
22
|
+
# Full mode - comprehensive review including spec compliance
|
|
23
|
+
/flow-quality [REQ-ID] --full
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Modes
|
|
27
|
+
|
|
28
|
+
### Quick Mode (Default)
|
|
29
|
+
|
|
30
|
+
Fast programmatic verification using quality-gates.yml:
|
|
31
|
+
|
|
32
|
+
1. **Lint Check** - `npm run lint`
|
|
33
|
+
2. **Type Check** - `npm run typecheck`
|
|
34
|
+
3. **Unit Tests** - `npm test`
|
|
35
|
+
|
|
36
|
+
**Use Case**: Rapid iteration during development, CI/CD pipelines.
|
|
37
|
+
|
|
38
|
+
**Duration**: ~1-2 minutes
|
|
39
|
+
|
|
40
|
+
### Full Mode (`--full`)
|
|
41
|
+
|
|
42
|
+
Comprehensive review including:
|
|
43
|
+
|
|
44
|
+
1. **Programmatic Checks** (same as quick mode)
|
|
45
|
+
2. **Spec Compliance Review** - Verify implementation matches PRD/TECH_DESIGN
|
|
46
|
+
3. **Code Quality Review** - Structure, patterns, Constitution compliance
|
|
47
|
+
4. **Security Scan** - `npm audit`, secret detection
|
|
48
|
+
5. **Integration Tests** - `npm run test:integration` (if available)
|
|
49
|
+
|
|
50
|
+
**Use Case**: Before PR creation, milestone completion.
|
|
51
|
+
|
|
52
|
+
**Duration**: ~5-10 minutes
|
|
53
|
+
|
|
54
|
+
## Entry Gate
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
prerequisites:
|
|
58
|
+
- development_complete: true
|
|
59
|
+
- TASKS.md: All tasks marked [x]
|
|
60
|
+
- Tests: All passing
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Exit Gate
|
|
64
|
+
|
|
65
|
+
### Quick Mode
|
|
66
|
+
```yaml
|
|
67
|
+
exit_criteria:
|
|
68
|
+
- lint: pass
|
|
69
|
+
- typecheck: pass
|
|
70
|
+
- tests: pass
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Full Mode
|
|
74
|
+
```yaml
|
|
75
|
+
exit_criteria:
|
|
76
|
+
- lint: pass
|
|
77
|
+
- typecheck: pass
|
|
78
|
+
- tests: pass
|
|
79
|
+
- spec_review: PASS
|
|
80
|
+
- code_quality: PASS
|
|
81
|
+
- security: no high-severity issues
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Output
|
|
85
|
+
|
|
86
|
+
### Quick Mode
|
|
87
|
+
```
|
|
88
|
+
✅ Quality Gate PASSED (Quick Mode)
|
|
89
|
+
|
|
90
|
+
✓ Lint Check
|
|
91
|
+
✓ Type Check
|
|
92
|
+
✓ Unit Tests (42 passed)
|
|
93
|
+
|
|
94
|
+
Duration: 1m 23s
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Full Mode
|
|
98
|
+
```
|
|
99
|
+
✅ Quality Gate PASSED (Full Mode)
|
|
100
|
+
|
|
101
|
+
Programmatic Checks:
|
|
102
|
+
✓ Lint Check
|
|
103
|
+
✓ Type Check
|
|
104
|
+
✓ Unit Tests (42 passed)
|
|
105
|
+
✓ Integration Tests (8 passed)
|
|
106
|
+
|
|
107
|
+
Reviews:
|
|
108
|
+
✓ Spec Compliance: PASS
|
|
109
|
+
✓ Code Quality: PASS
|
|
110
|
+
✓ Security: No issues
|
|
111
|
+
|
|
112
|
+
Reports Generated:
|
|
113
|
+
- SPEC_REVIEW.md
|
|
114
|
+
- CODE_QUALITY_REVIEW.md
|
|
115
|
+
- SECURITY_REPORT.md
|
|
116
|
+
|
|
117
|
+
Duration: 7m 45s
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Integration
|
|
121
|
+
|
|
122
|
+
### With flow-dev
|
|
123
|
+
|
|
124
|
+
After `/flow-dev` completes, the orchestrator recommends:
|
|
125
|
+
```
|
|
126
|
+
status: "development_complete"
|
|
127
|
+
→ Recommend: /flow-quality (quick verification)
|
|
128
|
+
→ Alternative: /flow-quality --full (comprehensive review)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### With flow-release
|
|
132
|
+
|
|
133
|
+
`/flow-release` requires quality gate to pass:
|
|
134
|
+
```yaml
|
|
135
|
+
flow-release:
|
|
136
|
+
prerequisites:
|
|
137
|
+
- quality_complete: true
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Deprecation Notice
|
|
141
|
+
|
|
142
|
+
The following commands are deprecated in v3.0:
|
|
143
|
+
|
|
144
|
+
- `/flow-review` → Use `/flow-quality --full`
|
|
145
|
+
- `/flow-qa` → Use `/flow-quality --full`
|
|
146
|
+
|
|
147
|
+
These commands still work for backward compatibility but will show a deprecation warning.
|
|
148
|
+
|
|
149
|
+
## Scripts
|
|
150
|
+
|
|
151
|
+
- `.claude/scripts/flow-quality-quick.sh` - Quick verification
|
|
152
|
+
- `.claude/scripts/flow-quality-full.sh` - Full verification
|
|
153
|
+
- `.claude/scripts/run-quality-gates.sh` - Core gate execution
|
|
154
|
+
|
|
155
|
+
## Related
|
|
156
|
+
|
|
157
|
+
- **Config**: `.claude/config/quality-gates.yml`
|
|
158
|
+
- **Error Log**: `ERROR_LOG.md` (errors recorded here)
|
|
159
|
+
- **Orchestrator**: Updates `orchestration_status.json` on completion
|