cc-devflow 4.5.0 → 4.5.2

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 (75) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +14 -0
  2. package/.claude/skills/cc-act/PLAYBOOK.md +26 -1
  3. package/.claude/skills/cc-act/SKILL.md +36 -7
  4. package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +20 -0
  5. package/.claude/skills/cc-act/references/closure-contract.md +8 -0
  6. package/.claude/skills/cc-act/scripts/cc-act-common.sh +6 -1
  7. package/.claude/skills/cc-act/scripts/render-pr-brief.sh +99 -0
  8. package/.claude/skills/cc-act/scripts/verify-act-gate.sh +17 -1
  9. package/.claude/skills/cc-check/CHANGELOG.md +14 -0
  10. package/.claude/skills/cc-check/PLAYBOOK.md +101 -1
  11. package/.claude/skills/cc-check/SKILL.md +128 -7
  12. package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +121 -1
  13. package/.claude/skills/cc-check/references/review-contract.md +88 -0
  14. package/.claude/skills/cc-check/scripts/render-report-card.js +172 -5
  15. package/.claude/skills/cc-check/scripts/verify-gate.sh +21 -0
  16. package/.claude/skills/cc-investigate/CHANGELOG.md +13 -0
  17. package/.claude/skills/cc-investigate/PLAYBOOK.md +105 -4
  18. package/.claude/skills/cc-investigate/SKILL.md +185 -8
  19. package/.claude/skills/cc-investigate/assets/ANALYSIS_TEMPLATE.md +77 -3
  20. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +10 -3
  21. package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +102 -1
  22. package/.claude/skills/cc-investigate/references/investigation-contract.md +146 -0
  23. package/.claude/skills/cc-plan/CHANGELOG.md +14 -0
  24. package/.claude/skills/cc-plan/PLAYBOOK.md +19 -2
  25. package/.claude/skills/cc-plan/SKILL.md +52 -20
  26. package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +70 -1
  27. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +13 -0
  28. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +3 -1
  29. package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +22 -0
  30. package/.claude/skills/cc-roadmap/CHANGELOG.md +12 -0
  31. package/.claude/skills/cc-roadmap/PLAYBOOK.md +24 -1
  32. package/.claude/skills/cc-roadmap/SKILL.md +50 -15
  33. package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +15 -0
  34. package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +37 -0
  35. package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +2 -1
  36. package/.claude/skills/cc-simplify/CHANGELOG.md +15 -0
  37. package/.claude/skills/cc-simplify/SKILL.md +255 -35
  38. package/CHANGELOG.md +36 -0
  39. package/CODE_OF_CONDUCT.md +39 -0
  40. package/CODE_OF_CONDUCT.zh-CN.md +39 -0
  41. package/CONTRIBUTING.md +195 -0
  42. package/CONTRIBUTING.zh-CN.md +195 -0
  43. package/README.md +141 -150
  44. package/README.zh-CN.md +144 -148
  45. package/SECURITY.md +56 -0
  46. package/SECURITY.zh-CN.md +56 -0
  47. package/docs/examples/example-bindings.json +6 -6
  48. package/docs/examples/full-design-blocked/BACKLOG.md +1 -1
  49. package/docs/examples/full-design-blocked/README.md +1 -1
  50. package/docs/examples/full-design-blocked/ROADMAP.md +1 -1
  51. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +1 -1
  52. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +1 -1
  53. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +140 -3
  54. package/docs/examples/full-design-blocked/roadmap-tracking.json +1 -1
  55. package/docs/examples/local-handoff/BACKLOG.md +1 -1
  56. package/docs/examples/local-handoff/README.md +1 -1
  57. package/docs/examples/local-handoff/ROADMAP.md +1 -1
  58. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +1 -1
  59. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +1 -1
  60. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +92 -0
  61. package/docs/examples/local-handoff/roadmap-tracking.json +1 -1
  62. package/docs/examples/pdca-loop/BACKLOG.md +1 -1
  63. package/docs/examples/pdca-loop/README.md +1 -1
  64. package/docs/examples/pdca-loop/ROADMAP.md +1 -1
  65. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +20 -0
  66. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +1 -1
  67. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +2 -2
  68. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +1 -1
  69. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +92 -0
  70. package/docs/examples/pdca-loop/roadmap-tracking.json +1 -1
  71. package/docs/guides/getting-started.md +5 -0
  72. package/docs/guides/getting-started.zh-CN.md +5 -0
  73. package/lib/skill-runtime/review.js +64 -1
  74. package/lib/skill-runtime/schemas.js +150 -3
  75. package/package.json +7 -1
@@ -1,55 +1,275 @@
1
1
  ---
2
2
  name: cc-simplify
