cc-devflow 4.1.5 → 4.2.0

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 (112) hide show
  1. package/.claude/CLAUDE.md +87 -1091
  2. package/.claude/commands/core/architecture.md +32 -2
  3. package/.claude/commands/core/guidelines.md +27 -2
  4. package/.claude/commands/core/roadmap.md +33 -4
  5. package/.claude/commands/core/style.md +53 -263
  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 +113 -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 +58 -60
  61. package/.claude/skills/workflow/flow-dev/context.jsonl +4 -8
  62. package/.claude/skills/workflow/flow-init/SKILL.md +46 -144
  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 +40 -511
  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 +72 -0
  77. package/README.md +96 -69
  78. package/README.zh-CN.md +95 -67
  79. package/bin/cc-devflow-cli.js +154 -0
  80. package/bin/harness.js +22 -0
  81. package/docs/commands/README.md +34 -38
  82. package/docs/commands/README.zh-CN.md +34 -36
  83. package/docs/commands/core-roadmap.md +2 -2
  84. package/docs/commands/core-roadmap.zh-CN.md +2 -2
  85. package/docs/commands/core-style.md +29 -381
  86. package/docs/commands/core-style.zh-CN.md +29 -381
  87. package/docs/commands/flow-init.md +10 -10
  88. package/docs/commands/flow-init.zh-CN.md +11 -11
  89. package/docs/commands/flow-new.md +25 -260
  90. package/docs/commands/flow-new.zh-CN.md +26 -257
  91. package/docs/guides/getting-started.md +16 -15
  92. package/docs/guides/getting-started.zh-CN.md +10 -12
  93. package/lib/compiler/__tests__/manifest.test.js +156 -0
  94. package/lib/compiler/__tests__/parser.test.js +21 -0
  95. package/lib/compiler/index.js +17 -1
  96. package/lib/compiler/manifest.js +68 -6
  97. package/lib/compiler/parser.js +5 -0
  98. package/lib/harness/CLAUDE.md +21 -0
  99. package/lib/harness/cli.js +208 -0
  100. package/lib/harness/index.js +16 -0
  101. package/lib/harness/operations/dispatch.js +285 -0
  102. package/lib/harness/operations/init.js +48 -0
  103. package/lib/harness/operations/janitor.js +74 -0
  104. package/lib/harness/operations/pack.js +100 -0
  105. package/lib/harness/operations/plan.js +29 -0
  106. package/lib/harness/operations/release.js +83 -0
  107. package/lib/harness/operations/resume.js +44 -0
  108. package/lib/harness/operations/verify.js +163 -0
  109. package/lib/harness/planner.js +141 -0
  110. package/lib/harness/schemas.js +108 -0
  111. package/lib/harness/store.js +240 -0
  112. package/package.json +9 -1
