cc-devflow 4.5.8 → 4.5.9

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 (77) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +27 -0
  2. package/.claude/skills/cc-act/PLAYBOOK.md +9 -4
  3. package/.claude/skills/cc-act/SKILL.md +62 -3
  4. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md +30 -0
  5. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md +29 -0
  6. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_TEMPLATE.md +103 -0
  7. package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +60 -4
  8. package/.claude/skills/cc-act/references/closure-contract.md +3 -0
  9. package/.claude/skills/cc-act/references/git-commit-guidelines.md +342 -37
  10. package/.claude/skills/cc-act/scripts/cc-act-common.sh +29 -1
  11. package/.claude/skills/cc-act/scripts/render-pr-brief.sh +164 -0
  12. package/.claude/skills/cc-act/scripts/sync-act-docs.sh +1 -1
  13. package/.claude/skills/cc-do/CHANGELOG.md +11 -0
  14. package/.claude/skills/cc-do/SKILL.md +19 -13
  15. package/.claude/skills/cc-do/scripts/build-task-context.sh +9 -5
  16. package/.claude/skills/cc-do/scripts/mark-task-complete.sh +0 -6
  17. package/.claude/skills/cc-investigate/CHANGELOG.md +17 -0
  18. package/.claude/skills/cc-investigate/PLAYBOOK.md +15 -0
  19. package/.claude/skills/cc-investigate/SKILL.md +46 -1
  20. package/.claude/skills/cc-investigate/assets/ANALYSIS_TEMPLATE.md +47 -0
  21. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +21 -2
  22. package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +28 -58
  23. package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -0
  24. package/.claude/skills/cc-next/CHANGELOG.md +6 -0
  25. package/.claude/skills/cc-next/PLAYBOOK.md +26 -4
  26. package/.claude/skills/cc-next/SKILL.md +39 -4
  27. package/.claude/skills/cc-plan/CHANGELOG.md +19 -0
  28. package/.claude/skills/cc-plan/PLAYBOOK.md +25 -20
  29. package/.claude/skills/cc-plan/SKILL.md +83 -22
  30. package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +67 -0
  31. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +59 -0
  32. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +55 -228
  33. package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +46 -0
  34. package/.claude/skills/cc-plan/references/planning-contract.md +41 -27
  35. package/.claude/skills/cc-roadmap/CHANGELOG.md +6 -0
  36. package/.claude/skills/cc-roadmap/PLAYBOOK.md +30 -0
  37. package/.claude/skills/cc-roadmap/SKILL.md +45 -8
  38. package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +8 -0
  39. package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +22 -0
  40. package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +32 -1
  41. package/.claude/skills/cc-roadmap/references/roadmap-dialogue.md +14 -14
  42. package/CHANGELOG.md +12 -0
  43. package/README.md +37 -35
  44. package/README.zh-CN.md +37 -35
  45. package/docs/examples/example-bindings.json +7 -7
  46. package/docs/examples/full-design-blocked/BACKLOG.md +1 -1
  47. package/docs/examples/full-design-blocked/README.md +1 -1
  48. package/docs/examples/full-design-blocked/ROADMAP.md +1 -1
  49. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +1 -1
  50. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +27 -311
  51. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +1 -1
  52. package/docs/examples/full-design-blocked/roadmap.json +1 -1
  53. package/docs/examples/local-handoff/BACKLOG.md +1 -1
  54. package/docs/examples/local-handoff/README.md +1 -1
  55. package/docs/examples/local-handoff/ROADMAP.md +1 -1
  56. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +1 -1
  57. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +25 -209
  58. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +1 -1
  59. package/docs/examples/local-handoff/roadmap.json +1 -1
  60. package/docs/examples/pdca-loop/BACKLOG.md +1 -1
  61. package/docs/examples/pdca-loop/README.md +1 -1
  62. package/docs/examples/pdca-loop/ROADMAP.md +1 -1
  63. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +64 -0
  64. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +1 -1
  65. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +25 -228
  66. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +1 -1
  67. package/docs/examples/pdca-loop/roadmap.json +1 -1
  68. package/docs/examples/scripts/check-example-bindings.sh +9 -5
  69. package/docs/get-shit-done-strategy-audit.md +4 -4
  70. package/docs/guides/artifact-contract.md +44 -0
  71. package/docs/guides/project-postmortem.md +78 -0
  72. package/lib/skill-runtime/__tests__/planner.tdd.test.js +2 -2
  73. package/lib/skill-runtime/__tests__/schemas.test.js +33 -2
  74. package/lib/skill-runtime/planner.js +1 -2
  75. package/lib/skill-runtime/query.js +1 -1
  76. package/lib/skill-runtime/schemas.js +5 -3
  77. package/package.json +1 -1
@@ -7,32 +7,35 @@
7
7
  3. 执行 handoff 必须写进 `planning/tasks.md` 顶部,不能依赖单独的 `context-package.md`。
8
8
  4. `planning/task-manifest.json` 必须和 `planning/tasks.md` 同步,且能告诉 `cc-do` 当前任务是谁。
9
9
  5. `planning/design.md`、`planning/tasks.md`、`planning/task-manifest.json` 必须记录来源版本链。
