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.
Files changed (128) hide show
  1. package/.claude/CLAUDE.md +87 -1183
  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/fix.md +1 -6
  14. package/.claude/commands/flow/ideate.md +13 -13
  15. package/.claude/commands/flow/init.md +19 -41
  16. package/.claude/commands/flow/new.md +12 -268
  17. package/.claude/commands/flow/quality.md +10 -153
  18. package/.claude/commands/flow/release.md +18 -131
  19. package/.claude/commands/flow/restart.md +15 -16
  20. package/.claude/commands/flow/spec.md +14 -164
  21. package/.claude/commands/flow/status.md +12 -12
  22. package/.claude/commands/flow/update.md +4 -4
  23. package/.claude/commands/flow/upgrade.md +6 -6
  24. package/.claude/commands/flow/verify.md +19 -78
  25. package/.claude/commands/flow/workspace.md +3 -20
  26. package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +7 -7
  27. package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +44 -96
  28. package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +1 -1
  29. package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +5 -5
  30. package/.claude/docs/guides/TEAM_MODE_GUIDE.md +0 -1
  31. package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +1 -1
  32. package/.claude/docs/templates/BACKLOG_TEMPLATE.md +3 -3
  33. package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +5 -5
  34. package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +2 -2
  35. package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +3 -3
  36. package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +33 -64
  37. package/.claude/docs/templates/RESEARCH_TEMPLATE.md +3 -3
  38. package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +2 -2
  39. package/.claude/docs/templates/ROADMAP_TEMPLATE.md +2 -2
  40. package/.claude/docs/templates/STYLE_TEMPLATE.md +3 -3
  41. package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +8 -9
  42. package/.claude/guides/workflow-guides/flow-orchestrator.md +31 -265
  43. package/.claude/hooks/CLAUDE.md +1 -1
  44. package/.claude/hooks/checklist-gate.js +4 -4
  45. package/.claude/hooks/inject-agent-context.ts +2 -2
  46. package/.claude/hooks/teammate-idle-hook.ts +1 -1
  47. package/.claude/rules/devflow-conventions.md +2 -93
  48. package/.claude/scripts/CLAUDE.md +1 -4
  49. package/.claude/scripts/calculate-checklist-completion.sh +2 -2
  50. package/.claude/scripts/check-prerequisites.sh +2 -2
  51. package/.claude/scripts/checklist-errors.sh +4 -4
  52. package/.claude/scripts/common.sh +12 -147
  53. package/.claude/scripts/flow-quality-full.sh +5 -5
  54. package/.claude/scripts/flow-quality-quick.sh +4 -4
  55. package/.claude/scripts/flow-workspace-init.sh +2 -2
  56. package/.claude/scripts/generate-clarification-report.sh +4 -4
  57. package/.claude/scripts/recover-workflow.sh +70 -73
  58. package/.claude/scripts/run-quality-gates.sh +1 -1
  59. package/.claude/scripts/setup-epic.sh +2 -2
  60. package/.claude/scripts/setup-ralph-loop.sh +2 -2
  61. package/.claude/scripts/validate-research.sh +1 -1
  62. package/.claude/scripts/verify-setup.sh +1 -1
  63. package/.claude/skills/cc-devflow-orchestrator/SKILL.md +88 -108
  64. package/.claude/skills/workflow/CLAUDE.md +24 -0
  65. package/.claude/skills/workflow/flow-dev/CLAUDE.md +14 -76
  66. package/.claude/skills/workflow/flow-dev/SKILL.md +29 -67
  67. package/.claude/skills/workflow/flow-dev/context.jsonl +4 -8
  68. package/.claude/skills/workflow/flow-init/SKILL.md +23 -186
  69. package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +1 -1
  70. package/.claude/skills/workflow/flow-init/context.jsonl +3 -3
  71. package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +1 -1
  72. package/.claude/skills/workflow/flow-init/scripts/create-requirement.sh +15 -134
  73. package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +1 -1
  74. package/.claude/skills/workflow/flow-release/SKILL.md +20 -110
  75. package/.claude/skills/workflow/flow-release/context.jsonl +5 -7
  76. package/.claude/skills/workflow/flow-spec/CLAUDE.md +15 -101
  77. package/.claude/skills/workflow/flow-spec/SKILL.md +15 -518
  78. package/.claude/skills/workflow/flow-spec/context.jsonl +5 -7
  79. package/.claude/skills/workflow/flow-verify/CLAUDE.md +10 -0
  80. package/.claude/skills/workflow/flow-verify/SKILL.md +53 -0
  81. package/.claude/skills/workflow/flow-verify/context.jsonl +5 -0
  82. package/.claude/skills/workflow.yaml +72 -270
  83. package/CHANGELOG.md +72 -0
  84. package/README.md +91 -69
  85. package/README.zh-CN.md +90 -67
  86. package/bin/harness.js +22 -0
  87. package/docs/commands/README.md +34 -38
  88. package/docs/commands/README.zh-CN.md +34 -36
  89. package/docs/commands/core-roadmap.md +2 -2
  90. package/docs/commands/core-roadmap.zh-CN.md +2 -2
  91. package/docs/commands/core-style.md +29 -381
  92. package/docs/commands/core-style.zh-CN.md +29 -381
  93. package/docs/commands/flow-init.md +10 -10
  94. package/docs/commands/flow-init.zh-CN.md +11 -11
  95. package/docs/commands/flow-new.md +25 -260
  96. package/docs/commands/flow-new.zh-CN.md +26 -257
  97. package/docs/guides/getting-started.md +16 -15
  98. package/docs/guides/getting-started.zh-CN.md +10 -12
  99. package/lib/compiler/__tests__/manifest.test.js +156 -0
  100. package/lib/compiler/__tests__/parser.test.js +21 -0
  101. package/lib/compiler/index.js +17 -1
  102. package/lib/compiler/manifest.js +68 -6
  103. package/lib/compiler/parser.js +5 -0
  104. package/lib/harness/CLAUDE.md +21 -0
  105. package/lib/harness/cli.js +208 -0
  106. package/lib/harness/index.js +16 -0
  107. package/lib/harness/operations/dispatch.js +285 -0
  108. package/lib/harness/operations/init.js +48 -0
  109. package/lib/harness/operations/janitor.js +74 -0
  110. package/lib/harness/operations/pack.js +100 -0
  111. package/lib/harness/operations/plan.js +29 -0
  112. package/lib/harness/operations/release.js +83 -0
  113. package/lib/harness/operations/resume.js +44 -0
  114. package/lib/harness/operations/verify.js +163 -0
  115. package/lib/harness/planner.js +141 -0
  116. package/lib/harness/schemas.js +108 -0
  117. package/lib/harness/store.js +240 -0
  118. package/package.json +9 -1
  119. package/.claude/scripts/flow-workspace-start.sh +0 -217
  120. package/.claude/scripts/flow-workspace-switch.sh +0 -234
  121. package/.claude/skills/domain/using-git-worktrees/SKILL.md +0 -252
  122. package/.claude/skills/domain/using-git-worktrees/assets/SHELL_ALIASES.md +0 -133
  123. package/.claude/skills/domain/using-git-worktrees/context.jsonl +0 -4
  124. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-cleanup.sh +0 -218
  125. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-create.sh +0 -232
  126. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-list.sh +0 -130
  127. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-status.sh +0 -140
  128. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-switch.sh +0 -70