3
- version: 1.1.0
4
- description: Review changed code for reuse, quality, efficiency, and spec drift, then fix any issues found or flag the drift for the user.
3
+ version: 1.3.0
4
+ description: "Use when changed code needs a Codex-native simplification pass for scope drift, reuse, code quality, efficiency, test quality, and confidence-gated smell fixes before cc-check or cc-act."
5
5
  ---
6
- Simplify: Code Review and Cleanup
7
6
 
8
- Review all changed files for reuse, quality, and efficiency. Fix any issues found.
7
+ # CC-Simplify
9
8
 
10
- ## Phase 1: Identify Changes
9
+ `cc-simplify` ship 前的坏味道清理关口。
11
10
 
12
- Run \`git diff\` (or \`git diff HEAD\` if there are staged changes) to see what changed. If there are no git changes, review the most recently modified files that the user mentioned or that you edited earlier in this conversation.
11
+ 它不是“顺手重构”。它只做一件事:基于当前 diff 找到已经存在的重复、过度设计、低效路径、测试假象、spec drift,并修掉已经确认的坏味道。
13
12
 
14
- ## Phase 2: Launch Three Review Agents in Parallel
13
+ ## Iron Law
15
14
 
16
- Use the ${AGENT_TOOL_NAME} tool to launch all three agents concurrently in a single message. Pass each agent the full diff so it has the complete context.
15
+ ```text
16
+ ONLY FIX CONFIRMED SMELLS. DO NOT BEAUTIFY BY GUESS.
17
+ ```
17
18
 
18
- ### Agent 1: Code Reuse Review
19
+ 没有证据的 reviewer finding 只是线索,不是命令。先验证,再修改。
19
20
 
20
- For each change:
21
+ ## Phase 1: 识别变更
21
22
 
22
- 1. **Search for existing utilities and helpers** that could replace newly written code. Look for similar patterns elsewhere in the codebase — common locations are utility directories, shared modules, and files adjacent to the changed ones.
23
- 2. **Flag any new function that duplicates existing functionality.** Suggest the existing function to use instead.
24
- 3. **Flag any inline logic that could use an existing utility** — hand-rolled string manipulation, manual path handling, custom environment checks, ad-hoc type guards, and similar patterns are common candidates.
23
+ 1. 优先读取当前变更:
24
+ - staged diff:跑 `git diff --cached` `git diff`
25
+ - staged diff:跑 `git diff HEAD`
26
+ - 如果没有 git diff,审查本轮对话中用户点名或你刚编辑过的文件
27
+ 2. 记录 diff 范围:
28
+ - changed files
29
+ - affected modules
30
+ - stack signals: `package.json` / `pyproject.toml` / `go.mod` / `Cargo.toml` / etc.
31
+ - test framework signals: `jest` / `vitest` / `pytest` / `go test` / etc.
32
+ - scope flags: API / auth / backend / frontend / migration / docs / release
33
+ - related `planning/tasks.md` / `change-meta.json` / capability specs
34
+ - already-run verification, if any
35
+ 3. 如果变更跨多个互不相关模块,先按模块分组;不要让一个 cleanup pass 变成大扫除。
36
+ 4. 只审当前 diff 新增或本次改动扩大后的坏味道。历史债只在它阻挡当前交付或被本次 diff 放大时进入清理范围。
25
37
 
26
- ### Agent 2: Code Quality Review
38
+ ## Phase 2: Codex 智能体评审
27
39
 
28
- Review the same changes for hacky patterns:
40
+ 如果当前环境支持 Codex 多智能体,并且用户已经明确触发 `cc-simplify` 或要求并行评审,可以构建只读评审智能体。
29
41
 
30
- 1. **Redundant state**: state that duplicates existing state, cached values that could be derived, observers/effects that could be direct calls
31
- 2. **Parameter sprawl**: adding new parameters to a function instead of generalizing or restructuring existing ones
32
- 3. **Copy-paste with slight variation**: near-duplicate code blocks that should be unified with a shared abstraction
33
- 4. **Leaky abstractions**: exposing internal details that should be encapsulated, or breaking existing abstraction boundaries
34
- 5. **Stringly-typed code**: using raw strings where constants, enums (string unions), or branded types already exist in the codebase
35
- 6. **Unnecessary JSX nesting**: wrapper Boxes/elements that add no layout value — check if inner component props (flexShrink, alignItems, etc.) already provide the needed behavior
36
- 7. **Unnecessary comments**: comments explaining WHAT the code does (well-named identifiers already do that), narrating the change, or referencing the task/caller — delete; keep only non-obvious WHY (hidden constraints, subtle invariants, workarounds)
37
- 8. **Spec drift**: behavior, boundary, or invariant changed but no matching `change-meta.json` / capability spec delta was updated — flag it explicitly and propose the missing spec sync
42
+ ### 调度原则
38
43
 
39
- ### Agent 3: Efficiency Review
44
+ - Codex 中优先使用 `spawn_agent(agent_type="explorer")` 创建只读评审智能体。
45
+ - 如果当前环境没有 `explorer`,使用默认智能体也必须在 prompt 里写明:只读审查,不编辑文件。
46
+ - 只把只读评审交给智能体;主线程负责最终判断和实际编辑。
47
+ - 每个智能体拿到同一份完整 diff、相关任务/设计/spec 路径、当前 repo 根目录。
48
+ - 智能体不能改文件,只输出结构化 findings。
49
+ - 如果没有多智能体能力,主线程按同样清单顺序执行。
50
+ - 小 diff 不强制开智能体:少于约 50 行且只触碰单一文件时,主线程执行同一清单即可。
51
+ - 条件 specialist 只在对应 scope 出现时启用;不要为了“完整”启动无关评审。
40
52
 
41
- Review the same changes for efficiency:
53
+ 智能体 prompt 必须自包含:
42
54
 
43
- 1. **Unnecessary work**: redundant computations, repeated file reads, duplicate network/API calls, N+1 patterns
44
- 2. **Missed concurrency**: independent operations run sequentially when they could run in parallel
45
- 3. **Hot-path bloat**: new blocking work added to startup or per-request/per-render hot paths
46
- 4. **Recurring no-op updates**: state/store updates inside polling loops, intervals, or event handlers that fire unconditionally — add a change-detection guard so downstream consumers aren't notified when nothing changed. Also: if a wrapper function takes an updater/reducer callback, verify it honors same-reference returns (or whatever the "no change" signal is) — otherwise callers' early-return no-ops are silently defeated
47
- 5. **Unnecessary existence checks**: pre-checking file/resource existence before operating (TOCTOU anti-pattern) — operate directly and handle the error
48
- 6. **Memory**: unbounded data structures, missing cleanup, event listener leaks
49
- 7. **Overly broad operations**: reading entire files when only a portion is needed, loading all items when filtering for one
55
+ ```text
56
+ 你是 cc-simplify 的只读评审智能体。不要编辑文件。
57
+ 输入:repo root、完整 diff、相关任务/spec 路径、你的评审维度。
58
+ 输出:每行一个 JSON finding;没有发现时只输出 NO FINDINGS。
59
+ 没有证据的猜测不要输出为 finding。
60
+ ```
50
61
 
51
- ## Phase 3: Fix Issues
62
+ Finding JSONL schema:
52
63
 
53
- Wait for all three agents to complete. Aggregate their findings and fix each issue directly. If a finding is a false positive or not worth addressing, note it and move on — do not argue with the finding, just skip it.
64
+ ```json
65
+ {"severity":"critical|important|minor","confidence":8,"path":"file","line":12,"category":"reuse|scope|quality|efficiency|testing|security|api-contract|release","summary":"...","evidence":"...","fix":"...","fingerprint":"file:12:category","specialist":"name","test_stub":"optional"}
66
+ ```
54
67
 
55
- When done, briefly summarize what was fixed (or confirm the code was already clean).
68
+ 字段要求:
69
+
70
+ - 必填:`severity`、`confidence`、`path`、`category`、`summary`、`evidence`、`fix`、`specialist`
71
+ - 可选:`line`、`fingerprint`、`test_stub`
72
+ - `confidence` 用 1-10;低于 5 的 finding 不能进入自动修复列表。
73
+ - `test_stub` 只给能用一个小测试抓住的问题;架构判断不要伪造测试。
74
+
75
+ ### 推荐三个智能体
76
+
77
+ #### Agent A: Spec / Scope Reviewer
78
+
79
+ 目标:确认实现是否仍然符合冻结的需求边界。
80
+
81
+ 检查:
82
+
83
+ 1. 是否遗漏了任务要求。
84
+ 2. 是否多做了未要求功能。
85
+ 3. 是否改变行为、边界或 invariant,却没有同步 `change-meta.json` 或 capability spec。
86
+ 4. 是否把 bug 修复伪装成新需求,或把新需求伪装成 cleanup。
87
+ 5. 是否应该 reroute:
88
+ - 设计范围变了 -> `cc-plan`
89
+ - 根因故事失效 -> `cc-investigate`
90
+ - 需要重新验证 -> `cc-check`
91
+
92
+ #### Agent B: Reuse / Structure Reviewer
93
+
94
+ 目标:删除重复和无意义抽象。
95
+
96
+ 检查:
97
+
98
+ 1. 新增函数是否重复现有 helper、utility、shared module、邻近文件里的模式。
99
+ 2. 是否手写了已有能力:路径处理、字符串解析、env 检测、类型 guard、schema 验证、错误包装。
100
+ 3. 是否出现 copy-paste with slight variation,应该合并为已有 helper 或一个更小的局部函数。
101
+ 4. 是否有 parameter sprawl:为了一个场景继续给函数加参数,而不是整理输入对象或拆出职责。
102
+ 5. 是否泄漏抽象边界:调用方知道了内部状态、文件布局、协议细节或测试专用机制。
103
+ 6. 文件是否因为本次改动开始承担多个职责;如果只是历史遗留,不在本轮扩大范围。
104
+
105
+ #### Agent C: Quality / Efficiency / Test Reviewer
106
+
107
+ 目标:找出会变成维护成本或运行成本的坏味道。
108
+
109
+ 检查:
110
+
111
+ 1. 冗余状态:缓存可派生值、重复状态源、无意义 observer/effect。
112
+ 2. 热路径膨胀:启动、请求、渲染、轮询、事件处理里新增阻塞工作。
113
+ 3. 重复 IO / 网络 / API 调用、N+1、整文件读取但只需要局部数据。
114
+ 4. missed concurrency:互不依赖的读文件、搜索、请求、验证命令被串行执行。
115
+ 5. recurring no-op update:轮询或 reducer 明明没有变化却通知下游。
116
+ 6. TOCTOU:先检查文件存在再操作;应直接操作并处理错误。
117
+ 7. 内存和生命周期:无界数组/map/cache、listener 未清理、timer 未释放。
118
+ 8. 测试坏味道:
119
+ - 测 mock 存在,不测真实行为
120
+ - 为测试给生产类加 test-only method
121
+ - 不理解依赖副作用就 mock
122
+ - partial mock 缺少真实响应字段
123
+ - 只补测试后验通过,没有证明测试会抓住 bug
124
+ - 缺少错误路径、权限拒绝、空值、边界值、单元素集合、并发访问测试
125
+ - 测试共享全局状态、依赖系统时间/时区/locale、真实网络或随机数据但没有 seed
126
+ - 断言无序结果的顺序,或使用过紧 timeout 造成 flaky
127
+
128
+ ### 条件 specialist
129
+
130
+ 当 diff 命中对应范围时,额外启用这些只读维度;没有命中就跳过:
131
+
132
+ - `security`:auth/backend 大改、用户输入、文件路径、命令执行、HTML escape hatch、token/secret 处理
133
+ - `api-contract`:endpoint、请求/响应字段、状态码、鉴权要求、分页、OpenAPI/SDK 文档
134
+ - `release`:VERSION、CHANGELOG、发布脚本、CI artifact、tag 格式、publish idempotency
135
+ - `frontend-performance`:渲染循环、列表查找、重复 style 注入、bundle/懒加载边界
136
+
137
+ 如果任一 specialist 发现 `critical`,再做一次 Red Team 只读复查:它只找遗漏的跨边界失败模式,不重复前面 finding。
138
+
139
+ ## Phase 3: 汇总和去重 findings
140
+
141
+ 先解析 JSONL;非 JSON 行丢弃,`NO FINDINGS` 表示该 source 没有发现。
142
+
143
+ Fingerprint 规则:
144
+
145
+ 1. 优先使用 finding 自带 `fingerprint`。
146
+ 2. 否则用 `{path}:{line}:{category}`。
147
+ 3. 没有 `line` 时用 `{path}:{category}:{summary}`。
148
+
149
+ 同一 fingerprint 的 finding 合并:
150
+
151
+ - 保留 confidence 最高的版本。
152
+ - 如果多个 specialist 命中同一问题,标记 `multi-specialist`,confidence +1,最高 10。
153
+ - 合并后按 `critical -> important -> minor`,再按 confidence 降序排序。
154
+
155
+ Confidence gate:
156
+
157
+ - `7-10`:进入主 findings 表。
158
+ - `5-6`:进入主表,但 Decision 初始为 `verify-first`。
159
+ - `3-4`:放到 appendix,只在主线程读代码后确认时升级。
160
+ - `1-2`:抑制,不输出为行动项。
161
+
162
+ 主表格式:
163
+
164
+ | ID | Source | Severity | File:line | Claim | Evidence | Proposed fix | Decision |
165
+ | --- | --- | --- | --- | --- | --- | --- | --- |
166
+ | S1 | spec | critical | | | | | pending |
167
+
168
+ Severity:
169
+
170
+ - `critical`: 会破坏功能、安全、数据、发布真实性
171
+ - `important`: 明显坏味道、spec drift、测试假象、性能风险
172
+ - `minor`: 可读性、局部重复、小优化
173
+
174
+ Decision:
175
+
176
+ - `auto-fix`: 已确认、机械、低风险,主线程可直接修
177
+ - `ask`: 需要用户判断或会改变用户可见行为
178
+ - `fix`: 已确认且在当前 cleanup 边界内
179
+ - `verify-first`: 线索合理但证据不足,修前必须读代码确认
180
+ - `skip-false-positive`: 和代码事实不符
181
+ - `skip-not-worth-it`: 成本高于收益,且不影响当前交付
182
+ - `reroute`: 已经不是 simplify 范围
183
+
184
+ ### Fix-First 决策表
185
+
186
+ 默认自动修:
187
+
188
+ - dead code、unused variable/import、明显 stale comment
189
+ - 简单重复 helper、路径/版本/changelog 不一致
190
+ - 局部 magic value 提取为已存在常量或邻近常量
191
+ - 明显 O(n*m) 查找可改为 map/index,且行为不变
192
+ - 缺少轻量输入 shape 校验,且已有本地校验模式可复用
193
+
194
+ 默认 ask 或 reroute:
195
+
196
+ - auth、XSS、注入、secret、权限、安全边界
197
+ - race condition、数据迁移、事务语义、enum/value completeness
198
+ - 需要超过约 20 行的新设计,或触碰超过 5 个文件
199
+ - 删除功能、改变公共 API、改变用户可见行为
200
+ - finding 证明 frozen plan、root cause、acceptance 已经失效
201
+
202
+ ## Phase 4: 验证 finding 是否成立
203
+
204
+ 不要盲信 reviewer。
205
+
206
+ 每条 finding 修复前先做四个检查:
207
+
208
+ 1. **代码事实**:打开对应文件和相邻实现,确认问题真实存在。
209
+ 2. **使用事实**:用 `rg` 查调用方,确认不是 reviewer 缺上下文。
210
+ 3. **需求事实**:对照 `planning/tasks.md`、`change-meta.json`、capability spec,确认没有误删必要行为。
211
+ 4. **验证事实**:明确修复后用什么命令或检查证明没有回归。
212
+
213
+ 如果 reviewer 建议“更专业”的能力,先做 YAGNI 检查:没有调用方、没有需求、没有 acceptance,就不要新增。
214
+
215
+ 这些情况不要报成 finding:
216
+
217
+ - 为可读性保留的轻微重复。
218
+ - 已有断言已经覆盖真实行为,只是“不够漂亮”。
219
+ - 输入域受约束,所谓边界值在产品里不可能出现。
220
+ - 测试一次覆盖多个 guard;只要行为清楚,不必强拆。
221
+ - 当前 diff 已经修掉的问题。
222
+ - shutdown/emergency/fire-and-forget 路径里有意吞掉错误。
223
+ - pass-through wrapper 只是稳定 API 层,内部委托到真实实现。
224
+
225
+ ## Phase 5: 只修 confirmed smells
226
+
227
+ 修复顺序:
228
+
229
+ 1. Critical
230
+ 2. Simple important fixes
231
+ 3. Complex important fixes
232
+ 4. Minor fixes only if low-risk
233
+
234
+ 边界:
235
+
236
+ - 不做 unrelated refactor。
237
+ - 不改公共 API,除非 finding 证明当前 API 本身就是坏味道。
238
+ - 不把多个架构方向揉进一个 cleanup。
239
+ - 不为了消灭 3 行重复制造 50 行抽象。
240
+ - 如果预计触碰超过 5 个文件,先停下说明:拆分、reroute,还是只修 critical path。
241
+
242
+ 如果某条 finding 需要重新设计,停止并交给 `cc-plan`。如果 finding 证明根因不明,交给 `cc-investigate`。
243
+
244
+ ## Phase 6: 新鲜验证
245
+
246
+ 完成修改后必须运行和本次 cleanup 相关的最小验证:
247
+
248
+ 1. 格式/结构:例如 `git diff --check`、JSON/YAML parse、脚本 `bash -n`。
249
+ 2. 目标测试:覆盖被修改模块的单测或 smoke。
250
+ 3. 必要时运行更高层 gate:`npm test`、`npm run verify:*`、项目本地等价命令。
251
+
252
+ 不能用旧结果声称现在通过。智能体报告也不能替代主线程验证。
253
+
254
+ ## 输出格式
255
+
256
+ 结束时输出简短 `Simplify Report`:
257
+
258
+ - Reviewed diff:
259
+ - Agents used: `yes` / `no`
260
+ - Findings fixed:
261
+ - Findings skipped:
262
+ - Reroutes / blockers:
263
+ - Verification run:
264
+ - Next step: `cc-check` / `cc-act` / `cc-plan` / `cc-investigate`
265
+
266
+ 如果 `cc-simplify` 修改了代码或验证口径,下一步必须回 `cc-check`,不能带旧 report-card 继续 `cc-act`。
267
+
268
+ ## Do Not
269
+
270
+ - 不把 cleanup 当成重写入口。
271
+ - 不因为 reviewer 说了就盲改。
272
+ - 不把风格偏好升级成 critical。
273
+ - 不跳过 spec drift。
274
+ - 不用 mock 通过来证明真实行为正确。
275
+ - 不在没有新鲜验证时声称“已简化完成”。
package/CHANGELOG.md CHANGED
@@ -9,6 +9,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [4.5.2] - 2026-04-28
13
+
14
+ ### Skill Review Hardening
15
+
16
+ v4.5.2 strengthens the verification and cleanup side of the workflow so
17
+ review, QA, investigation, release readiness, and pre-ship simplification carry
18
+ fresh evidence instead of relying on stale chat context.
19
+
20
+ ### Changed
21
+
22
+ - Updated `cc-check` to record review freshness, specialist review facets, QA coverage/browser evidence, and runtime failure ownership before a verdict can enter `cc-act`.
23
+ - Updated `cc-act` to render a readiness dashboard, check PR body accuracy, and rerun verification on each invocation while keeping ship actions idempotent.
24
+ - Updated `cc-investigate` to require a frozen root-cause contract with prior-history checks, boundary probes, backward trace, reference comparison, diagnostic probe cleanup, condition-wait evidence, pattern analysis, sanitized research evidence, and repair-boundary blast-radius fields.
25
+ - Updated `cc-simplify` to a Chinese Codex-native cleanup workflow with scope-aware reviewer dispatch, JSONL findings, confidence-gated deduplication, Fix-First decisions, false-positive suppressions, and fresh validation evidence.
26
+ - Refreshed public examples and skill binding metadata for `cc-investigate@1.1.4`, `cc-check@1.8.4`, `cc-act@1.6.4`, and `cc-simplify@1.3.0`.
27
+
28
+ ## [4.5.1] - 2026-04-28
29
+
30
+ ### Planning Evidence Gates
31
+
32
+ v4.5.1 strengthens roadmap and requirement planning so downstream execution gets
33
+ clearer evidence, option tradeoffs, rescue behavior, and test obligations before
34
+ implementation starts.
35
+
36
+ ### Changed
37
+
38
+ - Updated `cc-roadmap` to record planning posture, evidence maturity, framing checks, and developer/operator adoption handoff fields.
39
+ - Updated `cc-plan` to require named option roles, implementation decision horizon, error/rescue mapping, test framework evidence, coverage quality mapping, and regression-test planning.
40
+ - Updated README and getting-started docs to describe the new roadmap and planning quality gates.
41
+ - Refreshed public examples and skill binding metadata for `cc-roadmap@4.3.4` and `cc-plan@3.5.6`.
42
+
43
+ ### Fixed
44
+
45
+ - Improved publish validation diagnostics for YAML frontmatter list items that accidentally parse as mappings when they contain `": "`.
46
+ - Added a regression test so malformed public-skill string arrays report the exact field, index, actual type, and repair hint.
47
+
12
48
  ## [4.5.0] - 2026-04-27
13
49
 
14
50
  ### ✨ Runtime YAML Config
@@ -0,0 +1,39 @@
1
+ # Code of Conduct
2
+
3
+ [中文版](./CODE_OF_CONDUCT.zh-CN.md) | [English](./CODE_OF_CONDUCT.md)
4
+
5
+ ## Purpose
6
+
7
+ cc-devflow is built for practical agent-coding workflows. The project benefits from direct technical debate, but that debate must stay focused on code, design, evidence, and maintainability.
8
+
9
+ This code of conduct applies to project spaces, including issues, pull requests, discussions, documentation, examples, and maintainer communication channels.
10
+
11
+ ## Expected Behavior
12
+
13
+ - Be clear, specific, and evidence-based when reporting bugs or reviewing code.
14
+ - Critique ideas, code, architecture, and tradeoffs instead of attacking people.
15
+ - Assume contributors may have different language backgrounds and levels of context.
16
+ - Keep discussions aligned with the project scope: workflow skills, CLI distribution, adapters, examples, and documentation.
17
+ - Respect maintainer decisions after a direction is explained.
18
+
19
+ ## Unacceptable Behavior
20
+
21
+ - Harassment, threats, insults, or discriminatory language.
22
+ - Personal attacks, repeated bad-faith arguments, or derailing technical threads.
23
+ - Publishing private information without permission.
24
+ - Spam, advertising, or automated low-quality issue and PR noise.
25
+ - Security disclosure pressure, public exploit details, or demands for private maintainer information.
26
+
27
+ ## Reporting
28
+
29
+ For conduct concerns, open a private maintainer contact path if one is available in the project profile. If no private path exists, create a GitHub issue with only the minimum public context needed and ask maintainers to move the discussion to a private channel.
30
+
31
+ For vulnerabilities, do not use conduct reports. Follow [SECURITY.md](./SECURITY.md).
32
+
33
+ ## Enforcement
34
+
35
+ Maintainers may remove content, close issues or pull requests, block accounts, or limit participation when behavior harms the project. Enforcement should be proportional, evidence-based, and focused on restoring a productive project environment.
36
+
37
+ ## Notes
38
+
39
+ This is a project-specific conduct policy, written to match cc-devflow's technical collaboration model. It is intentionally short so contributors can read and apply it quickly.
@@ -0,0 +1,39 @@
1
+ # 行为准则
2
+
3
+ [中文版](./CODE_OF_CONDUCT.zh-CN.md) | [English](./CODE_OF_CONDUCT.md)
4
+
5
+ ## 目的
6
+
7
+ cc-devflow 服务于真实的 Agent 编程工作流。项目欢迎直接、严格的技术讨论,但讨论必须始终围绕代码、设计、证据和可维护性。
8
+
9
+ 本行为准则适用于项目空间,包括 issue、pull request、discussion、文档、样例,以及维护者沟通渠道。
10
+
11
+ ## 期望行为
12
+
13
+ - 报告 Bug 或 Review 代码时,保持清晰、具体、基于证据。
14
+ - 批评想法、代码、架构和取舍,不攻击个人。
15
+ - 尊重贡献者的语言背景和上下文差异。
16
+ - 讨论保持在项目范围内:workflow skill、CLI 分发、adapter、样例和文档。
17
+ - 当维护者解释方向后,尊重最终维护决策。
18
+
19
+ ## 不可接受行为
20
+
21
+ - 骚扰、威胁、侮辱或歧视性表达。
22
+ - 人身攻击、反复恶意争论,或故意带偏技术讨论。
23
+ - 未经许可公开他人隐私信息。
24
+ - 垃圾信息、广告,或自动化低质量 issue / PR 噪音。
25
+ - 安全披露施压、公开漏洞利用细节,或索要维护者私人信息。
26
+
27
+ ## 报告方式
28
+
29
+ 如果遇到行为准则问题,优先使用项目资料中可用的私密维护者联系方式。如果暂时没有私密渠道,可以创建 GitHub issue,只写最少必要的公开上下文,并请求维护者转入私密渠道处理。
30
+
31
+ 漏洞报告不要走行为准则渠道。请遵循 [SECURITY.zh-CN.md](./SECURITY.zh-CN.md)。
32
+
33
+ ## 执行
34
+
35
+ 当行为损害项目环境时,维护者可以删除内容、关闭 issue 或 PR、阻止账号,或限制参与。执行应基于证据、保持比例,并以恢复健康的项目协作为目标。
36
+
37
+ ## 说明
38
+
39
+ 这是为 cc-devflow 技术协作方式定制的项目级行为准则。它刻意保持简短,方便贡献者快速阅读和执行。
@@ -0,0 +1,195 @@
1
+ # Contributing to cc-devflow
2
+
3
+ [中文版](./CONTRIBUTING.zh-CN.md) | [English](./CONTRIBUTING.md)
4
+
5
+ ---
6
+
7
+ Please also read the [Code of Conduct](./CODE_OF_CONDUCT.md). If you are reporting a vulnerability, follow the [Security Policy](./SECURITY.md) instead of opening a public issue.
8
+
9
+ ## Overview
10
+
11
+ cc-devflow is now a skills-first repository with a restored distributable CLI.
12
+
13
+ Public surface:
14
+
15
+ - `cc-roadmap`
16
+ - `cc-plan`
17
+ - `cc-investigate`
18
+ - `cc-do`
19
+ - `cc-check`
20
+ - `cc-act`
21
+ - `cc-devflow init`
22
+ - `cc-devflow adapt`
23
+
24
+ Shared runtime helpers may still live under `lib/skill-runtime/`, but they are not the user-facing workflow anymore.
25
+
26
+ Maintenance helpers may also exist under `.claude/skills/`, such as `cc-spec-init`, `cc-simplify`, and `docs-sync`, but they do not change the public `cc-roadmap + PDCA/IDCA` workflow story.
27
+
28
+ ---
29
+
30
+ ## Development Setup
31
+
32
+ ### Prerequisites
33
+
34
+ - Node.js 18+
35
+ - npm
36
+ - Git
37
+
38
+ ### Install
39
+
40
+ ```bash
41
+ git clone https://github.com/YOUR_USERNAME/cc-devflow.git
42
+ cd cc-devflow
43
+ npm install
44
+ ```
45
+
46
+ ### Local CLI Smoke Test
47
+
48
+ When working from source, use the repo-local entrypoint:
49
+
50
+ ```bash
51
+ node bin/cc-devflow-cli.js --help
52
+ tmpdir=$(mktemp -d)
53
+ node bin/cc-devflow-cli.js init --dir "$tmpdir"
54
+ node bin/cc-devflow-cli.js adapt --cwd "$tmpdir" --platform codex
55
+ rm -rf "$tmpdir"
56
+ ```
57
+
58
+ For packaged behavior, validate with:
59
+
60
+ ```bash
61
+ npm pack
62
+ node scripts/validate-publish.js
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Project Structure
68
+
69
+ ```text
70
+ cc-devflow/
71
+ ├── .claude/skills/ # Distributed skills
72
+ ├── bin/ # CLI entrypoints
73
+ ├── config/ # Adapter configuration
74
+ ├── docs/ # Public docs
75
+ ├── lib/adapters/ # Platform adapter layer
76
+ ├── lib/compiler/ # Multi-platform compiler
77
+ ├── lib/skill-runtime/ # Shared runtime helpers and colocated tests for skill scripts
78
+ ├── README.md
79
+ ├── README.zh-CN.md
80
+ └── package.json
81
+ ```
82
+
83
+ ### Contribution Areas
84
+
85
+ - `.claude/skills/`: skill behavior, assets, references, scripts
86
+ - `bin/`: distributable CLI behavior
87
+ - `lib/compiler/`: skills/prompts parsing, transformation, emitters, rules generation
88
+ - `lib/adapters/`: platform adapter config and validation
89
+ - `lib/skill-runtime/`: shared runtime helpers used by skill-local scripts
90
+ - `docs/`: user-facing documentation
91
+
92
+ ---
93
+
94
+ ## Contribution Rules
95
+
96
+ ### 1. Keep The Public Surface Small
97
+
98
+ Do not reintroduce old `/flow:*` or `harness:*` CLI instructions into new user docs.
99
+
100
+ The user-facing story should stay:
101
+
102
+ - whole pack: `cc-devflow init`
103
+ - platform outputs: `cc-devflow adapt`
104
+ - workflow execution: visible `cc-roadmap + PDCA/IDCA` skills
105
+ - capability truth maintenance: `cc-spec-init`
106
+
107
+ ### 2. Preserve Skills-First Layout
108
+
109
+ Each shipped skill should keep its own folder:
110
+
111
+ ```text
112
+ .claude/skills/<skill>/
113
+ ├── SKILL.md
114
+ ├── PLAYBOOK.md
115
+ ├── assets/
116
+ ├── references/
117
+ └── scripts/
118
+ ```
119
+
120
+ If you touch a shipped skill, treat these files as one contract:
121
+
122
+ - `SKILL.md`
123
+ - local `CHANGELOG.md`
124
+ - any referenced `PLAYBOOK.md`, `assets/`, `references/`, `scripts/`
125
+
126
+ Do not change one part of the contract and leave the others stale.
127
+
128
+ ### 3. Keep Distribution Clean
129
+
130
+ Do not ship transient files in templates or tarballs.
131
+
132
+ Examples of junk we should exclude:
133
+
134
+ - `.claude/tsc-cache/`
135
+ - `.DS_Store`
136
+ - local editor or OS artifacts
137
+
138
+ ### 4. Keep Runtime Helpers Secondary
139
+
140
+ If you touch `lib/skill-runtime/`, keep the behavior testable, but do not document it as the primary user entry. The public workflow still belongs to the shipped skills.
141
+
142
+ ---
143
+
144
+ ## Testing
145
+
146
+ ### Main Test Command
147
+
148
+ ```bash
149
+ npm test
150
+ ```
151
+
152
+ ### Focused CLI Regression
153
+
154
+ ```bash
155
+ npm test -- --runInBand lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js
156
+ ```
157
+
158
+ ### Publish Validation
159
+
160
+ ```bash
161
+ node scripts/validate-publish.js
162
+ ```
163
+
164
+ This should confirm:
165
+
166
+ - the expected CLI files exist
167
+ - the expected skills exist
168
+ - the packed tarball is clean
169
+ - transient cache files are not shipped
170
+
171
+ ---
172
+
173
+ ## Documentation Rules
174
+
175
+ - README and getting-started docs should default to packaged CLI usage
176
+ - contributor-only docs may use `node bin/cc-devflow-cli.js ...`
177
+ - `skills.sh` should be documented only as a single-skill distribution path
178
+ - do not describe `.claude/commands/` as required structure
179
+ - do not describe internal runtime helpers as the supported public workflow
180
+ - if a shipped skill changes, update that skill's `version`, local `CHANGELOG.md`, and affected public docs in the same PR
181
+ - keep the workflow story as `cc-roadmap + PDCA/IDCA` visible skills; document maintenance helpers such as `cc-spec-init` / `cc-simplify` separately
182
+
183
+ ---
184
+
185
+ ## Pull Requests
186
+
187
+ Good PRs for this repo usually do one of these cleanly:
188
+
189
+ - improve a skill
190
+ - fix CLI distribution
191
+ - fix compiler/adaptation behavior
192
+ - clean stale docs
193
+ - add focused regression coverage
194
+
195
+ If a change touches the public surface, update the relevant docs in the same PR.