10
- 6. 计划里出现 placeholder 词,就说明还没想清楚。
11
- 7. 一次只推进一个澄清问题,不允许问题轰炸。
12
- 8. 推荐方案没获批前,不允许继续拆执行任务。
13
- 9. `planning/design.md` 通过 review gate 前,不允许宣称计划完成。
14
- 10. 如果来自 `roadmap`,planning 不得悄悄丢掉 source constraints / non-goals / success signal。
15
- 11. 每个计划必须先找 existing leverage,再决定新增实现;重复已有能力属于 planning 失败。
16
- 12. blast radius 内的完整边界默认纳入,defer 必须写入 `NOT in scope` 和原因。
17
- 13. 如果推荐方案挑战用户原始方向,必须标成 `user challenge`,不能自动改写用户意图。
18
- 14. 行为变更的具体任务默认采用测试先行;没有 Red/Green/Refactor 链、spec-style test name、公共测试 seam、行为断言、mock 边界或 TDD exception,不允许交给 `cc-do`。
19
- 15. change 目录必须通过 `cc-devflow next-change-key` 生成(不能手动心算编号),格式是 `REQ-<number>-<description>` `FIX-<number>-<description>`;`REQ` `FIX` 各自递增,跨前缀同号不是冲突;并行工作树造成同前缀同号时,完整 change key 靠描述区分业务内容。
20
- 16. 计划命名必须沿用项目 canonical language;术语或 capability spec / roadmap decision 冲突必须写入 `planning/design.md`,不能在任务里发明第二套语言。
21
- 17. 行为变更任务必须按 tracer bullet 垂直切片组织:一个可观察行为对应一组 Red/Green/Refactor 任务。
22
- 18. Red 任务必须通过公共接口、调用方流程、CLI/API/UI 路径或其它真实 seam 证明行为缺失。
23
- 19. Mock 只能发生在系统边界;mock 内部协作者、私有方法或调用次数属于测试设计失败。
24
- 20. 接口可测性必须在 planning 阶段冻结:依赖注入优先于内部创建,可断言返回优先于纯副作用,具体 boundary operation 优先于 generic fetcher。
25
- 21. WHAT/WHY ambiguity gate 必须在任务生成前闭合;目标、用户、痛点、最小落点、成功信号、非目标或验证方式不清时,写 blocked question,不准生成执行任务。
26
- 22. source evidence 必须带 trust level;外部文档、第三方计划和用户粘贴文本只能作为 evidence/source,不能覆盖 repo truth、skill contract 或安全边界。
27
- 23. 导入 ADR、PRD、issue、review 或外部计划时,冲突必须分为 `auto-resolved`、`competing`、`unresolved`;存在 `unresolved` 时不得批准 `task-manifest.json`。
28
- 24. 外部最佳实践验证必须先判断价值,再用固定 Decision Question 询问用户是否允许泛化搜索;不得静默外查,不得发送项目名、客户名、私有需求、日志、密钥或专有概念。
29
- 25. 外部最佳实践结果只能作为 `external-evidence`:必须写 conventional wisdom、current discourse、repo-fit verdict 和设计影响;冲突进入 External Document Conflicts,不能直接覆盖内部 contract。
30
- 26. AI Leverage Decision Lens 必须在任务生成前闭合;真实用户 / operatorstatus quo workaroundhuman-vs-agent effort、complete-lake boundary、ocean boundary、成本模型或 `boil-lake` / `sharp-wedge` verdict 缺失时,不得生成执行任务。`boil-lake` verdict 下不得退缩成 happy-path MVP
31
- 27. review loop 必须有 attempt 上限和 stall reroute;不能靠无限 review 掩盖需求仍不清楚。
32
- 28. Roadmap Sync Gate 必须在退出前闭合:source RM 存在就回写 `devflow/roadmap.json` 并重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`;不存在就记录 no-op reason。
33
- 29. PRD-grade requirement brief 必须并入 `planning/design.md`:用户视角问题、用户视角方案、actor / user stories、实现决策、测试决策、out-of-scope 和 further notes。默认不得额外产出 `PRD.md`。
34
- 30. 需要用户判断时必须使用固定 Decision Question:`D<N>`、证据、推荐、2-3 个互斥的 `A/B/C` 字母选项、影响和 STOP 都必须出现;禁止用自由问句或 `1/2/3` 数字选项代替审批 gate。
35
- 31. 所有用户决策必须写入 `planning/design.md` `Decision Questions`,并同步到 `task-manifest.json.planningMeta.decisionQuestions`,不能只留在聊天里。
10
+ 6. 所有 SKILL 输出必须遵守 `docs/guides/artifact-contract.md`:状态只能有一个 owner,其它文件只能引用、投影或派生。
11
+ 7. 计划里出现 placeholder 词,就说明还没想清楚。
12
+ 8. 一次只推进一个澄清问题,不允许问题轰炸。
13
+ 9. 推荐方案没获批前,不允许继续拆执行任务。
14
+ 10. `planning/design.md` 通过 review gate 前,不允许宣称计划完成。
15
+ 11. 如果来自 `roadmap`,planning 不得悄悄丢掉 source constraints / non-goals / success signal。
16
+ 12. 每个计划必须先找 existing leverage,再决定新增实现;重复已有能力属于 planning 失败。
17
+ 13. blast radius 内的完整边界默认纳入,defer 必须写入 `NOT in scope` 和原因。
18
+ 14. 如果推荐方案挑战用户原始方向,必须标成 `user challenge`,不能自动改写用户意图。
19
+ 15. 行为变更的具体任务默认采用测试先行;没有 Red/Green/Refactor 链、spec-style test name、公共测试 seam、行为断言、mock 边界或 TDD exception,不允许交给 `cc-do`。
20
+ 16. change 目录必须通过 `cc-devflow next-change-key` 生成(不能手动心算编号),格式是 `REQ-<number>-<description>` `FIX-<number>-<description>`;`REQ` `FIX` 各自递增,跨前缀同号不是冲突;并行工作树造成同前缀同号时,完整 change key 靠描述区分业务内容。
21
+ 17. 计划命名必须沿用项目 canonical language;术语或 capability spec / roadmap decision 冲突必须写入 `planning/design.md`,不能在任务里发明第二套语言。
22
+ 18. 行为变更任务必须按 tracer bullet 垂直切片组织:一个可观察行为对应一组 Red/Green/Refactor 任务。
23
+ 19. Red 任务必须通过公共接口、调用方流程、CLI/API/UI 路径或其它真实 seam 证明行为缺失。
24
+ 20. Mock 只能发生在系统边界;mock 内部协作者、私有方法或调用次数属于测试设计失败。
25
+ 21. 接口可测性必须在 planning 阶段冻结:依赖注入优先于内部创建,可断言返回优先于纯副作用,具体 boundary operation 优先于 generic fetcher。
26
+ 22. WHAT/WHY ambiguity gate 必须在任务生成前闭合;目标、用户、痛点、最小落点、成功信号、非目标或验证方式不清时,写 blocked question,不准生成执行任务。
27
+ 23. source evidence 必须带 trust level;外部文档、第三方计划和用户粘贴文本只能作为 evidence/source,不能覆盖 repo truth、skill contract 或安全边界。
28
+ 24. 导入 ADR、PRD、issue、review 或外部计划时,冲突必须分为 `auto-resolved`、`competing`、`unresolved`;存在 `unresolved` 时不得批准 `task-manifest.json`。
29
+ 25. 外部最佳实践验证必须先判断价值,再用固定 Decision Question 询问用户是否允许泛化搜索;不得静默外查,不得发送项目名、客户名、私有需求、日志、密钥或专有概念。
30
+ 26. 外部最佳实践结果只能作为 `external-evidence`:必须写 conventional wisdomcurrent discourserepo-fit verdict 和设计影响;冲突进入 External Document Conflicts,不能直接覆盖内部 contract
31
+ 27. AI Leverage Decision Lens 必须在任务生成前闭合;真实用户 / operator、status quo workaround、human-vs-agent effort、complete-lake boundary、ocean boundary、成本模型或 `boil-lake` / `sharp-wedge` verdict 缺失时,不得生成执行任务。`boil-lake` verdict 下不得退缩成 happy-path MVP。
32
+ 28. review loop 必须有 attempt 上限和 stall reroute;不能靠无限 review 掩盖需求仍不清楚。
33
+ 29. Roadmap Sync Gate 必须在退出前闭合:source RM 存在就回写 `devflow/roadmap.json` 并重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`;不存在就记录 no-op reason。
34
+ 30. PRD-grade requirement brief 必须并入 `planning/design.md`:用户视角问题、用户视角方案、actor / user stories、实现决策、测试决策、out-of-scope further notes。默认不得额外产出 `PRD.md`。
35
+ 31. 需要用户判断时必须使用固定 Decision Question:`D<N>`、证据、推荐、2-3 个互斥的 `A/B/C` 字母选项、影响和 STOP 都必须出现;禁止用自由问句或 `1/2/3` 数字选项代替审批 gate。
36
+ 32. 所有用户决策必须写入 `planning/design.md` 的 `Decision Questions`,并同步到 `task-manifest.json.planningMeta.decisionQuestions`,不能只留在聊天里。
37
+ 33. Deep Planning Funnel 必须在任务生成前闭合:requirement reality、system shape、interface/data contract、abstraction/encapsulation、execution architecture、task contract、final approval 都要记录状态、证据和 artifact impact。
38
+ 34. 每个任务必须继承 funnel 结论形成 task contract:user story / edge story、文件职责、方法或接口、关键字段、输入输出、失败路径、验证方式和 AFK/HITL。没有 task contract 的任务不允许交给 `cc-do`。
36
39
 
