cc-devflow 4.1.5 → 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.
Files changed (111) hide show
  1. package/.claude/CLAUDE.md +87 -1091
  2. package/.claude/commands/core/architecture.md +2 -2
  3. package/.claude/commands/core/guidelines.md +2 -2
  4. package/.claude/commands/core/roadmap.md +4 -4
  5. package/.claude/commands/core/style.md +40 -268
  6. package/.claude/commands/flow/CLAUDE.md +28 -0
  7. package/.claude/commands/flow/archive.md +2 -2
  8. package/.claude/commands/flow/checklist.md +9 -251
  9. package/.claude/commands/flow/clarify.md +9 -127
  10. package/.claude/commands/flow/constitution.md +1 -1
  11. package/.claude/commands/flow/context.md +1 -1
  12. package/.claude/commands/flow/dev.md +19 -395
  13. package/.claude/commands/flow/ideate.md +13 -13
  14. package/.claude/commands/flow/init.md +19 -30
  15. package/.claude/commands/flow/new.md +12 -268
  16. package/.claude/commands/flow/quality.md +10 -153
  17. package/.claude/commands/flow/release.md +18 -81
  18. package/.claude/commands/flow/restart.md +15 -16
  19. package/.claude/commands/flow/spec.md +14 -164
  20. package/.claude/commands/flow/status.md +12 -12
  21. package/.claude/commands/flow/update.md +4 -4
  22. package/.claude/commands/flow/upgrade.md +6 -6
  23. package/.claude/commands/flow/verify.md +19 -78
  24. package/.claude/commands/flow/workspace.md +1 -1
  25. package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +7 -7
  26. package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +44 -96
  27. package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +1 -1
  28. package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +5 -5
  29. package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +1 -1
  30. package/.claude/docs/templates/BACKLOG_TEMPLATE.md +3 -3
  31. package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +5 -5
  32. package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +2 -2
  33. package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +3 -3
  34. package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +33 -64
  35. package/.claude/docs/templates/RESEARCH_TEMPLATE.md +3 -3
  36. package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +2 -2
  37. package/.claude/docs/templates/ROADMAP_TEMPLATE.md +2 -2
  38. package/.claude/docs/templates/STYLE_TEMPLATE.md +3 -3
  39. package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +8 -9
  40. package/.claude/guides/workflow-guides/flow-orchestrator.md +31 -265
  41. package/.claude/hooks/CLAUDE.md +1 -1
  42. package/.claude/hooks/checklist-gate.js +4 -4
  43. package/.claude/hooks/inject-agent-context.ts +2 -2
  44. package/.claude/scripts/calculate-checklist-completion.sh +2 -2
  45. package/.claude/scripts/check-prerequisites.sh +2 -2
  46. package/.claude/scripts/checklist-errors.sh +4 -4
  47. package/.claude/scripts/flow-quality-full.sh +5 -5
  48. package/.claude/scripts/flow-quality-quick.sh +4 -4
  49. package/.claude/scripts/flow-workspace-init.sh +2 -2
  50. package/.claude/scripts/generate-clarification-report.sh +4 -4
  51. package/.claude/scripts/recover-workflow.sh +70 -73
  52. package/.claude/scripts/run-quality-gates.sh +1 -1
  53. package/.claude/scripts/setup-epic.sh +2 -2
  54. package/.claude/scripts/setup-ralph-loop.sh +2 -2
  55. package/.claude/scripts/validate-research.sh +1 -1
  56. package/.claude/scripts/verify-setup.sh +1 -1
  57. package/.claude/skills/cc-devflow-orchestrator/SKILL.md +88 -108
  58. package/.claude/skills/workflow/CLAUDE.md +24 -0
  59. package/.claude/skills/workflow/flow-dev/CLAUDE.md +14 -76
  60. package/.claude/skills/workflow/flow-dev/SKILL.md +29 -67
  61. package/.claude/skills/workflow/flow-dev/context.jsonl +4 -8
  62. package/.claude/skills/workflow/flow-init/SKILL.md +24 -151
  63. package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +1 -1
  64. package/.claude/skills/workflow/flow-init/context.jsonl +3 -3
  65. package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +1 -1
  66. package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +1 -1
  67. package/.claude/skills/workflow/flow-release/SKILL.md +23 -56
  68. package/.claude/skills/workflow/flow-release/context.jsonl +5 -7
  69. package/.claude/skills/workflow/flow-spec/CLAUDE.md +15 -101
  70. package/.claude/skills/workflow/flow-spec/SKILL.md +15 -518
  71. package/.claude/skills/workflow/flow-spec/context.jsonl +5 -7
  72. package/.claude/skills/workflow/flow-verify/CLAUDE.md +10 -0
  73. package/.claude/skills/workflow/flow-verify/SKILL.md +53 -0
  74. package/.claude/skills/workflow/flow-verify/context.jsonl +5 -0
  75. package/.claude/skills/workflow.yaml +72 -267
  76. package/CHANGELOG.md +31 -0
  77. package/README.md +91 -69
  78. package/README.zh-CN.md +90 -67
  79. package/bin/harness.js +22 -0
  80. package/docs/commands/README.md +34 -38
  81. package/docs/commands/README.zh-CN.md +34 -36
  82. package/docs/commands/core-roadmap.md +2 -2
  83. package/docs/commands/core-roadmap.zh-CN.md +2 -2
  84. package/docs/commands/core-style.md +29 -381
  85. package/docs/commands/core-style.zh-CN.md +29 -381
  86. package/docs/commands/flow-init.md +10 -10
  87. package/docs/commands/flow-init.zh-CN.md +11 -11
  88. package/docs/commands/flow-new.md +25 -260
  89. package/docs/commands/flow-new.zh-CN.md +26 -257
  90. package/docs/guides/getting-started.md +16 -15
  91. package/docs/guides/getting-started.zh-CN.md +10 -12
  92. package/lib/compiler/__tests__/manifest.test.js +156 -0
  93. package/lib/compiler/__tests__/parser.test.js +21 -0
  94. package/lib/compiler/index.js +17 -1
  95. package/lib/compiler/manifest.js +68 -6
  96. package/lib/compiler/parser.js +5 -0
  97. package/lib/harness/CLAUDE.md +21 -0
  98. package/lib/harness/cli.js +208 -0
  99. package/lib/harness/index.js +16 -0
  100. package/lib/harness/operations/dispatch.js +285 -0
  101. package/lib/harness/operations/init.js +48 -0
  102. package/lib/harness/operations/janitor.js +74 -0
  103. package/lib/harness/operations/pack.js +100 -0
  104. package/lib/harness/operations/plan.js +29 -0
  105. package/lib/harness/operations/release.js +83 -0
  106. package/lib/harness/operations/resume.js +44 -0
  107. package/lib/harness/operations/verify.js +163 -0
  108. package/lib/harness/planner.js +141 -0
  109. package/lib/harness/schemas.js +108 -0
  110. package/lib/harness/store.js +240 -0
  111. package/package.json +9 -1
