cc-devflow 4.4.1 → 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.
- package/.claude/skills/cc-act/CHANGELOG.md +6 -0
- package/.claude/skills/cc-act/SKILL.md +9 -1
- package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +4 -0
- package/.claude/skills/cc-act/assets/RELEASE_NOTE_TEMPLATE.md +4 -0
- package/.claude/skills/cc-act/scripts/cc-act-common.sh +5 -0
- package/.claude/skills/cc-act/scripts/render-pr-brief.sh +5 -0
- package/.claude/skills/cc-act/scripts/sync-act-docs.sh +14 -1
- package/.claude/skills/cc-check/CHANGELOG.md +5 -0
- package/.claude/skills/cc-check/SKILL.md +9 -1
- package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +3 -0
- package/.claude/skills/cc-do/CHANGELOG.md +5 -0
- package/.claude/skills/cc-do/SKILL.md +9 -1
- package/.claude/skills/cc-investigate/CHANGELOG.md +5 -0
- package/.claude/skills/cc-investigate/SKILL.md +9 -1
- package/.claude/skills/cc-investigate/assets/ANALYSIS_TEMPLATE.md +1 -0
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +1 -0
- package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +3 -0
- package/.claude/skills/cc-plan/CHANGELOG.md +19 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +19 -2
- package/.claude/skills/cc-plan/SKILL.md +60 -20
- package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +71 -1
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +14 -0
- package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +6 -1
- package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +23 -0
- package/.claude/skills/cc-roadmap/CHANGELOG.md +17 -0
- package/.claude/skills/cc-roadmap/PLAYBOOK.md +24 -1
- package/.claude/skills/cc-roadmap/SKILL.md +58 -15
- package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +16 -0
- package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +38 -0
- package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +5 -1
- package/.claude/skills/cc-spec-init/CHANGELOG.md +5 -0
- package/.claude/skills/cc-spec-init/SKILL.md +9 -1
- package/.claude/skills/cc-spec-init/assets/CAPABILITY_TEMPLATE.md +1 -0
- package/.claude/skills/cc-spec-init/assets/CHANGE_META_TEMPLATE.json +3 -0
- package/.claude/skills/cc-spec-init/assets/INDEX_TEMPLATE.md +1 -0
- package/CHANGELOG.md +39 -0
- package/CODE_OF_CONDUCT.md +39 -0
- package/CODE_OF_CONDUCT.zh-CN.md +39 -0
- package/CONTRIBUTING.md +195 -0
- package/CONTRIBUTING.zh-CN.md +195 -0
- package/README.md +154 -120
- package/README.zh-CN.md +156 -117
- package/SECURITY.md +56 -0
- package/SECURITY.zh-CN.md +56 -0
- package/bin/cc-devflow-cli.js +226 -0
- package/config/schema/cc-devflow-config.schema.json +45 -0
- package/config/user-config.template.yml +16 -0
- package/docs/examples/example-bindings.json +8 -8
- package/docs/examples/full-design-blocked/BACKLOG.md +1 -1
- package/docs/examples/full-design-blocked/README.md +1 -1
- package/docs/examples/full-design-blocked/ROADMAP.md +1 -1
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +1 -1
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +1 -1
- package/docs/examples/full-design-blocked/roadmap-tracking.json +1 -1
- package/docs/examples/local-handoff/BACKLOG.md +1 -1
- package/docs/examples/local-handoff/README.md +1 -1
- package/docs/examples/local-handoff/ROADMAP.md +1 -1
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +1 -1
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +1 -1
- package/docs/examples/local-handoff/roadmap-tracking.json +1 -1
- package/docs/examples/pdca-loop/BACKLOG.md +1 -1
- package/docs/examples/pdca-loop/README.md +1 -1
- package/docs/examples/pdca-loop/ROADMAP.md +1 -1
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +1 -1
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +2 -2
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +1 -1
- package/docs/examples/pdca-loop/roadmap-tracking.json +1 -1
- package/docs/guides/getting-started.md +5 -0
- package/docs/guides/getting-started.zh-CN.md +5 -0
- package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +112 -2
- package/lib/skill-runtime/__tests__/config.test.js +161 -0
- package/lib/skill-runtime/__tests__/runtime.integration.test.js +2 -0
- package/lib/skill-runtime/config.js +379 -0
- package/lib/skill-runtime/index.js +2 -0
- package/package.json +7 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cc-spec-init
|
|
3
|
-
version: 1.0.
|
|
3
|
+
version: 1.0.1
|
|
4
4
|
description: Use when you need to initialize capability specs under `devflow/specs/`, create or evolve capability truth sources, generate `change-meta.json`, or validate roadmap/change/spec links before roadmap, planning, or closeout work continues.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -33,6 +33,14 @@ description: Use when you need to initialize capability specs under `devflow/spe
|
|
|
33
33
|
- 重建 `devflow/specs/INDEX.md`
|
|
34
34
|
- 校验 capability、roadmap item、change 之间的链接完整性
|
|
35
35
|
|
|
36
|
+
## Runtime Output Policy
|
|
37
|
+
|
|
38
|
+
写入任何 durable Markdown 或 JSON metadata 前,先运行 `cc-devflow config resolve --format policy`。
|
|
39
|
+
|
|
40
|
+
- `Output language` 是机器约束,capability spec、`devflow/specs/INDEX.md` 和 `change-meta.json` 必须记录并遵守它。
|
|
41
|
+
- `agent_preferences` 是用户偏好建议,只影响表达方式和结构选择,不覆盖本 Skill 的工作流边界。
|
|
42
|
+
- 如果配置解析失败,先修配置或向用户说明阻塞,不要用默认语言继续生成正式文档。
|
|
43
|
+
|
|
36
44
|
## Read First
|
|
37
45
|
|
|
38
46
|
1. `PLAYBOOK.md`
|
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,45 @@ 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
|
+
|
|
32
|
+
## [4.5.0] - 2026-04-27
|
|
33
|
+
|
|
34
|
+
### ✨ Runtime YAML Config
|
|
35
|
+
|
|
36
|
+
v4.5.0 adds a personal/project YAML config mechanism that resolves output policy
|
|
37
|
+
at runtime before durable workflow documents are written.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- Added `~/.cc-devflow/config.yml`, `<repo>/.cc-devflow/config.yml`, and `<repo>/.cc-devflow/config.local.yml` resolution with deterministic defaults < user < project < local < env < CLI precedence.
|
|
42
|
+
- Added strict `output.document_language` validation for `en` and `zh-CN`, with non-standard preferences preserved under advisory `agent_preferences`.
|
|
43
|
+
- Added `cc-devflow config init|get|set|resolve|doctor` so users can create, inspect, update, trace, and diagnose the effective output contract.
|
|
44
|
+
- Added `config/user-config.template.yml` and `config/schema/cc-devflow-config.schema.json`.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- Public workflow skills now resolve config at runtime with `cc-devflow config resolve --format policy` before writing durable Markdown or human-readable metadata.
|
|
49
|
+
- `cc-devflow init` and `cc-devflow adapt --platform codex` no longer bake resolved user policy into managed Skill files.
|
|
50
|
+
|
|
12
51
|
## [4.4.1] - 2026-04-25
|
|
13
52
|
|
|
14
53
|
### 🔧 Canonical Change Keys + Planning Contract Hardening
|
|
@@ -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 技术协作方式定制的项目级行为准则。它刻意保持简短,方便贡献者快速阅读和执行。
|
package/CONTRIBUTING.md
ADDED
|
@@ -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.
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# 为 cc-devflow 做贡献
|
|
2
|
+
|
|
3
|
+
[中文版](./CONTRIBUTING.zh-CN.md) | [English](./CONTRIBUTING.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
请同时阅读 [行为准则](./CODE_OF_CONDUCT.zh-CN.md)。如果你要报告漏洞,请遵循 [安全策略](./SECURITY.zh-CN.md),不要创建公开 issue。
|
|
8
|
+
|
|
9
|
+
## 概览
|
|
10
|
+
|
|
11
|
+
cc-devflow 现在是一个 skills-first 仓库,并且重新带回了可分发的 CLI。
|
|
12
|
+
|
|
13
|
+
对外可见面只有这些:
|
|
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
|
+
`lib/skill-runtime/` 可以保留共享运行时支撑,但它已经不是用户要直接理解或运行的工作流入口。
|
|
25
|
+
|
|
26
|
+
仓库里也可以存在维护类 Skill,例如 `cc-spec-init`、`cc-simplify`、`docs-sync`,但它们不改变公开的 `cc-roadmap + PDCA/IDCA` 叙事。
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 开发环境
|
|
31
|
+
|
|
32
|
+
### 前置条件
|
|
33
|
+
|
|
34
|
+
- Node.js 18+
|
|
35
|
+
- npm
|
|
36
|
+
- Git
|
|
37
|
+
|
|
38
|
+
### 安装
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
git clone https://github.com/YOUR_USERNAME/cc-devflow.git
|
|
42
|
+
cd cc-devflow
|
|
43
|
+
npm install
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 本地 CLI 冒烟验证
|
|
47
|
+
|
|
48
|
+
如果你在源码仓库里开发,请使用仓库内入口:
|
|
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
|
+
如果要验证打包后的行为,运行:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm pack
|
|
62
|
+
node scripts/validate-publish.js
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 项目结构
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
cc-devflow/
|
|
71
|
+
├── .claude/skills/ # 对外分发的 Skill
|
|
72
|
+
├── bin/ # CLI 入口
|
|
73
|
+
├── config/ # Adapter 配置
|
|
74
|
+
├── docs/ # 公开文档
|
|
75
|
+
├── lib/adapters/ # 平台适配层
|
|
76
|
+
├── lib/compiler/ # 多平台编译器
|
|
77
|
+
├── lib/skill-runtime/ # 供 Skill 脚本复用的共享运行时与同目录测试
|
|
78
|
+
├── README.md
|
|
79
|
+
├── README.zh-CN.md
|
|
80
|
+
└── package.json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 常见贡献区域
|
|
84
|
+
|
|
85
|
+
- `.claude/skills/`:Skill 行为、资源、引用、脚本
|
|
86
|
+
- `bin/`:可分发 CLI 行为
|
|
87
|
+
- `lib/compiler/`:skills/prompts 解析、转换、emitters、rules 生成
|
|
88
|
+
- `lib/adapters/`:平台 adapter 配置与校验
|
|
89
|
+
- `lib/skill-runtime/`:Skill 脚本复用的共享运行时支撑
|
|
90
|
+
- `docs/`:对外文档
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 贡献规则
|
|
95
|
+
|
|
96
|
+
### 1. 保持对外入口极简
|
|
97
|
+
|
|
98
|
+
不要再把旧 `/flow:*` 或 `harness:*` CLI 写回新的用户文档。
|
|
99
|
+
|
|
100
|
+
对外故事应该始终保持为:
|
|
101
|
+
|
|
102
|
+
- 整包安装:`cc-devflow init`
|
|
103
|
+
- 平台产物:`cc-devflow adapt`
|
|
104
|
+
- 工作流执行:`cc-roadmap + PDCA/IDCA` 可见 Skill
|
|
105
|
+
- capability 真相维护:`cc-spec-init`
|
|
106
|
+
|
|
107
|
+
### 2. 保持 Skills-First 结构
|
|
108
|
+
|
|
109
|
+
每个已发布 Skill 都应保持独立目录:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
.claude/skills/<skill>/
|
|
113
|
+
├── SKILL.md
|
|
114
|
+
├── PLAYBOOK.md
|
|
115
|
+
├── assets/
|
|
116
|
+
├── references/
|
|
117
|
+
└── scripts/
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
如果你改了一个已发布 Skill,要把这些文件当成同一个契约:
|
|
121
|
+
|
|
122
|
+
- `SKILL.md`
|
|
123
|
+
- 本地 `CHANGELOG.md`
|
|
124
|
+
- 被引用的 `PLAYBOOK.md`、`assets/`、`references/`、`scripts/`
|
|
125
|
+
|
|
126
|
+
不要只改其中一部分,让其余说明继续过期。
|
|
127
|
+
|
|
128
|
+
### 3. 保持分发包干净
|
|
129
|
+
|
|
130
|
+
不要把瞬态文件放进模板或 tarball。
|
|
131
|
+
|
|
132
|
+
典型脏文件包括:
|
|
133
|
+
|
|
134
|
+
- `.claude/tsc-cache/`
|
|
135
|
+
- `.DS_Store`
|
|
136
|
+
- 本地编辑器和操作系统产生的垃圾文件
|
|
137
|
+
|
|
138
|
+
### 4. 让运行时辅助层保持次要
|
|
139
|
+
|
|
140
|
+
如果你改了 `lib/skill-runtime/`,请保持可测试,但不要再把它写成用户主入口。真正的公开 workflow 仍然属于已发布 Skill。
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 测试
|
|
145
|
+
|
|
146
|
+
### 主测试命令
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
npm test
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### CLI 回归测试
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
npm test -- --runInBand lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 发布校验
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
node scripts/validate-publish.js
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
它应该保证:
|
|
165
|
+
|
|
166
|
+
- CLI 必需文件存在
|
|
167
|
+
- 关键 Skill 存在
|
|
168
|
+
- 打包 tarball 干净
|
|
169
|
+
- 瞬态缓存不会被分发
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 文档规则
|
|
174
|
+
|
|
175
|
+
- README 和快速开始默认写打包后 CLI 的用法
|
|
176
|
+
- 贡献者文档才写 `node bin/cc-devflow-cli.js ...`
|
|
177
|
+
- `skills.sh` 只作为单 Skill 分发路径来写
|
|
178
|
+
- 不要把 `.claude/commands/` 写成必需结构
|
|
179
|
+
- 不要把内部运行时辅助层写成受支持的公开工作流
|
|
180
|
+
- 如果改了已发布 Skill,在同一个 PR 里同步该 Skill 的 `version`、本地 `CHANGELOG.md` 和受影响的公开文档
|
|
181
|
+
- 主 workflow 仍然只讲 `cc-roadmap + PDCA/IDCA`;`cc-spec-init` / `cc-simplify` 等维护类 Skill 单独说明
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Pull Request
|
|
186
|
+
|
|
187
|
+
这个仓库比较好的 PR,通常会干净地只做一类事:
|
|
188
|
+
|
|
189
|
+
- 改进某个 Skill
|
|
190
|
+
- 修复 CLI 分发行为
|
|
191
|
+
- 修复编译器 / 适配行为
|
|
192
|
+
- 清理陈旧文档
|
|
193
|
+
- 增加有针对性的回归测试
|
|
194
|
+
|
|
195
|
+
如果改动触碰了公开入口,记得在同一个 PR 里同步文档。
|