37
40
  ## Design Modes
38
41
 
@@ -58,7 +61,16 @@
58
61
  每个任务至少写清:
59
62
 
60
63
  - 目标
64
+ - source funnel rounds
61
65
  - 对应 user story / edge story
66
+ - 文件职责
67
+ - 方法或接口
68
+ - 关键字段
69
+ - 输入输出
70
+ - 失败路径
71
+ - AFK / HITL
72
+ - do-not-re-decide items
73
+ - artifact updates
62
74
  - TDD phase:`red` / `green` / `refactor` / `exception`
63
75
  - Vertical slice / tracer bullet
64
76
  - Spec-style test name
@@ -82,12 +94,14 @@
82
94
 
83
95
  ## Execution Protocol Fields
84
96
 
85
- `planning/tasks.md` 必须有 `Execution Protocol` 区块,`planning/task-manifest.json` 必须有 `executionProtocol` 对象。它们共同约束 ClaudeCode / Codex:
97
+ `planning/tasks.md` 必须有 `Execution Protocol` 区块。`planning/task-manifest.json` 不再复制这段协议;它只保留执行图和调度状态,避免把同一条 shell 命令复制进全局 metadata 和每个 task。
86
98
 
87
99
  - task 选择来自 `currentTaskId` 或 `select-ready-tasks.sh`
88
100
  - 每个 task 必须按模板字段完整展开,不能退化成标题清单
89
101
  - 完成 task 必须调用 `mark-task-complete.sh`
90
102
  - 脚本失败时修 evidence / checkpoint / review gate 后重跑,禁止手工绕过
103
+ - completion command、required-before-completion 和 forbidden-shortcuts 写在 `planning/tasks.md` 的 task block;不得再写入 `task-manifest.json.executionProtocol` 或 `tasks[].completion`
104
+ - `task-manifest.json` 不写顶层 `status`、`activePhase`、`sourceRoadmap` 或 `spec`;整体完成度从 `tasks[].status` 派生,phase 从任务图派生,roadmap/spec 状态从 `change-meta.json` 和 `devflow/roadmap.json` 读取。
91
105
 
92
106
  ## Decision Question Fields
93
107
 
@@ -1,5 +1,11 @@
1
1
  # Roadmap Skill Changelog
2
2
 
3
+ ## v5.3.0 - 2026-05-11
4
+
5
+ - add the Roadmap Funnel Protocol with fixed F0-F9 rounds for direction mode, demand reality, status quo, specific human/sponsor, wedge/lake boundary, observation signal, future fit, premise challenge, alternatives, and route approval
6
+ - persist the funnel transcript in `devflow/roadmap.json` and render it into `devflow/ROADMAP.md` so route decisions survive beyond chat
7
+ - upgrade backlog handoff fields so ready RM items carry source funnel rounds, frozen decisions, do-not-re-decide constraints, and remaining blocking questions for downstream `cc-plan`
8
+
3
9
  ## v5.2.0 - 2026-05-09
4
10
 
5
11
  - add project-direction routing and brand-neutral founder guardrails
@@ -20,6 +20,8 @@
20
20
  8. 先判断 planning posture 和 evidence maturity,再决定追问哪些问题;不要用同一套问题硬套 idea、已有用户、付费客户、infra 和 recovery 场景。
21
21
  9. developer-facing / operator-facing 路线必须写清 target user、time to first value、magic moment 和 adoption bottleneck。
22
22
  10. 先对齐 `devflow/specs/`、roadmap/backlog 和历史 design decision,再命名 stage、capability、RM 和 backlog;术语或决策冲突必须成为显式路线风险。
23
+ 11. Roadmap Funnel Protocol 必须固定推进:方向、真实需求、现状、具体人、wedge/lake、观察信号、future fit、premise challenge、alternatives、route approval。
24
+ 12. 每轮要么由证据回答,要么问用户一个 `D<N>` 决策题,要么写明 skipped reason;不能让关键轮次停在聊天记忆里。
23
25
 
24
26
  ## Local Kit
25
27
 
@@ -48,6 +50,31 @@
48
50
 
49
51
  先把这些材料压成 `Context Snapshot`,再追问用户。
50
52
 