@@ -1,282 +1,48 @@
1
1
  ---
2
2
  name: flow-orchestrator-guide
3
- description: Standard Operating Procedure for main agent when executing /flow-new command. Not an executable agent, but workflow guidance.
3
+ description: Standard Operating Procedure for main agent when executing canonical /flow:* delivery chain.
4
4
  type: workflow-guide
5
5
  ---
6
6
 
7
- # 需求开发流程标准作业程序
7
+ # 需求开发流程标准作业程序(主链版)
8
8
 
9
- 当用户执行 `/flow-new "REQ-ID|TITLE|PLAN_URLS"` 时,主 Agent (Claude 本身) 应按以下标准流程操作:
10
-
11
- ## 核心原则 (遵循 Claude Code 最佳实践)
12
-
13
- ### 主 Agent 职责
14
- - **完整上下文管理**: 主 Agent 拥有项目全貌,负责所有代码实施
15
- - **Sub-agent 协调**: 调用研究型 sub-agents 收集专业信息和制定计划
16
- - **最终实施**: 基于所有研究报告和计划,主 Agent 直接执行代码修改
17
-
18
- ### Sub-agent 定位
19
- - **研究员角色**: 仅提供研究报告、分析文档、实施计划
20
- - **无代码执行**: 不直接修改项目文件,只输出 Markdown 文档
21
- - **专业分工**: 各自在专业领域提供深度分析和建议
22
-
23
- ### 工作流原则
24
- 1. **顺序执行**: 避免并行代码修改,确保一致性
25
- 2. **上下文保持**: 主 Agent 保持完整项目上下文
26
- 3. **计划先行**: 充分规划后再执行实施
27
- 4. **质量保证**: 每个阶段都有相应的质量检查
28
- 5. **避免过度设计**: 在需求研究与规划分解阶段,坚持最小可行实现与核心价值,避免提前引入复杂架构、抽象或不必要的扩展点
29
-
30
- ## Rules Integration
31
- You MUST follow these rules during orchestration:
32
-
33
- 0. **Constitution** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md):
34
- - **Project Constitution**: Follow all constitutional principles without exception
35
- - **Quality Gates**: Enforce all quality gate requirements
36
- - **Architecture Constraints**: Adhere to architectural consistency rules
37
- - **Security Principles**: Apply security-first approach to all operations
38
-
39
- 1. **Standard Patterns**:
40
- - Apply Fail Fast principle: validate inputs immediately
41
- - Use Clear Errors with structured error messages
42
- - Maintain Minimal Output approach in user communication
43
- - Follow Trust System principle for sub-agent delegation
44
-
45
- 2. **DevFlow Patterns**:
46
- - Enforce REQ-ID format validation: REQ-\d+
47
- - Use standard branch naming: feature/${reqId}-${slug(BRANCH_TITLE_EN)} (模型意译生成,禁止拼音/音译)
48
- - Apply commit message format: feat(${reqId}): ${taskTitle}
49
- - Maintain complete document chain: PRD → EPIC → TASKS
50
-
51
- 3. **Agent Coordination**:
52
- - Use file locks for concurrent access prevention
53
- - Update status in LOG.md after each sub-agent call
54
- - Implement proper error propagation between agents
55
- - Follow the defined sub-agent call sequence
56
-
57
- 4. **Branch Operations** (${DEVFLOW_CLAUDE_DIR:-.claude}/guides/technical-guides/git-github-guide.md):
58
- - Verify clean working directory before branch creation
59
- - Use conventional commit messages with Co-authored-by
60
- - Enforce quality gates before any push operations
61
- - Clean up branches after successful merge
62
-
63
- 5. **GitHub Operations** (${DEVFLOW_CLAUDE_DIR:-.claude}/guides/technical-guides/git-github-guide.md):
64
- - Check authentication status before PR operations
65
- - Verify repository is not a template before modifications
66
- - Use structured PR descriptions with links to documentation
67
- - Handle permission errors gracefully
68
-
69
- 6. **Test Execution**:
70
- - Delegate all testing to qa-tester sub-agent
71
- - Capture verbose test output for audit trail
72
- - Enforce minimum coverage thresholds
73
- - Never mock external services in tests
74
-
75
- 7. **DateTime Handling**:
76
- - Use real system time in ISO 8601 UTC format
77
- - Include timestamps in all YAML frontmatter
78
- - Handle timezone-aware operations correctly
79
- - Support cross-platform datetime operations
80
-
81
- 8. **MCP Integration**:
82
- - Use WebFetch tool for all external content retrieval
83
- - Apply URL validation rules for security
84
- - Implement retry logic with exponential backoff
85
- - Cache content appropriately to reduce API calls
86
-
87
- Steps:
88
- 0) Constitutional Validation
89
- - Read and internalize ${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md requirements
90
- - Validate all inputs against constitutional principles
91
- - Ensure current environment meets constitutional standards
92
- - Apply constitutional constraints to the entire workflow
93
-
94
- 1) Context intake
95
- - If planSources include URLs, first use MCP server "docs-web" (or WebFetch) to fetch HTML/MD/PDF and write them under devflow/requirements/${reqId}/research/${reqId}_*.md.
96
- - Read local .claude/docs/plan/*.md and CLAUDE.md to learn codebase constraints.
97
-
98
- 2) Git branch
99
- - git switch -c feature/${reqId}-${slug(BRANCH_TITLE_EN)}
100
-
101
- ## 标准作业流程
102
-
103
- ### 阶段1: 需求研究和分析
104
- 1. **外部资料研究**
105
- ```bash
106
- Task: prd-writer "Analyze ${planSources} and generate comprehensive PRD for ${reqId}: ${title}"
107
- ```
108
-
109
- - prd-writer 输出: `devflow/requirements/${reqId}/PRD.md`
110
- - 主 Agent 读取并理解需求
111
-
112
- 2. **规划和分解**
113
- ```bash
114
- Task: planner "Based on PRD, create Epic and detailed task breakdown for ${reqId}"
115
- ```
116
-
117
- - planner 输出: `EPIC.md` 和 `tasks/TASK_*.md`
118
- - 主 Agent 审查规划合理性
119
-
120
- ### 阶段2: 实施准备
121
- 3. **一致性初步验证**(计划阶段)
122
- ```bash
123
- Task: consistency-checker "Verify document consistency and requirement traceability for ${reqId}"
124
- ```
125
-
126
- - consistency-checker 输出: `CONSISTENCY_ANALYSIS.md`
127
- - 包含: 文档一致性检查、需求可追溯性验证、潜在冲突识别
128
- - **触发条件**: PRD 和 EPIC 生成完成后自动执行
129
-
130
- 4. **测试计划**(代码实现前)
131
- ```bash
132
- Task: qa-tester "Create comprehensive test plan for ${reqId} based on EPIC and tasks"
133
- ```
134
-
135
- - qa-tester 输出: `TEST_PLAN.md`
136
- - 包含: 测试策略、用例设计、覆盖率要求
137
- - **触发词**: 包含 "test plan" 的提示词
138
-
139
- 5. **安全评估计划**(代码实现前)
140
- ```bash
141
- Task: security-reviewer "Create comprehensive security plan for ${reqId} based on requirements"
142
- ```
143
-
144
- - security-reviewer 输出: `SECURITY_PLAN.md`
145
- - 包含: 安全检查点、风险评估、缓解措施
146
- - **触发词**: 包含 "security plan" 的提示词
147
-
148
- ### 阶段3: 主 Agent 代码实施
149
- 5. **代码实施**
150
- - 主 Agent 基于详细的 TASK 文档直接编写代码
151
- - 遵循现有项目模式和约定
152
- - 实施所有 TASK 的功能要求
153
-
154
- ### 阶段4: 质量验证(代码实现后)
155
- 6. **测试执行和报告**
156
- ```bash
157
- Task: qa-tester "Analyze implemented code and generate comprehensive test report for ${reqId}"
158
- ```
159
-
160
- - 主 Agent 基于 TEST_PLAN.md 编写和执行测试
161
- - qa-tester 分析测试结果,输出: `TEST_REPORT.md`
162
- - 包含: 覆盖率分析、测试结果、质量评估
163
- - **触发词**: 包含 "test report" 的提示词
164
-
165
- 7. **安全检查和报告**
166
- ```bash
167
- Task: security-reviewer "Analyze implemented code and generate comprehensive security report for ${reqId}"
168
- ```
169
-
170
- - security-reviewer 分析实际代码,输出: `SECURITY_REPORT.md`
171
- - 包含: 漏洞扫描、安全风险、修复建议
172
- - **触发词**: 包含 "security report" 的提示词
173
-
174
- 8. **最终一致性验证**(实施完成后)
175
- ```bash
176
- Task: consistency-checker "Perform comprehensive consistency verification for completed ${reqId}"
177
- ```
178
-
179
- - consistency-checker 输出: `FINAL_CONSISTENCY_REPORT.md`
180
- - 包含: 实现与规格一致性、测试覆盖完整性、文档同步状态
181
- - **触发条件**: 代码实现和质量报告完成后执行
182
-
183
- 9. **发布准备**
184
- ```bash
185
- Task: release-manager "Create release plan for ${reqId} based on quality reports"
186
- ```
187
-
188
- - release-manager 输出: `RELEASE_PLAN.md`
189
- - 包含: 发布流程、回滚计划、部署策略
190
-
191
- ### 阶段5: 发布执行
192
- 10. **质量闸检查**
193
- - **宪法合规检查**: 验证所有代码和流程符合项目宪法
194
- - **质量闸验证**: 确保通过所有质量闸要求
195
- - **架构一致性**: 验证架构约束得到遵循
196
- - **安全原则**: 确保安全原则得到执行
197
- - 修复 TEST_REPORT.md 和 SECURITY_REPORT.md 中发现的问题
198
-
199
- 11. **发布和合并**
200
- - 主 Agent 基于 RELEASE_PLAN.md 创建 PR
201
- - 执行最终质量闸检查
202
- - 处理代码合并流程
203
-
204
- ### 阶段6: 总结和归档
205
- 12. **文档更新**
206
- - 更新项目文档和说明
207
- - 记录实施过程和决策
208
- - 记录需求完成状态
209
-
210
- 13. **执行日志**
211
- - 在 LOG.md 中记录完整执行过程
212
- - 包含时间线、决策点、问题解决
9
+ 当用户执行需求交付时,主 Agent 按显式主链推进:
213
10
 
214
11
  ```text
215
- devflow/requirements/${reqId}/
216
- ├── PRD.md # 产品需求文档
217
- ├── EPIC.md # Epic 规划
218
- ├── tasks/ # 任务分解
219
- │ ├── TASK_001.md
220
- │ ├── TASK_002.md
221
- │ └── ...
222
- ├── research/ # 外部研究材料
223
- │ ├── ${reqId}_plan_1.md
224
- │ └── ${reqId}_plan_2.md
225
- ├── TEST_REPORT.md # 测试报告
226
- └── LOG.md # 执行日志
12
+ /flow:init -> /flow:spec -> /flow:dev -> /flow:verify -> /flow:release
227
13
  ```
228
14
 
229
- ## Agent Coordination Protocol
15
+ ## Agent 职责
16
+ - 维护全局上下文与最终实现。
17
+ - 仅把研究/规划/审查任务分发给对应子代理。
18
+ - 在每个阶段结束后写入状态与审计日志。
230
19
 
231
- ### Status Management
232
- Create and maintain status files for coordination:
233
- ```json
234
- // devflow/requirements/${reqId}/orchestration_status.json
235
- {
236
- "reqId": "${reqId}",
237
- "currentPhase": "development",
238
- "startTime": "2024-01-15T10:30:00Z",
239
- "phaseStatus": {
240
- "research": "completed",
241
- "prd": "completed",
242
- "planning": "completed",
243
- "development": "in_progress",
244
- "testing": "pending",
245
- "security": "pending",
246
- "release": "pending"
247
- },
248
- "activeAgents": [
249
- {"agent": "qa-tester", "phase": "test_analysis", "status": "running", "startTime": "..."},
250
- {"agent": "security-reviewer", "phase": "security_analysis", "status": "running", "startTime": "..."}
251
- ],
252
- "completedTasks": ["TASK_003"],
253
- "failedTasks": [],
254
- "nextActions": ["wait_for_TASK_001", "wait_for_TASK_002"]
255
- }
256
- ```
20
+ ## 阶段作业
21
+
22
+ ### 1) 初始化 `/flow:init`
23
+ - 创建需求目录与运行时上下文。
24
+ - 写入初始 `orchestration_status.json`。
257
25
 
258
- ### Sequential Execution Pattern
259
- When coordinating research agents:
260
- 1. **Pre-Launch**: Create orchestration_status.json
261
- 2. **Sequential Launch**: Start agents one by one based on dependencies
262
- 3. **Monitor**: Check agent completion via file system
263
- 4. **Quality Check**: Validate each agent's output before proceeding
264
- 5. **Main Agent Execution**: Execute code implementation based on all plans
26
+ ### 2) 规格与任务 `/flow:spec`
27
+ - 统一完成 PRD、技术方案、UI 约束(按模式可裁剪)。
28
+ - 产出可执行 `TASKS.md`,进入 `spec_complete`。
265
29
 
266
- ### Error Handling
267
- - If any research agent fails, pause and report
268
- - Allow manual intervention or retry
269
- - Update status file with failure details
270
- - Provide recovery options
30
+ ### 3) 开发执行 `/flow:dev`
31
+ - task manifest 执行并更新进度。
32
+ - 失败任务通过 `--resume` 增量恢复。
271
33
 
272
- ### Communication Files
273
- - `orchestration_status.json` - Current execution state
274
- - `LOG.md` - Detailed audit trail
275
- - `dev_status.json` - Development phase specifics
276
- - Individual task completion markers in tasks/ directory
34
+ ### 4) 质量闸 `/flow:verify`
35
+ - 快速模式用于日常检查。
36
+ - `--strict` 作为发布前唯一准入门禁。
277
37
 
278
- Be conservative with privileges. Ask when performing push/merge. Persist everything in Markdown.
38
+ ### 5) 发布收口 `/flow:release`
39
+ - 仅在 verify 通过后创建发布产物。
40
+ - 收尾清理 runtime/worktree 噪音。
279
41
 
280
- ## Key Implementation Notes
42
+ ## 失败恢复原则
43
+ - 不回退整条链,优先从失败阶段重试。
44
+ - 优先命令:`/flow:status`、`/flow:dev --resume`、`/flow:verify --strict`。
281
45
 
282
- **REMEMBER**: This is a workflow guide for the main agent. The main agent should call research-type sub-agents using Task tool for analysis and planning, then execute all actual code implementation, testing, and git operations directly based on the plans received from sub-agents.
46
+ ## 约束
47
+ - 必须遵循项目宪法与质量门禁。
48
+ - 禁止把旧链路命令(如 `/flow-new`)作为主流程推荐。
@@ -86,7 +86,7 @@ Hook 检测到 Task 工具调用
86
86
  | prd-writer | flow-spec | prd-writer.jsonl |
87
87
  | tech-architect | flow-spec | tech-architect.jsonl |
88
88
  | planner | flow-spec | planner.jsonl |
89
- | qa-tester | flow-quality | qa-tester.jsonl |
89
+ | qa-tester | flow-verify | qa-tester.jsonl |
90
90
 
91
91
  ## ralph-loop.ts (v4.7 Team 模式)
92
92
 
@@ -228,7 +228,7 @@ function logGateSkip(reqDir, completion, threshold, reason) {
228
228
  **Completion**: ${completion.percentage}%
229
229
  **Threshold**: ${threshold}%
230
230
  **Reason**: ${reason}
231
- **Command**: /flow-epic --skip-gate --reason "${reason}"
231
+ **Command**: /flow:spec --skip-gate --reason "${reason}"
232
232
  `;
233
233
 
234
234
  try {
@@ -252,7 +252,7 @@ function outputText(result) {
252
252
  console.log('❌ Checklist Gate: NO_CHECKLISTS');
253
253
  console.log(' No checklist files found.');
254
254
  console.log('');
255
- console.log(' Run /flow-checklist --type <type> first.');
255
+ console.log(' Run /flow:verify --strict first.');
256
256
  return;
257
257
  }
258
258
 
@@ -273,7 +273,7 @@ function outputText(result) {
273
273
  console.log('');
274
274
  console.log(' To continue:');
275
275
  console.log(' 1. Review and complete checklist items');
276
- console.log(' 2. Run /flow-checklist --status to check progress');
276
+ console.log(' 2. Run /flow:verify --strict to re-check progress');
277
277
  console.log(' 3. Or use --skip-gate --reason "your reason" to bypass');
278
278
  }
279
279
 
@@ -382,7 +382,7 @@ function main() {
382
382
  },
383
383
  message: passed
384
384
  ? `Checklist completion ${completion.percentage}% >= ${threshold}% threshold`
385
- : `Checklist completion ${completion.percentage}% < ${threshold}% threshold. Run /flow-checklist --status to review.`
385
+ : `Checklist completion ${completion.percentage}% < ${threshold}% threshold. Run /flow:verify --strict to review.`
386
386
  };
387
387
 
388
388
  if (options.json) {
@@ -50,8 +50,8 @@ const AGENT_SKILL_MAP: Record<string, string> = {
50
50
  'ui-designer': 'flow-spec',
51
51
  'planner': 'flow-spec',
52
52
  'dev-implementer': 'flow-dev',
53
- 'qa-tester': 'flow-quality',
54
- 'security-reviewer': 'flow-quality',
53
+ 'qa-tester': 'flow-verify',
54
+ 'security-reviewer': 'flow-verify',
55
55
  'release-manager': 'flow-release',
56
56
  };
57
57
 
@@ -117,7 +117,7 @@ function findRepoRoot(startPath: string): string | null {
117
117
  }
118
118
 
119
119
  /**
120
- * worktree 目录名或分支名提取 REQ-ID
120
+ * 从环境变量、.current-req 文件或目录扫描提取 REQ-ID
121
121
  */
