cc-devflow 4.5.9 → 4.5.11
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 +11 -0
- package/.claude/skills/cc-act/SKILL.md +19 -10
- package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +1 -1
- package/.claude/skills/cc-act/references/closure-contract.md +1 -1
- package/.claude/skills/cc-act/references/git-commit-guidelines.md +1 -1
- package/.claude/skills/cc-check/CHANGELOG.md +23 -0
- package/.claude/skills/cc-check/PLAYBOOK.md +1 -0
- package/.claude/skills/cc-check/SKILL.md +15 -9
- package/.claude/skills/cc-check/references/review-contract.md +7 -0
- package/.claude/skills/cc-check/scripts/render-report-card.js +6 -1
- package/.claude/skills/cc-dev/CHANGELOG.md +10 -0
- package/.claude/skills/cc-dev/SKILL.md +34 -2
- package/.claude/skills/cc-do/CHANGELOG.md +18 -0
- package/.claude/skills/cc-do/PLAYBOOK.md +7 -7
- package/.claude/skills/cc-do/SKILL.md +47 -40
- package/.claude/skills/cc-do/references/execution-recovery.md +18 -13
- package/.claude/skills/cc-do/scripts/build-task-context.sh +4 -17
- package/.claude/skills/cc-do/scripts/record-review-decision.sh +4 -5
- package/.claude/skills/cc-do/scripts/recover-workflow.sh +9 -11
- package/.claude/skills/cc-do/scripts/verify-task-gates.sh +12 -10
- package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +7 -29
- package/.claude/skills/cc-investigate/CHANGELOG.md +24 -0
- package/.claude/skills/cc-investigate/PLAYBOOK.md +10 -9
- package/.claude/skills/cc-investigate/SKILL.md +163 -417
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +56 -10
- package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +6 -6
- package/.claude/skills/cc-investigate/assets/{ANALYSIS_TEMPLATE.md → legacy/ANALYSIS_TEMPLATE.md} +1 -0
- package/.claude/skills/cc-investigate/references/investigation-contract.md +5 -4
- package/.claude/skills/cc-investigate/scripts/bootstrap-analysis.sh +1 -1
- package/.claude/skills/cc-plan/CHANGELOG.md +32 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +55 -53
- package/.claude/skills/cc-plan/SKILL.md +209 -536
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +50 -14
- package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +5 -4
- package/.claude/skills/cc-plan/assets/{DESIGN_TEMPLATE.md → legacy/DESIGN_TEMPLATE.md} +1 -0
- package/.claude/skills/cc-plan/assets/{TINY_DESIGN_TEMPLATE.md → legacy/TINY_DESIGN_TEMPLATE.md} +1 -1
- package/.claude/skills/cc-plan/references/planning-contract.md +12 -10
- package/.claude/skills/cc-review/CHANGELOG.md +6 -0
- package/.claude/skills/cc-review/PLAYBOOK.md +9 -11
- package/.claude/skills/cc-review/SKILL.md +37 -61
- package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +1 -1
- package/.claude/skills/cc-review/references/implementation-review-branch.md +5 -5
- package/.claude/skills/cc-review/references/plan-review-branch.md +1 -1
- package/.claude/skills/cc-review/references/review-methods.md +4 -4
- package/.claude/skills/cc-review/scripts/collect-review-context.sh +14 -7
- package/CHANGELOG.md +30 -0
- package/CONTRIBUTING.md +40 -4
- package/CONTRIBUTING.zh-CN.md +40 -4
- package/README.md +22 -8
- package/README.zh-CN.md +22 -8
- package/bin/cc-devflow-cli.js +293 -36
- package/docs/examples/START-HERE.md +6 -4
- package/docs/examples/example-bindings.json +8 -8
- package/docs/examples/full-design-blocked/README.md +2 -2
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +2 -1
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +3 -2
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +11 -8
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +4 -4
- package/docs/examples/local-handoff/README.md +2 -2
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +2 -1
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +3 -2
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +9 -6
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +1 -1
- package/docs/examples/pdca-loop/README.md +2 -2
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +2 -2
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +2 -1
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +2 -1
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +9 -6
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +1 -1
- package/docs/examples/scripts/check-example-bindings.sh +2 -0
- package/docs/get-shit-done-strategy-audit.md +22 -22
- package/docs/guides/artifact-contract.md +5 -1
- package/docs/guides/getting-started.md +11 -8
- package/docs/guides/getting-started.zh-CN.md +11 -8
- package/docs/guides/minimize-artifacts.md +137 -0
- package/lib/compiler/__tests__/skills-registry.test.js +2 -2
- package/lib/skill-runtime/CLAUDE.md +1 -1
- package/lib/skill-runtime/__tests__/autopilot.test.js +42 -6
- package/lib/skill-runtime/__tests__/benchmark-artifacts.test.js +165 -0
- package/lib/skill-runtime/__tests__/benchmark-skills.test.js +109 -0
- package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +2 -2
- package/lib/skill-runtime/__tests__/dispatch.test.js +8 -38
- package/lib/skill-runtime/__tests__/intent.test.js +4 -20
- package/lib/skill-runtime/__tests__/lifecycle.test.js +1 -1
- package/lib/skill-runtime/__tests__/paths.test.js +7 -1
- package/lib/skill-runtime/__tests__/planner.tdd.test.js +61 -0
- package/lib/skill-runtime/__tests__/prepare-pr.test.js +3 -16
- package/lib/skill-runtime/__tests__/query.test.js +388 -7
- package/lib/skill-runtime/__tests__/review-check-integration.test.js +148 -0
- package/lib/skill-runtime/__tests__/review-records.test.js +619 -0
- package/lib/skill-runtime/__tests__/runtime.integration.test.js +64 -23
- package/lib/skill-runtime/__tests__/schemas.test.js +43 -0
- package/lib/skill-runtime/__tests__/task-contract-migrate.test.js +137 -0
- package/lib/skill-runtime/__tests__/task-contract.test.js +874 -0
- package/lib/skill-runtime/__tests__/verify-artifacts.test.js +203 -0
- package/lib/skill-runtime/__tests__/worker-run.test.js +4 -11
- package/lib/skill-runtime/__tests__/workflow-context-legacy-fallback.test.js +31 -0
- package/lib/skill-runtime/__tests__/workflow-context.test.js +98 -0
- package/lib/skill-runtime/artifacts.js +0 -5
- package/lib/skill-runtime/context-index.js +545 -0
- package/lib/skill-runtime/intent.js +9 -33
- package/lib/skill-runtime/lifecycle.js +1 -1
- package/lib/skill-runtime/operations/CLAUDE.md +2 -2
- package/lib/skill-runtime/operations/dispatch.js +4 -42
- package/lib/skill-runtime/operations/init.js +2 -6
- package/lib/skill-runtime/operations/janitor.js +2 -18
- package/lib/skill-runtime/operations/resume.js +21 -38
- package/lib/skill-runtime/operations/review-records.js +265 -0
- package/lib/skill-runtime/operations/snapshot.js +1 -1
- package/lib/skill-runtime/operations/task-contract.js +593 -0
- package/lib/skill-runtime/operations/worker-run.js +2 -30
- package/lib/skill-runtime/paths.js +4 -4
- package/lib/skill-runtime/planner.js +24 -11
- package/lib/skill-runtime/query-registry.js +2 -2
- package/lib/skill-runtime/query.js +15 -2
- package/lib/skill-runtime/review-records.js +123 -0
- package/lib/skill-runtime/review.js +246 -11
- package/lib/skill-runtime/schemas.js +174 -12
- package/lib/skill-runtime/store.js +0 -10
- package/lib/skill-runtime/task-contract.js +188 -0
- package/lib/skill-runtime/workflow-context.js +748 -0
- package/package.json +6 -2
|
@@ -15,10 +15,12 @@ if [[ -z "$change_dir" ]]; then
|
|
|
15
15
|
fi
|
|
16
16
|
|
|
17
17
|
review_dir="$change_dir/review"
|
|
18
|
-
ledger="$review_dir/
|
|
18
|
+
ledger="$review_dir/review-ledger.jsonl"
|
|
19
|
+
legacy_ledger="$review_dir/cc-review-ledger.jsonl"
|
|
19
20
|
report="$review_dir/cc-review-report.md"
|
|
20
21
|
plan="$review_dir/cc-review-plan.md"
|
|
21
|
-
findings="$review_dir/
|
|
22
|
+
findings="$review_dir/review-findings.json"
|
|
23
|
+
legacy_findings="$review_dir/cc-review-findings.json"
|
|
22
24
|
|
|
23
25
|
head_sha="$(git rev-parse HEAD)"
|
|
24
26
|
base_sha=""
|
|
@@ -27,9 +29,14 @@ if git rev-parse --verify "$base_ref" >/dev/null 2>&1; then
|
|
|
27
29
|
fi
|
|
28
30
|
|
|
29
31
|
reviewed_sha=""
|
|
30
|
-
|
|
32
|
+
ledger_for_read="$ledger"
|
|
33
|
+
if [[ ! -f "$ledger_for_read" && -f "$legacy_ledger" ]]; then
|
|
34
|
+
ledger_for_read="$legacy_ledger"
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
if [[ -f "$ledger_for_read" ]]; then
|
|
31
38
|
reviewed_sha="$(
|
|
32
|
-
sed -n 's/.*"headSha"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$
|
|
39
|
+
sed -n 's/.*"headSha"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$ledger_for_read" |
|
|
33
40
|
tail -n 1
|
|
34
41
|
)"
|
|
35
42
|
fi
|
|
@@ -57,7 +64,7 @@ echo "diff_base=${diff_base:-unknown}"
|
|
|
57
64
|
|
|
58
65
|
echo
|
|
59
66
|
echo "PRIOR_REVIEW_FILES"
|
|
60
|
-
for file in "$plan" "$report" "$
|
|
67
|
+
for file in "$ledger" "$findings" "$plan" "$report" "$legacy_ledger" "$legacy_findings"; do
|
|
61
68
|
if [[ -f "$file" ]]; then
|
|
62
69
|
printf 'present %s\n' "$file"
|
|
63
70
|
else
|
|
@@ -73,8 +80,8 @@ else
|
|
|
73
80
|
git diff --name-status HEAD
|
|
74
81
|
fi
|
|
75
82
|
|
|
76
|
-
if [[ -f "$
|
|
83
|
+
if [[ -f "$ledger_for_read" ]]; then
|
|
77
84
|
echo
|
|
78
85
|
echo "RECENT_LEDGER"
|
|
79
|
-
tail -n 20 "$
|
|
86
|
+
tail -n 20 "$ledger_for_read"
|
|
80
87
|
fi
|
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [4.5.11] - 2026-05-13
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Added `npm run benchmark:skills` to keep public skill entrypoints under explicit context budgets.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Slimmed the `cc-plan` public entrypoint into a thin harness contract and moved low-frequency planning/review rules behind conditional references.
|
|
21
|
+
- Slimmed the `cc-investigate` public entrypoint into a thin root-cause contract and moved low-frequency debug rules behind conditional references.
|
|
22
|
+
- Updated `cc-plan` and `cc-investigate` to require CLI-owned machine artifacts: agents write `planning/tasks.md`, then run `cc-devflow task-contract compile` / `validate` for `task-manifest.json` and `change-meta.json`.
|
|
23
|
+
- Internalized the new PDCA/IDCA operating principles into the stage skills themselves: assumptions and simplicity in plan/investigate, surgical read-before-write execution in do, fresh intent-focused proof in check, and explicit checkpoint/ship blockers in dev/act.
|
|
24
|
+
- Updated `npm run verify` to include `benchmark:skills` after tests, example binding checks, and artifact verification.
|
|
25
|
+
|
|
26
|
+
## [4.5.10] - 2026-05-13
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Added the `workflow-context` typed runtime query as a context index that reports the next PDCA/IDCA skill, current task, source hashes, `mustNotForget` guardrails, default section/JSON refs, trusted commands, fail-closed rules, and machine-readable deep-open triggers.
|
|
31
|
+
- Added `cc-devflow query --data-only --no-trace --compact` output controls and `npm run benchmark:workflow-context` for checked-in token estimates plus synthetic routing-correctness cases.
|
|
32
|
+
- Added the minimized workflow artifact contract guide, `cc-devflow task-contract validate`, `npm run verify:artifacts`, and `npm run benchmark:artifacts` so change artifacts stay small and measurable.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Updated `cc-plan`, `cc-investigate`, `cc-do`, `cc-check`, `cc-act`, and `cc-dev` so stage transitions start from `cc-devflow query workflow-context --data-only --no-trace --compact` instead of reloading the full loop history by default.
|
|
37
|
+
- Updated `cc-plan` and `cc-investigate` so new changes default to `planning/tasks.md` as the only human-authored Markdown handoff: feature plans use `## Contract Summary`, bug investigations use `## Root Cause Contract`, and legacy `planning/design.md` / `planning/analysis.md` remain fallback inputs only.
|
|
38
|
+
- Updated `cc-review` so `review/review-ledger.jsonl` is the default durable review record, with `review-findings.json` and rendered Markdown reports created only when needed.
|
|
39
|
+
- Updated `cc-check` review truth loading to prefer structured findings and review ledger records before legacy `cc-review-*.md` reports.
|
|
40
|
+
- Updated `npm run verify` to include `verify:artifacts` after tests and example binding checks.
|
|
41
|
+
|
|
12
42
|
## [4.5.9] - 2026-05-11
|
|
13
43
|
|
|
14
44
|
### Added
|
package/CONTRIBUTING.md
CHANGED
|
@@ -13,17 +13,25 @@ cc-devflow is now a skills-first repository with a restored distributable CLI.
|
|
|
13
13
|
Public surface:
|
|
14
14
|
|
|
15
15
|
- `cc-roadmap`
|
|
16
|
+
- `cc-next`
|
|
17
|
+
- `cc-dev`
|
|
16
18
|
- `cc-plan`
|
|
17
19
|
- `cc-investigate`
|
|
18
20
|
- `cc-do`
|
|
21
|
+
- `cc-review`
|
|
22
|
+
- `cc-pr-review`
|
|
23
|
+
- `cc-pr-land`
|
|
19
24
|
- `cc-check`
|
|
20
25
|
- `cc-act`
|
|
21
26
|
- `cc-devflow init`
|
|
22
27
|
- `cc-devflow adapt`
|
|
28
|
+
- `cc-devflow query`
|
|
29
|
+
- `cc-devflow task-contract`
|
|
30
|
+
- `cc-devflow review`
|
|
23
31
|
|
|
24
32
|
Shared runtime helpers may still live under `lib/skill-runtime/`, but they are not the user-facing workflow anymore.
|
|
25
33
|
|
|
26
|
-
Maintenance helpers may also exist under `.claude/skills/`, such as `cc-spec-init`, `cc-simplify`, and `docs-sync
|
|
34
|
+
Maintenance helpers may also exist under `.claude/skills/`, such as `cc-spec-init`, `cc-simplify`, and `docs-sync`. `cc-spec-init` and `cc-simplify` ship with the pack as maintenance skills; `docs-sync` stays internal.
|
|
27
35
|
|
|
28
36
|
---
|
|
29
37
|
|
|
@@ -125,7 +133,34 @@ If you touch a shipped skill, treat these files as one contract:
|
|
|
125
133
|
|
|
126
134
|
Do not change one part of the contract and leave the others stale.
|
|
127
135
|
|
|
128
|
-
|
|
136
|
+
Codex output under `.codex/skills/` is generated by `cc-devflow adapt`. Do not hand-edit it. Change `.claude/skills/<skill>/` first, then regenerate the mirror with:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npm run adapt
|
|
140
|
+
npm run adapt -- --check
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 3. Keep Skill Contract Changes Complete
|
|
144
|
+
|
|
145
|
+
When a shipped skill contract changes, update the source and public surfaces in one pass:
|
|
146
|
+
|
|
147
|
+
- `.claude/skills/<skill>/SKILL.md`
|
|
148
|
+
- `.claude/skills/<skill>/CHANGELOG.md`
|
|
149
|
+
- affected `PLAYBOOK.md`, `assets/`, `references/`, and `scripts/`
|
|
150
|
+
- root `README.md` / `README.zh-CN.md`
|
|
151
|
+
- affected docs under `docs/`
|
|
152
|
+
- `docs/examples/example-bindings.json` and example metadata
|
|
153
|
+
|
|
154
|
+
Then run the relevant gates:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
npm run verify:examples
|
|
158
|
+
npm run verify:publish
|
|
159
|
+
npm run verify:artifacts
|
|
160
|
+
npm run verify
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 4. Keep Distribution Clean
|
|
129
164
|
|
|
130
165
|
Do not ship transient files in templates or tarballs.
|
|
131
166
|
|
|
@@ -135,7 +170,7 @@ Examples of junk we should exclude:
|
|
|
135
170
|
- `.DS_Store`
|
|
136
171
|
- local editor or OS artifacts
|
|
137
172
|
|
|
138
|
-
###
|
|
173
|
+
### 5. Keep Runtime Helpers Secondary
|
|
139
174
|
|
|
140
175
|
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
176
|
|
|
@@ -178,7 +213,8 @@ This should confirm:
|
|
|
178
213
|
- do not describe `.claude/commands/` as required structure
|
|
179
214
|
- do not describe internal runtime helpers as the supported public workflow
|
|
180
215
|
- 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
|
|
216
|
+
- keep the workflow story as `cc-roadmap`, `cc-next`, `cc-dev`, manual PDCA/IDCA skills, optional `cc-review`, and PR review/landing skills; document maintenance helpers such as `cc-spec-init` / `cc-simplify` separately
|
|
217
|
+
- do not hand-edit `.codex/skills`; regenerate it from `.claude/skills` with `npm run adapt`
|
|
182
218
|
|
|
183
219
|
---
|
|
184
220
|
|
package/CONTRIBUTING.zh-CN.md
CHANGED
|
@@ -13,17 +13,25 @@ cc-devflow 现在是一个 skills-first 仓库,并且重新带回了可分发
|
|
|
13
13
|
对外可见面只有这些:
|
|
14
14
|
|
|
15
15
|
- `cc-roadmap`
|
|
16
|
+
- `cc-next`
|
|
17
|
+
- `cc-dev`
|
|
16
18
|
- `cc-plan`
|
|
17
19
|
- `cc-investigate`
|
|
18
20
|
- `cc-do`
|
|
21
|
+
- `cc-review`
|
|
22
|
+
- `cc-pr-review`
|
|
23
|
+
- `cc-pr-land`
|
|
19
24
|
- `cc-check`
|
|
20
25
|
- `cc-act`
|
|
21
26
|
- `cc-devflow init`
|
|
22
27
|
- `cc-devflow adapt`
|
|
28
|
+
- `cc-devflow query`
|
|
29
|
+
- `cc-devflow task-contract`
|
|
30
|
+
- `cc-devflow review`
|
|
23
31
|
|
|
24
32
|
`lib/skill-runtime/` 可以保留共享运行时支撑,但它已经不是用户要直接理解或运行的工作流入口。
|
|
25
33
|
|
|
26
|
-
仓库里也可以存在维护类 Skill,例如 `cc-spec-init`、`cc-simplify`、`docs-sync
|
|
34
|
+
仓库里也可以存在维护类 Skill,例如 `cc-spec-init`、`cc-simplify`、`docs-sync`。其中 `cc-spec-init` 和 `cc-simplify` 随整包分发为维护类 Skill;`docs-sync` 仍是内部维护 Skill。
|
|
27
35
|
|
|
28
36
|
---
|
|
29
37
|
|
|
@@ -125,7 +133,34 @@ cc-devflow/
|
|
|
125
133
|
|
|
126
134
|
不要只改其中一部分,让其余说明继续过期。
|
|
127
135
|
|
|
128
|
-
|
|
136
|
+
Codex 输出目录 `.codex/skills/` 由 `cc-devflow adapt` 生成。不要手改它。先改 `.claude/skills/<skill>/`,再重新生成镜像:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npm run adapt
|
|
140
|
+
npm run adapt -- --check
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 3. 保持 Skill 契约变更完整
|
|
144
|
+
|
|
145
|
+
如果一个已发布 Skill 的契约变化,请一次性同步这些面:
|
|
146
|
+
|
|
147
|
+
- `.claude/skills/<skill>/SKILL.md`
|
|
148
|
+
- `.claude/skills/<skill>/CHANGELOG.md`
|
|
149
|
+
- 受影响的 `PLAYBOOK.md`、`assets/`、`references/` 和 `scripts/`
|
|
150
|
+
- 根 `README.md` / `README.zh-CN.md`
|
|
151
|
+
- `docs/` 下受影响的公开文档
|
|
152
|
+
- `docs/examples/example-bindings.json` 和样例 metadata
|
|
153
|
+
|
|
154
|
+
然后运行相关门禁:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
npm run verify:examples
|
|
158
|
+
npm run verify:publish
|
|
159
|
+
npm run verify:artifacts
|
|
160
|
+
npm run verify
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 4. 保持分发包干净
|
|
129
164
|
|
|
130
165
|
不要把瞬态文件放进模板或 tarball。
|
|
131
166
|
|
|
@@ -135,7 +170,7 @@ cc-devflow/
|
|
|
135
170
|
- `.DS_Store`
|
|
136
171
|
- 本地编辑器和操作系统产生的垃圾文件
|
|
137
172
|
|
|
138
|
-
###
|
|
173
|
+
### 5. 让运行时辅助层保持次要
|
|
139
174
|
|
|
140
175
|
如果你改了 `lib/skill-runtime/`,请保持可测试,但不要再把它写成用户主入口。真正的公开 workflow 仍然属于已发布 Skill。
|
|
141
176
|
|
|
@@ -178,7 +213,8 @@ node scripts/validate-publish.js
|
|
|
178
213
|
- 不要把 `.claude/commands/` 写成必需结构
|
|
179
214
|
- 不要把内部运行时辅助层写成受支持的公开工作流
|
|
180
215
|
- 如果改了已发布 Skill,在同一个 PR 里同步该 Skill 的 `version`、本地 `CHANGELOG.md` 和受影响的公开文档
|
|
181
|
-
- 主 workflow
|
|
216
|
+
- 主 workflow 仍然围绕 `cc-roadmap`、`cc-next`、`cc-dev`、手动 PDCA/IDCA Skill、可选 `cc-review` 和 PR review/landing Skill;`cc-spec-init` / `cc-simplify` 等维护类 Skill 单独说明
|
|
217
|
+
- 不要手改 `.codex/skills`;从 `.claude/skills` 通过 `npm run adapt` 重新生成
|
|
182
218
|
|
|
183
219
|
---
|
|
184
220
|
|
package/README.md
CHANGED
|
@@ -96,10 +96,10 @@ flowchart TD
|
|
|
96
96
|
| `cc-roadmap` | You need product direction, staged scope, or backlog order | `devflow/roadmap.json`, `devflow/ROADMAP.md`, deprecated `devflow/BACKLOG.md` |
|
|
97
97
|
| `cc-next` | You need to pick the next roadmap-aware ready target from roadmap, unarchived local changes, and issue truth | one Goal Packet for `cc-dev` |
|
|
98
98
|
| `cc-dev` | A selected objective should be driven in the current worktree to a remote PR | PDCA/IDCA artifacts plus a PR or handoff |
|
|
99
|
-
| `cc-plan` | A feature or change needs scope, design, and task freezing | `planning/
|
|
100
|
-
| `cc-investigate` | A bug needs symptom, reproduction, root cause, and repair boundary | `planning/
|
|
101
|
-
| `cc-do` | Planned or investigated work needs implementation | code, tests,
|
|
102
|
-
| `cc-review` | Complex plans, investigations, or diffs need optional deep multi-round review before implementation or verification | `
|
|
99
|
+
| `cc-plan` | A feature or change needs scope, design, and task freezing | `planning/tasks.md#Contract Summary`, `task-manifest.json`, `change-meta.json` |
|
|
100
|
+
| `cc-investigate` | A bug needs symptom, reproduction, root cause, and repair boundary | `planning/tasks.md#Root Cause Contract`, `task-manifest.json`, `change-meta.json` |
|
|
101
|
+
| `cc-do` | Planned or investigated work needs implementation | code, tests, task state, scratch runtime |
|
|
102
|
+
| `cc-review` | Complex plans, investigations, or diffs need optional deep multi-round review before implementation or verification | `review-ledger.jsonl`, optional `review-findings.json`, optional rendered Markdown |
|
|
103
103
|
| `cc-pr-review` | A remote PR needs an independent review session before landing | PR review packet, findings, and landing verdict |
|
|
104
104
|
| `cc-pr-land` | Reviewed PRs need rebase-first landing into main with parity proof | integrated main plus local/remote parity evidence |
|
|
105
105
|
| `cc-check` | Work needs fresh verification evidence | `report-card.json` |
|
|
@@ -114,11 +114,13 @@ Maintenance skills are shipped with the pack:
|
|
|
114
114
|
|
|
115
115
|
`cc-roadmap` now records planning posture, evidence maturity, canonical project language, and durable decision context before recommending a route. That keeps idea-stage, active-user, paying-customer, infrastructure, and recovery work from being forced through the same questions, and prevents roadmap items from inventing a second vocabulary. Developer-facing or operator-facing roadmap items also carry target user, time to first value, magic moment, adoption bottleneck, and domain handoff into `cc-plan`.
|
|
116
116
|
|
|
117
|
-
Canonical language and durable decisions stay inside cc-devflow-native sources: `devflow/specs/`, `devflow/roadmap.json`, `devflow/ROADMAP.md`, `planning/
|
|
117
|
+
Canonical language and durable decisions stay inside cc-devflow-native sources: `devflow/specs/`, `devflow/roadmap.json`, `devflow/ROADMAP.md`, `planning/tasks.md`, and `change-meta.json`. Legacy `planning/design.md` and `planning/analysis.md` remain readable fallback inputs for older changes.
|
|
118
118
|
|
|
119
119
|
`cc-plan` freezes more implementation decisions before `cc-do` starts. Non-trivial plans compare minimal viable and ideal architecture options, full designs include decision horizon plus error/rescue mapping, and test-first plans record test framework evidence, public test seams, spec-style test names, public verification paths, behavior assertions, mock boundaries, coverage quality, mandatory regression tests, interface depth, Green minimality guards, refactor candidates, and vertical tracer-bullet slices when existing behavior changes. Before handoff, `cc-plan` and `cc-investigate` also reconcile the source roadmap item so RM status, REQ/FIX binding, progress, and spec diagnosis do not drift from the frozen change artifacts.
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
Every post-planning stage can start from `cc-devflow query workflow-context --change <id> --change-key <key> --data-only --no-trace --compact`. Treat the result as a context index, not semantic compression: it routes the next stage, names the current task, carries source hashes, `mustNotForget` constraints, default section/JSON refs, trusted commands, fail-closed rules, and machine-readable deep-open conditions. Source artifacts still decide disputed facts. This primarily reduces stage-routing and context-reset reads; end-to-end PDCA/IDCA savings depend on how often agents open `defaultOpen` and `deepOpen` refs. Use `npm run benchmark:workflow-context` to inspect token estimates plus routing correctness over the checked-in and synthetic examples. Use `npm run benchmark:skills` to keep public skill entrypoints thin; deeper planning rules should live behind conditional references instead of default context.
|
|
122
|
+
|
|
123
|
+
`cc-review` is optional and deeper than `cc-check`. It can run immediately after `cc-plan` / `cc-investigate` to review the frozen plan or root-cause contract, or after `cc-do` to review the implementation. It reads prior review records and current git/artifact delta, then records review lifecycle events through `cc-devflow review start`, `record-node`, `add-finding`, and `close` into `review-ledger.jsonl`. Human Markdown reports are rendered on demand with `cc-devflow review render`. When the host supports subagents, selected nodes can be dispatched to independent read-only reviewers so strategy, engineering, design, DX, smell, test, and runtime checks do not share one contaminated context. Broad implementation reviews can use separate risk lanes for intent/regression, security/privacy, performance/reliability, and contracts/coverage before the main thread triages raw findings. Plan reviews borrow strategy/design/engineering/DX methods through progressive references, while implementation reviews inspect diff scope, code smells, tests, UI/runtime behavior, Browser/Computer Use evidence, and logs when applicable. Findings route back to `cc-plan` or `cc-do`; clean implementation reviews continue to `cc-check`.
|
|
122
124
|
|
|
123
125
|
## Verification And Ship Gates
|
|
124
126
|
|
|
@@ -242,11 +244,23 @@ The currently distributed skill folders are:
|
|
|
242
244
|
|
|
243
245
|
- `devflow/specs/` stores durable capability truth: `INDEX.md` plus `capabilities/*.md`.
|
|
244
246
|
- New change directories use `REQ-<number>-<description>` for requirements or `FIX-<number>-<description>` for bug fixes. `REQ` and `FIX` numbers advance independently, so the same number may exist in both prefixes. Parallel worktrees may also create repeated numbers; the full change key must use a specific description to distinguish the work.
|
|
245
|
-
- `devflow/changes/<change>/` stores durable change truth:
|
|
247
|
+
- `devflow/changes/<change>/` stores durable change truth: CLI-generated `change-meta.json`, `planning/tasks.md`, CLI-generated `task-manifest.json`, review ledger/findings records, optional CLI logs for debug/failure, `report-card.json`, and one final handoff file. Task `context.md`, `checkpoint.json`, review markdown, and AI-written process files are not default durable truth.
|
|
248
|
+
- New changes default to one human-authored Markdown artifact: `planning/tasks.md`. Feature plans put the frozen design in `## Contract Summary`; bug investigations put root-cause truth in `## Root Cause Contract`. Legacy `planning/design.md`, `planning/analysis.md`, and `cc-review-*.md` remain fallback inputs, not new default writes.
|
|
249
|
+
- Machine JSON is CLI-owned: write the human contract in `planning/tasks.md`, then run `cc-devflow task-contract compile` / `validate`; do not handwrite `task-manifest.json` or `change-meta.json`.
|
|
250
|
+
- Use `cc-devflow task-contract validate`, `npm run verify:artifacts`, `npm run benchmark:artifacts`, and `npm run benchmark:skills` to keep workflow artifacts and skill entrypoints small and measurable.
|
|
246
251
|
- `devflow/workspaces/<change>/` stores ephemeral runtime scratch such as worker assignment, journals, prompts, and session logs.
|
|
247
252
|
- Regenerable files should not be persisted under `devflow/changes/`.
|
|
248
253
|
|
|
249
|
-
|
|
254
|
+
Artifact contract quick checks:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npx cc-devflow task-contract validate --change REQ-001 --change-key REQ-001-copy-invite-link
|
|
258
|
+
npm run verify:artifacts
|
|
259
|
+
npm run benchmark:artifacts
|
|
260
|
+
npm run benchmark:skills
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
For complete artifact examples, start with [`docs/examples/START-HERE.md`](./docs/examples/START-HERE.md). Example version bindings live in [`docs/examples/example-bindings.json`](./docs/examples/example-bindings.json). Migration and authoring guidance for the minimized artifact contract lives in [`docs/guides/minimize-artifacts.md`](./docs/guides/minimize-artifacts.md).
|
|
250
264
|
|
|
251
265
|
## Development
|
|
252
266
|
|
package/README.zh-CN.md
CHANGED
|
@@ -96,10 +96,10 @@ flowchart TD
|
|
|
96
96
|
| `cc-roadmap` | 需要产品方向、阶段范围或 backlog 顺序 | `devflow/roadmap.json`、`devflow/ROADMAP.md`、deprecated `devflow/BACKLOG.md` |
|
|
97
97
|
| `cc-next` | 需要从 roadmap、未归档本地 change 和 issue truth 里选下一个 ready 目标 | 交给 `cc-dev` 的 Goal Packet |
|
|
98
98
|
| `cc-dev` | 已选目标要在当前 worktree 内自动推进到远程 PR | PDCA/IDCA 产物加 PR 或 handoff |
|
|
99
|
-
| `cc-plan` | 新功能或变更需要澄清范围、设计方案、冻结任务 | `planning/
|
|
100
|
-
| `cc-investigate` | Bug 需要症状、复现、根因和修复边界 | `planning/
|
|
101
|
-
| `cc-do` | 已计划或已调查的任务需要实现 |
|
|
102
|
-
| `cc-review` | 复杂方案、调查根因或 diff 需要在实现前或验证前做可选深度多轮 Review | `
|
|
99
|
+
| `cc-plan` | 新功能或变更需要澄清范围、设计方案、冻结任务 | `planning/tasks.md#Contract Summary`、`task-manifest.json`、`change-meta.json` |
|
|
100
|
+
| `cc-investigate` | Bug 需要症状、复现、根因和修复边界 | `planning/tasks.md#Root Cause Contract`、`task-manifest.json`、`change-meta.json` |
|
|
101
|
+
| `cc-do` | 已计划或已调查的任务需要实现 | 代码、测试、任务状态、scratch runtime |
|
|
102
|
+
| `cc-review` | 复杂方案、调查根因或 diff 需要在实现前或验证前做可选深度多轮 Review | `review-ledger.jsonl`,可选 `review-findings.json`,可按需渲染 Markdown |
|
|
103
103
|
| `cc-pr-review` | 远程 PR 需要单独会话做合并前 Review | PR review packet、findings 和 landing verdict |
|
|
104
104
|
| `cc-pr-land` | 已 Review PR 需要 rebase-first 合并到 main 并证明 parity | 已集成 main 和本地 / 远程一致性证据 |
|
|
105
105
|
| `cc-check` | 工作需要新鲜验证证据 | `report-card.json` |
|
|
@@ -114,11 +114,13 @@ flowchart TD
|
|
|
114
114
|
|
|
115
115
|
`cc-roadmap` 现在会先记录 planning posture、evidence maturity、项目 canonical language 和持久决策上下文,再推荐路线。idea、已有用户、付费客户、infra、recovery 场景不会被套进同一组问题,也不会让 roadmap item 发明第二套词汇。面向开发者或操作者的 roadmap item 还会把目标用户、time to first value、magic moment、adoption bottleneck 和 domain handoff 交给 `cc-plan`。
|
|
116
116
|
|
|
117
|
-
Canonical language 和 durable decisions 只收敛到 cc-devflow 原生真相源:`devflow/specs/`、`devflow/roadmap.json`、`devflow/ROADMAP.md`、`planning/design.md
|
|
117
|
+
Canonical language 和 durable decisions 只收敛到 cc-devflow 原生真相源:`devflow/specs/`、`devflow/roadmap.json`、`devflow/ROADMAP.md`、`planning/tasks.md` 和 `change-meta.json`。历史 `planning/design.md` / `planning/analysis.md` 只作为旧 change 的可读 fallback。
|
|
118
118
|
|
|
119
119
|
`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 不再漂移。
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
planning 之后的每个阶段都可以先运行 `cc-devflow query workflow-context --change <id> --change-key <key> --data-only --no-trace --compact`。把结果当成 context index,而不是语义压缩:它负责路由下一阶段、标记当前 task、携带 source hash、`mustNotForget` 约束、默认 section/JSON refs、可信命令、fail-closed 规则和机器可读 deep-open 条件;有争议的事实仍由源 artifact 裁决。它主要降低 stage-routing 和 context-reset 的读取成本;端到端 PDCA/IDCA 节省取决于 agent 实际打开多少 `defaultOpen` 和 `deepOpen` refs。可用 `npm run benchmark:workflow-context` 查看仓库示例和合成用例上的 token 估算与路由正确性。用 `npm run benchmark:skills` 保持 public skill 入口足够薄;深层规划规则应该放在条件 reference 后面,而不是默认上下文里。
|
|
122
|
+
|
|
123
|
+
`cc-review` 是可选的深度 Review,不替代 `cc-check`。它可以接在 `cc-plan` / `cc-investigate` 后审冻结的计划或根因合同,也可以接在 `cc-do` 后审实现。它先读取上次 Review 记录和当前 git/artifact delta,再通过 `cc-devflow review start`、`record-node`、`add-finding`、`close` 把生命周期事件写进 `review-ledger.jsonl`。需要人类 Markdown 报告时,再用 `cc-devflow review render` 按需渲染。宿主支持 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`。
|
|
122
124
|
|
|
123
125
|
## 验证与交付门禁
|
|
124
126
|
|
|
@@ -242,11 +244,23 @@ npx cc-devflow config doctor --cwd /path/to/your/project
|
|
|
242
244
|
|
|
243
245
|
- `devflow/specs/` 保存 durable capability truth:`INDEX.md` 和 `capabilities/*.md`。
|
|
244
246
|
- 新 change 目录使用 `REQ-<number>-<description>` 表示需求,使用 `FIX-<number>-<description>` 表示 Bug 修复。`REQ` 和 `FIX` 各自递增自己的编号,跨前缀同号允许共存。并行工作树也可能产生重复编号,必须用完整 change key 的描述区分业务内容。
|
|
245
|
-
- `devflow/changes/<change>/` 保存 durable change truth
|
|
247
|
+
- `devflow/changes/<change>/` 保存 durable change truth:CLI 生成的 `change-meta.json`、`planning/tasks.md`、CLI 生成的 `task-manifest.json`、review ledger / findings 记录、debug / failed 的可选 CLI 日志、`report-card.json` 和唯一最终 handoff 文件。任务级 `context.md`、`checkpoint.json`、review markdown 和 AI 手写过程文件不是默认 durable truth。
|
|
248
|
+
- 新 change 默认只有一个人工编写的 Markdown artifact:`planning/tasks.md`。功能计划把冻结设计写进 `## Contract Summary`;Bug 调查把根因真相写进 `## Root Cause Contract`。历史 `planning/design.md`、`planning/analysis.md` 和 `cc-review-*.md` 只作为旧 change 的 fallback 输入,不再是新默认写入。
|
|
249
|
+
- 机器态 JSON 归 CLI 所有:先把人类合同写进 `planning/tasks.md`,再运行 `cc-devflow task-contract compile` / `validate`;不要手写 `task-manifest.json` 或 `change-meta.json`。
|
|
250
|
+
- 用 `cc-devflow task-contract validate`、`npm run verify:artifacts`、`npm run benchmark:artifacts` 和 `npm run benchmark:skills` 保持 workflow artifact 与 skill 入口小而可测。
|
|
246
251
|
- `devflow/workspaces/<change>/` 保存 ephemeral runtime scratch,例如 worker assignment、journal、prompt 和 session log。
|
|
247
252
|
- 能从 durable truth 再生成的文件,不应该持久化到 `devflow/changes/`。
|
|
248
253
|
|
|
249
|
-
|
|
254
|
+
Artifact contract 快速检查:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npx cc-devflow task-contract validate --change REQ-001 --change-key REQ-001-copy-invite-link
|
|
258
|
+
npm run verify:artifacts
|
|
259
|
+
npm run benchmark:artifacts
|
|
260
|
+
npm run benchmark:skills
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
想先看完整产物链,可以从 [`docs/examples/START-HERE.md`](./docs/examples/START-HERE.md) 开始。样例和 Skill 的版本绑定真相源在 [`docs/examples/example-bindings.json`](./docs/examples/example-bindings.json)。最小 artifact 合同的迁移与编写指南在 [`docs/guides/minimize-artifacts.md`](./docs/guides/minimize-artifacts.md)。
|
|
250
264
|
|
|
251
265
|
## 开发
|
|
252
266
|
|