53
+ ## Roadmap Funnel Protocol
54
+
55
+ 固定轮次:
56
+
57
+ 1. `F0 Direction Mode`
58
+ 2. `F1 Demand / Operator Reality`
59
+ 3. `F2 Status Quo`
60
+ 4. `F3 Specific Human / Sponsor`
61
+ 5. `F4 Narrowest Wedge / Lake Boundary`
62
+ 6. `F5 Observation / Feedback Signal`
63
+ 7. `F6 Future Fit`
64
+ 8. `F7 Premise Challenge`
65
+ 9. `F8 Alternatives`
66
+ 10. `F9 Route Approval`
67
+
68
+ 执行规则:
69
+
70
+ 1. 一次只推进一轮;需要用户时只问一个 `D<N> - <decision title>`。
71
+ 2. 每个问题必须有推荐答案、证据来源、选项影响和 STOP。
72
+ 3. 用户回答后先更新 `roadmapFunnel.rounds[]`,再继续下一轮。
73
+ 4. 用户要求跳过时,最多再问 2 个最关键剩余问题,然后必须仍然跑 `F7` 和 `F8`。
74
+ 5. `F7` 把隐含前提写成可同意 / 反对的句子;反对时回到受影响轮次重算。
75
+ 6. `F8` 至少给最小路径和理想架构路径;非平凡项目给第三条 lateral / decomposition 路径。
76
+ 7. `F9` 才能冻结 route、stage、ready RM 和 `cc-plan` handoff。
77
+
51
78
  ## Force Reality First
52
79
 
53
80
  至少逼清这 5 件事:
@@ -119,10 +146,12 @@
119
146
  `devflow/roadmap.json`
120
147
  - single editable roadmap state
121
148
  - output policy, meta, context, evidence, route, stages, items, handoff, and architecture
149
+ - `context.roadmapFunnel.rounds[]` stores every fixed round, answer source, evidence, skipped reason, and decision impact
122
150
  - flat `architecture.nodes` / `architecture.edges` used to generate Mermaid
123
151
 
124
152
  `devflow/ROADMAP.md`
125
153
  - version / skill version / context snapshot / evidence ledger
154
+ - Roadmap Funnel Transcript with F0-F9 answers and skipped reasons
126
155
  - 1-3 个阶段
127
156
  - 独立子系统拆分判断
128
157
  - 每阶段目标
@@ -139,6 +168,7 @@
139
168
  - deprecated compatibility projection; edit `devflow/roadmap.json` instead
140
169
  - 只保留会真的进入下一轮 `cc-plan` 的事项
141
170
  - 每项注明来源阶段、优先级、证据、`Depends On`、`Parallel With`、当前未知点、下一决策、是否 ready
171
+ - ready 项必须带 `Source funnel rounds`、`Frozen decisions`、`Do not re-decide` 和 `Remaining blocking question`
142
172
  - developer-facing / operator-facing 条目要带 target user、time to first value、magic moment 和 adoption bottleneck,方便 `cc-plan` 继续做 DX 设计
143
173
  - `Backlog Meta`、`Queue`、`Dependency Handoff`、`Ready For Req-Plan`、`Parked` 由 `devflow/roadmap.json` 回渲染,避免 roadmap truth 和 backlog handoff 分叉
144
174
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cc-roadmap
3
- version: 5.2.0
3
+ version: 5.3.0
4
4
  description: "Use when defining, resetting, or narrowing project direction, stage order, or backlog priority before a concrete requirement enters the PDCA loop."
5
5
  triggers:
6
6
  - "帮我定路线图"
@@ -42,6 +42,7 @@ entry_gate:
42
42
  - "If the ask contains multiple independent subsystems, decompose them into stages and RM candidates before refining any implementation detail."
43
43
  - "Do not decompose implementation tasks while the roadmap is still being decided."
44
44
  - "Apply the AI Leverage Route Lens before route approval: name the reachable user/operator, current workaround, human-vs-agent effort, complete-lake boundary, ocean boundary, first success signal, and kill signal."
45
+ - "Run the Roadmap Funnel Protocol as fixed one-question rounds; every round must either be answered from repo evidence, asked to the user, or explicitly skipped with reason."
45
46
  - "If AI makes a complete same-blast-radius route cheap and verifiable, prefer boil-lake over a timid MVP slice."
46
47
  - "If the route cannot name a real user/operator and current workaround, mark it as needs-evidence instead of producing implementation-ready RM handoff."
47
48
  exit_criteria:
@@ -50,6 +51,7 @@ exit_criteria:
50
51
  - "The roadmap shows an explicit RM dependency graph so serial blockers and parallel-ready work are obvious."
51
52
  - "The user-approved recommendation is explicit and grounded in current evidence."
52
53
  - "Each Stage 1 or ready-for-cc-plan item records an AI Leverage Route Lens verdict: boil-lake, sharp-wedge, needs-evidence, or pivot."
54
+ - "The Roadmap Funnel Transcript is persisted in `devflow/roadmap.json`, rendered into `devflow/ROADMAP.md`, and each ready RM carries the source funnel rounds, frozen decisions, and remaining blocking question."
53
55
  reroutes:
54
56
  - when: "The user is already discussing one concrete requirement, bug, or execution task."
55
57
  target: "cc-plan"
@@ -240,6 +242,39 @@ Verdict 只允许四种:
240
242
  5. 每条路线都要用一个具体 scenario 压测:谁在什么约束下,今天如何绕路,Stage 1 完成后哪一步不再发生。
241
243
  6. 硬决策才沉淀:只有 hard to reverse、surprising without context、real trade-off 三者同时成立,才进入 capability spec delta、roadmap decision note 或本次 design decision log。
242
244
 
