cc-devflow 4.5.6 → 4.5.8

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 (92) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +6 -0
  2. package/.claude/skills/cc-act/PLAYBOOK.md +11 -2
  3. package/.claude/skills/cc-act/SKILL.md +17 -7
  4. package/.claude/skills/cc-act/references/closure-contract.md +4 -0
  5. package/.claude/skills/cc-act/scripts/{archive-requirement.sh → archive-change.sh} +7 -7
  6. package/.claude/skills/cc-act/scripts/detect-ship-target.sh +27 -0
  7. package/.claude/skills/cc-act/scripts/ensure-ship-branch.sh +93 -0
  8. package/.claude/skills/cc-act/scripts/generate-status-report.sh +6 -0
  9. package/.claude/skills/cc-act/scripts/render-pr-brief.sh +6 -0
  10. package/.claude/skills/cc-act/scripts/sync-act-docs.sh +14 -0
  11. package/.claude/skills/cc-dev/CHANGELOG.md +5 -0
  12. package/.claude/skills/cc-dev/PLAYBOOK.md +63 -0
  13. package/.claude/skills/cc-dev/SKILL.md +168 -0
  14. package/.claude/skills/cc-do/CHANGELOG.md +6 -0
  15. package/.claude/skills/cc-do/SKILL.md +23 -1
  16. package/.claude/skills/cc-investigate/CHANGELOG.md +5 -0
  17. package/.claude/skills/cc-investigate/SKILL.md +2 -2
  18. package/.claude/skills/cc-next/CHANGELOG.md +5 -0
  19. package/.claude/skills/cc-next/PLAYBOOK.md +52 -0
  20. package/.claude/skills/cc-next/SKILL.md +161 -0
  21. package/.claude/skills/cc-plan/CHANGELOG.md +28 -0
  22. package/.claude/skills/cc-plan/PLAYBOOK.md +20 -17
  23. package/.claude/skills/cc-plan/SKILL.md +135 -21
  24. package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +42 -0
  25. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +28 -0
  26. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +84 -2
  27. package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +30 -0
  28. package/.claude/skills/cc-plan/references/planning-contract.md +31 -15
  29. package/.claude/skills/cc-plan/scripts/next-change-key.sh +78 -0
  30. package/.claude/skills/cc-pr-land/CHANGELOG.md +5 -0
  31. package/.claude/skills/cc-pr-land/PLAYBOOK.md +45 -0
  32. package/.claude/skills/cc-pr-land/SKILL.md +157 -0
  33. package/.claude/skills/cc-pr-review/CHANGELOG.md +5 -0
  34. package/.claude/skills/cc-pr-review/PLAYBOOK.md +46 -0
  35. package/.claude/skills/cc-pr-review/SKILL.md +142 -0
  36. package/.claude/skills/cc-review/CHANGELOG.md +28 -0
  37. package/.claude/skills/cc-review/PLAYBOOK.md +108 -0
  38. package/.claude/skills/cc-review/SKILL.md +340 -0
  39. package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +85 -0
  40. package/.claude/skills/cc-review/references/implementation-review-branch.md +152 -0
  41. package/.claude/skills/cc-review/references/plan-review-branch.md +151 -0
  42. package/.claude/skills/cc-review/references/review-methods.md +221 -0
  43. package/.claude/skills/cc-review/scripts/collect-review-context.sh +80 -0
  44. package/.claude/skills/cc-roadmap/CHANGELOG.md +6 -0
  45. package/.claude/skills/cc-roadmap/SKILL.md +102 -8
  46. package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +3 -0
  47. package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +23 -0
  48. package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +20 -1
  49. package/.claude/skills/cc-roadmap/references/roadmap-dialogue.md +28 -13
  50. package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/markdown.js +18 -0
  51. package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/schema.js +8 -0
  52. package/.claude/skills/cc-simplify/CHANGELOG.md +6 -0
  53. package/.claude/skills/cc-simplify/SKILL.md +19 -8
  54. package/CHANGELOG.md +16 -0
  55. package/README.md +58 -4
  56. package/README.zh-CN.md +58 -4
  57. package/bin/cc-devflow-cli.js +119 -0
  58. package/config/distributable-skills.json +10 -0
  59. package/docs/assets/cc-devflow-pr-harness-en.svg +153 -0
  60. package/docs/assets/cc-devflow-pr-harness-zh.svg +152 -0
  61. package/docs/assets/wechat-group-qr.jpg +0 -0
  62. package/docs/examples/example-bindings.json +11 -6
  63. package/docs/examples/full-design-blocked/BACKLOG.md +1 -1
  64. package/docs/examples/full-design-blocked/README.md +1 -1
  65. package/docs/examples/full-design-blocked/ROADMAP.md +16 -1
  66. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +36 -3
  67. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +604 -76
  68. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +46 -1
  69. package/docs/examples/full-design-blocked/roadmap.json +18 -2
  70. package/docs/examples/local-handoff/BACKLOG.md +1 -1
  71. package/docs/examples/local-handoff/README.md +1 -1
  72. package/docs/examples/local-handoff/ROADMAP.md +16 -1
  73. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +27 -1
  74. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +366 -44
  75. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +36 -1
  76. package/docs/examples/local-handoff/roadmap.json +16 -2
  77. package/docs/examples/pdca-loop/BACKLOG.md +1 -1
  78. package/docs/examples/pdca-loop/README.md +1 -1
  79. package/docs/examples/pdca-loop/ROADMAP.md +16 -1
  80. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +27 -1
  81. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +259 -14
  82. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +36 -1
  83. package/docs/examples/pdca-loop/roadmap.json +16 -2
  84. package/docs/examples/scripts/check-example-bindings.sh +21 -1
  85. package/docs/guides/getting-started.md +12 -9
  86. package/docs/guides/getting-started.zh-CN.md +12 -9
  87. package/lib/skill-runtime/__tests__/archive-change.test.js +124 -0
  88. package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +1 -0
  89. package/lib/skill-runtime/__tests__/paths.test.js +81 -1
  90. package/lib/skill-runtime/archive-change.js +64 -0
  91. package/lib/skill-runtime/paths.js +32 -0
  92. package/package.json +7 -1
