cc-devflow 4.5.0 → 4.5.1

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 (45) hide show
  1. package/.claude/skills/cc-plan/CHANGELOG.md +14 -0
  2. package/.claude/skills/cc-plan/PLAYBOOK.md +19 -2
  3. package/.claude/skills/cc-plan/SKILL.md +52 -20
  4. package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +70 -1
  5. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +13 -0
  6. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +3 -1
  7. package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +22 -0
  8. package/.claude/skills/cc-roadmap/CHANGELOG.md +12 -0
  9. package/.claude/skills/cc-roadmap/PLAYBOOK.md +24 -1
  10. package/.claude/skills/cc-roadmap/SKILL.md +50 -15
  11. package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +15 -0
  12. package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +37 -0
  13. package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +2 -1
  14. package/CHANGELOG.md +20 -0
  15. package/CODE_OF_CONDUCT.md +39 -0
  16. package/CODE_OF_CONDUCT.zh-CN.md +39 -0
  17. package/CONTRIBUTING.md +195 -0
  18. package/CONTRIBUTING.zh-CN.md +195 -0
  19. package/README.md +141 -150
  20. package/README.zh-CN.md +144 -148
  21. package/SECURITY.md +56 -0
  22. package/SECURITY.zh-CN.md +56 -0
  23. package/docs/examples/example-bindings.json +3 -3
  24. package/docs/examples/full-design-blocked/BACKLOG.md +1 -1
  25. package/docs/examples/full-design-blocked/README.md +1 -1
  26. package/docs/examples/full-design-blocked/ROADMAP.md +1 -1
  27. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +1 -1
  28. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +1 -1
  29. package/docs/examples/full-design-blocked/roadmap-tracking.json +1 -1
  30. package/docs/examples/local-handoff/BACKLOG.md +1 -1
  31. package/docs/examples/local-handoff/README.md +1 -1
  32. package/docs/examples/local-handoff/ROADMAP.md +1 -1
  33. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +1 -1
  34. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +1 -1
  35. package/docs/examples/local-handoff/roadmap-tracking.json +1 -1
  36. package/docs/examples/pdca-loop/BACKLOG.md +1 -1
  37. package/docs/examples/pdca-loop/README.md +1 -1
  38. package/docs/examples/pdca-loop/ROADMAP.md +1 -1
  39. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +1 -1
  40. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +2 -2
  41. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +1 -1
  42. package/docs/examples/pdca-loop/roadmap-tracking.json +1 -1
  43. package/docs/guides/getting-started.md +5 -0
  44. package/docs/guides/getting-started.zh-CN.md +5 -0
  45. package/package.json +7 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cc-roadmap
3
- version: 4.3.2
3
+ version: 4.3.4
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
  - "帮我定路线图"
@@ -32,6 +32,8 @@ writes:
32
32
  entry_gate:
33
33
  - "Read current roadmap, backlog, related capability specs, and surrounding repo context before proposing direction."
34
34
  - "Confirm this is a project-direction problem, not a single requirement execution problem."
35
+ - "Classify planning posture and evidence maturity before selecting the route or forcing questions."
36
+ - "If the ask contains multiple independent subsystems, decompose them into stages and RM candidates before refining any implementation detail."
35
37
  - "Do not decompose implementation tasks while the roadmap is still being decided."
36
38
  exit_criteria:
37
39
  - "The next 1-3 stages are frozen with goal, why now, dependencies, exit signal, kill signal, and non-goals."
@@ -95,12 +97,13 @@ tool_budget:
95
97
  | “不知道下一步做什么” | 主线不清 | `wedge-first` |
96
98
  | “后面几阶段都会重复碰同一底座” | 底座风险 | `platform-first` |
97
99
  | “增长/交付/信任卡住了” | 当前最大瓶颈 | `rescue-first` |
100
+ | “一个目标里塞了多个可独立交付系统” | 边界过宽 | `decompose-first` |
98
101
 