245
+ ## Roadmap Funnel Protocol
246
+
247
+ 路线图必须像 office-hours 一样固定推进多轮,但输出必须是 source-neutral 的 `cc-roadmap` 产物,不暴露外部来源。
248
+
249
+ 每轮只允许处理一个 route-changing unknown。能从仓库证据回答就写 `answered-by-evidence`;不能回答才问用户;用户催促跳过时最多保留 2 个最关键问题,然后进入 premise challenge 和 alternatives。每个问题都必须给推荐答案、证据、反对时会改变的路线,并在回答后更新 `Roadmap Funnel Transcript`。
250
+
251
+ 固定轮次:
252
+
253
+ 1. `F0 Direction Mode`:确认项目目标模式,说明为什么不是其它模式。
254
+ 2. `F1 Demand / Operator Reality`:确认真实用户或操作者,以及他们今天是否真的痛。
255
+ 3. `F2 Status Quo`:确认现状 workaround、成本、失败方式;没有 workaround 默认 `needs-evidence`。
256
+ 4. `F3 Specific Human / Sponsor`:把类别词压成可命名角色、具体约束、职业/组织后果。
257
+ 5. `F4 Narrowest Wedge / Lake Boundary`:比较最窄 wedge、完整 same-blast-radius lake、ocean boundary。
258
+ 6. `F5 Observation / Feedback Signal`:确认看过真实使用、失败日志、运营证据或可复现实验;没有观察就写 Stage 1 observation task。
259
+ 7. `F6 Future Fit`:确认 6-12 个月后为什么更需要这条路,而不是只靠今天的热词。
260
+ 8. `F7 Premise Challenge`:把本轮隐含前提写成 2-4 条,逐条确认或修正。
261
+ 9. `F8 Alternatives`:至少给 2 条路线,非平凡项目给 3 条;必须包含最小路径与理想架构路径。
262
+ 10. `F9 Route Approval`:冻结推荐路线、拒绝路线、第一成功信号、kill signal、下一批 ready RM。
263
+
264
+ STOP 规则:
265
+
266
+ - 每次需要用户判断时只问一个 `D<N> - <decision title>`。
267
+ - 选项只用 `A` / `B` / `C`,推荐项必须标 `(recommended)`。
268
+ - 问完必须停止等待,不能同一轮继续生成最终 roadmap。
269
+ - 用户回答后,先更新 transcript,再决定是否进入下一轮。
270
+
271
+ 产物规则:
272
+
273
+ - `devflow/roadmap.json.context.roadmapFunnel.rounds[]` 记录每轮 `id`、`question`、`answerSource`、`answer`、`evidence`、`decisionImpact`、`status`。
274
+ - `devflow/ROADMAP.md` 必须渲染 `## Roadmap Funnel Transcript`,让后续读者知道路线不是拍脑袋。
275
+ - `devflow/BACKLOG.md` 的 ready RM 必须记录 `Source funnel rounds`、`Frozen decisions`、`Do not re-decide`、`Remaining blocking question`。
276
+ - 没有闭合 `F7` 和 `F8` 时,不允许把任何 RM 标成 ready for `cc-plan`,除非用户给出已成形且有证据的计划;即便如此也要把跳过理由写入 transcript。
277
+
243
278
  ## Founder Advice Guardrail
244
279
 
245
280
  创业建议只能服务于 roadmap 质量,不是推广内容。遇到 `founder-business` 或 `internal-company`:
@@ -319,13 +354,15 @@ Verdict 只允许四种:
319
354
  1. 没有 `Context Snapshot`,不准给路线推荐。
320
355
  2. 没有 project direction mode、planning posture、evidence maturity 和 framing check,不准给路线推荐。
321
356
  3. 没有 native language / durable decision scan,不准给路线推荐;如果缺少 `devflow/specs/` 或历史决策材料,写成 `not present`,不要假装已对齐。
322
- 4. 没有 2-3 条路线对比,不准直接拍脑袋定主线。
323
- 5. 没有 exit signal / kill signal / non-goals,不算阶段冻结。
324
- 6. 没有明确成功信号和下一决策,不准把事项放进 `Ready For Req-Plan`。
325
- 7. developer-facing / operator-facing item 没有 target user、time to first value adoption bottleneck,不准标成 ready。
326
- 8. 没有 `RM dependency graph` 或 parallel-ready wave,不准宣称事项可以并发推进。
327
- 9. 没有独立子系统拆分判断,不准把大而混杂的方向伪装成单一主线。
328
- 10. 没有用户批准,不准把 roadmap item 下放到 `cc-plan`。
357
+ 4. 没有 `Roadmap Funnel Transcript`,不准给路线推荐。
358
+ 5. 没有 `F7 Premise Challenge` `F8 Alternatives`,不准把事项标成 ready。
359
+ 6. 没有 2-3 条路线对比,不准直接拍脑袋定主线。
360
+ 7. 没有 exit signal / kill signal / non-goals,不算阶段冻结。
361
+ 8. 没有明确成功信号和下一决策,不准把事项放进 `Ready For Req-Plan`。
362
+ 9. developer-facing / operator-facing item 没有 target user、time to first value 或 adoption bottleneck,不准标成 ready。
363
+ 10. 没有 `RM dependency graph` 或 parallel-ready wave,不准宣称事项可以并发推进。
364
+ 11. 没有独立子系统拆分判断,不准把大而混杂的方向伪装成单一主线。
365
+ 12. 没有用户批准,不准把 roadmap item 下放到 `cc-plan`。
329
366
 
330
367
  ## Review Loop
331
368
 
@@ -27,6 +27,10 @@
27
27
  ## Adoption Handoff
28
28
 
29
29
  - Project direction mode:
30
+ - Source funnel rounds:
31
+ - Frozen decisions:
32
+ - Do not re-decide:
33
+ - Remaining blocking question:
30
34
  - Direction-specific first question:
31
35
  - Founder / builder / infra guardrail:
32
36
  - Planning posture:
@@ -56,6 +60,10 @@
56
60
  - Expected spec delta:
57
61
  - Open risks:
58
62
  - First planning question:
63
+ - Source funnel rounds:
64
+ - Frozen decisions:
65
+ - Do not re-decide:
66
+ - Remaining blocking question:
59
67
  - Evidence maturity:
60
68
  - Target developer / operator:
61
69
  - Time to first value:
@@ -53,6 +53,28 @@
53
53
  | Feasibility | | High / Med / Low | | |
54
54
  | Distribution | | High / Med / Low | | |
55
55
 