package/README.zh-CN.md CHANGED
@@ -14,13 +14,42 @@ CC-DevFlow 是一个给 Agent 编程时代准备的小而明确的工作流系
14
14
  ```text
15
15
  cc-roadmap
16
16
 
17
- PDCA: cc-plan -> cc-do -> cc-check -> cc-act
18
- IDCA: cc-investigate -> cc-do -> cc-check -> cc-act
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本地和远程一致"]
19
46
  ```
20
47
 
48
+ ![CC-DevFlow PR Harness 中文可视化流程](./docs/assets/cc-devflow-pr-harness-zh.svg)
49
+
21
50
  ## 为什么用 cc-devflow
22
51
 
23
- - **公开入口很小**:6 个可见 workflow skill,加一个负责安装和平台适配的 CLI。
52
+ - **公开入口很小**:核心 workflow skill、PR Harness 链路、1 个可选深度 review skill,加一个负责安装和平台适配的 CLI。
24
53
  - **先证据后完成**:实现之后必须经过验证证据,才能进入 ship 或 handoff。
25
54
  - **Skill-first 分发**:公开契约写在 `.claude/skills/<skill>/SKILL.md` 和 `PLAYBOOK.md`,不依赖隐藏运行时语义。
26
55
  - **多平台产物**:一次安装,再生成 Codex、Cursor、Qwen、Antigravity 等 Agent 环境需要的输出。
@@ -56,16 +85,21 @@ npx cc-devflow@latest adapt --cwd /path/to/your/project --platform antigravity
56
85
  npx cc-devflow@latest adapt --cwd /path/to/your/project --all
57
86
  ```
58
87
 
59
- 安装完成后,直接让 Agent 使用这些 workflow skill。产品方向先走 `cc-roadmap`,新需求走 `cc-plan`,Bug 和 regression 走 `cc-investigate`,然后继续进入 `cc-do`、`cc-check`、`cc-act`。
88
+ 安装完成后,直接让 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`。
60
89
 
61
90
  ## Workflow Skill
62
91
 
63
92
  | Skill | 什么时候用 | 主要产物 |
64
93
  | --- | --- | --- |
65
94
  | `cc-roadmap` | 需要产品方向、阶段范围或 backlog 顺序 | `devflow/roadmap.json`、`devflow/ROADMAP.md`、deprecated `devflow/BACKLOG.md` |
95
+ | `cc-next` | 需要从 roadmap 和 issue truth 里选下一个 ready 目标 | 交给 `cc-dev` 的 Goal Packet |
96
+ | `cc-dev` | 已选目标要在当前 worktree 内自动推进到远程 PR | PDCA/IDCA 产物加 PR 或 handoff |
66
97
  | `cc-plan` | 新功能或变更需要澄清范围、设计方案、冻结任务 | `planning/design.md`、`planning/tasks.md`、`task-manifest.json` |
67
98
  | `cc-investigate` | Bug 需要症状、复现、根因和修复边界 | `planning/analysis.md`、`planning/tasks.md`、`task-manifest.json` |
68
99
  | `cc-do` | 已计划或已调查的任务需要实现 | 代码、测试、checkpoint、scratch runtime |
100
+ | `cc-review` | 复杂方案、调查根因或 diff 需要在实现前或验证前做可选深度多轮 Review | `cc-review-report.md`,可选 `cc-review-findings.json` |
101
+ | `cc-pr-review` | 远程 PR 需要单独会话做合并前 Review | PR review packet、findings 和 landing verdict |
102
+ | `cc-pr-land` | 已 Review PR 需要 rebase-first 合并到 main 并证明 parity | 已集成 main 和本地 / 远程一致性证据 |
69
103
  | `cc-check` | 工作需要新鲜验证证据 | `report-card.json` |
70
104
  | `cc-act` | 已验证工作需要 PR、本地 handoff、release note 或 closeout | 唯一最终 handoff 文件 |
71
105
 
@@ -82,6 +116,8 @@ Canonical language 和 durable decisions 只收敛到 cc-devflow 原生真相源
82
116
 
83
117
  `cc-plan` 会在 `cc-do` 开始前冻结更多实现决策。非 trivial 计划需要比较 minimal viable 和 ideal architecture,full-design 需要包含 implementation decision horizon 和 error/rescue map;测试计划要记录测试框架证据、public test seam、spec-style test name、public verification path、behavior assertion、mock boundary、覆盖质量、强制 regression test、interface depth、Green minimality guard、refactor candidates 和 vertical tracer-bullet slices。交接前,`cc-plan` 和 `cc-investigate` 还会校准 source roadmap item,让 RM 状态、REQ/FIX 绑定、progress 和 spec diagnosis 不再漂移。
84
118
 