99
102
  先给一个**默认推荐**,再解释为什么,不要把用户扔进开放式战略讨论。
100
103
 
101
104
  ## Harness Contract
102
105
 
103
- - Allowed actions: read current strategy files, repo context, and recent reality; compare route shapes; write `devflow/ROADMAP.md`, `devflow/BACKLOG.md`, and the optional `devflow/roadmap-tracking.json` sidecar used by bundled helpers as the shared roadmap/backlog truth source.
106
+ - Allowed actions: read current strategy files, repo context, and recent reality; compare route shapes; decompose independent subsystems into stages and RM candidates; write `devflow/ROADMAP.md`, `devflow/BACKLOG.md`, and the optional `devflow/roadmap-tracking.json` sidecar used by bundled helpers as the shared roadmap/backlog truth source.
104
107
  - Forbidden actions: decompose implementation tasks, invent hidden context, or jump into `cc-plan` before the roadmap is approved.
105
108
  - Required evidence: every stage and backlog item must point back to explicit repo facts, user constraints, or observed market signals.
106
109
  - Reroute rule: once the conversation collapses to one concrete requirement, stop strategic expansion and hand off to `cc-plan`.
@@ -109,8 +112,9 @@ tool_budget:
109
112
 
110
113
  1. 如果 `devflow/ROADMAP.md` / `devflow/BACKLOG.md` 已存在,先读现状再重写。
111
114
  2. 先判断这是“项目方向问题”还是“单 requirement 执行问题”。
112
- 3. 先做一次上下文扫描,不能跳过现有事实直接写愿景。
113
- 4. 方向没被批准前,不准把 roadmap 偷偷下放成实现任务。
115
+ 3. 如果输入是多个独立子系统的混合目标,先拆成阶段和 `RM` 候选;不要继续追问某个子系统的实现细节。
116
+ 4. 先做一次上下文扫描,不能跳过现有事实直接写愿景。
117
+ 5. 方向没被批准前,不准把 roadmap 偷偷下放成实现任务。
114
118
 
115
119
  ## Context Sweep
116
120
 
@@ -122,20 +126,38 @@ tool_budget:
122
126
  4. 最近相关提交、当前分支脏状态、正在进行中的 requirement。
123
127
  5. 真实 forcing functions:deadline、发布窗口、资源上限、依赖、distribution、adoption / trust / delivery 卡点。
124
128
  6. 当前项目最强的现实证据,以及仍然只能靠假设的空白。
129
+ 7. Planning posture:startup / internal / hackathon / OSS / research / learning / side-project / infrastructure。
130
+ 8. Evidence maturity:idea / has users / paying users / internal sponsor / infra-only / recovery。
131
+ 9. 如果是 developer-facing 或 operator-facing 能力,补齐 target developer/operator、time to first value、magic moment、install / run / debug / upgrade 卡点。
125
132
 
126
133
  先把这些材料压成一个 `Context Snapshot`,再开始追问用户。
127
134
 
135
+ ## Evidence-Maturity Routing
136
+
137
+ 不要对所有项目套同一组问题。先用 `planning posture` 和 `evidence maturity` 决定追问深度:
138
+
139
+ | Evidence maturity | 优先追问 | 不要浪费时间在 |
140
+ | --- | --- | --- |
141
+ | idea / pre-product | 真实用户、status quo、最窄 wedge、需求证据 | 远期平台架构细节 |
142
+ | has users | 现有使用路径、失败/绕路场景、保留率或复用信号、下一阶段 wedge | 假想 persona |
143
+ | paying users / internal sponsor | 付费/赞助动机、扩张边界、不可丢的信任信号、组织风险 | 泛泛市场教育 |
144
+ | infra-only | 当前瓶颈、调用方、现有 workaround、复用边界、迁移/回滚约束 | 伪装成用户访谈的问题 |
145
+ | recovery / trust gap | 事故证据、恢复路径、最小可信修复、停止继续扩张的 kill signal | 新功能愿景 |
146
+
147
+ 第一轮回答后必须做 framing check:术语是否具体、用户是否可命名、痛点是否有行为证据、status quo 是否真实、需求是否只是兴趣。发现答案虚,要先收紧问题,再谈路线。
148
+
128
149
  ## Session Protocol
