cc-devflow 4.1.4 → 4.1.6
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 -1183
- package/.claude/commands/core/architecture.md +2 -2
- package/.claude/commands/core/guidelines.md +2 -2
- package/.claude/commands/core/roadmap.md +4 -4
- package/.claude/commands/core/style.md +40 -268
- 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/fix.md +1 -6
- package/.claude/commands/flow/ideate.md +13 -13
- package/.claude/commands/flow/init.md +19 -41
- package/.claude/commands/flow/new.md +12 -268
- package/.claude/commands/flow/quality.md +10 -153
- package/.claude/commands/flow/release.md +18 -131
- 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 +3 -20
- 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/guides/TEAM_MODE_GUIDE.md +0 -1
- 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/hooks/teammate-idle-hook.ts +1 -1
- package/.claude/rules/devflow-conventions.md +2 -93
- package/.claude/scripts/CLAUDE.md +1 -4
- 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/common.sh +12 -147
- 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 +88 -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 +29 -67
- package/.claude/skills/workflow/flow-dev/context.jsonl +4 -8
- package/.claude/skills/workflow/flow-init/SKILL.md +23 -186
- 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/create-requirement.sh +15 -134
- package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +1 -1
- package/.claude/skills/workflow/flow-release/SKILL.md +20 -110
- 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 +15 -518
- 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 -270
- package/CHANGELOG.md +72 -0
- package/README.md +91 -69
- package/README.zh-CN.md +90 -67
- 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
- package/.claude/scripts/flow-workspace-start.sh +0 -217
- package/.claude/scripts/flow-workspace-switch.sh +0 -234
- package/.claude/skills/domain/using-git-worktrees/SKILL.md +0 -252
- package/.claude/skills/domain/using-git-worktrees/assets/SHELL_ALIASES.md +0 -133
- package/.claude/skills/domain/using-git-worktrees/context.jsonl +0 -4
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-cleanup.sh +0 -218
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-create.sh +0 -232
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-list.sh +0 -130
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-status.sh +0 -140
- package/.claude/skills/domain/using-git-worktrees/scripts/worktree-switch.sh +0 -70
|
@@ -1,186 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-spec
|
|
3
|
-
description: '
|
|
4
|
-
|
|
5
|
-
prereq: .claude/scripts/check-prerequisites.sh
|
|
6
|
-
validate_research: .claude/scripts/validate-research.sh
|
|
7
|
-
validate_constitution: .claude/scripts/validate-constitution.sh
|
|
3
|
+
description: 'Generate task-manifest from requirement context. Usage: /flow:spec "REQ-123" [--overwrite]'
|
|
4
|
+
skill: workflow/flow-spec
|
|
8
5
|
---
|
|
9
6
|
|
|
10
|
-
# Flow-Spec
|
|
7
|
+
# Flow-Spec Command (Harness Planning)
|
|
11
8
|
|
|
12
|
-
>
|
|
9
|
+
> 触发入口:执行细节由 `.claude/skills/workflow/flow-spec/SKILL.md` 定义。
|
|
13
10
|
|
|
14
11
|
## User Input
|
|
15
12
|
|
|
16
13
|
```text
|
|
17
|
-
$ARGUMENTS = "REQ_ID [--
|
|
14
|
+
$ARGUMENTS = "REQ_ID [--overwrite]"
|
|
18
15
|
```
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## 命令格式
|
|
17
|
+
## Usage
|
|
23
18
|
|
|
24
19
|
```bash
|
|
25
|
-
|
|
26
|
-
/flow
|
|
27
|
-
|
|
28
|
-
# Quick Mode (小需求) - PRD + Epic only
|
|
29
|
-
/flow-spec "REQ-123" --skip-tech --skip-ui
|
|
30
|
-
|
|
31
|
-
# Backend Only - PRD + Tech + Epic
|
|
32
|
-
/flow-spec "REQ-123" --skip-ui
|
|
33
|
-
|
|
34
|
-
# Frontend Only - PRD + UI + Epic
|
|
35
|
-
/flow-spec "REQ-123" --skip-tech
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Mode Matrix
|
|
39
|
-
|
|
40
|
-
| Mode | Flags | Agents | Output |
|
|
41
|
-
|------|-------|--------|--------|
|
|
42
|
-
| Full | (default) | PRD + Tech + UI + Epic | PRD.md, TECH_DESIGN.md, UI_PROTOTYPE.html, EPIC.md, TASKS.md |
|
|
43
|
-
| Quick | `--skip-tech --skip-ui` | PRD + Epic | PRD.md, EPIC.md, TASKS.md |
|
|
44
|
-
| Backend | `--skip-ui` | PRD + Tech + Epic | PRD.md, TECH_DESIGN.md, EPIC.md, TASKS.md |
|
|
45
|
-
| Frontend | `--skip-tech` | PRD + UI + Epic | PRD.md, UI_PROTOTYPE.html, EPIC.md, TASKS.md |
|
|
46
|
-
|
|
47
|
-
## 执行流程
|
|
48
|
-
|
|
49
|
-
**加载 Skill 指令**:
|
|
50
|
-
```
|
|
51
|
-
→ 读取 .claude/skills/workflow/flow-spec/SKILL.md
|
|
52
|
-
→ 按 SKILL.md 中定义的 Execution Flow 执行
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### 阶段 1: Entry Gate
|
|
56
|
-
|
|
57
|
-
```yaml
|
|
58
|
-
Prerequisites:
|
|
59
|
-
1. REQ_ID 解析:
|
|
60
|
-
- 从参数获取
|
|
61
|
-
- 或从当前分支推断 (feature/REQ-XXX-*)
|
|
62
|
-
- 或从 orchestration_status.json 获取
|
|
63
|
-
|
|
64
|
-
2. BRAINSTORM.md 存在:
|
|
65
|
-
- 路径: devflow/requirements/${REQ_ID}/BRAINSTORM.md
|
|
66
|
-
- 必须包含: 需求描述、目标用户、核心功能
|
|
67
|
-
|
|
68
|
-
3. Research 完成:
|
|
69
|
-
- 路径: devflow/requirements/${REQ_ID}/research/research.md
|
|
70
|
-
- 无 TODO/PLACEHOLDER
|
|
71
|
-
|
|
72
|
-
4. Status Check:
|
|
73
|
-
- orchestration_status.status ∈ {"initialized", "spec_failed"}
|
|
74
|
-
|
|
75
|
-
5. Constitution Gate:
|
|
76
|
-
- 读取 BRAINSTORM.md 验证需求边界
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### 阶段 2: PRD Generation (Sequential)
|
|
80
|
-
|
|
81
|
-
```yaml
|
|
82
|
-
Agent: prd-writer (research-type)
|
|
83
|
-
Input:
|
|
84
|
-
- BRAINSTORM.md
|
|
85
|
-
- research/research.md
|
|
86
|
-
- research/internal/codebase-overview.md
|
|
87
|
-
|
|
88
|
-
Output:
|
|
89
|
-
- PRD.md
|
|
90
|
-
|
|
91
|
-
Rules:
|
|
92
|
-
- ANTI-EXPANSION: 未提及 → [NEEDS CLARIFICATION]
|
|
93
|
-
- NO TECH DETAILS: 只关注 WHAT/WHY
|
|
94
|
-
- STORY INDEPENDENCE: 每个故事有独立测试
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### 阶段 3: Tech + UI (Parallel)
|
|
98
|
-
|
|
99
|
-
```yaml
|
|
100
|
-
Parallel Execution:
|
|
101
|
-
tech-architect (if !--skip-tech):
|
|
102
|
-
Input: PRD.md, research/codebase-overview.md
|
|
103
|
-
Output: TECH_DESIGN.md, data-model.md, contracts/
|
|
104
|
-
|
|
105
|
-
ui-designer (if !--skip-ui AND UI detected):
|
|
106
|
-
Input: PRD.md, STYLE.md (optional)
|
|
107
|
-
Output: UI_PROTOTYPE.html, ui_design_strategy.md
|
|
108
|
-
|
|
109
|
-
Method:
|
|
110
|
-
- 使用 Task tool 并行调用两个 agent
|
|
111
|
-
- 等待两者完成后进入 Stage 4
|
|
20
|
+
/flow:spec "REQ-123"
|
|
21
|
+
/flow:spec "REQ-123" --overwrite
|
|
112
22
|
```
|
|
113
23
|
|
|
114
|
-
|
|
24
|
+
## Internal Execution
|
|
115
25
|
|
|
116
|
-
|
|
117
|
-
Agent: planner (research-type)
|
|
118
|
-
Input:
|
|
119
|
-
- PRD.md
|
|
120
|
-
- TECH_DESIGN.md (if exists)
|
|
121
|
-
- UI_PROTOTYPE.html (if exists)
|
|
26
|
+
- `npm run harness:plan -- --change-id <REQ_ID> [--overwrite]`
|
|
122
27
|
|
|
123
|
-
Output
|
|
124
|
-
- EPIC.md
|
|
125
|
-
- TASKS.md
|
|
28
|
+
## Output
|
|
126
29
|
|
|
127
|
-
|
|
128
|
-
- TDD Order: Phase 2 (Tests) → Phase 3 (Implementation)
|
|
129
|
-
- Bite-Sized Tasks: 每个 step 2-5 分钟
|
|
130
|
-
- Phase -1 Gates: Simplicity, Anti-Abstraction, Integration-First
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### 阶段 5: Exit Gate
|
|
134
|
-
|
|
135
|
-
```yaml
|
|
136
|
-
File Checks:
|
|
137
|
-
- [ ] PRD.md exists, no {{PLACEHOLDER}}
|
|
138
|
-
- [ ] TECH_DESIGN.md exists (if !--skip-tech)
|
|
139
|
-
- [ ] UI_PROTOTYPE.html exists (if !--skip-ui AND UI detected)
|
|
140
|
-
- [ ] EPIC.md exists, no {{PLACEHOLDER}}
|
|
141
|
-
- [ ] TASKS.md exists, TDD order correct
|
|
142
|
-
|
|
143
|
-
Status Update:
|
|
144
|
-
- orchestration_status.status = "spec_complete"
|
|
145
|
-
- orchestration_status.phase = "spec"
|
|
146
|
-
```
|
|
30
|
+
- `devflow/requirements/<REQ_ID>/task-manifest.json`
|
|
147
31
|
|
|
148
|
-
##
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
devflow/requirements/${REQ_ID}/
|
|
152
|
-
├── PRD.md # Always
|
|
153
|
-
├── TECH_DESIGN.md # If !--skip-tech
|
|
154
|
-
├── data-model.md # If !--skip-tech
|
|
155
|
-
├── contracts/openapi.yaml # If !--skip-tech
|
|
156
|
-
├── UI_PROTOTYPE.html # If !--skip-ui AND UI detected
|
|
157
|
-
├── EPIC.md # Always
|
|
158
|
-
├── TASKS.md # Always
|
|
159
|
-
└── orchestration_status.json # Updated
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
## 错误处理
|
|
163
|
-
|
|
164
|
-
- **Entry Gate 失败**: 返回具体缺失项,指导用户运行 `/flow-init`
|
|
165
|
-
- **PRD 生成失败**: status = "spec_failed",可重试
|
|
166
|
-
- **Tech/UI 失败**: 继续执行,标记为 skipped
|
|
167
|
-
- **Epic 失败**: status = "spec_failed",可用 `--from=epic` 重试
|
|
168
|
-
|
|
169
|
-
## 下一步
|
|
32
|
+
## Next Step
|
|
170
33
|
|
|
171
34
|
```bash
|
|
172
|
-
/flow
|
|
35
|
+
/flow:dev "<REQ_ID>"
|
|
173
36
|
```
|
|
174
|
-
|
|
175
|
-
## Agent References
|
|
176
|
-
|
|
177
|
-
| Agent | Purpose | Location |
|
|
178
|
-
|-------|---------|----------|
|
|
179
|
-
| prd-writer | PRD 生成 | `.claude/agents/prd-writer.md` |
|
|
180
|
-
| tech-architect | 技术设计 | `.claude/agents/tech-architect.md` |
|
|
181
|
-
| ui-designer | UI 原型 | `.claude/agents/ui-designer.md` |
|
|
182
|
-
| planner | Epic/Tasks | `.claude/agents/planner.md` |
|
|
183
|
-
|
|
184
|
-
## 详细指令
|
|
185
|
-
|
|
186
|
-
完整执行逻辑见: `.claude/skills/workflow/flow-spec/SKILL.md`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-status
|
|
3
|
-
description: 'Query development progress status for cc-devflow requirements. Usage: /flow
|
|
3
|
+
description: 'Query development progress status for cc-devflow requirements. Usage: /flow:status [REQ-ID]'
|
|
4
4
|
scripts:
|
|
5
5
|
prereq: .claude/scripts/check-prerequisites.sh
|
|
6
6
|
generate_status: .claude/scripts/generate-status-report.sh
|
|
@@ -28,9 +28,9 @@ $ARGUMENTS = "[REQ_ID?] [--all] [--bugs] [--detailed] [--summary]"
|
|
|
28
28
|
→ devflow/bugs/*/orchestration_status.json
|
|
29
29
|
3. 读取每个状态文件及 EXECUTION_LOG.md 头部,提取:
|
|
30
30
|
→ status, phase, completedSteps, phase0/phase1 flag, lastUpdated
|
|
31
|
-
→ 是否存在
|
|
31
|
+
→ 是否存在 context-package/task-manifest/report-card/RELEASE_NOTE
|
|
32
32
|
4. 若 `--branches`: 读取 git 分支与 upstream 状态
|
|
33
|
-
5. 若 `--detailed`: 关联
|
|
33
|
+
5. 若 `--detailed`: 关联 task-manifest 任务统计、report-card 结论、release note
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### 3. 输出格式
|
|
@@ -39,12 +39,12 @@ $ARGUMENTS = "[REQ_ID?] [--all] [--bugs] [--detailed] [--summary]"
|
|
|
39
39
|
- **Summary/All**: 使用 {SCRIPT:generate_status} 生成聚合报告。
|
|
40
40
|
|
|
41
41
|
### 4. 建议动作
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
- 根据状态字段提示下一命令(优先主链):
|
|
43
|
+
- `status=initialized` 或 `status=context_packed` → `/flow:spec`
|
|
44
|
+
- `status=planned` 或 `status=spec_complete` → `/flow:dev`
|
|
45
|
+
- `status=development_in_progress` 且有失败任务 → `/flow:dev --resume`
|
|
46
|
+
- `status=development_complete` → `/flow:verify --strict`
|
|
47
|
+
- `status=quality_complete` 或 `status=verified` → `/flow:release`
|
|
48
48
|
|
|
49
49
|
## 输出样例
|
|
50
50
|
```
|
|
@@ -52,9 +52,9 @@ $ARGUMENTS = "[REQ_ID?] [--all] [--bugs] [--detailed] [--summary]"
|
|
|
52
52
|
┌─────────┬──────────────┬───────────────┬────────────┬──────────┐
|
|
53
53
|
│ ID │ Title │ Status │ Phase │ Next │
|
|
54
54
|
├─────────┼──────────────┼───────────────┼────────────┼──────────┤
|
|
55
|
-
│ REQ-123 │ 下单流程优化 │
|
|
56
|
-
│ REQ-124 │ 权限矩阵 │ quality_complete │
|
|
57
|
-
│ REQ-125 │ 账单导出 │
|
|
55
|
+
│ REQ-123 │ 下单流程优化 │ planned │ planning │ /flow:dev │
|
|
56
|
+
│ REQ-124 │ 权限矩阵 │ quality_complete │ verify │ /flow:release │
|
|
57
|
+
│ REQ-125 │ 账单导出 │ initialized │ init │ /flow:spec │
|
|
58
58
|
└─────────┴──────────────┴───────────────┴────────────┴──────────┘
|
|
59
59
|
```
|
|
60
60
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-update
|
|
3
|
-
description: 'Update task progress for cc-devflow requirements. Usage: /flow
|
|
3
|
+
description: 'Update task progress for cc-devflow requirements. Usage: /flow:update "REQ-123" "T012" [OPTIONS]'
|
|
4
4
|
scripts:
|
|
5
5
|
prereq: .claude/scripts/check-prerequisites.sh
|
|
6
6
|
check_tasks: .claude/scripts/check-task-status.sh
|
|
@@ -17,7 +17,7 @@ $ARGUMENTS = "REQ_ID TASK_ID [--status=STATE] [--progress=PCT] [--estimate=HRS]
|
|
|
17
17
|
|
|
18
18
|
## 命令格式
|
|
19
19
|
```text
|
|
20
|
-
/flow
|
|
20
|
+
/flow:update "REQ_ID" "TASK_ID" [OPTIONS]
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
### 支持选项
|
|
@@ -106,6 +106,6 @@ $ARGUMENTS = "REQ_ID TASK_ID [--status=STATE] [--progress=PCT] [--estimate=HRS]
|
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
## 下一步
|
|
109
|
-
- 若所有任务完成:立即运行 `/flow
|
|
109
|
+
- 若所有任务完成:立即运行 `/flow:verify --strict`。
|
|
110
110
|
- 若任务被阻塞:添加 `blocked` 注释并通知相关负责人。
|
|
111
|
-
- 周期性执行 `/flow
|
|
111
|
+
- 周期性执行 `/flow:status` 获取进度总览。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-upgrade
|
|
3
|
-
description: 'PRD version management, analysis, and application workflow. Usage: /flow
|
|
3
|
+
description: 'PRD version management, analysis, and application workflow. Usage: /flow:upgrade "REQ-123" --analyze or --version="2.0.0" --reason="..."'
|
|
4
4
|
scripts:
|
|
5
5
|
prereq: .claude/scripts/check-prerequisites.sh
|
|
6
6
|
manage_constitution: .claude/scripts/manage-constitution.sh
|
|
@@ -34,7 +34,7 @@ $ARGUMENTS = "REQ_ID [--analyze] [--version=SEMVER] [--reason='...'] [--rollback
|
|
|
34
34
|
→ Git 工作区需干净(除非只做 analyze)。
|
|
35
35
|
|
|
36
36
|
3. 状态确认
|
|
37
|
-
→ orchestration_status.status 至少为 "
|
|
37
|
+
→ orchestration_status.status 至少为 "initialized"。
|
|
38
38
|
→ 若后续流程在开发阶段进行,提示可能影响当前迭代。
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -70,7 +70,7 @@ $ARGUMENTS = "REQ_ID [--analyze] [--version=SEMVER] [--reason='...'] [--rollback
|
|
|
70
70
|
→ EXECUTION_LOG.md 记录升级摘要。
|
|
71
71
|
|
|
72
72
|
5. 触发后续动作
|
|
73
|
-
→ 提示重新运行
|
|
73
|
+
→ 提示重新运行 `/flow:spec`、`/flow:dev`、`/flow:verify` 等受影响阶段。
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
### 阶段 2C: 回滚 (--rollback)
|
|
@@ -91,7 +91,7 @@ $ARGUMENTS = "REQ_ID [--analyze] [--version=SEMVER] [--reason='...'] [--rollback
|
|
|
91
91
|
### 阶段 3: Exit Gate
|
|
92
92
|
```
|
|
93
93
|
1. 核验版本快照目录、CHANGELOG、影响报告是否生成。
|
|
94
|
-
2. 若版本号更新成功,提示下一步(重新跑 /flow
|
|
94
|
+
2. 若版本号更新成功,提示下一步(重新跑 `/flow:spec` / `/flow:dev` / `/flow:verify`)。
|
|
95
95
|
3. 失败时保持原状态,给出恢复指引。
|
|
96
96
|
```
|
|
97
97
|
|
|
@@ -111,5 +111,5 @@ $ARGUMENTS = "REQ_ID [--analyze] [--version=SEMVER] [--reason='...'] [--rollback
|
|
|
111
111
|
|
|
112
112
|
## 下一步
|
|
113
113
|
- 若版本包含重大变更:立即通知团队重新生成技术方案和规划。
|
|
114
|
-
- 使用 `/flow
|
|
115
|
-
- 需要宪法变更时调用 `/flow
|
|
114
|
+
- 使用 `/flow:status` 检查其他需求是否依赖该版本。
|
|
115
|
+
- 需要宪法变更时调用 `/flow:constitution --amend`。
|
|
@@ -1,96 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flow-verify
|
|
3
|
-
description: '
|
|
4
|
-
|
|
5
|
-
prereq: .claude/scripts/check-prerequisites.sh
|
|
6
|
-
validate_constitution: .claude/scripts/validate-constitution.sh
|
|
7
|
-
generate_status: .claude/scripts/generate-status-report.sh
|
|
3
|
+
description: 'Run layered quality gates and produce report-card. Usage: /flow:verify "REQ-123" [--strict] [--skip-review]'
|
|
4
|
+
skill: workflow/flow-verify
|
|
8
5
|
---
|
|
9
6
|
|
|
10
|
-
# Flow-Verify
|
|
7
|
+
# Flow-Verify Command (Harness Gates)
|
|
8
|
+
|
|
9
|
+
> 触发入口:执行细节由 `.claude/skills/workflow/flow-verify/SKILL.md` 定义。
|
|
11
10
|
|
|
12
11
|
## User Input
|
|
12
|
+
|
|
13
13
|
```text
|
|
14
|
-
$ARGUMENTS = "REQ_ID
|
|
14
|
+
$ARGUMENTS = "REQ_ID [--strict] [--skip-review]"
|
|
15
15
|
```
|
|
16
|
-
缺省 REQ_ID 时使用当前分支;`--all` 针对所有需求。
|
|
17
|
-
|
|
18
|
-
## 验证维度
|
|
19
|
-
- 文档链路:`PRD.md → TECH_DESIGN.md → data-model.md → contracts/ → EPIC.md → TASKS.md`
|
|
20
|
-
- 实现链路:`代码实现 ↔ tests ↔ quickstart.md`
|
|
21
|
-
- 状态链路:`orchestration_status.json`、`EXECUTION_LOG.md`
|
|
22
16
|
|
|
23
|
-
##
|
|
17
|
+
## Usage
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
```bash
|
|
20
|
+
/flow:verify "REQ-123"
|
|
21
|
+
/flow:verify "REQ-123" --strict
|
|
22
|
+
/flow:verify "REQ-123" --strict --skip-review
|
|
26
23
|
```
|
|
27
|
-
1. 参数解析
|
|
28
|
-
→ 支持单需求、批量 (--all)、增量 (--since/--diff)、维度过滤 (--documents-only 等)
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
→ {SCRIPT:prereq} --json
|
|
32
|
-
→ 确保存在: PRD.md, TECH_DESIGN.md, data-model.md, contracts/, quickstart.md, EPIC.md, TASKS.md
|
|
33
|
-
→ orchestration_status.status 至少为 "dev_complete"(或用户指定跳过实现验证)
|
|
25
|
+
## Internal Execution
|
|
34
26
|
|
|
35
|
-
|
|
36
|
-
→ 单需求: 使用传入 ID
|
|
37
|
-
→ --all: 枚举 devflow/requirements/**
|
|
38
|
-
```
|
|
27
|
+
- `npm run harness:verify -- --change-id <REQ_ID> [--strict] [--skip-review]`
|
|
39
28
|
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
1. 汇总上下文
|
|
43
|
-
→ 读取研究/设计/规划/实现资产,构建追溯矩阵
|
|
44
|
-
2. 配置验证级别
|
|
45
|
-
→ 默认: 全量
|
|
46
|
-
→ --summary: 仅关键阻断项
|
|
47
|
-
→ --critical-only: 只输出严重问题
|
|
48
|
-
3. 更新 EXECUTION_LOG.md 记录验证开始
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### 阶段 3: Consistency Checks
|
|
52
|
-
```
|
|
53
|
-
1. 文档一致性
|
|
54
|
-
→ PRD 用户故事 ↔ EPIC scopes ↔ TASKS phases
|
|
55
|
-
→ TECH_DESIGN 决策 ↔ data-model / contracts / quickstart
|
|
29
|
+
## Output
|
|
56
30
|
|
|
57
|
-
|
|
58
|
-
→ TASKS 任务 ↔ Git 提交 ↔ 测试文件
|
|
59
|
-
→ quickstart 命令可执行性(dry-run 或脚本验证)
|
|
31
|
+
- `devflow/requirements/<REQ_ID>/report-card.json`
|
|
60
32
|
|
|
61
|
-
|
|
62
|
-
→ {SCRIPT:validate_constitution} --type verify --severity warning
|
|
63
|
-
→ 检查 Simplicity / Anti-Abstraction / Integration-First、No Partial Implementation、No Dead Code 等
|
|
64
|
-
```
|
|
33
|
+
## Next Step
|
|
65
34
|
|
|
66
|
-
|
|
35
|
+
```bash
|
|
36
|
+
/flow:release "<REQ_ID>"
|
|
67
37
|
```
|
|
68
|
-
1. 生成 report
|
|
69
|
-
→ 路径: devflow/requirements/${REQ_ID}/VERIFY_REPORT.md
|
|
70
|
-
→ 包含: 概览、通过/失败项、严重度、建议、受影响文件
|
|
71
|
-
|
|
72
|
-
2. 更新状态
|
|
73
|
-
→ orchestration_status:
|
|
74
|
-
lastVerificationAt = ISO timestamp
|
|
75
|
-
verificationStatus = "passed" 或 "issues_found"
|
|
76
|
-
→ EXECUTION_LOG 记录完成
|
|
77
|
-
|
|
78
|
-
3. 可选: {SCRIPT:generate_status} 汇总全部需求验证结果
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## 输出
|
|
82
|
-
```
|
|
83
|
-
✅ VERIFY_REPORT.md
|
|
84
|
-
✅ orchestration_status.json(记录验证状态)
|
|
85
|
-
✅ EXECUTION_LOG.md 更新
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## 错误处理
|
|
89
|
-
- 缺失关键资产 → 提示前置命令(/flow-prd、/flow-tech、/flow-epic、/flow-dev)。
|
|
90
|
-
- 验证脚本失败 → 输出日志位置,保持 verificationStatus = "failed".
|
|
91
|
-
- Constitution 违规 → 报告标记为 BLOCKER,需在发版前修复。
|
|
92
|
-
|
|
93
|
-
## 建议后续
|
|
94
|
-
1. 对 issues_found 的需求,回到对应阶段修复。
|
|
95
|
-
2. 在 `/flow-release` 前确保最新验证为 PASS。
|
|
96
|
-
3. 将验证报告纳入 QA 签核材料。
|
|
@@ -63,9 +63,8 @@ Start a new session, recovering context from previous session.
|
|
|
63
63
|
Process:
|
|
64
64
|
1. Read `.current-req` to get current requirement
|
|
65
65
|
2. Read latest journal entries
|
|
66
|
-
3.
|
|
67
|
-
4.
|
|
68
|
-
5. Ready to continue work
|
|
66
|
+
3. Display context summary
|
|
67
|
+
4. Ready to continue work
|
|
69
68
|
|
|
70
69
|
可选行为:
|
|
71
70
|
- 传入 `REQ-XXX/BUG-XXX` 会先更新 `.current-req` 再恢复上下文
|
|
@@ -91,17 +90,6 @@ Switch to a different requirement.
|
|
|
91
90
|
```
|
|
92
91
|
|
|
93
92
|
Updates `.current-req` and creates a new journal entry.
|
|
94
|
-
如果存在对应 worktree,建议立即切换到:
|
|
95
|
-
```bash
|
|
96
|
-
cd "$(bash .claude/skills/domain/using-git-worktrees/scripts/worktree-switch.sh REQ-008)"
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
更便捷的一步切换:
|
|
100
|
-
```bash
|
|
101
|
-
eval "$(bash .claude/scripts/flow-workspace-switch.sh REQ-008 --print-cd)"
|
|
102
|
-
# 或
|
|
103
|
-
source .claude/scripts/flow-workspace-switch.sh REQ-008 --cd
|
|
104
|
-
```
|
|
105
93
|
|
|
106
94
|
## Workspace Structure
|
|
107
95
|
|
|
@@ -138,15 +126,12 @@ devflow/workspace/
|
|
|
138
126
|
|
|
139
127
|
### With flow-init
|
|
140
128
|
|
|
141
|
-
When `/flow
|
|
129
|
+
When `/flow:init` creates a new requirement (and workspace already initialized):
|
|
142
130
|
```bash
|
|
143
131
|
# Auto-update workspace
|
|
144
132
|
echo "REQ-XXX" > devflow/workspace/{developer}/.current-req
|
|
145
133
|
```
|
|
146
134
|
|
|
147
|
-
`/flow-workspace start` 会基于 REQ-ID 推导期望 worktree 路径:
|
|
148
|
-
`../{repo-name}-{REQ_ID}`,并提示是否已在正确 worktree。
|
|
149
|
-
|
|
150
135
|
### With flow-dev
|
|
151
136
|
|
|
152
137
|
During development, progress is automatically recorded:
|
|
@@ -161,9 +146,7 @@ Journal is read at Protocol 3 (Ralph iteration start) to maintain context.
|
|
|
161
146
|
## Scripts
|
|
162
147
|
|
|
163
148
|
- `.claude/scripts/flow-workspace-init.sh` - Initialize workspace
|
|
164
|
-
- `.claude/scripts/flow-workspace-start.sh` - Start session
|
|
165
149
|
- `.claude/scripts/flow-workspace-record.sh` - Record progress
|
|
166
|
-
- `.claude/scripts/flow-workspace-switch.sh` - Switch REQ pointer and worktree action
|
|
167
150
|
|
|
168
151
|
## Related
|
|
169
152
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Flow-Init Troubleshooting Guide
|
|
2
2
|
|
|
3
|
-
> Quick reference for `/flow
|
|
3
|
+
> Quick reference for `/flow:init` errors and recovery
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
```bash
|
|
19
19
|
❌ ERROR: devflow/requirements/REQ-123/ already exists
|
|
20
20
|
```
|
|
21
|
-
**Fix**: 使用不同 ID 或 `/flow
|
|
21
|
+
**Fix**: 使用不同 ID 或 `/flow:init "REQ-123|..." --force` 强制覆盖
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
```bash
|
|
54
54
|
rm -rf devflow/requirements/REQ-123/
|
|
55
55
|
git branch -D feature/REQ-123-*
|
|
56
|
-
/flow
|
|
56
|
+
/flow:init "REQ-123|Title|URLs"
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### Recover from Interruption
|
|
@@ -69,7 +69,7 @@ jq '.phase0_complete = true' devflow/requirements/REQ-123/orchestration_status.j
|
|
|
69
69
|
mv tmp.json devflow/requirements/REQ-123/orchestration_status.json
|
|
70
70
|
|
|
71
71
|
# 继续下一阶段
|
|
72
|
-
/flow
|
|
72
|
+
/flow:spec "REQ-123"
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
### Rebuild Research.md from Tasks.json
|
|
@@ -95,8 +95,8 @@ bash .claude/scripts/validate-research.sh "$REQ_DIR"
|
|
|
95
95
|
|
|
96
96
|
### Command-Line Flags
|
|
97
97
|
```bash
|
|
98
|
-
/flow
|
|
99
|
-
/flow
|
|
98
|
+
/flow:init "REQ-123|..." --force # 强制覆盖现有需求
|
|
99
|
+
/flow:init --interactive # 交互式输入模式
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
---
|
|
@@ -104,7 +104,7 @@ bash .claude/scripts/validate-research.sh "$REQ_DIR"
|
|
|
104
104
|
## FAQ
|
|
105
105
|
|
|
106
106
|
**Q: 如何跳过 MCP 研究阶段?**
|
|
107
|
-
A: `SKIP_MCP_RESEARCH=1 /flow
|
|
107
|
+
A: `SKIP_MCP_RESEARCH=1 /flow:init "REQ-123|..."`
|
|
108
108
|
|
|
109
109
|
**Q: Context Loading 阶段找不到 ROADMAP.md 怎么办?**
|
|
110
110
|
A: 可选步骤,不影响执行。如需路线图,先运行 `/core-roadmap`
|