@@ -28,24 +28,23 @@ usage() {
28
28
 
29
29
  选项:
30
30
  -h, --help 显示此帮助信息
31
- --from STAGE 从指定阶段重新开始 (init/prd/epic/dev/quality/release, qa 兼容)
31
+ --from STAGE 从指定阶段重新开始 (init/spec/dev/verify/release;prd/epic/quality/qa 兼容)
32
32
  --force 强制恢复,跳过安全检查
33
33
  --dry-run 显示恢复计划但不执行
34
34
  --verbose 显示详细信息
35
35
 
36
36
  阶段说明:
37
37
  init - 初始化阶段
38
- prd - PRD生成阶段
39
- epic - Epic规划阶段
38
+ spec - 规格与任务规划阶段
40
39
  dev - 开发执行阶段
41
- quality - 质量验证阶段
40
+ verify - 质量验证阶段
42
41
  release - 发布管理阶段
43
42
 
44
43
  示例:
45
44
  $0 REQ-123 # 自动检测并恢复
46
45
  $0 REQ-123 --from dev # 从开发阶段重新开始
47
46
  $0 REQ-123 --dry-run # 预览恢复计划
48
- $0 REQ-123 --from prd --force # 强制从PRD阶段重新开始
47
+ $0 REQ-123 --from spec --force # 强制从规划阶段重新开始
49
48
 
50
49
  EOF
51
50
  exit 0
@@ -127,14 +126,14 @@ detect_workflow_status() {
127
126
  # 检查需求目录是否存在
128
127
  if [[ ! -d "$REQ_DIR" ]]; then
129
128
  echo -e "${RED}错误: 需求目录不存在: $REQ_DIR${NC}"
130
- echo -e "${YELLOW}建议: 使用 /flow-init 初始化需求${NC}"
129
+ echo -e "${YELLOW}建议: 使用 /flow:init 初始化需求${NC}"
131
130
  exit 1
132
131
  fi
133
132
 
134
133
  # 检查状态文件
135
134
  if [[ ! -f "$STATUS_FILE" ]]; then
136
135
  echo -e "${YELLOW}警告: 状态文件不存在,需求可能未正确初始化${NC}"
137
- echo -e "${YELLOW}建议: 使用 /flow-init --force 重新初始化${NC}"
136
+ echo -e "${YELLOW}建议: 使用 /flow:init --force 重新初始化${NC}"
138
137
  exit 1
139
138
  fi
140
139
 
@@ -213,29 +212,21 @@ analyze_recovery_strategy() {
213
212
  if [[ -n "$FROM_STAGE" ]]; then
214
213
  echo -e "${YELLOW}用户指定从阶段恢复: $FROM_STAGE${NC}"
215
214
  validate_stage "$FROM_STAGE"
216
- echo "$FROM_STAGE"
215
+ echo "$(normalize_stage "$FROM_STAGE")"
217
216
  return 0
218
217
  fi
219
218
 
220
219
  # 根据当前阶段智能判断恢复点
221
220
  case "$current_phase" in
222
- initialized|planning)
223
- echo -e "${CYAN}建议: 从 PRD 阶段开始${NC}"
224
- echo "prd"
221
+ initialized|context_packed|planning|planned|spec_in_progress)
222
+ echo -e "${CYAN}建议: 从规格阶段开始${NC}"
223
+ echo "spec"
225
224
  ;;
226
- prd_generation_in_progress)
227
- echo -e "${CYAN}建议: 重新生成 PRD${NC}"
228
- echo "prd"
229
- ;;
230
- prd_complete|epic_planning)
231
- echo -e "${CYAN}建议: 从 Epic 阶段开始${NC}"
232
- echo "epic"
233
- ;;
234
- epic_complete)
225
+ prd_generation_in_progress|epic_planning|prd_complete|epic_complete|spec_complete)
235
226
  echo -e "${CYAN}建议: 从开发阶段开始${NC}"
236
227
  echo "dev"
237
228
  ;;
238
- development|dev_complete)
229
+ development|development_in_progress|dev_complete|development_complete)
239
230
  # 检查是否有未完成的任务
240
231
  if [[ -f "$REQ_DIR/TASKS.md" ]]; then
241
232
  # 统计已完成任务 (- [x] 标记)
@@ -252,16 +243,20 @@ analyze_recovery_strategy() {
252
243
  echo "dev"
253
244
  else
254
245
  echo -e "${CYAN}建议: 进入质量验证阶段${NC}"
255
- echo "quality"
246
+ echo "verify"
256
247
  fi
257
248
  else
258
249
  echo -e "${CYAN}建议: 从开发阶段开始${NC}"
259
250
  echo "dev"
260
251
  fi
261
252
  ;;
262
- quality|quality_complete|qa|qa_complete)
253
+ quality|qa|verification_in_progress)
263
254
  echo -e "${CYAN}建议: 从质量验证阶段开始${NC}"
264
- echo "quality"
255
+ echo "verify"
256
+ ;;
257
+ quality_complete|qa_complete|verified)
258
+ echo -e "${CYAN}建议: 从发布阶段开始${NC}"
259
+ echo "release"
265
260
  ;;
266
261
  release|release_complete)
267
262
  echo -e "${CYAN}建议: 从发布阶段开始${NC}"
@@ -273,8 +268,8 @@ analyze_recovery_strategy() {
273
268
  exit 0
274
269
  ;;
275
270
  *)
276
- echo -e "${YELLOW}警告: 未知阶段 '$current_phase',从 PRD 开始${NC}"
277
- echo "prd"
271
+ echo -e "${YELLOW}警告: 未知阶段 '$current_phase',从规格阶段开始${NC}"
272
+ echo "spec"
278
273
  ;;
279
274
  esac
280
275
  }