129
150
 
130
151
  1. 先探索上下文,不靠默认上下文注入替代阅读。
131
152
  2. 先问现实,不先写愿景。
132
153
  3. 一次只推进一个关键未知点,不要一口气抛一串问题。
133
- 4. 先写 `Context Snapshot`、证据、约束、非目标,再讨论阶段。
154
+ 4. 先写 `Context Snapshot`、planning posture、evidence maturity、证据、约束、非目标,再讨论阶段。
134
155
  5. 给出 2-3 种路线图形状,再明确推荐一种,并说明为什么其他路线现在不值得打。
135
- 6. 只冻结 1-3 个阶段。每个阶段都必须有 goal、why now、dependencies、exit signal、kill signal、non-goals。
136
- 7. `RM` 之间的硬依赖压成显式 dependency graph,并标出 parallel-ready wave;不要把“最好按这个顺序做”伪装成 blocker
137
- 8. backlog 只保留会真的进入下一轮 `cc-plan` 的事项,每项都要带成功信号、下一决策、`Primary Capability`、`Secondary Capabilities`、`Expected Spec Delta`、`Depends On` 与 `Parallel With`。
138
- 9. 用户没批准,不进入 `cc-plan`。
156
+ 6. 如果一个方向里有多个可独立交付的子系统,先写清 decomposition:哪些合并为同一阶段,哪些拆成独立 `RM`,为什么。
157
+ 7. 只冻结 1-3 个阶段。每个阶段都必须有 goal、why now、dependencies、exit signal、kill signal、non-goals
158
+ 8. `RM` 之间的硬依赖压成显式 dependency graph,并标出 parallel-ready wave;不要把“最好按这个顺序做”伪装成 blocker。
159
+ 9. backlog 只保留会真的进入下一轮 `cc-plan` 的事项,每项都要带成功信号、下一决策、`Primary Capability`、`Secondary Capabilities`、`Expected Spec Delta`、`Depends On` 与 `Parallel With`。
160
+ 10. 用户没批准,不进入 `cc-plan`。
139
161
 
140
162
  ## Route Selection Rule
141
163
 
@@ -173,14 +195,24 @@ tool_budget:
173
195
  8. 当前最大的 adoption、trust、delivery 卡点是什么
174
196
  9. 这个 roadmap 成功与失败各自用什么信号判断
175
197
 
198
+ 如果这是 developer-facing / operator-facing roadmap,再补 4 件事:
199
+
200
+ 10. 目标开发者 / 操作者是谁
201
+ 11. 从第一次接触到第一次成功输出需要多久
202
+ 12. 让他们觉得“这东西真的有用”的 magic moment 是什么
203
+ 13. install / run / debug / upgrade / handoff 中哪个环节最可能让 adoption 失败
204
+
176
205
  ## Approval Gates
177
206
 
178
207
  1. 没有 `Context Snapshot`,不准给路线推荐。