119
+ `cc-review` 是可选的深度 Review,不替代 `cc-check`。它可以接在 `cc-plan` / `cc-investigate` 后审冻结的计划或根因合同,也可以接在 `cc-do` 后审实现。它先读取上次 Review 记录和当前 git/artifact delta,写出 Review 计划,再逐节点检查并写 ledger。宿主支持 subAgent 时,选中的节点可以派给独立只读 reviewer,让 strategy、engineering、design、DX、坏味道、测试和运行时审查不共享同一个被污染的上下文。复杂实现 Review 可以把 intent/regression、security/privacy、performance/reliability、contracts/coverage 拆成独立风险 lane,再由主线程聚合和筛掉弱 findings。计划 Review 通过渐进式 references 借鉴 strategy / design / engineering / DX 方法;实现 Review 检查 diff 范围、代码坏味道、测试、UI/runtime 行为、Browser/Computer Use 证据和日志。Finding 回到 `cc-plan` 或 `cc-do`;实现 Review 干净后再进入 `cc-check`。
120
+
85
121
  ## 验证与交付门禁
86
122
 
87
123
  `cc-check` 现在把 QA 当成反馈环问题,而不是只看测试是否绿。Bugfix 和行为变更需要记录证明现实的 loop、expected / actual、复现步骤、测试边界质量;如果没有干净的 public test seam,要留下架构 follow-up。
@@ -117,9 +153,14 @@ node bin/cc-devflow-cli.js adapt --cwd /tmp/example-project --platform codex
117
153
 
118
154
  ```bash
119
155
  npx skills add https://github.com/Dimon94/cc-devflow --skill cc-roadmap
156
+ npx skills add https://github.com/Dimon94/cc-devflow --skill cc-next
157
+ npx skills add https://github.com/Dimon94/cc-devflow --skill cc-dev
120
158
  npx skills add https://github.com/Dimon94/cc-devflow --skill cc-plan
121
159
  npx skills add https://github.com/Dimon94/cc-devflow --skill cc-investigate
122
160
  npx skills add https://github.com/Dimon94/cc-devflow --skill cc-do
161
+ npx skills add https://github.com/Dimon94/cc-devflow --skill cc-review
162
+ npx skills add https://github.com/Dimon94/cc-devflow --skill cc-pr-review
163
+ npx skills add https://github.com/Dimon94/cc-devflow --skill cc-pr-land
123
164
  npx skills add https://github.com/Dimon94/cc-devflow --skill cc-check
124
165
  npx skills add https://github.com/Dimon94/cc-devflow --skill cc-act
125
166
  ```
@@ -182,9 +223,14 @@ npx cc-devflow config doctor --cwd /path/to/your/project
182
223
  当前分发目录:
183
224
 
184
225
  - `.claude/skills/cc-roadmap/`
226
+ - `.claude/skills/cc-next/`
227
+ - `.claude/skills/cc-dev/`
185
228
  - `.claude/skills/cc-plan/`
186
229
  - `.claude/skills/cc-investigate/`
187
230
  - `.claude/skills/cc-do/`
231
+ - `.claude/skills/cc-review/`
232
+ - `.claude/skills/cc-pr-review/`
233
+ - `.claude/skills/cc-pr-land/`
188
234
  - `.claude/skills/cc-check/`
189
235
  - `.claude/skills/cc-act/`
190
236
  - `.claude/skills/cc-spec-init/`
@@ -218,6 +264,14 @@ npm run verify:publish
218
264
 
219
265
  主要贡献说明见 [`CONTRIBUTING.zh-CN.md`](./CONTRIBUTING.zh-CN.md),里面包含公开入口规则、本地 CLI 冒烟验证、文档规则和 PR 期望。
220
266
 
267
+ ## 讨论交流
268
+
269
+ 欢迎扫码加入 cc-devflow 交流 1 群,反馈问题、交流使用体验或提出新功能建议。
270
+
271
+ <img src="./docs/assets/wechat-group-qr.jpg" alt="cc-devflow 交流 1 群微信群二维码" width="320" />
272
+
273
+ 如果二维码过期,请在 issue 中提醒维护者更新。
274
+
221
275
  ## 社区与贡献
222
276
 