@@ -284,17 +279,33 @@ validate_stage() {
284
279
  local stage="$1"
285
280
 
286
281
  case "$stage" in
287
- init|prd|epic|dev|quality|qa|release)
282
+ init|spec|dev|verify|release|prd|epic|quality|qa)
288
283
  return 0
289
284
  ;;
290
285
  *)
291
286
  echo -e "${RED}错误: 无效的阶段 '$stage'${NC}"
292
- echo -e "${YELLOW}有效阶段: init, prd, epic, dev, quality, release (qa 兼容)${NC}"
287
+ echo -e "${YELLOW}有效阶段: init, spec, dev, verify, release (prd/epic/quality/qa 兼容)${NC}"
293
288
  exit 1
294
289
  ;;
295
290
  esac
296
291
  }
297
292
 
293
+ # 兼容历史阶段名称,统一映射到主链阶段
294
+ normalize_stage() {
295
+ local stage="$1"
296
+ case "$stage" in
297
+ prd|epic)
298
+ echo "spec"
299
+ ;;
300
+ quality|qa)
301
+ echo "verify"
302
+ ;;
303
+ *)
304
+ echo "$stage"
305
+ ;;
306
+ esac
307
+ }
308
+
298
309
  # ============================================================================
299
310
  # 恢复执行
300
311
  # ============================================================================
@@ -315,19 +326,16 @@ generate_recovery_plan() {
315
326
  local stages=()
316
327
  case "$start_stage" in
317
328
  init)
318
- stages=("init" "prd" "epic" "dev" "quality" "release")
329
+ stages=("init" "spec" "dev" "verify" "release")
319
330
  ;;
320
- prd)
321
- stages=("prd" "epic" "dev" "quality" "release")
322
- ;;
323
- epic)
324
- stages=("epic" "dev" "quality" "release")
331
+ spec)
332
+ stages=("spec" "dev" "verify" "release")
325
333
  ;;
326
334
  dev)
327
- stages=("dev" "quality" "release")
335
+ stages=("dev" "verify" "release")
328
336
  ;;
329
- quality|qa)
330
- stages=("quality" "release")
337
+ verify)
338
+ stages=("verify" "release")
331
339
  ;;
332
340
  release)
333
341
  stages=("release")
@@ -340,22 +348,19 @@ generate_recovery_plan() {
340
348
  local command=""
341
349
  case "$stage" in
342
350
  init)
343
- command="/flow-init \"$REQ_ID\""
344
- ;;
345
- prd)
346
- command="/flow-prd \"$REQ_ID\""
351
+ command="/flow:init \"$REQ_ID\""
347
352
  ;;
348
- epic)
349
- command="/flow-epic \"$REQ_ID\""
353
+ spec)
354
+ command="/flow:spec \"$REQ_ID\""
350
355
  ;;
351
356
  dev)
352
- command="/flow-dev \"$REQ_ID\" --resume"
357
+ command="/flow:dev \"$REQ_ID\" --resume"
353
358
  ;;
354
- quality)
355
- command="/flow-quality \"$REQ_ID\""
359
+ verify)
360
+ command="/flow:verify \"$REQ_ID\" --strict"
356
361
  ;;
357
362
  release)
358
- command="/flow-release \"$REQ_ID\""
363
+ command="/flow:release \"$REQ_ID\""
359
364
  ;;
360
365
  esac
361
366
 
@@ -387,43 +392,35 @@ execute_recovery() {
387
392
  fi
388
393
 
389
394
  # 根据起始阶段执行命令
390
- # 注意: 这里只是展示命令,实际执行由用户手动调用或使用 /flow-restart
395
+ # 注意: 这里只是展示命令,实际执行由用户手动调用或使用 /flow:restart
391
396
  echo -e "${CYAN}请手动执行以下命令以恢复工作流:${NC}"
392
397
  echo ""
393
398
 
394
399
  case "$start_stage" in
395
400
  init)
396
- echo "/flow-init \"$REQ_ID\""
397
- echo "/flow-prd \"$REQ_ID\""
398
- echo "/flow-epic \"$REQ_ID\""
399
- echo "/flow-dev \"$REQ_ID\""
400
- echo "/flow-quality \"$REQ_ID\""
401
- echo "/flow-release \"$REQ_ID\""
401
+ echo "/flow:init \"$REQ_ID\""
402
+ echo "/flow:spec \"$REQ_ID\""
403
+ echo "/flow:dev \"$REQ_ID\""
404
+ echo "/flow:verify \"$REQ_ID\" --strict"
405
+ echo "/flow:release \"$REQ_ID\""
402
406
  ;;