179
- 2. 没有 2-3 条路线对比,不准直接拍脑袋定主线。
180
- 3. 没有 exit signal / kill signal / non-goals,不算阶段冻结。
181
- 4. 没有明确成功信号和下一决策,不准把事项放进 `Ready For Req-Plan`。
182
- 5. 没有 `RM dependency graph` 或 parallel-ready wave,不准宣称事项可以并发推进。
183
- 6. 没有用户批准,不准把 roadmap item 下放到 `cc-plan`。
208
+ 2. 没有 planning posture、evidence maturity 和 framing check,不准给路线推荐。
209
+ 3. 没有 2-3 条路线对比,不准直接拍脑袋定主线。
210
+ 4. 没有 exit signal / kill signal / non-goals,不算阶段冻结。
211
+ 5. 没有明确成功信号和下一决策,不准把事项放进 `Ready For Req-Plan`。
212
+ 6. developer-facing / operator-facing item 没有 target user、time to first value 或 adoption bottleneck,不准标成 ready。
213
+ 7. 没有 `RM dependency graph` 或 parallel-ready wave,不准宣称事项可以并发推进。
214
+ 8. 没有独立子系统拆分判断,不准把大而混杂的方向伪装成单一主线。
215
+ 9. 没有用户批准,不准把 roadmap item 下放到 `cc-plan`。
184
216
 
185
217
  ## Review Loop
186
218
 
@@ -192,7 +224,10 @@ tool_budget:
192
224
  4. Feasibility scan:阶段目标与团队容量、依赖、distribution 约束是否接得上。
193
225
  5. Graph scan:`Depends On` 是否只包含硬阻塞,图里有没有环,parallel-ready wave 是否真的共享同一前置。
194
226
  6. Spec scan:每个 roadmap item 是否都落到某个 capability,而不是悬空需求。
195
- 7. Handoff scan:第一批 roadmap item 是否已经自然长成可进入 `cc-plan` 的对象。
227
+ 7. Decomposition scan:多个独立子系统是否已拆成阶段 / `RM` 候选,而不是塞进一个含糊阶段。
228
+ 8. Handoff scan:第一批 roadmap item 是否已经自然长成可进入 `cc-plan` 的对象。
229
+ 9. Evidence maturity scan:问题路由是否匹配 idea / user / paying / infra / recovery 状态,还是拿同一套问题硬套所有项目。
230
+ 10. Adoption scan:developer-facing / operator-facing item 是否写清目标人、time to first value、magic moment 和 adoption bottleneck。
196
231
 
197
232
  ## Output
198
233
 
@@ -19,8 +19,18 @@
19
19
 
20
20
  - Serial spine:
21
21
  - Parallel-ready next wave:
22
+ - Decomposition notes:
22
23
  - Notes on blockers:
23
24
 
25
+ ## Adoption Handoff
26
+
27
+ - Planning posture:
28
+ - Evidence maturity:
29
+ - Target developer / operator:
30
+ - Time to first value:
31
+ - Magic moment:
32
+ - Adoption bottleneck:
33
+
24
34
  ## Ready For Req-Plan
25
35
 
26
36
  - RM-001:
@@ -33,6 +43,11 @@
33
43
  - Expected spec delta:
34
44
  - Open risks:
35
45
  - First planning question:
46
+ - Evidence maturity:
47
+ - Target developer / operator:
48
+ - Time to first value:
49
+ - Magic moment:
50
+ - Adoption bottleneck:
36
51
  - Required context to load:
37
52
  - Depends On:
38
53
  - Parallel With:
@@ -15,17 +15,24 @@
15
15
  ## Context Snapshot
16
16
 
17
17
  - Product / repo:
18
+ - Planning posture:
18
19
  - Project stage:
20
+ - Evidence maturity:
19
21
  - Users:
20
22
  - Pain:
21
23
  - Existing workaround:
22
24
  - Strongest demand evidence:
25
+ - Framing check:
23
26
  - Why now:
24
27
  - Distribution path:
25
28
  - Deadline / forcing function:
26
29
  - Team / capacity:
27
30
  - Hard constraints:
28
31
  - Adoption / trust bottleneck:
32
+ - Target developer / operator:
33
+ - Time to first value:
34
+ - Magic moment:
35
+ - Install / run / debug / upgrade bottleneck:
29
36
  - Known unknowns:
30
37
  - Relevant capabilities:
31
38
 
@@ -45,6 +52,7 @@
45
52
  | wedge-first | | | Recommended / Rejected |
46
53
  | platform-first | | | Rejected |