@@ -1,186 +1,36 @@
1
1
  ---
2
2
  name: flow-spec
3
- description: 'Unified specification phase: PRD → Tech+UI (parallel) → Epic/Tasks. Usage: /flow-spec "REQ-123" [--skip-tech] [--skip-ui]'
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
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
- > **v4.1 新增**: 合并 flow-prd/flow-tech/flow-ui/flow-epic 为单一命令
9
+ > 触发入口:执行细节由 `.claude/skills/workflow/flow-spec/SKILL.md` 定义。
13
10
 
14
11
  ## User Input
15
12
 
16
13
  ```text
17
- $ARGUMENTS = "REQ_ID [--skip-tech] [--skip-ui]"
14
+ $ARGUMENTS = "REQ_ID [--overwrite]"
18
15
  ```
19
16
 
20
- 若未提供 REQ_ID 则根据当前分支或 `DEVFLOW_REQ_ID` 自动解析。
21
-
22
- ## 命令格式
17
+ ## Usage
23
18
 
24
19
  ```bash
25
- # Full Mode (默认) - PRD + Tech + UI + Epic
26
- /flow-spec "REQ-123"
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
- ### 阶段 4: Epic Generation (Sequential)
24
+ ## Internal Execution
115
25
 
116
- ```yaml
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
- Rules:
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-dev "${REQ_ID}"
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-status [REQ-ID]'
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
- → 是否存在 PRD/TECH_DESIGN/data-model/contracts/quickstart/EPIC/TASKS/QA 报告
31
+ → 是否存在 context-package/task-manifest/report-card/RELEASE_NOTE
32
32
  4. 若 `--branches`: 读取 git 分支与 upstream 状态