403
- prd)
404
- echo "/flow-prd \"$REQ_ID\""
405
- echo "/flow-epic \"$REQ_ID\""
406
- echo "/flow-dev \"$REQ_ID\""
407
- echo "/flow-quality \"$REQ_ID\""
408
- echo "/flow-release \"$REQ_ID\""
409
- ;;
410
- epic)
411
- echo "/flow-epic \"$REQ_ID\""
412
- echo "/flow-dev \"$REQ_ID\""
413
- echo "/flow-quality \"$REQ_ID\""
414
- echo "/flow-release \"$REQ_ID\""
407
+ spec)
408
+ echo "/flow:spec \"$REQ_ID\""
409
+ echo "/flow:dev \"$REQ_ID\""
410
+ echo "/flow:verify \"$REQ_ID\" --strict"
411
+ echo "/flow:release \"$REQ_ID\""
415
412
  ;;
416
413
  dev)
417
- echo "/flow-dev \"$REQ_ID\" --resume"
418
- echo "/flow-quality \"$REQ_ID\""
419
- echo "/flow-release \"$REQ_ID\""
414
+ echo "/flow:dev \"$REQ_ID\" --resume"
415
+ echo "/flow:verify \"$REQ_ID\" --strict"
416
+ echo "/flow:release \"$REQ_ID\""
420
417
  ;;
421
- quality|qa)
422
- echo "/flow-quality \"$REQ_ID\""
423
- echo "/flow-release \"$REQ_ID\""
418
+ verify)
419
+ echo "/flow:verify \"$REQ_ID\" --strict"
420
+ echo "/flow:release \"$REQ_ID\""
424
421
  ;;
425
422
  release)
426
- echo "/flow-release \"$REQ_ID\""
423
+ echo "/flow:release \"$REQ_ID\""
427
424
  ;;
428
425
  esac
429
426
 
@@ -25,7 +25,7 @@ Usage: run-quality-gates.sh <phase> [--json] [--verbose]
25
25
  Execute quality gate verification commands for a phase.
26
26
 
27
27
  Arguments:
28
- phase Phase name (flow-dev, flow-review, flow-quality, flow-qa, flow-release)
28
+ phase Phase name (flow-dev, flow-review, flow-quality, flow-release)
29
29
 
30
30
  Options:
31
31
  --json Output results as JSON
@@ -78,7 +78,7 @@ validate_req_id "$REQ_ID" || exit 1
78
78
  # Ensure the requirement directory exists
79
79
  if [[ ! -d "$REQ_DIR" ]]; then
80
80
  echo "ERROR: Requirement directory not found: $REQ_DIR" >&2
81
- echo "Run /flow-init first to create the requirement structure." >&2
81
+ echo "Run /flow:init first to create the requirement structure." >&2
82
82
  exit 1
83
83
  fi
84
84
 
@@ -170,4 +170,4 @@ else
170
170
  echo "PRD_FILE: $PRD_FILE"
171
171
  echo "EPIC_FILE: $EPIC_FILE"
172
172
  echo "TASKS_FILE: $TASKS_FILE"
173
- fi
173
+ fi
@@ -91,14 +91,14 @@ fi
91
91
  REQ_DIR="devflow/requirements/${REQ_ID}"
92
92
  if [[ ! -d "$REQ_DIR" ]]; then
93
93
  echo "❌ Error: Requirement directory not found: $REQ_DIR" >&2
94
- echo " Run /flow-init first to create the requirement structure" >&2
94
+ echo " Run /flow:init first to create the requirement structure" >&2
95
95
  exit 1
96
96
  fi
97
97
 
98
98
  # Check if TASKS.md exists
99
99
  if [[ ! -f "${REQ_DIR}/TASKS.md" ]]; then
100
100
  echo "❌ Error: TASKS.md not found in $REQ_DIR" >&2
101
- echo " Run /flow-epic first to generate tasks" >&2
101
+ echo " Run /flow:spec first to generate tasks" >&2
102
102
  exit 1