56
+ ## Roadmap Funnel Transcript
57
+
58
+ | Round | Question | Answer source | Answer / decision | Evidence | Decision impact | Status |
59
+ |-------|----------|---------------|-------------------|----------|-----------------|--------|
60
+ | F0 Direction Mode | | repo-evidence / user-answer / skipped | | | | pending |
61
+ | F1 Demand / Operator Reality | | repo-evidence / user-answer / skipped | | | | pending |
62
+ | F2 Status Quo | | repo-evidence / user-answer / skipped | | | | pending |
63
+ | F3 Specific Human / Sponsor | | repo-evidence / user-answer / skipped | | | | pending |
64
+ | F4 Narrowest Wedge / Lake Boundary | | repo-evidence / user-answer / skipped | | | | pending |
65
+ | F5 Observation / Feedback Signal | | repo-evidence / user-answer / skipped | | | | pending |
66
+ | F6 Future Fit | | repo-evidence / user-answer / skipped | | | | pending |
67
+ | F7 Premise Challenge | | repo-evidence / user-answer / skipped | | | | pending |
68
+ | F8 Alternatives | | repo-evidence / user-answer / skipped | | | | pending |
69
+ | F9 Route Approval | | repo-evidence / user-answer / skipped | | | | pending |
70
+
71
+ - Premises confirmed:
72
+ - Premises rejected / revised:
73
+ - Alternatives reviewed:
74
+ - Approved route:
75
+ - Open concerns:
76
+ - Skipped rounds and reasons:
77
+
56
78
  ## AI Leverage Route Lens
57
79
 
58
80
  - Real user / operator:
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "meta": {
7
7
  "roadmapVersion": "roadmap.v1",
8
- "skillVersion": "5.2.0",
8
+ "skillVersion": "5.3.0",
9
9
  "status": "active",
10
10
  "lastUpdated": "2026-05-01",
11
11
  "currentFocusStage": "Stage 1"
@@ -32,6 +32,33 @@
32
32
  "verdict": "needs-evidence",
33
33
  "missingEvidence": []
34
34
  },
35
+ "roadmapFunnel": {
36
+ "status": "in-progress",
37
+ "currentRound": "F0",
38
+ "approvedRouteRound": "",
39
+ "rounds": [
40
+ {
41
+ "id": "F0",
42
+ "title": "Direction Mode",
43
+ "question": "What project-direction mode are we in, and why not the other modes?",
44
+ "answerSource": "repo-evidence | user-answer | skipped",
45
+ "answer": "",
46
+ "evidence": [],
47
+ "decisionImpact": "Selects the question set and default route shape",
48
+ "status": "pending",
49
+ "skippedReason": ""
50
+ }
51
+ ],
52
+ "premiseChallenge": [],
53
+ "alternativesReviewed": [],
54
+ "routeApproval": {
55
+ "approved": false,
56
+ "approvedRoute": "",
57
+ "approvedBy": "",
58
+ "approvedAt": "",
59
+ "openConcerns": []
60
+ }
61
+ },
35
62
  "canonicalTerms": [],
36
63
  "durableDecisionSources": []
37
64
  },
@@ -69,6 +96,10 @@
69
96
  "entryConstraints": "",
70
97
  "openRisks": "",
71
98
  "firstPlanningQuestion": "",
99
+ "sourceFunnelRounds": [],
100
+ "frozenDecisions": [],
101
+ "doNotRedecide": [],
102
+ "remainingBlockingQuestion": "",
72
103
  "requiredContextToLoad": "",
73
104
  "whyReadyNow": "",
74
105
  "parked": false,
@@ -3,28 +3,27 @@
3
3
  ## Order
4
4
 
5
5
  0. 先做 `Context Snapshot`:现有 roadmap / backlog、capability specs、历史 design/analysis、最近提交、forcing functions、项目语言 / durable decisions
6
- 1. 先判断 project direction mode:founder-business / internal-company / hackathon-demo / open-source-research / learning / side-project / infrastructure / recovery
7
- 2. 用户是谁
8
- 3. 今天靠什么笨办法活着
9
- 4. 最强需求证据是什么
10
- 5. 为什么现在必须解决
11
- 6. deadline / capacity / dependency / distribution 约束是什么
12
- 7. 当前最大的 adoption / trust / delivery 卡点是什么
13
- 8. 核心术语是否已有 canonical definition,是否和现有 capability spec / roadmap decision 冲突
14
- 9. 最窄突破口是什么
15
- 10. 6-12 个月后会长成什么
16
- 11. 给出 2-3 条路线图形状并明确推荐
17
- 12. 冻结 1-3 个阶段,写 exit signal / kill signal / non-goals
18
- 13. 画出 `RM dependency graph`,标出串行主链和 parallel-ready wave
19
- 14. 标出哪些事项真的 ready for `cc-plan`
6
+ 1. `F0 Direction Mode`:project direction mode,为什么不是其它模式
7
+ 2. `F1 Demand / Operator Reality`:用户是谁,最强需求或运营证据是什么
8
+ 3. `F2 Status Quo`:今天靠什么笨办法活着,成本和失败方式是什么
9
+ 4. `F3 Specific Human / Sponsor`:具体人、具体角色、具体组织后果
10
+ 5. `F4 Narrowest Wedge / Lake Boundary`:最窄突破口、完整 lake、ocean boundary
11
+ 6. `F5 Observation / Feedback Signal`:真实观察、运行证据、demo 使用或待补证据任务
12
+ 7. `F6 Future Fit`:6-12 个月后为什么更需要它
13
+ 8. `F7 Premise Challenge`:核心前提、canonical language、capability/spec 冲突
14
+ 9. `F8 Alternatives`:给出 2-3 条路线图形状并明确推荐
15
+ 10. `F9 Route Approval`:冻结 1-3 个阶段、dependency graph、parallel wave、ready RM
20
16
 
21
17
  ## Question Rules
22
18
 
23
19
  - 一次只推进一个关键未知点
24
20
  - 每个问题附带推荐答案、证据来源,以及用户反对时会改变哪条路线
21
+ - 问题编号使用 `D<N> - <decision title>`;选项只用 `A` / `B` / `C`,推荐项标 `(recommended)`
22
+ - 每轮回答必须落入 `Roadmap Funnel Transcript`
25
23
  - 能从 repo / capability spec / roadmap / design / git history 得到答案时先查证,不问用户
26
24
  - 没证据时明确写 assumption
27
25
  - 用户没批准前,不把事项偷下放成 requirement
26
+ - 用户催促跳过时,最多补问 2 个关键问题,但不能跳过 `F7 Premise Challenge` 和 `F8 Alternatives`
28
27
 
29
28
  ## Project Direction Modes
30
29
 
@@ -54,3 +53,4 @@
54
53
  - backlog 只收下一轮真会进入 `cc-plan` 的事项
55
54
  - ready 项必须带成功信号、下一决策、`Depends On`、`Parallel With`
56
55
  - ready 项必须带 canonical terms、capability spec context 或明确的 language / decision conflict