33
- 5. 若 `--detailed`: 关联 PRD/EPIC/TASKS 进度、QA/Release 结论
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
- - `status=initialized` → `/flow-prd`
44
- - `phase0_complete=false` → `/flow-init` consolidate
45
- - `phase1_complete=false` → `/flow-tech`
46
- - `status=epic_complete` → `/flow-dev`
47
- - `status=quality_complete`(兼容 `qa_complete`)→ `/flow-release`
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 │ 下单流程优化 │ epic_complete │ planning │ /flow-dev │
56
- │ REQ-124 │ 权限矩阵 │ quality_complete │ release │ /flow-release │
57
- │ REQ-125 │ 账单导出 │ prd_complete technical │ /flow-tech
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-update "REQ-123" "T012" [OPTIONS]'
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-update "REQ_ID" "TASK_ID" [OPTIONS]
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-quality`(需要深度审查时再加 `--full`)。
109
+ - 若所有任务完成:立即运行 `/flow:verify --strict`。
110
110
  - 若任务被阻塞:添加 `blocked` 注释并通知相关负责人。
111
- - 周期性执行 `/flow-status` 获取进度总览。
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-upgrade "REQ-123" --analyze or --version="2.0.0" --reason="..."'
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 至少为 "prd_complete"。
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
- → 提示重新运行 /flow-tech、/flow-epic 等受影响阶段。
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-tech /flow-epic)。
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-status` 检查其他需求是否依赖该版本。
115
- - 需要宪法变更时调用 `/flow-constitution --amend`。
114
+ - 使用 `/flow:status` 检查其他需求是否依赖该版本。
115
+ - 需要宪法变更时调用 `/flow:constitution --amend`。
@@ -1,96 +1,37 @@
1
1
  ---
2
2
  name: flow-verify
3
- description: 'Comprehensive consistency verification across documents and implementation. Usage: /flow-verify "REQ-123" or /flow-verify --all'
4
- scripts:
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? [--all] [--summary] [--critical-only] [--since=ISO] [--diff=RANGE] [--documents-only|--implementation-only|--tests-only]"
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
- ### 阶段 1: Entry Gate
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
- 2. 前置检查
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
- 3. 选择验证集合
36
- → 单需求: 使用传入 ID
37
- → --all: 枚举 devflow/requirements/**
38
- ```
27
+ - `npm run harness:verify -- --change-id <REQ_ID> [--strict] [--skip-review]`
39
28
 
40
- ### 阶段 2: 验证准备
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
- 2. 实现一致性
58
- → TASKS 任务 ↔ Git 提交 ↔ 测试文件
59
- → quickstart 命令可执行性(dry-run 或脚本验证)
31
+ - `devflow/requirements/<REQ_ID>/report-card.json`
60
32
 
61
- 3. 质量守则
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
- ### 阶段 4: 报告输出
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 签核材料。
@@ -126,7 +126,7 @@ devflow/workspace/
126
126
 
127
127
  ### With flow-init
128
128
 
129
- When `/flow-init` creates a new requirement (and workspace already initialized):
129
+ When `/flow:init` creates a new requirement (and workspace already initialized):
130
130
  ```bash
131
131
  # Auto-update workspace
132
132
  echo "REQ-XXX" > devflow/workspace/{developer}/.current-req
@@ -1,6 +1,6 @@
1
1
  # Flow-Init Troubleshooting Guide
2
2
 
3
- > Quick reference for `/flow-init` errors and recovery
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-init "REQ-123|..." --force` 强制覆盖
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-init "REQ-123|Title|URLs"
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-prd "REQ-123"
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-init "REQ-123|..." --force # 强制覆盖现有需求
99
- /flow-init --interactive # 交互式输入模式
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-init "REQ-123|..."`
107
+ A: `SKIP_MCP_RESEARCH=1 /flow:init "REQ-123|..."`
108
108
 
109
109
  **Q: Context Loading 阶段找不到 ROADMAP.md 怎么办?**
110
110
  A: 可选步骤,不影响执行。如需路线图,先运行 `/core-roadmap`