223
277
  - 如果这个工作流对你有用,可以给项目一个 Star:[GitHub stars](https://github.com/Dimon94/cc-devflow/stargazers)
@@ -60,6 +60,10 @@ Commands:
60
60
  config doctor Validate config and local ignore safety
61
61
  query list List typed runtime query ids
62
62
  query <id> Run a typed runtime query as JSON
63
+ next-change-key Compute the next REQ/FIX change key
64
+ archive-change Archive a completed change to devflow/changes/archive/YYYY-MM/
65
+ restore-change Restore an archived change back to devflow/changes/
66
+ list-archived List all archived changes
63
67
 
64
68
  Init options:
65
69
  --dir <path> Target project path (default: cwd)
@@ -91,6 +95,11 @@ Query options:
91
95
  --change-id <id> Alias for --change
92
96
  --change-key <key> Full change key, for example REQ-123-my-feature
93
97
 
98
+ Next-change-key options:
99
+ --prefix <REQ|FIX> Change type prefix (required)
100
+ --description <text> Short description, will be slugified (required)
101
+ --cwd <path> Project path (default: cwd)
102
+
94
103
  Examples:
95
104
  cc-devflow init
96
105
  cc-devflow init --dir /path/to/project
@@ -528,6 +537,31 @@ async function runQueryCommand(args) {
528
537
  return result.ok ? 0 : 2;
529
538
  }
530
539
 
540
+ function runNextChangeKey(args) {
541
+ const parsed = { prefix: null, description: null, cwd: null };
542
+
543
+ for (let i = 0; i < args.length; i++) {
544
+ const arg = args[i];
545
+ if (arg === '--prefix') { parsed.prefix = args[++i]; continue; }
546
+ if (arg.startsWith('--prefix=')) { parsed.prefix = arg.slice('--prefix='.length); continue; }
547
+ if (arg === '--description') { parsed.description = args[++i]; continue; }
548
+ if (arg.startsWith('--description=')) { parsed.description = arg.slice('--description='.length); continue; }
549
+ if (arg === '--cwd') { parsed.cwd = args[++i]; continue; }
550
+ if (arg.startsWith('--cwd=')) { parsed.cwd = arg.slice('--cwd='.length); continue; }
551
+ }
552
+
553
+ if (!parsed.prefix || !parsed.description) {
554
+ console.error('Use: cc-devflow next-change-key --prefix REQ|FIX --description "short description"');
555
+ return 1;
556
+ }
557
+
558
+ const { nextChangeKey } = require(path.join(PACKAGE_ROOT, 'lib/skill-runtime/paths.js'));
559
+ const repoRoot = path.resolve(parsed.cwd || process.cwd());
560
+ const result = nextChangeKey(repoRoot, parsed.prefix, parsed.description);
561
+ process.stdout.write(`${result.changeId}\n${result.changeKey}\n`);
562
+ return 0;
563
+ }
564
+
531
565
  function runAdapt(args) {
532
566
  const { options, rest } = parseCliArgs(args);
533
567
 
@@ -571,6 +605,75 @@ function runAdapter(command, args) {
571
605
  return typeof result.status === 'number' ? result.status : 1;
572
606
  }
573
607
 
608
+ function runArchiveChange(args) {
609
+ const parsed = { changeKey: null, cwd: null };
610
+
611
+ for (let i = 0; i < args.length; i++) {
612
+ const arg = args[i];
613
+ if (arg === '--cwd') { parsed.cwd = args[++i]; continue; }
614
+ if (arg.startsWith('--cwd=')) { parsed.cwd = arg.slice('--cwd='.length); continue; }
615
+ if (!arg.startsWith('-') && !parsed.changeKey) { parsed.changeKey = arg; continue; }
616
+ }
617
+
618
+ if (!parsed.changeKey) {
619
+ console.error('Use: cc-devflow archive-change <change-key> [--cwd path]');
620
+ return 1;
621
+ }
622
+
623
+ const { archiveChange } = require(path.join(PACKAGE_ROOT, 'lib/skill-runtime/archive-change.js'));
624
+ const repoRoot = path.resolve(parsed.cwd || process.cwd());
625
+ const result = archiveChange(repoRoot, parsed.changeKey);
626
+ process.stdout.write(`Archived to ${result.archived}\n`);
627
+ return 0;
628
+ }
629
+
630
+ function runRestoreChange(args) {
631
+ const parsed = { archivedPath: null, cwd: null };
632
+
633
+ for (let i = 0; i < args.length; i++) {
634
+ const arg = args[i];
635
+ if (arg === '--cwd') { parsed.cwd = args[++i]; continue; }
636
+ if (arg.startsWith('--cwd=')) { parsed.cwd = arg.slice('--cwd='.length); continue; }
637
+ if (!arg.startsWith('-') && !parsed.archivedPath) { parsed.archivedPath = arg; continue; }
638
+ }
639
+
640
+ if (!parsed.archivedPath) {
641
+ console.error('Use: cc-devflow restore-change <archived-path> [--cwd path]');
642
+ return 1;
643
+ }
644
+
645
+ const { restoreChange } = require(path.join(PACKAGE_ROOT, 'lib/skill-runtime/archive-change.js'));
646
+ const repoRoot = path.resolve(parsed.cwd || process.cwd());
647
+ const archivePath = path.resolve(parsed.archivedPath);
648
+ const result = restoreChange(repoRoot, archivePath);
649
+ process.stdout.write(`Restored to ${result.restored}\n`);
650
+ return 0;
651
+ }
652
+
653
+ function runListArchived(args) {
654
+ const parsed = { cwd: null };
655
+
656
+ for (let i = 0; i < args.length; i++) {
657
+ const arg = args[i];
658
+ if (arg === '--cwd') { parsed.cwd = args[++i]; continue; }
659
+ if (arg.startsWith('--cwd=')) { parsed.cwd = arg.slice('--cwd='.length); continue; }
660
+ }
661
+
662
+ const { listArchived } = require(path.join(PACKAGE_ROOT, 'lib/skill-runtime/archive-change.js'));
663
+ const repoRoot = path.resolve(parsed.cwd || process.cwd());
664
+ const items = listArchived(repoRoot);
665
+
666
+ if (items.length === 0) {
667
+ process.stdout.write('No archived changes.\n');
668
+ return 0;
669
+ }
670
+
671
+ for (const item of items) {
672
+ process.stdout.write(`${item.month} ${item.changeKey}\n`);
673
+ }
674
+ return 0;
675
+ }
676
+
574
677
  async function main() {
575
678
  const argv = process.argv.slice(2);
576
679
  const [command, ...rest] = argv;
@@ -596,6 +699,22 @@ async function main() {
596
699
  return runQueryCommand(rest);
597
700
  }
598
701
 
702
+ if (command === 'next-change-key') {
703
+ return runNextChangeKey(rest);
704
+ }
705
+
706
+ if (command === 'archive-change') {
707
+ return runArchiveChange(rest);
708
+ }
709
+
710
+ if (command === 'restore-change') {
711
+ return runRestoreChange(rest);
712
+ }
713
+
714
+ if (command === 'list-archived') {
715
+ return runListArchived(rest);
716
+ }
717
+
599
718
  return runAdapter(command, rest);
600
719
  }
601
720
 
@@ -1,17 +1,27 @@
1
1
  {
2
2
  "publicSkills": [
3
3
  "cc-roadmap",
4
+ "cc-next",
5
+ "cc-dev",
4
6
  "cc-plan",
5
7
  "cc-investigate",
6
8
  "cc-do",
9
+ "cc-review",
10
+ "cc-pr-review",
11
+ "cc-pr-land",
7
12
  "cc-check",
8
13
  "cc-act"
9
14
  ],
10
15
  "distributedSkills": [
11
16
  "cc-roadmap",
17
+ "cc-next",
18
+ "cc-dev",
12
19
  "cc-plan",
13
20
  "cc-investigate",
14
21
  "cc-do",
22
+ "cc-review",
23
+ "cc-pr-review",
24
+ "cc-pr-land",
15
25
  "cc-check",
16
26
  "cc-act",
17
27
  "cc-spec-init",
@@ -0,0 +1,153 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1000" viewBox="0 0 1600 1000" role="img" aria-labelledby="title desc">
2
+ <title id="title">CC-DevFlow PR Harness workflow</title>
3
+ <desc id="desc">A visual workflow diagram showing roadmap selection, goal-driven development, PDCA and IDCA loops, PR review, and PR landing with main parity.</desc>
4
+ <defs>
5
+ <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
6
+ <stop offset="0" stop-color="#07111f"/>
7
+ <stop offset="0.48" stop-color="#0d2638"/>
8
+ <stop offset="1" stop-color="#102414"/>
9
+ </linearGradient>
10
+ <linearGradient id="blue" x1="0" y1="0" x2="1" y2="1">
11
+ <stop offset="0" stop-color="#4cc9f0"/>
12
+ <stop offset="1" stop-color="#4361ee"/>
13
+ </linearGradient>
14
+ <linearGradient id="green" x1="0" y1="0" x2="1" y2="1">
15
+ <stop offset="0" stop-color="#b8f05a"/>
16
+ <stop offset="1" stop-color="#2fbf71"/>
17
+ </linearGradient>
18
+ <linearGradient id="amber" x1="0" y1="0" x2="1" y2="1">
19
+ <stop offset="0" stop-color="#ffd166"/>
20
+ <stop offset="1" stop-color="#ef8354"/>
21
+ </linearGradient>
22
+ <linearGradient id="violet" x1="0" y1="0" x2="1" y2="1">
23
+ <stop offset="0" stop-color="#d0a2ff"/>
24
+ <stop offset="1" stop-color="#7b2cbf"/>
25
+ </linearGradient>
26
+ <filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
27
+ <feDropShadow dx="0" dy="16" stdDeviation="16" flood-color="#000000" flood-opacity="0.35"/>
28
+ </filter>
29
+ <marker id="arrow" markerWidth="16" markerHeight="16" refX="12" refY="8" orient="auto" markerUnits="strokeWidth">
30
+ <path d="M2,2 L14,8 L2,14 Z" fill="#d7e3f4"/>
31
+ </marker>
32
+ <style>
33
+ .title{font:800 62px Inter,Arial,sans-serif;fill:#f8fbff;letter-spacing:0}
34
+ .subtitle{font:500 26px Inter,Arial,sans-serif;fill:#bdd0e8}
35
+ .label{font:800 26px Inter,Arial,sans-serif;fill:#f8fbff;letter-spacing:0}
36
+ .small{font:500 18px Inter,Arial,sans-serif;fill:#d7e3f4}
37
+ .micro{font:700 15px Inter,Arial,sans-serif;fill:#0a1421;letter-spacing:.5px}
38
+ .note{font:600 18px Inter,Arial,sans-serif;fill:#f8fbff}
39
+ .muted{font:500 16px Inter,Arial,sans-serif;fill:#9fb4cd}
40
+ .card{fill:#102033;stroke:#27445f;stroke-width:2;filter:url(#shadow)}
41
+ .lane{fill:#0b1728;stroke:#27445f;stroke-width:2}
42
+ .line{fill:none;stroke:#d7e3f4;stroke-width:4;marker-end:url(#arrow)}
43
+ .thin{fill:none;stroke:#6c819b;stroke-width:3;stroke-dasharray:8 10;marker-end:url(#arrow)}
44
+ </style>
45
+ </defs>
46
+ <rect width="1600" height="1000" fill="url(#bg)"/>
47
+ <circle cx="140" cy="125" r="220" fill="#2247ff" opacity="0.12"/>
48
+ <circle cx="1450" cy="820" r="260" fill="#2fbf71" opacity="0.13"/>
49
+
50
+ <text x="80" y="96" class="title">CC-DevFlow PR Harness</text>
51
+ <text x="84" y="136" class="subtitle">Roadmap-aware goal autopilot: pick next work, drive to PR, review separately, land with main parity.</text>
52
+
53
+ <rect x="80" y="190" width="1440" height="150" rx="18" class="lane"/>
54
+ <text x="110" y="225" class="note">Navigation layer</text>
55
+ <g transform="translate(130 250)">
56
+ <rect width="260" height="70" rx="16" fill="url(#blue)"/>
57
+ <text x="24" y="32" class="label">cc-roadmap</text>
58
+ <text x="24" y="56" class="small">product order and staged truth</text>
59
+ </g>
60
+ <g transform="translate(520 250)">
61
+ <rect width="260" height="70" rx="16" fill="url(#green)"/>
62
+ <text x="24" y="32" class="label">cc-next</text>
63
+ <text x="24" y="56" class="small">choose one ready Goal Packet</text>
64
+ </g>
65
+ <g transform="translate(910 250)">
66
+ <rect width="300" height="70" rx="16" fill="url(#amber)"/>
67
+ <text x="24" y="32" class="label">cc-dev</text>
68
+ <text x="24" y="56" class="small">current worktree to remote PR</text>
69
+ </g>
70
+ <path class="line" d="M390 285 H510"/>
71
+ <path class="line" d="M780 285 H900"/>
72
+
73
+ <rect x="80" y="390" width="675" height="335" rx="18" class="lane"/>
74
+ <text x="110" y="426" class="note">PDCA feature loop</text>
75
+ <text x="110" y="455" class="muted">For new behavior, API/UI changes, and requirement work</text>
76
+ <g transform="translate(120 490)">
77
+ <rect width="230" height="72" rx="14" class="card"/>
78
+ <text x="24" y="32" class="label">cc-plan</text>
79
+ <text x="24" y="57" class="small">scope, design, tasks</text>
80
+ </g>
81
+ <g transform="translate(455 490)">
82
+ <rect width="230" height="72" rx="14" class="card"/>
83
+ <text x="24" y="32" class="label">cc-do</text>
84
+ <text x="24" y="57" class="small">red, green, refactor</text>
85
+ </g>
86
+ <g transform="translate(120 615)">
87
+ <rect width="230" height="72" rx="14" class="card"/>
88
+ <text x="24" y="32" class="label">cc-check</text>
89
+ <text x="24" y="57" class="small">fresh evidence verdict</text>
90
+ </g>
91
+ <g transform="translate(455 615)">
92
+ <rect width="230" height="72" rx="14" class="card"/>
93
+ <text x="24" y="32" class="label">cc-act</text>
94
+ <text x="24" y="57" class="small">create or update PR</text>
95
+ </g>
96
+ <path class="line" d="M350 526 H445"/>
97
+ <path class="line" d="M570 562 V605"/>
98
+ <path class="line" d="M455 651 H360"/>
99
+
100
+ <rect x="845" y="390" width="675" height="335" rx="18" class="lane"/>
101
+ <text x="875" y="426" class="note">IDCA bug loop</text>
102
+ <text x="875" y="455" class="muted">For regressions, broken behavior, crashes, and flaky failures</text>
103
+ <g transform="translate(885 490)">
104
+ <rect width="270" height="72" rx="14" class="card"/>
105
+ <text x="24" y="32" class="label">cc-investigate</text>
106
+ <text x="24" y="57" class="small">repro, root cause, boundary</text>
107
+ </g>
108
+ <g transform="translate(1245 490)">
109
+ <rect width="230" height="72" rx="14" class="card"/>
110
+ <text x="24" y="32" class="label">cc-do</text>
111
+ <text x="24" y="57" class="small">repair with evidence</text>
112
+ </g>
113
+ <g transform="translate(885 615)">
114
+ <rect width="230" height="72" rx="14" class="card"/>
115
+ <text x="24" y="32" class="label">cc-check</text>
116
+ <text x="24" y="57" class="small">prove the symptom is fixed</text>
117
+ </g>
118
+ <g transform="translate(1245 615)">
119
+ <rect width="230" height="72" rx="14" class="card"/>
120
+ <text x="24" y="32" class="label">cc-act</text>
121
+ <text x="24" y="57" class="small">create or update PR</text>
122
+ </g>
123
+ <path class="line" d="M1155 526 H1235"/>
124
+ <path class="line" d="M1360 562 V605"/>
125
+ <path class="line" d="M1245 651 H1125"/>
126
+
127
+ <path class="thin" d="M1060 320 C950 360 830 365 685 410"/>
128
+ <path class="thin" d="M1060 320 C1180 360 1230 365 1260 410"/>
129
+
130
+ <rect x="250" y="790" width="1100" height="120" rx="22" fill="#101f2f" stroke="#3c5a78" stroke-width="2" filter="url(#shadow)"/>
131
+ <g transform="translate(305 815)">
132
+ <rect width="230" height="64" rx="14" fill="url(#violet)"/>
133
+ <text x="24" y="30" class="label">cc-pr-review</text>
134
+ <text x="24" y="52" class="small">separate PR review session</text>
135
+ </g>
136
+ <g transform="translate(690 815)">
137
+ <rect width="230" height="64" rx="14" fill="url(#green)"/>
138
+ <text x="24" y="30" class="label">cc-pr-land</text>
139
+ <text x="24" y="52" class="small">rebase and land reviewed PR</text>
140
+ </g>
141
+ <g transform="translate(1075 815)">
142
+ <rect width="220" height="64" rx="14" fill="url(#blue)"/>
143
+ <text x="24" y="30" class="label">main</text>
144
+ <text x="24" y="52" class="small">local and remote parity</text>
145
+ </g>
146
+ <path class="line" d="M535 847 H680"/>
147
+ <path class="line" d="M920 847 H1065"/>
148
+ <path class="thin" d="M805 815 C720 760 650 735 570 690"/>
149
+ <path class="thin" d="M805 815 C920 760 1110 735 1360 690"/>
150
+
151
+ <rect x="84" y="930" width="1432" height="42" rx="12" fill="#07111f" stroke="#27445f"/>
152
+ <text x="110" y="957" class="small">Boundary: cc-dev never creates nested worktrees and never merges PRs. Review and landing are separate sessions by design.</text>
153
+ </svg>
@@ -0,0 +1,152 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1000" viewBox="0 0 1600 1000" role="img" aria-labelledby="title desc">
2
+ <title id="title">CC-DevFlow PR Harness 运作流程</title>
3
+ <desc id="desc">一张中文流程图,展示 roadmap 选题、目标自动驾驶、PDCA 和 IDCA 循环、PR 独立 Review、PR 合并和 main 一致性证明。</desc>
4
+ <defs>
5
+ <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
6
+ <stop offset="0" stop-color="#07111f"/>
7
+ <stop offset="0.48" stop-color="#0d2638"/>
8
+ <stop offset="1" stop-color="#102414"/>
9
+ </linearGradient>
10
+ <linearGradient id="blue" x1="0" y1="0" x2="1" y2="1">
11
+ <stop offset="0" stop-color="#4cc9f0"/>
12
+ <stop offset="1" stop-color="#4361ee"/>
13
+ </linearGradient>
14
+ <linearGradient id="green" x1="0" y1="0" x2="1" y2="1">
15
+ <stop offset="0" stop-color="#b8f05a"/>
16
+ <stop offset="1" stop-color="#2fbf71"/>
17
+ </linearGradient>
18
+ <linearGradient id="amber" x1="0" y1="0" x2="1" y2="1">
19
+ <stop offset="0" stop-color="#ffd166"/>
20
+ <stop offset="1" stop-color="#ef8354"/>
21
+ </linearGradient>
22
+ <linearGradient id="violet" x1="0" y1="0" x2="1" y2="1">
23
+ <stop offset="0" stop-color="#d0a2ff"/>
24
+ <stop offset="1" stop-color="#7b2cbf"/>
25
+ </linearGradient>
26
+ <filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
27
+ <feDropShadow dx="0" dy="16" stdDeviation="16" flood-color="#000000" flood-opacity="0.35"/>
28
+ </filter>
29
+ <marker id="arrow" markerWidth="16" markerHeight="16" refX="12" refY="8" orient="auto" markerUnits="strokeWidth">
30
+ <path d="M2,2 L14,8 L2,14 Z" fill="#d7e3f4"/>
31
+ </marker>
32
+ <style>
33
+ .title{font:800 62px Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;fill:#f8fbff;letter-spacing:0}
34
+ .subtitle{font:500 26px Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;fill:#bdd0e8}
35
+ .label{font:800 26px Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;fill:#f8fbff;letter-spacing:0}
36
+ .small{font:500 18px Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;fill:#d7e3f4}
37
+ .note{font:600 18px Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;fill:#f8fbff}
38
+ .muted{font:500 16px Inter,"PingFang SC","Microsoft YaHei",Arial,sans-serif;fill:#9fb4cd}
39
+ .card{fill:#102033;stroke:#27445f;stroke-width:2;filter:url(#shadow)}
40
+ .lane{fill:#0b1728;stroke:#27445f;stroke-width:2}
41
+ .line{fill:none;stroke:#d7e3f4;stroke-width:4;marker-end:url(#arrow)}
42
+ .thin{fill:none;stroke:#6c819b;stroke-width:3;stroke-dasharray:8 10;marker-end:url(#arrow)}
43
+ </style>
44
+ </defs>
45
+ <rect width="1600" height="1000" fill="url(#bg)"/>
46
+ <circle cx="140" cy="125" r="220" fill="#2247ff" opacity="0.12"/>
47
+ <circle cx="1450" cy="820" r="260" fill="#2fbf71" opacity="0.13"/>
48
+
49
+ <text x="80" y="96" class="title">CC-DevFlow PR Harness</text>
50
+ <text x="84" y="136" class="subtitle">从 roadmap 选题,到当前 worktree 自动开发,再到独立 PR Review 和 main 一致性证明。</text>
51
+
52
+ <rect x="80" y="190" width="1440" height="150" rx="18" class="lane"/>
53
+ <text x="110" y="225" class="note">导航层</text>
54
+ <g transform="translate(130 250)">
55
+ <rect width="260" height="70" rx="16" fill="url(#blue)"/>
56
+ <text x="24" y="32" class="label">cc-roadmap</text>
57
+ <text x="24" y="56" class="small">产品顺序和阶段真相</text>
58
+ </g>
59
+ <g transform="translate(520 250)">
60
+ <rect width="260" height="70" rx="16" fill="url(#green)"/>
61
+ <text x="24" y="32" class="label">cc-next</text>
62
+ <text x="24" y="56" class="small">选择一个 ready 目标</text>
63
+ </g>
64
+ <g transform="translate(910 250)">
65
+ <rect width="300" height="70" rx="16" fill="url(#amber)"/>
66
+ <text x="24" y="32" class="label">cc-dev</text>
67
+ <text x="24" y="56" class="small">当前 worktree 推进到 PR</text>
68
+ </g>
69
+ <path class="line" d="M390 285 H510"/>
70
+ <path class="line" d="M780 285 H900"/>
71
+
72
+ <rect x="80" y="390" width="675" height="335" rx="18" class="lane"/>
73
+ <text x="110" y="426" class="note">PDCA 新需求循环</text>
74
+ <text x="110" y="455" class="muted">适用于新行为、接口、UI、规格和需求变更</text>
75
+ <g transform="translate(120 490)">
76
+ <rect width="230" height="72" rx="14" class="card"/>
77
+ <text x="24" y="32" class="label">cc-plan</text>
78
+ <text x="24" y="57" class="small">冻结范围、设计、任务</text>
79
+ </g>
80
+ <g transform="translate(455 490)">
81
+ <rect width="230" height="72" rx="14" class="card"/>
82
+ <text x="24" y="32" class="label">cc-do</text>
83
+ <text x="24" y="57" class="small">红灯、绿灯、重构</text>
84
+ </g>
85
+ <g transform="translate(120 615)">
86
+ <rect width="230" height="72" rx="14" class="card"/>
87
+ <text x="24" y="32" class="label">cc-check</text>
88
+ <text x="24" y="57" class="small">新鲜证据裁决</text>
89
+ </g>
90
+ <g transform="translate(455 615)">
91
+ <rect width="230" height="72" rx="14" class="card"/>
92
+ <text x="24" y="32" class="label">cc-act</text>
93
+ <text x="24" y="57" class="small">创建或更新 PR</text>
94
+ </g>
95
+ <path class="line" d="M350 526 H445"/>
96
+ <path class="line" d="M570 562 V605"/>
97
+ <path class="line" d="M455 651 H360"/>
98
+
99
+ <rect x="845" y="390" width="675" height="335" rx="18" class="lane"/>
100
+ <text x="875" y="426" class="note">IDCA Bug 调查循环</text>
101
+ <text x="875" y="455" class="muted">适用于回归、崩溃、错误行为和不稳定失败</text>
102
+ <g transform="translate(885 490)">
103
+ <rect width="270" height="72" rx="14" class="card"/>
104
+ <text x="24" y="32" class="label">cc-investigate</text>
105
+ <text x="24" y="57" class="small">复现、根因、修复边界</text>
106
+ </g>
107
+ <g transform="translate(1245 490)">
108
+ <rect width="230" height="72" rx="14" class="card"/>
109
+ <text x="24" y="32" class="label">cc-do</text>
110
+ <text x="24" y="57" class="small">带证据修复</text>
111
+ </g>
112
+ <g transform="translate(885 615)">
113
+ <rect width="230" height="72" rx="14" class="card"/>
114
+ <text x="24" y="32" class="label">cc-check</text>
115
+ <text x="24" y="57" class="small">证明症状已修复</text>
116
+ </g>
117
+ <g transform="translate(1245 615)">
118
+ <rect width="230" height="72" rx="14" class="card"/>
119
+ <text x="24" y="32" class="label">cc-act</text>
120
+ <text x="24" y="57" class="small">创建或更新 PR</text>
121
+ </g>
122
+ <path class="line" d="M1155 526 H1235"/>
123
+ <path class="line" d="M1360 562 V605"/>
124
+ <path class="line" d="M1245 651 H1125"/>
125
+
126
+ <path class="thin" d="M1060 320 C950 360 830 365 685 410"/>
127
+ <path class="thin" d="M1060 320 C1180 360 1230 365 1260 410"/>
128
+
129
+ <rect x="250" y="790" width="1100" height="120" rx="22" fill="#101f2f" stroke="#3c5a78" stroke-width="2" filter="url(#shadow)"/>
130
+ <g transform="translate(305 815)">
131
+ <rect width="230" height="64" rx="14" fill="url(#violet)"/>
132
+ <text x="24" y="30" class="label">cc-pr-review</text>
133
+ <text x="24" y="52" class="small">单独会话 Review PR</text>
134
+ </g>
135
+ <g transform="translate(690 815)">
136
+ <rect width="230" height="64" rx="14" fill="url(#green)"/>
137
+ <text x="24" y="30" class="label">cc-pr-land</text>
138
+ <text x="24" y="52" class="small">Rebase 并合并 PR</text>
139
+ </g>
140
+ <g transform="translate(1075 815)">
141
+ <rect width="220" height="64" rx="14" fill="url(#blue)"/>
142
+ <text x="24" y="30" class="label">main</text>
143
+ <text x="24" y="52" class="small">本地和远程一致</text>
144
+ </g>
145
+ <path class="line" d="M535 847 H680"/>
146
+ <path class="line" d="M920 847 H1065"/>
147
+ <path class="thin" d="M805 815 C720 760 650 735 570 690"/>
148
+ <path class="thin" d="M805 815 C920 760 1110 735 1360 690"/>
149
+
150
+ <rect x="84" y="930" width="1432" height="42" rx="12" fill="#07111f" stroke="#27445f"/>
151
+ <text x="110" y="957" class="small">边界:cc-dev 不创建嵌套 worktree,也不合并 PR;Review 和 Landing 必须是独立会话。</text>
152
+ </svg>
Binary file
@@ -1,12 +1,17 @@
1
1
  {
2
- "updatedAt": "2026-05-06",
2
+ "updatedAt": "2026-05-10",
3
3
  "skills": {
4
- "cc-roadmap": "5.0.0",
5
- "cc-plan": "3.7.7",
6
- "cc-investigate": "1.2.2",
7
- "cc-do": "1.6.2",
4
+ "cc-roadmap": "5.2.0",
5
+ "cc-next": "1.0.0",
6
+ "cc-dev": "1.0.0",
7
+ "cc-plan": "3.8.2",
8
+ "cc-investigate": "1.3.0",
9
+ "cc-do": "1.6.3",
10
+ "cc-review": "1.3.0",
11
+ "cc-pr-review": "1.0.0",
12
+ "cc-pr-land": "1.0.0",
8
13
  "cc-check": "1.10.1",
9
- "cc-act": "1.8.2",
14
+ "cc-act": "1.8.3",
10
15
  "cc-spec-init": "1.1.0"
11
16
  },
12
17
  "examples": [
@@ -5,7 +5,7 @@
5
5
  ## Backlog Meta
6
6
 
7
7
  - Roadmap version: `roadmap.v2`
8
- - Skill version: `5.0.0`
8
+ - Skill version: `5.2.0`
9
9
  - Last synced: `2026-04-19`
10
10
  - Current focus stage: `Stage 2`
11
11
  - Roadmap state source: `roadmap.json`