56
+ - ready 项必须带 Source funnel rounds、Frozen decisions、Do not re-decide、Remaining blocking question
package/CHANGELOG.md CHANGED
@@ -9,6 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [4.5.9] - 2026-05-11
13
+
14
+ ### Added
15
+
16
+ - Added project-level AI postmortem contracts under `devflow/postmortems/`, with `cc-act` writing progressive incident, index, and principle records that include Git evidence and verification facts.
17
+
18
+ ### Changed
19
+
20
+ - Updated `cc-plan`, `cc-investigate`, and `cc-do` to search project postmortems before freezing plans, finalizing root-cause hypotheses, or executing individual tasks.
21
+ - Updated `cc-act` so `post-merge-closeout` must run `cc-devflow archive-change <change-key>` and prove the archive path, instead of leaving archive as an optional next action.
22
+ - Updated `cc-next` so unarchived `devflow/changes/<REQ|FIX>-*` directories are next-work candidates, including done-but-unarchived closeout work.
23
+
12
24
  ## [4.5.8] - 2026-05-11
13
25
 
14
26
  ### Changed
package/README.md CHANGED
@@ -11,40 +11,6 @@
11
11
 
12
12
  CC-DevFlow is a small, explicit workflow system for agent coding. It gives an AI agent one roadmap entry point, then routes every change through either a feature loop or a bug-investigation loop before work can be called done.
13
13
 
14
- ```text
15
- cc-roadmap
16
-
17
- PR Harness: cc-next -> cc-dev -> cc-pr-review -> cc-pr-land
18
-
19
- PDCA: cc-plan -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
20
- IDCA: cc-investigate -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
21
- ```
22
-
23
- ```mermaid
24
- flowchart TD
25
- Roadmap["cc-roadmap\nProduct direction and staged truth"] --> Next["cc-next\nPick next ready Goal Packet"]
26
- Next --> Dev["cc-dev\nDrive current worktree to PR"]
27
-
28
- Dev --> Route{"Route"}
29
- Route -->|Feature or change| Plan["cc-plan\nFreeze scope and tasks"]
30
- Route -->|Bug or regression| Investigate["cc-investigate\nFreeze root cause and repair boundary"]
31
-
32
- Plan --> PlanReview["cc-review\nOptional plan review"]
33
- Investigate --> PlanReview
34
- PlanReview --> Do["cc-do\nImplement with evidence"]
35
- Plan --> Do
36
- Investigate --> Do
37
-
38
- Do --> ImplReview["cc-review\nOptional implementation review"]
39
- ImplReview --> Check["cc-check\nFresh verification verdict"]
40
- Do --> Check
41
- Check --> Act["cc-act\nCreate or update remote PR"]
42
- Act --> PRReview["cc-pr-review\nSeparate PR review session"]
43
- PRReview --> PRLand["cc-pr-land\nRebase, land, prove main parity"]
44
- PRReview -->|Fixes required| Dev
45
- PRLand --> Main["main\nLocal and remote parity"]
46
- ```
47
-
48
14
  ![CC-DevFlow PR Harness visual workflow](./docs/assets/cc-devflow-pr-harness-en.svg)
49
15
 
50
16
  ## Why cc-devflow
@@ -87,12 +53,48 @@ npx cc-devflow@latest adapt --cwd /path/to/your/project --all
87
53
 
88
54
  After installation, ask your agent to use the workflow skills directly. Start with `cc-roadmap` for product direction. Use `cc-next` to select the next roadmap-aware target, `cc-dev` to drive the current worktree through PDCA or IDCA until a remote PR is opened, `cc-pr-review` to review that PR in a separate session, and `cc-pr-land` to land reviewed PRs into main. For manual core workflow work, use `cc-plan` for new work, use `cc-investigate` for bugs, optionally run `cc-review` on complex frozen plans or investigations, then continue through `cc-do`, optional implementation `cc-review`, `cc-check`, and `cc-act`.
89
55
 
56
+ ## Workflow Map
57
+
58
+ ```text
59
+ cc-roadmap
60
+
61
+ PR Harness: cc-next -> cc-dev -> cc-pr-review -> cc-pr-land
62
+
63
+ PDCA: cc-plan -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
64
+ IDCA: cc-investigate -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
65
+ ```
66
+
67
+ ```mermaid
68
+ flowchart TD
69
+ Roadmap["cc-roadmap\nProduct direction and staged truth"] --> Next["cc-next\nPick next ready Goal Packet"]
70
+ Next --> Dev["cc-dev\nDrive current worktree to PR"]
71
+
72
+ Dev --> Route{"Route"}
73
+ Route -->|Feature or change| Plan["cc-plan\nFreeze scope and tasks"]
74
+ Route -->|Bug or regression| Investigate["cc-investigate\nFreeze root cause and repair boundary"]
75
+
76
+ Plan --> PlanReview["cc-review\nOptional plan review"]
77
+ Investigate --> PlanReview
78
+ PlanReview --> Do["cc-do\nImplement with evidence"]
79
+ Plan --> Do
80
+ Investigate --> Do
81
+
82
+ Do --> ImplReview["cc-review\nOptional implementation review"]
83
+ ImplReview --> Check["cc-check\nFresh verification verdict"]
84
+ Do --> Check
85
+ Check --> Act["cc-act\nCreate or update remote PR"]
86
+ Act --> PRReview["cc-pr-review\nSeparate PR review session"]
87
+ PRReview --> PRLand["cc-pr-land\nRebase, land, prove main parity"]
88
+ PRReview -->|Fixes required| Dev
89
+ PRLand --> Main["main\nLocal and remote parity"]
90
+ ```
91
+
90
92
  ## Workflow Skills
91
93
 
92
94
  | Skill | Use it when | Main output |
93
95
  | --- | --- | --- |
94
96
  | `cc-roadmap` | You need product direction, staged scope, or backlog order | `devflow/roadmap.json`, `devflow/ROADMAP.md`, deprecated `devflow/BACKLOG.md` |
95
- | `cc-next` | You need to pick the next roadmap-aware ready target from roadmap and issue truth | one Goal Packet for `cc-dev` |
97
+ | `cc-next` | You need to pick the next roadmap-aware ready target from roadmap, unarchived local changes, and issue truth | one Goal Packet for `cc-dev` |
96
98
  | `cc-dev` | A selected objective should be driven in the current worktree to a remote PR | PDCA/IDCA artifacts plus a PR or handoff |
