cc-devflow 4.5.8 → 4.5.10
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 +33 -0
- package/.claude/skills/cc-act/PLAYBOOK.md +9 -4
- package/.claude/skills/cc-act/SKILL.md +73 -12
- package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md +30 -0
- package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md +29 -0
- package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_TEMPLATE.md +103 -0
- package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +61 -5
- package/.claude/skills/cc-act/references/closure-contract.md +4 -1
- package/.claude/skills/cc-act/references/git-commit-guidelines.md +342 -37
- package/.claude/skills/cc-act/scripts/cc-act-common.sh +29 -1
- package/.claude/skills/cc-act/scripts/render-pr-brief.sh +164 -0
- package/.claude/skills/cc-act/scripts/sync-act-docs.sh +1 -1
- package/.claude/skills/cc-check/CHANGELOG.md +17 -0
- package/.claude/skills/cc-check/PLAYBOOK.md +1 -0
- package/.claude/skills/cc-check/SKILL.md +9 -5
- 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 +5 -0
- package/.claude/skills/cc-dev/SKILL.md +26 -1
- package/.claude/skills/cc-do/CHANGELOG.md +23 -0
- package/.claude/skills/cc-do/PLAYBOOK.md +7 -7
- package/.claude/skills/cc-do/SKILL.md +49 -45
- package/.claude/skills/cc-do/references/execution-recovery.md +18 -13
- package/.claude/skills/cc-do/scripts/build-task-context.sh +13 -22
- package/.claude/skills/cc-do/scripts/mark-task-complete.sh +0 -6
- 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 +34 -0
- package/.claude/skills/cc-investigate/PLAYBOOK.md +21 -5
- package/.claude/skills/cc-investigate/SKILL.md +97 -40
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +66 -4
- package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +30 -59
- package/.claude/skills/cc-investigate/assets/{ANALYSIS_TEMPLATE.md → legacy/ANALYSIS_TEMPLATE.md} +48 -0
- package/.claude/skills/cc-investigate/references/investigation-contract.md +16 -2
- package/.claude/skills/cc-investigate/scripts/bootstrap-analysis.sh +1 -1
- package/.claude/skills/cc-next/CHANGELOG.md +6 -0
- package/.claude/skills/cc-next/PLAYBOOK.md +26 -4
- package/.claude/skills/cc-next/SKILL.md +39 -4
- package/.claude/skills/cc-plan/CHANGELOG.md +38 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +60 -53
- package/.claude/skills/cc-plan/SKILL.md +164 -87
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +101 -9
- package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +58 -229
- package/.claude/skills/cc-plan/assets/{DESIGN_TEMPLATE.md → legacy/DESIGN_TEMPLATE.md} +68 -0
- package/.claude/skills/cc-plan/assets/{TINY_DESIGN_TEMPLATE.md → legacy/TINY_DESIGN_TEMPLATE.md} +47 -1
- package/.claude/skills/cc-plan/references/planning-contract.md +48 -33
- 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/.claude/skills/cc-roadmap/CHANGELOG.md +6 -0
- package/.claude/skills/cc-roadmap/PLAYBOOK.md +30 -0
- package/.claude/skills/cc-roadmap/SKILL.md +45 -8
- package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +8 -0
- package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +22 -0
- package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +32 -1
- package/.claude/skills/cc-roadmap/references/roadmap-dialogue.md +14 -14
- package/CHANGELOG.md +28 -0
- package/CONTRIBUTING.md +40 -4
- package/CONTRIBUTING.zh-CN.md +40 -4
- package/README.md +57 -43
- package/README.zh-CN.md +57 -43
- package/bin/cc-devflow-cli.js +293 -36
- package/docs/examples/START-HERE.md +5 -4
- package/docs/examples/example-bindings.json +10 -10
- package/docs/examples/full-design-blocked/BACKLOG.md +1 -1
- package/docs/examples/full-design-blocked/README.md +2 -2
- 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 +2 -1
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +29 -312
- 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/full-design-blocked/roadmap.json +1 -1
- package/docs/examples/local-handoff/BACKLOG.md +1 -1
- package/docs/examples/local-handoff/README.md +2 -2
- package/docs/examples/local-handoff/ROADMAP.md +1 -1
- 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 +27 -210
- 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/local-handoff/roadmap.json +1 -1
- package/docs/examples/pdca-loop/BACKLOG.md +1 -1
- package/docs/examples/pdca-loop/README.md +2 -2
- package/docs/examples/pdca-loop/ROADMAP.md +1 -1
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +65 -1
- 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 +26 -228
- 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/pdca-loop/roadmap.json +1 -1
- package/docs/examples/scripts/check-example-bindings.sh +11 -5
- package/docs/get-shit-done-strategy-audit.md +22 -22
- package/docs/guides/artifact-contract.md +44 -0
- package/docs/guides/getting-started.md +10 -8
- package/docs/guides/getting-started.zh-CN.md +10 -8
- package/docs/guides/minimize-artifacts.md +123 -0
- package/docs/guides/project-postmortem.md +78 -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__/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 +63 -2
- 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 +76 -2
- package/lib/skill-runtime/__tests__/task-contract-migrate.test.js +137 -0
- package/lib/skill-runtime/__tests__/task-contract.test.js +783 -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 +524 -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 +25 -13
- package/lib/skill-runtime/query-registry.js +2 -2
- package/lib/skill-runtime/query.js +16 -3
- package/lib/skill-runtime/review-records.js +123 -0
- package/lib/skill-runtime/review.js +246 -11
- package/lib/skill-runtime/schemas.js +179 -15
- package/lib/skill-runtime/store.js +0 -10
- package/lib/skill-runtime/task-contract.js +187 -0
- package/lib/skill-runtime/workflow-context.js +748 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -11,40 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
CC-DevFlow is a small, explicit workflow system for agent coding. It gives an AI agent one roadmap entry point, then routes every change through either a feature loop or a bug-investigation loop before work can be called done.
|
|
13
13
|
|
|
14
|
-
```text
|
|
15
|
-
cc-roadmap
|
|
16
|
-
|
|
17
|
-
PR Harness: cc-next -> cc-dev -> cc-pr-review -> cc-pr-land
|
|
18
|
-
|
|
19
|
-
PDCA: cc-plan -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
|
|
20
|
-
IDCA: cc-investigate -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
```mermaid
|
|
24
|
-
flowchart TD
|
|
25
|
-
Roadmap["cc-roadmap\nProduct direction and staged truth"] --> Next["cc-next\nPick next ready Goal Packet"]
|
|
26
|
-
Next --> Dev["cc-dev\nDrive current worktree to PR"]
|
|
27
|
-
|
|
28
|
-
Dev --> Route{"Route"}
|
|
29
|
-
Route -->|Feature or change| Plan["cc-plan\nFreeze scope and tasks"]
|
|
30
|
-
Route -->|Bug or regression| Investigate["cc-investigate\nFreeze root cause and repair boundary"]
|
|
31
|
-
|
|
32
|
-
Plan --> PlanReview["cc-review\nOptional plan review"]
|
|
33
|
-
Investigate --> PlanReview
|
|
34
|
-
PlanReview --> Do["cc-do\nImplement with evidence"]
|
|
35
|
-
Plan --> Do
|
|
36
|
-
Investigate --> Do
|
|
37
|
-
|
|
38
|
-
Do --> ImplReview["cc-review\nOptional implementation review"]
|
|
39
|
-
ImplReview --> Check["cc-check\nFresh verification verdict"]
|
|
40
|
-
Do --> Check
|
|
41
|
-
Check --> Act["cc-act\nCreate or update remote PR"]
|
|
42
|
-
Act --> PRReview["cc-pr-review\nSeparate PR review session"]
|
|
43
|
-
PRReview --> PRLand["cc-pr-land\nRebase, land, prove main parity"]
|
|
44
|
-
PRReview -->|Fixes required| Dev
|
|
45
|
-
PRLand --> Main["main\nLocal and remote parity"]
|
|
46
|
-
```
|
|
47
|
-
|
|
48
14
|

|
|
49
15
|
|
|
50
16
|
## Why cc-devflow
|
|
@@ -87,17 +53,53 @@ npx cc-devflow@latest adapt --cwd /path/to/your/project --all
|
|
|
87
53
|
|
|
88
54
|
After installation, ask your agent to use the workflow skills directly. Start with `cc-roadmap` for product direction. Use `cc-next` to select the next roadmap-aware target, `cc-dev` to drive the current worktree through PDCA or IDCA until a remote PR is opened, `cc-pr-review` to review that PR in a separate session, and `cc-pr-land` to land reviewed PRs into main. For manual core workflow work, use `cc-plan` for new work, use `cc-investigate` for bugs, optionally run `cc-review` on complex frozen plans or investigations, then continue through `cc-do`, optional implementation `cc-review`, `cc-check`, and `cc-act`.
|
|
89
55
|
|
|
56
|
+
## Workflow Map
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
cc-roadmap
|
|
60
|
+
|
|
61
|
+
PR Harness: cc-next -> cc-dev -> cc-pr-review -> cc-pr-land
|
|
62
|
+
|
|
63
|
+
PDCA: cc-plan -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
|
|
64
|
+
IDCA: cc-investigate -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```mermaid
|
|
68
|
+
flowchart TD
|
|
69
|
+
Roadmap["cc-roadmap\nProduct direction and staged truth"] --> Next["cc-next\nPick next ready Goal Packet"]
|
|
70
|
+
Next --> Dev["cc-dev\nDrive current worktree to PR"]
|
|
71
|
+
|
|
72
|
+
Dev --> Route{"Route"}
|
|
73
|
+
Route -->|Feature or change| Plan["cc-plan\nFreeze scope and tasks"]
|
|
74
|
+
Route -->|Bug or regression| Investigate["cc-investigate\nFreeze root cause and repair boundary"]
|
|
75
|
+
|
|
76
|
+
Plan --> PlanReview["cc-review\nOptional plan review"]
|
|
77
|
+
Investigate --> PlanReview
|
|
78
|
+
PlanReview --> Do["cc-do\nImplement with evidence"]
|
|
79
|
+
Plan --> Do
|
|
80
|
+
Investigate --> Do
|
|
81
|
+
|
|
82
|
+
Do --> ImplReview["cc-review\nOptional implementation review"]
|
|
83
|
+
ImplReview --> Check["cc-check\nFresh verification verdict"]
|
|
84
|
+
Do --> Check
|
|
85
|
+
Check --> Act["cc-act\nCreate or update remote PR"]
|
|
86
|
+
Act --> PRReview["cc-pr-review\nSeparate PR review session"]
|
|
87
|
+
PRReview --> PRLand["cc-pr-land\nRebase, land, prove main parity"]
|
|
88
|
+
PRReview -->|Fixes required| Dev
|
|
89
|
+
PRLand --> Main["main\nLocal and remote parity"]
|
|
90
|
+
```
|
|
91
|
+
|
|
90
92
|
## Workflow Skills
|
|
91
93
|
|
|
92
94
|
| Skill | Use it when | Main output |
|
|
93
95
|
| --- | --- | --- |
|
|
94
96
|
| `cc-roadmap` | You need product direction, staged scope, or backlog order | `devflow/roadmap.json`, `devflow/ROADMAP.md`, deprecated `devflow/BACKLOG.md` |
|
|
95
|
-
| `cc-next` | You need to pick the next roadmap-aware ready target from roadmap and issue truth | one Goal Packet for `cc-dev` |
|
|
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` |
|
|
96
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 |
|
|
97
|
-
| `cc-plan` | A feature or change needs scope, design, and task freezing | `planning/
|
|
98
|
-
| `cc-investigate` | A bug needs symptom, reproduction, root cause, and repair boundary | `planning/
|
|
99
|
-
| `cc-do` | Planned or investigated work needs implementation | code, tests,
|
|
100
|
-
| `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 |
|
|
101
103
|
| `cc-pr-review` | A remote PR needs an independent review session before landing | PR review packet, findings, and landing verdict |
|
|
102
104
|
| `cc-pr-land` | Reviewed PRs need rebase-first landing into main with parity proof | integrated main plus local/remote parity evidence |
|
|
103
105
|
| `cc-check` | Work needs fresh verification evidence | `report-card.json` |
|
|
@@ -112,11 +114,13 @@ Maintenance skills are shipped with the pack:
|
|
|
112
114
|
|
|
113
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`.
|
|
114
116
|
|
|
115
|
-
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.
|
|
116
118
|
|
|
117
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.
|
|
118
120
|
|
|
119
|
-
|
|
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.
|
|
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`.
|
|
120
124
|
|
|
121
125
|
## Verification And Ship Gates
|
|
122
126
|
|
|
@@ -240,11 +244,21 @@ The currently distributed skill folders are:
|
|
|
240
244
|
|
|
241
245
|
- `devflow/specs/` stores durable capability truth: `INDEX.md` plus `capabilities/*.md`.
|
|
242
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.
|
|
243
|
-
- `devflow/changes/<change>/` stores durable change truth: `change-
|
|
247
|
+
- `devflow/changes/<change>/` stores durable change truth: `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
|
+
- Use `cc-devflow task-contract validate`, `npm run verify:artifacts`, and `npm run benchmark:artifacts` to keep workflow artifacts small and measurable.
|
|
244
250
|
- `devflow/workspaces/<change>/` stores ephemeral runtime scratch such as worker assignment, journals, prompts, and session logs.
|
|
245
251
|
- Regenerable files should not be persisted under `devflow/changes/`.
|
|
246
252
|
|
|
247
|
-
|
|
253
|
+
Artifact contract quick checks:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
npx cc-devflow task-contract validate --change REQ-001 --change-key REQ-001-copy-invite-link
|
|
257
|
+
npm run verify:artifacts
|
|
258
|
+
npm run benchmark:artifacts
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
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).
|
|
248
262
|
|
|
249
263
|
## Development
|
|
250
264
|
|
package/README.zh-CN.md
CHANGED
|
@@ -11,40 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
CC-DevFlow 是一个给 Agent 编程时代准备的小而明确的工作流系统。它先用一个 roadmap 入口确定方向,再让每个变更进入「新需求闭环」或「Bug 调查闭环」,最后必须经过验证和交付收口。
|
|
13
13
|
|
|
14
|
-
```text
|
|
15
|
-
cc-roadmap
|
|
16
|
-
|
|
17
|
-
PR Harness: cc-next -> cc-dev -> cc-pr-review -> cc-pr-land
|
|
18
|
-
|
|
19
|
-
PDCA: cc-plan -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
|
|
20
|
-
IDCA: cc-investigate -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
```mermaid
|
|
24
|
-
flowchart TD
|
|
25
|
-
Roadmap["cc-roadmap\n产品方向和阶段真相"] --> Next["cc-next\n选择下一个 Goal Packet"]
|
|
26
|
-
Next --> Dev["cc-dev\n当前 worktree 自动推进到 PR"]
|
|
27
|
-
|
|
28
|
-
Dev --> Route{"路线"}
|
|
29
|
-
Route -->|新需求或变更| Plan["cc-plan\n冻结范围和任务"]
|
|
30
|
-
Route -->|Bug 或回归| Investigate["cc-investigate\n冻结根因和修复边界"]
|
|
31
|
-
|
|
32
|
-
Plan --> PlanReview["cc-review\n可选方案 Review"]
|
|
33
|
-
Investigate --> PlanReview
|
|
34
|
-
PlanReview --> Do["cc-do\n实现并留下证据"]
|
|
35
|
-
Plan --> Do
|
|
36
|
-
Investigate --> Do
|
|
37
|
-
|
|
38
|
-
Do --> ImplReview["cc-review\n可选实现 Review"]
|
|
39
|
-
ImplReview --> Check["cc-check\n新鲜验证裁决"]
|
|
40
|
-
Do --> Check
|
|
41
|
-
Check --> Act["cc-act\n创建或更新远程 PR"]
|
|
42
|
-
Act --> PRReview["cc-pr-review\n单独会话 Review PR"]
|
|
43
|
-
PRReview --> PRLand["cc-pr-land\nRebase 合并并证明 main parity"]
|
|
44
|
-
PRReview -->|需要修复| Dev
|
|
45
|
-
PRLand --> Main["main\n本地和远程一致"]
|
|
46
|
-
```
|
|
47
|
-
|
|
48
14
|

|
|
49
15
|
|
|
50
16
|
## 为什么用 cc-devflow
|
|
@@ -87,17 +53,53 @@ npx cc-devflow@latest adapt --cwd /path/to/your/project --all
|
|
|
87
53
|
|
|
88
54
|
安装完成后,直接让 Agent 使用这些 workflow skill。产品方向先走 `cc-roadmap`。需要自动选择下一步时走 `cc-next`;选中目标后用 `cc-dev` 在当前 worktree 内自动跑 PDCA 或 IDCA,直到远程 PR 打开;PR 用单独会话跑 `cc-pr-review`;review 后用单独会话跑 `cc-pr-land` 合并并证明 main parity。手动核心链路仍然是:新需求走 `cc-plan`,Bug 和 regression 走 `cc-investigate`;复杂计划或根因合同冻结后可以先接 `cc-review`,再进入 `cc-do`;实现复杂时还可以再接一次实现 `cc-review`,最后进入 `cc-check` 和 `cc-act`。
|
|
89
55
|
|
|
56
|
+
## 流程图
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
cc-roadmap
|
|
60
|
+
|
|
61
|
+
PR Harness: cc-next -> cc-dev -> cc-pr-review -> cc-pr-land
|
|
62
|
+
|
|
63
|
+
PDCA: cc-plan -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
|
|
64
|
+
IDCA: cc-investigate -> [cc-review] -> cc-do -> [cc-review] -> cc-check -> cc-act
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```mermaid
|
|
68
|
+
flowchart TD
|
|
69
|
+
Roadmap["cc-roadmap\n产品方向和阶段真相"] --> Next["cc-next\n选择下一个 Goal Packet"]
|
|
70
|
+
Next --> Dev["cc-dev\n当前 worktree 自动推进到 PR"]
|
|
71
|
+
|
|
72
|
+
Dev --> Route{"路线"}
|
|
73
|
+
Route -->|新需求或变更| Plan["cc-plan\n冻结范围和任务"]
|
|
74
|
+
Route -->|Bug 或回归| Investigate["cc-investigate\n冻结根因和修复边界"]
|
|
75
|
+
|
|
76
|
+
Plan --> PlanReview["cc-review\n可选方案 Review"]
|
|
77
|
+
Investigate --> PlanReview
|
|
78
|
+
PlanReview --> Do["cc-do\n实现并留下证据"]
|
|
79
|
+
Plan --> Do
|
|
80
|
+
Investigate --> Do
|
|
81
|
+
|
|
82
|
+
Do --> ImplReview["cc-review\n可选实现 Review"]
|
|
83
|
+
ImplReview --> Check["cc-check\n新鲜验证裁决"]
|
|
84
|
+
Do --> Check
|
|
85
|
+
Check --> Act["cc-act\n创建或更新远程 PR"]
|
|
86
|
+
Act --> PRReview["cc-pr-review\n单独会话 Review PR"]
|
|
87
|
+
PRReview --> PRLand["cc-pr-land\nRebase 合并并证明 main parity"]
|
|
88
|
+
PRReview -->|需要修复| Dev
|
|
89
|
+
PRLand --> Main["main\n本地和远程一致"]
|
|
90
|
+
```
|
|
91
|
+
|
|
90
92
|
## Workflow Skill
|
|
91
93
|
|
|
92
94
|
| Skill | 什么时候用 | 主要产物 |
|
|
93
95
|
| --- | --- | --- |
|
|
94
96
|
| `cc-roadmap` | 需要产品方向、阶段范围或 backlog 顺序 | `devflow/roadmap.json`、`devflow/ROADMAP.md`、deprecated `devflow/BACKLOG.md` |
|
|
95
|
-
| `cc-next` | 需要从 roadmap 和 issue truth 里选下一个 ready 目标 | 交给 `cc-dev` 的 Goal Packet |
|
|
97
|
+
| `cc-next` | 需要从 roadmap、未归档本地 change 和 issue truth 里选下一个 ready 目标 | 交给 `cc-dev` 的 Goal Packet |
|
|
96
98
|
| `cc-dev` | 已选目标要在当前 worktree 内自动推进到远程 PR | PDCA/IDCA 产物加 PR 或 handoff |
|
|
97
|
-
| `cc-plan` | 新功能或变更需要澄清范围、设计方案、冻结任务 | `planning/
|
|
98
|
-
| `cc-investigate` | Bug 需要症状、复现、根因和修复边界 | `planning/
|
|
99
|
-
| `cc-do` | 已计划或已调查的任务需要实现 |
|
|
100
|
-
| `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 |
|
|
101
103
|
| `cc-pr-review` | 远程 PR 需要单独会话做合并前 Review | PR review packet、findings 和 landing verdict |
|
|
102
104
|
| `cc-pr-land` | 已 Review PR 需要 rebase-first 合并到 main 并证明 parity | 已集成 main 和本地 / 远程一致性证据 |
|
|
103
105
|
| `cc-check` | 工作需要新鲜验证证据 | `report-card.json` |
|
|
@@ -112,11 +114,13 @@ npx cc-devflow@latest adapt --cwd /path/to/your/project --all
|
|
|
112
114
|
|
|
113
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`。
|
|
114
116
|
|
|
115
|
-
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。
|
|
116
118
|
|
|
117
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 不再漂移。
|
|
118
120
|
|
|
119
|
-
|
|
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 估算与路由正确性。
|
|
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`。
|
|
120
124
|
|
|
121
125
|
## 验证与交付门禁
|
|
122
126
|
|
|
@@ -240,11 +244,21 @@ npx cc-devflow config doctor --cwd /path/to/your/project
|
|
|
240
244
|
|
|
241
245
|
- `devflow/specs/` 保存 durable capability truth:`INDEX.md` 和 `capabilities/*.md`。
|
|
242
246
|
- 新 change 目录使用 `REQ-<number>-<description>` 表示需求,使用 `FIX-<number>-<description>` 表示 Bug 修复。`REQ` 和 `FIX` 各自递增自己的编号,跨前缀同号允许共存。并行工作树也可能产生重复编号,必须用完整 change key 的描述区分业务内容。
|
|
243
|
-
- `devflow/changes/<change>/` 保存 durable change truth:`change-
|
|
247
|
+
- `devflow/changes/<change>/` 保存 durable change truth:`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
|
+
- 用 `cc-devflow task-contract validate`、`npm run verify:artifacts` 和 `npm run benchmark:artifacts` 保持 workflow artifact 小而可测。
|
|
244
250
|
- `devflow/workspaces/<change>/` 保存 ephemeral runtime scratch,例如 worker assignment、journal、prompt 和 session log。
|
|
245
251
|
- 能从 durable truth 再生成的文件,不应该持久化到 `devflow/changes/`。
|
|
246
252
|
|
|
247
|
-
|
|
253
|
+
Artifact contract 快速检查:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
npx cc-devflow task-contract validate --change REQ-001 --change-key REQ-001-copy-invite-link
|
|
257
|
+
npm run verify:artifacts
|
|
258
|
+
npm run benchmark:artifacts
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
想先看完整产物链,可以从 [`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)。
|
|
248
262
|
|
|
249
263
|
## 开发
|
|
250
264
|
|