47
54
  | rescue-first | | | Rejected |
55
+ | decompose-first | | | Recommended / Rejected |
48
56
 
49
57
  ## Recommended Route
50
58
 
@@ -64,6 +72,33 @@
64
72
  - What we refuse to build yet:
65
73
  - 6-12 month pull:
66
74
 
75
+ ## Evidence-Maturity Routing
76
+
77
+ - Planning posture:
78
+ - Evidence maturity:
79
+ - Questions selected:
80
+ - Questions intentionally skipped:
81
+ - Reason this route matches maturity:
82
+ - Evidence that would change the route:
83
+
84
+ ## DX / Operator Adoption Context
85
+
86
+ - Applies: Yes / No
87
+ - Target developer / operator:
88
+ - Current first-success path:
89
+ - Target time to first value:
90
+ - Magic moment:
91
+ - Install / run / debug / upgrade risks:
92
+ - Adoption bottleneck:
93
+
94
+ ## Subsystem Decomposition
95
+
96
+ | Subsystem / RM candidate | User value | Can ship independently? | Merge / split decision | Reason |
97
+ |--------------------------|------------|-------------------------|------------------------|--------|
98
+ | RM-001 | | Yes / No | Merge / Split | |
99
+
100
+ > 如果一个目标里塞了多个独立子系统,先拆阶段和 `RM`,再谈优先级。不要把大杂烩写成一个阶段。
101
+
67
102
  ## Stage Overview
68
103
 
69
104
  | Stage | Goal | Why now | Primary capabilities | Dependencies | Exit signal | Kill signal | Non-goals |
@@ -140,6 +175,8 @@ flowchart LR
140
175
 
141
176
  - Rejected path A:
142
177
  - Rejected path B:
178
+ - Rejected maturity route:
179
+ - Developer / operator adoption assumptions:
143
180
  - Open assumptions to verify next:
144
181
  - What changed in this version:
145
182
 
@@ -6,12 +6,13 @@
6
6
  "lastSyncedAt": "2026-04-19",
7
7
  "backlogMeta": {
8
8
  "roadmapVersion": "roadmap.v1",
9
- "skillVersion": "4.3.2",
9
+ "skillVersion": "4.3.4",
10
10
  "currentFocusStage": "Stage 1"
11
11
  },
12
12
  "dependencyHandoff": {
13
13
  "serialSpine": "RM-001",
14
14
  "parallelReadyNextWave": "-",
15
+ "decompositionNotes": "-",
15
16
  "notesOnBlockers": "-"
16
17
  },
17
18
  "items": [
package/CHANGELOG.md CHANGED
@@ -9,6 +9,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [4.5.1] - 2026-04-28
13
+
14
+ ### Planning Evidence Gates
15
+
16
+ v4.5.1 strengthens roadmap and requirement planning so downstream execution gets
17
+ clearer evidence, option tradeoffs, rescue behavior, and test obligations before
18
+ implementation starts.
19
+
20
+ ### Changed
21
+
22
+ - Updated `cc-roadmap` to record planning posture, evidence maturity, framing checks, and developer/operator adoption handoff fields.
23
+ - Updated `cc-plan` to require named option roles, implementation decision horizon, error/rescue mapping, test framework evidence, coverage quality mapping, and regression-test planning.
24
+ - Updated README and getting-started docs to describe the new roadmap and planning quality gates.
25
+ - Refreshed public examples and skill binding metadata for `cc-roadmap@4.3.4` and `cc-plan@3.5.6`.
26
+
27
+ ### Fixed
28
+
29
+ - Improved publish validation diagnostics for YAML frontmatter list items that accidentally parse as mappings when they contain `": "`.
30
+ - Added a regression test so malformed public-skill string arrays report the exact field, index, actual type, and repair hint.
31
+
12
32
  ## [4.5.0] - 2026-04-27
13
33
 
14
34
  ### ✨ 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.