122
122
  function extractReqId(repoRoot: string): string | null {
123
123
  // 尝试从目录名提取 (e.g., cc-devflow-REQ-123)
@@ -61,100 +61,9 @@ devflow/requirements/${reqId}/
61
61
 
62
62
  ---
63
63
 
64
- ## 🌿 Git Worktree 约定 (v4.3)
64
+ ## 🌿 Git 约定
65
65
 
66
- ### Worktree vs Branch 模式
67
-
68
- | 模式 | 命令 | 适用场景 |
69
- |------|------|----------|
70
- | **Worktree (默认)** | `/flow-init "REQ-123\|Title"` | 多需求并行、需要隔离环境 |
71
- | **Branch** | `/flow-init "REQ-123\|Title" --branch-only` | 单需求开发、简单修改 |
72
-
73
- ### Worktree 目录布局
74
-
75
- ```
76
- ~/projects/
77
- ├── cc-devflow/ # 主仓库 (main 分支)
78
- ├── cc-devflow-REQ-001/ # REQ-001 worktree
79
- ├── cc-devflow-REQ-002/ # REQ-002 worktree
80
- ├── cc-devflow-analysis/ # 只读分析 worktree (可选)
81
- └── cc-devflow-hotfix/ # 紧急修复 worktree (可选)
82
- ```
83
-
84
- ### 命名规范
85
-
86
- ```bash
87
- # Worktree 目录
88
- {repo-name}-{REQ_ID}
89
- # 示例: cc-devflow-REQ-123
90
-
91
- # 对应分支 (不变)
92
- feature/${reqId}-${slug(BRANCH_TITLE_EN)}
93
- # 示例: feature/REQ-123-user-order-support
94
- ```
95
-
96
- ### Worktree 操作流程
97
-
98
- 1. **创建** (flow-init 自动执行)
99
- ```bash
100
- git worktree add -b feature/REQ-123-title ../cc-devflow-REQ-123
101
- ```
102
-
103
- 2. **切换**
104
- ```bash
105
- cd ../cc-devflow-REQ-123
106
- # 或使用 shell 别名
107
- zw REQ-123
108
- ```
109
-
110
- 3. **开发**
111
- - 每个 worktree 独立的 Claude Code 会话
112
- - 互不干扰,保持上下文
113
-
114
- 4. **清理** (flow-release 自动执行)
115
- ```bash
116
- git worktree remove ../cc-devflow-REQ-123
117
- git branch -d feature/REQ-123-title
118
- ```
119
-
120
- ### Shell 别名推荐
121
-
122
- ```bash
123
- # 添加到 ~/.zshrc 或 ~/.bashrc
124
- alias za='cd $(git rev-parse --show-toplevel 2>/dev/null || echo .)'
125
- alias zl='git worktree list'
126
- alias zm='cd ~/projects/cc-devflow'
127
-
128
- zw() {
129
- local req_id="${1:-}"
130
- local repo_name=$(basename $(git rev-parse --show-toplevel 2>/dev/null))
131
- cd ~/projects/${repo_name}-${req_id}
132
- }
133
- ```
134
-
135
- ### 分支命名 (保持不变)
136
-
137
- ```bash
138
- # 标准格式
139
- feature/${reqId}-${slug(BRANCH_TITLE_EN)}
140
-
141
- # 示例
142
- feature/REQ-123-user-order-support
143
- feature/REQ-124-permission-management
144
- ```
145
-
146
- > BRANCH_TITLE_EN 为 TITLE 的英文意译 (语义为准,非拼音,使用模型意译)
147
-
148
- ### 分支操作流程 (Worktree 模式)
149
-
150
- 1. 确保主仓库在 main 分支且状态干净
151
- 2. 执行 `/flow-init` 创建 worktree + 分支
152
- 3. 切换到 worktree 目录
153
- 4. 启动新的 Claude Code 会话
154
- 5. 实施开发 (TDD方式)
155
- 6. 质量闸检查
156
- 7. 创建 PR
157
- 8. 合并后清理 worktree 和分支
66
+ > Git 分支、worktree、PR、合并由用户自行管理,DevFlow 不参与 Git 拓扑管理。
158
67
 
159
68
  ---
160
69
 
@@ -17,7 +17,7 @@ check-dependencies.sh: 依赖关系检查脚本。
17
17
  check-prerequisites.sh: 流程前置条件统一校验脚本。
18
18
  check-task-status.sh: TASKS 完成状态统计脚本。
19
19
  checklist-errors.sh: Checklist 错误码与诊断脚本。
20
- common.sh: 脚本公共函数库(REQ 识别、worktree 路径、日志工具等)。
20
+ common.sh: 脚本公共函数库(REQ 识别、日志工具等)。
21
21
  consolidate-research.sh: research 结果汇总脚本。
22
22
  create-requirement.sh: 创建需求目录与初始状态;同步 workspace 的 `.current-req`。
23
23
  delta-parser.ts: Delta 解析器。
@@ -36,8 +36,6 @@ flow-quality-full.sh: 全量质量检查脚本。
36
36
  flow-quality-quick.sh: 快速质量检查脚本。
37
37
  flow-workspace-init.sh: 开发者 workspace 初始化脚本。
38
38
  flow-workspace-record.sh: workspace journal 追加记录脚本。
39
- flow-workspace-start.sh: workspace 会话恢复脚本;支持 REQ 覆盖与 worktree 切换提示。
40
- flow-workspace-switch.sh: workspace REQ 切换脚本;支持 `--print-cd` 与 `--cd`。
41
39
  generate-clarification-questions.sh: Clarify 问题生成脚本。
42
40
  generate-clarification-report.sh: Clarify 报告生成脚本。
43
41
  generate-quickstart.sh: quickstart 文档生成脚本。
@@ -75,5 +73,4 @@ workflow-status.ts: 工作流状态类型化读取器。
75
73
  ## 设计约束
76
74
 
77
75
  - 需求识别统一复用 `common.sh`,避免多处正则分叉。
78
- - worktree 与 workspace 职责分离:代码隔离由 worktree 提供,连续上下文由 workspace 提供。
79
76
  - 新增脚本优先保持幂等与可重入,便于中断恢复。
@@ -152,7 +152,7 @@ if [[ ! -d "$CHECKLISTS_DIR" ]]; then
152
152
  echo "ERROR: NO_CHECKLISTS" >&2
153
153
  echo "Checklists directory not found: $CHECKLISTS_DIR" >&2
154
154
  echo "" >&2
155
- echo "Run /flow-checklist --type <type> first." >&2
155
+ echo "Run /flow:verify --strict first." >&2
156
156
  fi
157
157
  exit 1
158
158
  fi
@@ -171,7 +171,7 @@ if [[ ${#CHECKLIST_FILES[@]} -eq 0 ]]; then
171
171
  echo "ERROR: NO_CHECKLISTS" >&2
172
172
  echo "No checklist files found in $CHECKLISTS_DIR" >&2
173
173
  echo "" >&2
174
- echo "Run /flow-checklist --type <type> first." >&2
174
+ echo "Run /flow:verify --strict first." >&2
175
175
  fi
176
176
  exit 1
177
177
  fi
@@ -126,7 +126,7 @@ fi
126
126
  # Validate required directories and files
127
127
  if [[ ! -d "$REQ_DIR" ]]; then
128
128
  echo "ERROR: Requirement directory not found: $REQ_DIR" >&2
129
- echo "Run /flow-new first to create the requirement structure." >&2
129
+ echo "Run /flow:init first to create the requirement structure." >&2
130
130
  exit 1
131
131
  fi
132
132
 
@@ -229,4 +229,4 @@ else
229
229
  check_file "$ANALYSIS_FILE" "ANALYSIS.md"
230
230
  check_file "$PLAN_FILE" "PLAN.md"
231
231
  fi
232
- fi
232
+ fi
@@ -2,7 +2,7 @@
2
2
  # ============================================================================
3
3
  # checklist-errors.sh
4
4
  # ============================================================================
5
- # Error codes and messages for /flow-checklist command and related hooks
5
+ # Error codes and messages for checklist gate and related hooks
6
6
  #
7
7
  # Usage: source this file in scripts that need checklist error handling
8
8
  #
@@ -51,7 +51,7 @@ print_checklist_error() {
51
51
  echo "ERROR: $code" >&2
52
52
  echo "PRD.md not found in requirement directory." >&2
53
53
  echo "" >&2
54
- echo "Run /flow-prd first." >&2
54
+ echo "Run /flow:spec first." >&2
55
55
  ;;
56
56
  "$ERR_INVALID_TYPE")
57
57
  echo "ERROR: $code" >&2
@@ -63,7 +63,7 @@ print_checklist_error() {
63
63
  echo "ERROR: $code" >&2
64
64
  echo "No checklists found in checklists/ directory." >&2
65
65
  echo "" >&2
66
- echo "Run /flow-checklist --type <type> first." >&2
66
+ echo "Run /flow:verify --strict first." >&2
67
67
  ;;
68
68
  "$ERR_ITEM_NOT_FOUND")
69
69
  echo "WARNING: $code" >&2
@@ -73,7 +73,7 @@ print_checklist_error() {
73
73
  echo "ERROR: $code" >&2
74
74
  echo "Checklist completion $extra" >&2
75
75
  echo "" >&2
76
- echo "Run /flow-checklist --status to review incomplete items." >&2
76
+ echo "Run /flow:verify --strict to review incomplete items." >&2
77
77
  echo "Or use --skip-gate --reason \"your reason\" to bypass." >&2
78
78
  ;;
79
79
  "$ERR_SKIP_REASON_REQUIRED")