97
99
  | `cc-plan` | A feature or change needs scope, design, and task freezing | `planning/design.md`, `planning/tasks.md`, `task-manifest.json` |
98
100
  | `cc-investigate` | A bug needs symptom, reproduction, root cause, and repair boundary | `planning/analysis.md`, `planning/tasks.md`, `task-manifest.json` |
package/README.zh-CN.md CHANGED
@@ -11,40 +11,6 @@
11
11
 
12
12
  CC-DevFlow 是一个给 Agent 编程时代准备的小而明确的工作流系统。它先用一个 roadmap 入口确定方向,再让每个变更进入「新需求闭环」或「Bug 调查闭环」,最后必须经过验证和交付收口。
13
13
 
14
- ```text
15
- cc-roadmap
16
-
17
- PR Harness: cc-next -> cc-dev -> cc-pr-review -> cc-pr-land
18
-
19
- PDCA: cc-plan -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
20
- IDCA: cc-investigate -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
21
- ```
22
-
23
- ```mermaid
24
- flowchart TD
25
- Roadmap["cc-roadmap\n产品方向和阶段真相"] --> Next["cc-next\n选择下一个 Goal Packet"]
26
- Next --> Dev["cc-dev\n当前 worktree 自动推进到 PR"]
27
-
28
- Dev --> Route{"路线"}
29
- Route -->|新需求或变更| Plan["cc-plan\n冻结范围和任务"]
30
- Route -->|Bug 或回归| Investigate["cc-investigate\n冻结根因和修复边界"]
31
-
32
- Plan --> PlanReview["cc-review\n可选方案 Review"]
33
- Investigate --> PlanReview
34
- PlanReview --> Do["cc-do\n实现并留下证据"]
35
- Plan --> Do
36
- Investigate --> Do
37
-
38
- Do --> ImplReview["cc-review\n可选实现 Review"]
39
- ImplReview --> Check["cc-check\n新鲜验证裁决"]
40
- Do --> Check
41
- Check --> Act["cc-act\n创建或更新远程 PR"]
42
- Act --> PRReview["cc-pr-review\n单独会话 Review PR"]
43
- PRReview --> PRLand["cc-pr-land\nRebase 合并并证明 main parity"]
44
- PRReview -->|需要修复| Dev
45
- PRLand --> Main["main\n本地和远程一致"]
46
- ```
47
-
48
14
  ![CC-DevFlow PR Harness 中文可视化流程](./docs/assets/cc-devflow-pr-harness-zh.svg)
49
15
 
50
16
  ## 为什么用 cc-devflow
@@ -87,12 +53,48 @@ npx cc-devflow@latest adapt --cwd /path/to/your/project --all
87
53
 
88
54
  安装完成后,直接让 Agent 使用这些 workflow skill。产品方向先走 `cc-roadmap`。需要自动选择下一步时走 `cc-next`;选中目标后用 `cc-dev` 在当前 worktree 内自动跑 PDCA 或 IDCA,直到远程 PR 打开;PR 用单独会话跑 `cc-pr-review`;review 后用单独会话跑 `cc-pr-land` 合并并证明 main parity。手动核心链路仍然是:新需求走 `cc-plan`,Bug 和 regression 走 `cc-investigate`;复杂计划或根因合同冻结后可以先接 `cc-review`,再进入 `cc-do`;实现复杂时还可以再接一次实现 `cc-review`,最后进入 `cc-check` 和 `cc-act`。
89
55
 
56
+ ## 流程图
57
+
58
+ ```text
59
+ cc-roadmap
60
+
61
+ PR Harness: cc-next -> cc-dev -> cc-pr-review -> cc-pr-land
62
+
63
+ PDCA: cc-plan -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
64
+ IDCA: cc-investigate -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
65
+ ```
66
+
67
+ ```mermaid
68
+ flowchart TD
69
+ Roadmap["cc-roadmap\n产品方向和阶段真相"] --> Next["cc-next\n选择下一个 Goal Packet"]
70
+ Next --> Dev["cc-dev\n当前 worktree 自动推进到 PR"]
71
+
72
+ Dev --> Route{"路线"}
73
+ Route -->|新需求或变更| Plan["cc-plan\n冻结范围和任务"]
74
+ Route -->|Bug 或回归| Investigate["cc-investigate\n冻结根因和修复边界"]
75
+
76
+ Plan --> PlanReview["cc-review\n可选方案 Review"]
77
+ Investigate --> PlanReview
78
+ PlanReview --> Do["cc-do\n实现并留下证据"]
79
+ Plan --> Do
80
+ Investigate --> Do
81
+
82
+ Do --> ImplReview["cc-review\n可选实现 Review"]
83
+ ImplReview --> Check["cc-check\n新鲜验证裁决"]
84
+ Do --> Check
85
+ Check --> Act["cc-act\n创建或更新远程 PR"]
86
+ Act --> PRReview["cc-pr-review\n单独会话 Review PR"]
87
+ PRReview --> PRLand["cc-pr-land\nRebase 合并并证明 main parity"]
88
+ PRReview -->|需要修复| Dev
89
+ PRLand --> Main["main\n本地和远程一致"]
90
+ ```
91
+
90
92
  ## Workflow Skill
91
93
 
92
94
  | Skill | 什么时候用 | 主要产物 |
93
95
  | --- | --- | --- |
94
96
  | `cc-roadmap` | 需要产品方向、阶段范围或 backlog 顺序 | `devflow/roadmap.json`、`devflow/ROADMAP.md`、deprecated `devflow/BACKLOG.md` |
95
- | `cc-next` | 需要从 roadmap 和 issue truth 里选下一个 ready 目标 | 交给 `cc-dev` 的 Goal Packet |
97
+ | `cc-next` | 需要从 roadmap、未归档本地 change 和 issue truth 里选下一个 ready 目标 | 交给 `cc-dev` 的 Goal Packet |
96
98
  | `cc-dev` | 已选目标要在当前 worktree 内自动推进到远程 PR | PDCA/IDCA 产物加 PR 或 handoff |
97
99
  | `cc-plan` | 新功能或变更需要澄清范围、设计方案、冻结任务 | `planning/design.md`、`planning/tasks.md`、`task-manifest.json` |
98
100
  | `cc-investigate` | Bug 需要症状、复现、根因和修复边界 | `planning/analysis.md`、`planning/tasks.md`、`task-manifest.json` |