103
103
  fi
104
104
 
@@ -303,7 +303,7 @@ main() {
303
303
  echo "════════════════════════════════════════════════════════════════════════"
304
304
  if [[ $total_errors -eq 0 ]]; then
305
305
  echo "✅ ALL VALIDATIONS PASSED"
306
- echo "research.md is ready for /flow-prd"
306
+ echo "research.md is ready for /flow:spec"
307
307
  echo "════════════════════════════════════════════════════════════════════════"
308
308
  return 0
309
309
  else
@@ -31,7 +31,7 @@ require_file() {
31
31
  require_dir "$CLAUDE_DIR/commands"
32
32
  require_dir "$CLAUDE_DIR/skills"
33
33
  require_dir "$CLAUDE_DIR/scripts"
34
- require_file "$CLAUDE_DIR/commands/flow-new.md"
34
+ require_file "$CLAUDE_DIR/commands/flow/new.md"
35
35
  require_file "$CLAUDE_DIR/skills/cc-devflow-orchestrator/SKILL.md"
36
36
 
37
37
  echo "cc-devflow setup OK."
@@ -6,159 +6,164 @@ description: CC-DevFlow workflow router and agent recommender. Use when starting
6
6
  # CC-DevFlow Orchestrator
7
7
 
8
8
  ## Purpose
9
- Guide users to the correct agent/command WITHOUT duplicating their detailed standards.
9
+ Guide users to the correct command/skill without duplicating detailed implementation standards.
10
10
 
11
11
  ## Workflow Map
12
12
 
13
- ### 🏢 项目级工作流(Project-Level, 项目初期执行一次)
13
+ ### Project-Level (run once per project)
14
14
 
15
- ```
16
- /core:roadmap → ROADMAP.md + BACKLOG.md (产品路线图)
17
- /core:architecture → ARCHITECTURE.md (系统架构设计)
18
- /core:guidelines → frontend-guidelines.md / backend-guidelines.md (项目规范)
19
- /core:style → STYLE.md (设计风格指南)
15
+ ```text
16
+ /core:roadmap → ROADMAP.md + BACKLOG.md
17
+ /core:architecture → ARCHITECTURE.md
18
+ /core:guidelines → frontend/backend guidelines
19
+ /core:style → STYLE.md
20
20
  ```
21
21
 
22
- ### 📦 需求级工作流(Requirement-Level, 每个需求执行一次)
22
+ ## Project-Level Harness Protocol (Long-running)
23
23
 
24
- ```
25
- /flow:init → research.md + tasks.json + BRAINSTORM.md (研究初始化 + 头脑风暴)
26
-
27
- /flow:clarify clarifications/*.md (11 维度歧义扫描, 可选)
28
-
29
- /flow:spec PRD + Tech + UI + Epic (统一规格阶段)
30
- Modes:
31
- - Full: PRD Tech+UI (并行) → Epic
32
- - Quick: PRD Epic (--skip-tech --skip-ui)
33
- - Backend: PRD → Tech → Epic (--skip-ui)
34
- - Frontend: PRD UI Epic (--skip-tech)
24
+ For `/core:*` commands, enforce a two-session model before declaring completion:
25
+
26
+ 1. Initializer session
27
+ - establish/update `devflow/.core-harness/<command>/checklist.json`, `progress.md`, `session-handoff.md`
28
+ - convert high-level goal into structured acceptance checks (default all failing)
29
+ 2. Worker session(s)
30
+ - resume from `session-handoff.md` + `progress.md`
31
+ - execute one smallest deliverable per session
32
+ - update checklist status only after command-specific validation
33
+ 3. Completion gate
34
+ - completion is allowed only when checklist is fully passing and command validation gates pass
35
+ - never declare success from “looks complete”; require artifact evidence
36
+
37
+ ### Core Route Defaults
38
+
39
+ - no `devflow/ROADMAP.md` → route to `/core:roadmap` (initializer first)
40
+ - roadmap exists but architecture missing/stale → route to `/core:architecture`
41
+ - architecture exists but guidelines missing/stale → route to `/core:guidelines`
42
+ - style missing/stale → route to `/core:style`
43
+ - interrupted core command → rerun same command from handoff (`/core:roadmap --resume` if supported; otherwise run command again and continue from `session-handoff.md`)
44
+
45
+ ### Requirement-Level Canonical Mainline (v6)
46
+
47
+ ```text
48
+ /flow:init → harness:init + harness:pack
49
+ → context-package.md + harness-state.json
35
50
 
36
- /flow:dev TASKS.md execution (TDD + Autonomous mode default)
51
+ /flow:spec harness:plan
52
+ → task-manifest.json
37
53
 
38
- /flow:quality Quality verification
54
+ /flow:dev harness:dispatch / harness:resume
55
+ → runtime events + checkpoints + manifest status
39
56
 
40
- /flow:release PR creation + deployment
57
+ /flow:verify harness:verify
58
+ → report-card.json (quick/strict gates)
41
59
 
42
- /flow:verifyconsistency check (任意阶段可调用)
60
+ /flow:releaseharness:release + harness:janitor
61
+ → RELEASE_NOTE.md + released state
43
62
  ```
44
63
 
45
- ### 🚀 简化流程
64
+ ### Bug Workflow
46
65
 
66
+ ```text
67
+ /flow:fix "BUG-123|描述" → 系统化调试与修复
47
68
  ```
48
- 【精简流程】(适合小需求, 3 步)
49
- /flow:init --quick → /flow:spec --skip-tech --skip-ui → /flow:dev → /flow:release
50
69
 
51
- 【标准流程】(适合中等需求, 4 )
52
- /flow:init → /flow:spec → /flow:dev → /flow:quality → /flow:release
70
+ ### Deprecated Migrations (keep for compatibility)
53
71
 
54
- 【完整流程】(适合大需求, 5 步)
55
- /flow:init → /flow:clarify → /flow:spec → /flow:dev → /flow:quality --full → /flow:release
72
+ ```text
73
+ /flow:new → /flow:init → /flow:spec → /flow:dev → /flow:verify → /flow:release
74
+ /flow:clarify → merged into /flow:spec
75
+ /flow:checklist → merged into /flow:verify --strict
76
+ /flow:quality → merged into /flow:verify
56
77
  ```
57
78
 
58
- ### 🐛 Bug 修复工作流
79
+ ## Routing Guide
59
80
 
60
- ```
61
- /flow:fix "BUG-123|描述" → 系统化调试 (4阶段: Root Cause → Pattern → Hypothesis → TDD Fix)
62
- ```
63
-
64
- **说明**:
65
- - `/flow:spec` 是统一规格命令,合并 PRD/Tech/UI/Epic 为单一命令
66
- - `/flow:spec` 内部并行执行 Tech + UI,减少 ~35% 设计阶段时间
67
- - `/flow:dev` 默认 Autonomous 模式(自动重试),使用 `--manual` 退出到 Manual 模式
68
-
69
- ## Agent Delegation Guide
81
+ ### Requirement kickoff
82
+ - Recommend: `/flow:init "REQ-123|Title|URLs?"`
83
+ - Then: `/flow:spec "REQ-123"`
70
84
 
71
- ### When User Asks About Unified Specification
72
- - **DO**: Recommend `/flow:spec` command → orchestrates prd-writer + tech-architect + ui-designer + planner
73
- - **Link**: See `.claude/skills/workflow/flow-spec/SKILL.md` for details
74
- - **Modes**: Full (default), Quick (--skip-tech --skip-ui), Backend (--skip-ui), Frontend (--skip-tech)
85
+ ### Planning/specification questions
86
+ - Recommend: `/flow:spec`
87
+ - Notes: this is the unified planning stage for executable task-manifest generation.
75
88
 
76
- ### When User Asks About Requirements Clarification
77
- - **DO**: Recommend `/flow:clarify` command → invokes clarify-analyst agent
78
- - **Link**: See `.claude/commands/flow/clarify.md` for details
89
+ ### Development execution / interrupted execution
90
+ - Recommend: `/flow:dev "REQ-123"`
91
+ - If interrupted/failed: `/flow:dev "REQ-123" --resume`
79
92
 
80
- ### When User Asks About PRD/Tech/UI/Epic
81
- - **DO**: Recommend `/flow:spec` command (unified)
82
- - **Link**: See `.claude/agents/prd-writer.md`, `tech-architect.md`, `ui-designer.md`, `planner.md` for agent details
93
+ ### QA/security/release readiness
94
+ - Recommend: `/flow:verify "REQ-123"`
95
+ - Strict gate: `/flow:verify "REQ-123" --strict`
83
96
 
84
- ### When User Asks About QA/Security
85
- - **DO**: Recommend `/flow:quality` command → invokes qa-tester + security-reviewer agents
86
- - **Link**: See `.claude/agents/qa-tester.md` for QA details
97
+ ### Release
98
+ - Recommend: `/flow:release "REQ-123"`
99
+ - Release is blocked when report-card overall is fail.
87
100
 
88
- ### When User Asks About Code Review
89
- - **DO**: Recommend `/flow:review` command → invokes spec-reviewer + code-quality-reviewer agents
90
- - **Link**: See `.claude/commands/flow/review.md` for details
91
-
92
- ### When User Asks About Bug Fix
93
- - **DO**: Recommend `/flow:fix` command → 4-phase systematic debugging
94
- - **Link**: See `.claude/commands/flow/fix.md` for details
101
+ ### Code review requests
102
+ - Recommend: `/flow:verify "REQ-123" --strict`
103
+ - Optional deep review: `/util:code-review "<diff>"`
95
104
 
96
105
  ## Phase Gates (Quick Reference)
97
106
 
98
107
  ### Entry Gates
99
- - **flow:init Entry**: Git 工作区干净, main 分支
100
- - **flow:clarify Entry**: research.md 存在, phase0_complete == true
101
- - **flow:spec Entry**: BRAINSTORM.md 存在, research.md TODO placeholder
102
- - **flow:dev Entry**: EPIC.md + TASKS.md 存在
103
- - **flow:quality Entry**: development_complete == true
104
- - **flow:release Entry**: quality_complete == true
108
+ - `flow:init`: repository and requirement id are valid.
109
+ - `flow:spec`: `context-package.md` and `harness-state.json` exist.
110
+ - `flow:dev`: `task-manifest.json` exists and is schema-valid.
111
+ - `flow:verify`: task dispatch completed or at least one dispatch/resume run exists.
112
+ - `flow:release`: `report-card.json.overall == pass`.
105
113
 
106
114
  ### Exit Gates
107
- - **flow:init Exit**: research.md 5-level quality check, BRAINSTORM.md 完整
108
- - **flow:spec Exit**: PRD.md + EPIC.md + TASKS.md 完整, TDD 顺序正确
109
- - **flow:dev Exit**: 所有 TASKS 完成, TDD Checkpoint 通过
110
- - **flow:quality Exit**: high-severity 漏洞
111
- - **flow:release Exit**: PR 创建成功
115
+ - `flow:init`: requirement context packaged.
116
+ - `flow:spec`: task-manifest generated.
117
+ - `flow:dev`: task statuses updated with runtime checkpoints/events.
118
+ - `flow:verify`: report-card emitted (quick/strict/review sections).
119
+ - `flow:release`: release note generated and harness state marked released.
112
120
 
113
- ## State Machine: Status → Recommended Command
121
+ ## State → Recommended Command
114
122
 
115
123
  ```yaml
116
- status: "initialized"
117
- → Recommend: /flow:spec (统一规格阶段)
118
- → Alternative: /flow:clarify (optional)
124
+ no_requirement_context:
125
+ recommend: /flow:init
126
+
127
+ initialized_or_context_packed:
128
+ recommend: /flow:spec
119
129
 
120
- status: "clarify_complete" OR "clarify_skipped"
121
- → Recommend: /flow:spec
130
+ manifest_exists_with_pending_or_failed:
131
+ recommend: /flow:dev
132
+ alternative: /flow:dev --resume
122
133
 
123
- status: "spec_complete"
124
- → Recommend: /flow:dev (TDD development, Autonomous mode default)
134
+ manifest_all_passed_without_report_card:
135
+ recommend: /flow:verify --strict
125
136
 
126
- status: "development_complete"
127
- → Recommend: /flow:quality
137
+ report_card_fail:
138
+ recommend: /flow:dev --resume
139
+ then: /flow:verify --strict
128
140
 
129
- status: "quality_complete"
130
- → Recommend: /flow:release
141
+ report_card_pass:
142
+ recommend: /flow:release
131
143
 
132
- status: "released"
133
- → Recommend: /flow:verify (final consistency check)
144
+ released:
145
+ recommend: /flow:archive (optional)
134
146
  ```
135
147
 
136
148
  ## Auxiliary Commands
137
149
 
138
- ### Status and Progress
139
- - `/flow:status` - Query requirement progress
140
- - `/flow:update "REQ-123" "T012"` - Update task completion
141
- - `/flow:restart "REQ-123" --from=spec` - Resume interrupted workflow
142
-
143
- ### Upgrade and Analysis
144
- - `/flow:upgrade "REQ-123" --analyze` - PRD version upgrade impact analysis
145
- - `/flow:constitution` - Constitution management
146
- - `/flow:verify "REQ-123"` - Comprehensive consistency verification
147
-
148
- ### Bug Fix
149
- - `/flow:fix "BUG-123|描述"` - 系统化 BUG 修复
150
- - `/util:problem-analyzer "<issue>"` - Problem diagnosis
150
+ ### Progress and recovery
151
+ - `/flow:status` - query requirement progress
152
+ - `/flow:update "REQ-123" "T012"` - update task progress
153
+ - `/flow:restart "REQ-123" --from=dev` - recover interrupted workflow state
151
154
 
152
- ### Code Review
153
- - `/flow:review "REQ-123"` - Two-Stage Code Review
154
- - `/util:code-review "<diff>"` - High-rigor code review
155
+ ### Upgrade and governance
156
+ - `/flow:upgrade "REQ-123" --analyze` - PRD version impact analysis
157
+ - `/flow:constitution` - constitution governance
158
+ - `/flow:verify "REQ-123"` - consistency and quality verification
155
159
 
156
160
  ## Design Principle
157
161
 
158
- **This skill ONLY contains**:
159
- - Workflow routing (which command to run next)
160
- - Agent delegation (which agent handles what)
161
- - Quick reference (Phase Gates summary)
162
- - Links to detailed documentation
162
+ This skill only does routing:
163
+ - Which command to run next
164
+ - Which gate blocks progress
165
+ - Which migration path applies for deprecated commands
166
+ - Prefer incremental convergence over one-shot generation
167
+ - Require artifact-backed completion for long-running sessions
163
168
 
164
- **Rationale**: Avoid duplication. Agents and Commands own detailed standards.
169
+ Detailed quality standards stay in command files and workflow skills.
@@ -0,0 +1,24 @@
1
+ # workflow/
2
+ > L2 | 父级: /Users/dimon/001Area/80-CodeWorld/002-devflow/cc-devflow/.claude/CLAUDE.md
3
+
4
+ 成员清单
5
+ flow-init/SKILL.md: 需求初始化入口,调用 harness:init + harness:pack。
6
+ flow-init/context.jsonl: flow-init 的上下文注入定义。
7
+ flow-spec/SKILL.md: 计划生成入口,调用 harness:plan 产出 task-manifest。
8
+ flow-spec/context.jsonl: flow-spec 的上下文注入定义。
9
+ flow-spec/team-config.json: 旧 Team 配置资产(兼容保留,当前主链不依赖)。
10
+ flow-dev/SKILL.md: 执行入口,调用 harness:dispatch/resume 并写 checkpoint/events。
11
+ flow-dev/context.jsonl: flow-dev 的上下文注入定义。
12
+ flow-dev/dev-implementer.jsonl: 旧 dev-implementer 上下文(兼容保留)。
13
+ flow-verify/SKILL.md: 质量门禁入口,调用 harness:verify 输出 report-card。
14
+ flow-verify/context.jsonl: flow-verify 的上下文注入定义。
15
+ flow-release/SKILL.md: 发布入口,调用 harness:release + harness:janitor。
16
+ flow-release/context.jsonl: flow-release 的上下文注入定义。
17
+ flow-quality/SKILL.md: 旧质量流程技能(迁移过渡保留)。
18
+ flow-quality/context.jsonl: 旧质量流程上下文(迁移过渡保留)。
19
+ flow-fix/SKILL.md: Bug 修复流程技能。
20
+ flow-fix/context.jsonl: flow-fix 的上下文注入定义。
21
+
22
+ 法则: 成员完整·一行一文件·父级链接·技术词前置
23
+
24
+ [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md