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
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
- Requirement version:
|
|
6
6
|
- Design version:
|
|
7
7
|
- CC-Plan skill version:
|
|
8
|
+
- Work branch:
|
|
8
9
|
- Output language:
|
|
9
10
|
- Source roadmap item:
|
|
10
11
|
- Source roadmap version:
|
|
@@ -13,14 +14,46 @@
|
|
|
13
14
|
|
|
14
15
|
## Progressive Disclosure Index
|
|
15
16
|
|
|
16
|
-
- Default read: Plan Meta, Execution Handoff, Execution Protocol, current task block.
|
|
17
|
+
- Default read: Plan Meta, Contract Summary, Execution Handoff, Execution Protocol, current task block.
|
|
17
18
|
- Open for scheduling: `planning/task-manifest.json`, ready-task selector output, dependencies, touched files.
|
|
18
19
|
- Open for parallel or ownership questions: Implementation Surface Map, Tracer Bullet Map.
|
|
19
|
-
- Open for audit/recovery: Task Quality Bar,
|
|
20
|
+
- Open for audit/recovery: Task Quality Bar, Git state, CLI logs, review/report-card.json.
|
|
21
|
+
- Machine JSON rule: after editing this file, run `cc-devflow task-contract compile --change <changeId> --change-key <changeKey>` and `cc-devflow task-contract validate --change <changeId> --change-key <changeKey>`; do not handwrite `task-manifest.json` or `change-meta.json`.
|
|
22
|
+
|
|
23
|
+
## Contract Summary
|
|
24
|
+
|
|
25
|
+
Change:
|
|
26
|
+
Mode: plan
|
|
27
|
+
Profile: tiny-design | full-design
|
|
28
|
+
Approval:
|
|
29
|
+
|
|
30
|
+
Goal:
|
|
31
|
+
-
|
|
32
|
+
|
|
33
|
+
Do Not Do:
|
|
34
|
+
-
|
|
35
|
+
|
|
36
|
+
Approved Direction:
|
|
37
|
+
-
|
|
38
|
+
|
|
39
|
+
Acceptance:
|
|
40
|
+
-
|
|
41
|
+
|
|
42
|
+
Verification:
|
|
43
|
+
-
|
|
44
|
+
|
|
45
|
+
Risk / Escalate If:
|
|
46
|
+
-
|
|
47
|
+
|
|
48
|
+
> This is the default human-authored planning contract. Do not create
|
|
49
|
+
> `planning/design.md` for new changes unless the user explicitly requests a
|
|
50
|
+
> legacy artifact or a migration requires preserving one.
|
|
51
|
+
> `task-manifest.json` and `change-meta.json` are generated by
|
|
52
|
+
> `cc-devflow task-contract compile`, not by manual AI JSON authoring.
|
|
20
53
|
|
|
21
54
|
## Execution Handoff
|
|
22
55
|
|
|
23
|
-
- Canonical
|
|
56
|
+
- Canonical contract: `planning/tasks.md#Contract Summary`
|
|
24
57
|
- Canonical change meta: `change-meta.json`
|
|
25
58
|
- Execution mode: `single-path` | `parallel-ready`
|
|
26
59
|
- Frozen decisions:
|
|
@@ -70,14 +103,17 @@
|
|
|
70
103
|
ClaudeCode / Codex 执行本计划时,必须把本文件当成任务模板合同,而不是普通 TODO 列表。
|
|
71
104
|
|
|
72
105
|
- Template source: `assets/TASKS_TEMPLATE.md`
|
|
106
|
+
- Context index first: run `cc-devflow query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact` before opening deep sections; use `packetOnly` plus `mustNotForget` first, verify `sourceHashes`, open `defaultOpen` refs only when needed, and reserve `deepOpen` for matching `openWhen.conditions`.
|
|
73
107
|
- Task selection: read `planning/task-manifest.json.currentTaskId`; if empty, run the ready-task selector before choosing work.
|
|
74
108
|
- Task block rule: read the full task block before coding; title-only execution is invalid.
|
|
75
|
-
- Contract sync rule: every task must inherit one row from Task Contract Matrix; if the matrix lacks source funnel rounds, interface/data contract, do-not-re-decide items, or artifact updates, return to `planning/
|
|
109
|
+
- Contract sync rule: every task must inherit one row from Task Contract Matrix; if the matrix lacks source funnel rounds, interface/data contract, do-not-re-decide items, or artifact updates, return to `planning/tasks.md#Contract Summary` before coding.
|
|
76
110
|
- Completion rule: after verification and review gates pass, run the completion script; do not manually edit checkbox, status, or `currentTaskId`.
|
|
77
|
-
- Completion failure: if the script fails, fix the missing
|
|
78
|
-
- Postmortem recall rule: before each task, search `devflow/postmortems` with the task's touched files, capability, failure class, and model-risk terms;
|
|
111
|
+
- Completion failure: if the script fails, fix the missing review / dependency evidence and rerun it. Do not bypass it by editing JSON or Markdown.
|
|
112
|
+
- Postmortem recall rule: before each task, search `devflow/postmortems` with the task's touched files, capability, failure class, and model-risk terms; apply relevant reminders to the work. Do not generate no-match process files.
|
|
113
|
+
- Runtime file ban: do not generate `execution/tasks/<task-id>/context.md`, `checkpoint.json`, review markdown, or any AI-written process file. Recovery reads code, Git, `planning/tasks.md`, `planning/task-manifest.json`, and CLI logs only.
|
|
79
114
|
|
|
80
115
|
```bash
|
|
116
|
+
cc-devflow query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact
|
|
81
117
|
SCRIPT_ROOT=".claude/skills/cc-do/scripts"
|
|
82
118
|
if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
|
|
83
119
|
SCRIPT_ROOT=".codex/skills/cc-do/scripts"
|
|
@@ -124,7 +160,7 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key
|
|
|
124
160
|
Project postmortem search: `rg -n "<test seam|capability|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
125
161
|
Verification: `npm test -- path/to/test`
|
|
126
162
|
Evidence: failing output
|
|
127
|
-
Completion: after failing evidence and required
|
|
163
|
+
Completion: after failing evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T001`; do not hand-edit status.
|
|
128
164
|
Coverage: unit / integration / e2e / eval; regression: yes / no
|
|
129
165
|
Spec-style test name: 测试名像规格说明,描述可观察行为
|
|
130
166
|
One logical behavior: yes / no
|
|
@@ -147,8 +183,8 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key
|
|
|
147
183
|
Read first: `design.md`, `path/to/test`
|
|
148
184
|
Project postmortem search: `rg -n "<implementation surface|module|failure-class|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
149
185
|
Verification: `npm test -- path/to/test`
|
|
150
|
-
Evidence: passing output +
|
|
151
|
-
Completion: after green evidence and required
|
|
186
|
+
Evidence: passing output + Git diff
|
|
187
|
+
Completion: after green evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T002`; do not hand-edit status.
|
|
152
188
|
Green minimality guard: 只写当前红灯要求的最小实现,不预铺未来行为、分支或 API
|
|
153
189
|
Vertical slice: Slice 1
|
|
154
190
|
Ready when: T001 已经见红,且当前 touched files 不和其他并行任务冲突
|
|
@@ -167,7 +203,7 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key
|
|
|
167
203
|
Project postmortem search: `rg -n "<test seam|capability|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
168
204
|
Verification: `npm test -- path/to/other.test`
|
|
169
205
|
Evidence: failing output
|
|
170
|
-
Completion: after failing evidence and required
|
|
206
|
+
Completion: after failing evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T003`; do not hand-edit status.
|
|
171
207
|
Coverage: unit / integration / e2e / eval; regression: yes / no
|
|
172
208
|
Spec-style test name: 测试名像规格说明,描述可观察行为
|
|
173
209
|
One logical behavior: yes / no
|
|
@@ -191,7 +227,7 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key
|
|
|
191
227
|
Project postmortem search: `rg -n "<implementation surface|module|failure-class|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
192
228
|
Verification: `npm test -- path/to/other.test`
|
|
193
229
|
Evidence: passing output + review notes
|
|
194
|
-
Completion: after green evidence and required
|
|
230
|
+
Completion: after green evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T004`; do not hand-edit status.
|
|
195
231
|
Green minimality guard: 只写当前红灯要求的最小实现,不预铺未来行为、分支或 API
|
|
196
232
|
Vertical slice: Slice 2
|
|
197
233
|
Ready when: T003 已经见红,且文件触点与其他 `[P]` 任务不冲突
|
|
@@ -210,7 +246,7 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key
|
|
|
210
246
|
Project postmortem search: `rg -n "<refactor candidate|code smell|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
211
247
|
Verification: `npm test -- path/to/test path/to/other.test`
|
|
212
248
|
Evidence: refactor diff + repeated green output
|
|
213
|
-
Completion: after refactor evidence and required
|
|
249
|
+
Completion: after refactor evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T005`; do not hand-edit status.
|
|
214
250
|
Refactor candidates: duplication / long method / shallow module / feature envy / primitive obsession / naming / >3 nesting / newly exposed old code smell
|
|
215
251
|
Ready when: 对应 Red/Green 任务都已完成,且清理不会扩大 scope
|
|
216
252
|
|
|
@@ -219,14 +255,14 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key
|
|
|
219
255
|
Source funnel rounds: Execution Architecture; Task Contract; Final Approval.
|
|
220
256
|
Contract: user story `all planned stories`; file responsibility `verification evidence`; method/interface `all changed public seams`; key fields `all contract fields`; input/output `not applicable`; failure path `gate failure blocks completion`; AFK/HITL `AFK`.
|
|
221
257
|
Do not re-decide: scope, test framework, gate set, completion protocol.
|
|
222
|
-
Artifact updates: review evidence
|
|
258
|
+
Artifact updates: review evidence only; no behavior changes and no execution process files.
|
|
223
259
|
TDD phase: evidence
|
|
224
260
|
Files: `command or file`
|
|
225
261
|
Read first: `tasks.md`, `task-manifest.json`
|
|
226
262
|
Project postmortem search: `rg -n "<verification|release|tooling|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
227
263
|
Verification: `npm test && npm run lint`
|
|
228
264
|
Evidence: gate output
|
|
229
|
-
Completion: after gate evidence and required
|
|
265
|
+
Completion: after gate evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T006`; do not hand-edit status.
|
|
230
266
|
Ready when: 当前 requirement 的实现任务都已收口
|
|
231
267
|
|
|
232
268
|
> `[P]` 只表示“依赖满足后有资格并行”,不表示可以无脑同时开发。
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
"documentLanguage": ""
|
|
10
10
|
},
|
|
11
11
|
"planningMeta": {
|
|
12
|
-
"reqPlanSkillVersion": "3.
|
|
12
|
+
"reqPlanSkillVersion": "3.9.2",
|
|
13
13
|
"designVersion": "design.v1",
|
|
14
|
+
"workBranch": "REQ/XXX-short-feature-name",
|
|
14
15
|
"approvedAt": "2026-04-15T12:00:00.000Z",
|
|
15
16
|
"basedOnOption": "Option A",
|
|
16
17
|
"aiLeverageDecisionLens": {
|
|
@@ -132,7 +133,6 @@
|
|
|
132
133
|
],
|
|
133
134
|
"context": {
|
|
134
135
|
"readFiles": [
|
|
135
|
-
"design.md",
|
|
136
136
|
"tasks.md",
|
|
137
137
|
"change-meta.json"
|
|
138
138
|
],
|
|
@@ -141,7 +141,8 @@
|
|
|
141
141
|
],
|
|
142
142
|
"notes": [
|
|
143
143
|
"Write the failing test first",
|
|
144
|
-
"Do not change unrelated contracts in this task"
|
|
144
|
+
"Do not change unrelated contracts in this task",
|
|
145
|
+
"Do not generate execution context.md, checkpoint.json, review markdown, or AI-written process files"
|
|
145
146
|
]
|
|
146
147
|
},
|
|
147
148
|
"reviews": {
|
|
@@ -171,7 +172,7 @@
|
|
|
171
172
|
],
|
|
172
173
|
"metadata": {
|
|
173
174
|
"source": "tasks.md",
|
|
174
|
-
"generatedBy": "
|
|
175
|
+
"generatedBy": "cc-devflow task-contract",
|
|
175
176
|
"planVersion": 1
|
|
176
177
|
}
|
|
177
178
|
}
|
|
@@ -2,23 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## Hard Rules
|
|
4
4
|
|
|
5
|
-
1. `cc-plan` 默认只产出
|
|
6
|
-
2. clarification / brainstorm / review 结论必须并入 `planning/design.md
|
|
5
|
+
1. `cc-plan` 默认只产出 3 个文件:`planning/tasks.md`、CLI 生成的 `planning/task-manifest.json`、CLI 生成的 `change-meta.json`。
|
|
6
|
+
2. clarification / brainstorm / review 结论必须并入 `planning/tasks.md#Contract Summary`,不能再默认拆 `planning/design.md` 或独立文档。
|
|
7
7
|
3. 执行 handoff 必须写进 `planning/tasks.md` 顶部,不能依赖单独的 `context-package.md`。
|
|
8
8
|
4. `planning/task-manifest.json` 必须和 `planning/tasks.md` 同步,且能告诉 `cc-do` 当前任务是谁。
|
|
9
|
-
5. `planning/
|
|
9
|
+
5. `planning/tasks.md`、`planning/task-manifest.json` 必须记录来源版本链。
|
|
10
|
+
6. 机器态 JSON 必须由 `cc-devflow task-contract compile` / 模板 / validator 生成或更新;AI 不手写 `task-manifest.json` 或 `change-meta.json`。
|
|
10
11
|
6. 所有 SKILL 输出必须遵守 `docs/guides/artifact-contract.md`:状态只能有一个 owner,其它文件只能引用、投影或派生。
|
|
11
12
|
7. 计划里出现 placeholder 词,就说明还没想清楚。
|
|
12
13
|
8. 一次只推进一个澄清问题,不允许问题轰炸。
|
|
13
14
|
9. 推荐方案没获批前,不允许继续拆执行任务。
|
|
14
|
-
10. `planning/
|
|
15
|
+
10. `planning/tasks.md#Contract Summary` 通过 review gate 前,不允许宣称计划完成。
|
|
15
16
|
11. 如果来自 `roadmap`,planning 不得悄悄丢掉 source constraints / non-goals / success signal。
|
|
16
17
|
12. 每个计划必须先找 existing leverage,再决定新增实现;重复已有能力属于 planning 失败。
|
|
17
18
|
13. 同 blast radius 内的完整边界默认纳入,defer 必须写入 `NOT in scope` 和原因。
|
|
18
19
|
14. 如果推荐方案挑战用户原始方向,必须标成 `user challenge`,不能自动改写用户意图。
|
|
19
20
|
15. 行为变更的具体任务默认采用测试先行;没有 Red/Green/Refactor 链、spec-style test name、公共测试 seam、行为断言、mock 边界或 TDD exception,不允许交给 `cc-do`。
|
|
20
21
|
16. 新 change 目录必须通过 `cc-devflow next-change-key` 生成(不能手动心算编号),格式是 `REQ-<number>-<description>` 或 `FIX-<number>-<description>`;`REQ` 和 `FIX` 各自递增,跨前缀同号不是冲突;并行工作树造成同前缀同号时,完整 change key 靠描述区分业务内容。
|
|
21
|
-
17. 计划命名必须沿用项目 canonical language;术语或 capability spec / roadmap decision 冲突必须写入 `planning/
|
|
22
|
+
17. 计划命名必须沿用项目 canonical language;术语或 capability spec / roadmap decision 冲突必须写入 `planning/tasks.md#Contract Summary`,不能在任务里发明第二套语言。
|
|
22
23
|
18. 行为变更任务必须按 tracer bullet 垂直切片组织:一个可观察行为对应一组 Red/Green/Refactor 任务。
|
|
23
24
|
19. Red 任务必须通过公共接口、调用方流程、CLI/API/UI 路径或其它真实 seam 证明行为缺失。
|
|
24
25
|
20. Mock 只能发生在系统边界;mock 内部协作者、私有方法或调用次数属于测试设计失败。
|
|
@@ -31,9 +32,9 @@
|
|
|
31
32
|
27. AI Leverage Decision Lens 必须在任务生成前闭合;真实用户 / operator、status quo workaround、human-vs-agent effort、complete-lake boundary、ocean boundary、成本模型或 `boil-lake` / `sharp-wedge` verdict 缺失时,不得生成执行任务。`boil-lake` verdict 下不得退缩成 happy-path MVP。
|
|
32
33
|
28. review loop 必须有 attempt 上限和 stall reroute;不能靠无限 review 掩盖需求仍不清楚。
|
|
33
34
|
29. Roadmap Sync Gate 必须在退出前闭合:source RM 存在就回写 `devflow/roadmap.json` 并重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`;不存在就记录 no-op reason。
|
|
34
|
-
30. PRD-grade requirement brief 必须并入 `planning/
|
|
35
|
+
30. PRD-grade requirement brief 必须并入 `planning/tasks.md#Contract Summary`:用户视角问题、用户视角方案、actor / user stories、实现决策、测试决策、out-of-scope 和 further notes。默认不得额外产出 `PRD.md`。
|
|
35
36
|
31. 需要用户判断时必须使用固定 Decision Question:`D<N>`、证据、推荐、2-3 个互斥的 `A/B/C` 字母选项、影响和 STOP 都必须出现;禁止用自由问句或 `1/2/3` 数字选项代替审批 gate。
|
|
36
|
-
32. 所有用户决策必须写入 `planning/
|
|
37
|
+
32. 所有用户决策必须写入 `planning/tasks.md#Contract Summary` 的 `Decision Questions`,并同步到 `task-manifest.json.planningMeta.decisionQuestions`,不能只留在聊天里。
|
|
37
38
|
33. Deep Planning Funnel 必须在任务生成前闭合:requirement reality、system shape、interface/data contract、abstraction/encapsulation、execution architecture、task contract、final approval 都要记录状态、证据和 artifact impact。
|
|
38
39
|
34. 每个任务必须继承 funnel 结论形成 task contract:user story / edge story、文件职责、方法或接口、关键字段、输入输出、失败路径、验证方式和 AFK/HITL。没有 task contract 的任务不允许交给 `cc-do`。
|
|
39
40
|
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
- Completion command:调用 `mark-task-complete.sh`,同步 `planning/task-manifest.json` 与 `planning/tasks.md`
|
|
89
90
|
- Forbidden shortcuts:禁止手工改 checkbox、manifest status 或 `currentTaskId`
|
|
90
91
|
|
|
91
|
-
行为变更任务必须先有 `[TEST]` 红灯任务,再有 `[IMPL]` 绿灯任务,最后有 `[REFACTOR]` 或明确 refactor
|
|
92
|
+
行为变更任务必须先有 `[TEST]` 红灯任务,再有 `[IMPL]` 绿灯任务,最后有 `[REFACTOR]` 或明确 refactor gate。纯文档、纯配置、纯生成文件、throwaway prototype 可以例外,但必须写明原因、风险和替代验证。
|
|
92
93
|
不要把计划拆成水平层:一批测试、一批服务、一批 UI。每个切片完成后都应该能证明一个真实行为。
|
|
93
94
|
也不要把一批 Red 一次性写完再批量实现。每条 tracer bullet 只证明一个可观察行为,Green 只做当前红灯要求的最小实现;下一条 Red 可以吸收上一轮学到的事实,但不能越过冻结边界。
|
|
94
95
|
|
|
@@ -99,7 +100,8 @@
|
|
|
99
100
|
- task 选择来自 `currentTaskId` 或 `select-ready-tasks.sh`
|
|
100
101
|
- 每个 task 必须按模板字段完整展开,不能退化成标题清单
|
|
101
102
|
- 完成 task 必须调用 `mark-task-complete.sh`
|
|
102
|
-
- 脚本失败时修 evidence /
|
|
103
|
+
- 脚本失败时修 evidence / review gate / dependency state 后重跑,禁止手工绕过
|
|
104
|
+
- 禁止规划或要求生成执行过程文件:`execution/tasks/<task-id>/context.md`、`checkpoint.json`、review markdown 或其它 AI 手写过程文件都不是默认真相源;恢复只看代码、Git、`planning/tasks.md`、`task-manifest.json` 和 CLI 自动日志。
|
|
103
105
|
- completion command、required-before-completion 和 forbidden-shortcuts 写在 `planning/tasks.md` 的 task block;不得再写入 `task-manifest.json.executionProtocol` 或 `tasks[].completion`
|
|
104
106
|
- `task-manifest.json` 不写顶层 `status`、`activePhase`、`sourceRoadmap` 或 `spec`;整体完成度从 `tasks[].status` 派生,phase 从任务图派生,roadmap/spec 状态从 `change-meta.json` 和 `devflow/roadmap.json` 读取。
|
|
105
107
|
|
|
@@ -120,7 +122,7 @@
|
|
|
120
122
|
|
|
121
123
|
## Review Gate
|
|
122
124
|
|
|
123
|
-
`planning/
|
|
125
|
+
`planning/tasks.md#Contract Summary` 至少完成:
|
|
124
126
|
|
|
125
127
|
1. Placeholder scan
|
|
126
128
|
2. Consistency scan
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# CC-Review Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0 - 2026-05-13
|
|
4
|
+
|
|
5
|
+
- break default review output away from Markdown plan/report files and make `review-ledger.jsonl` the required durable record
|
|
6
|
+
- add CLI-first lifecycle guidance for `review start`, `record-node`, `add-finding`, `close`, and on-demand `render`
|
|
7
|
+
- rename optional machine outputs to `review-findings.json` and `review-agent-results.jsonl`, with legacy `cc-review-*` files retained only as fallback inputs
|
|
8
|
+
|
|
3
9
|
## 1.3.0
|
|
4
10
|
|
|
5
11
|
- Added a risk-lane review swarm profile for broad implementation and PR-landing reviews.
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
## Core Rules
|
|
15
15
|
|
|
16
16
|
1. 先判断 review 对象是计划、实现,还是混合。
|
|
17
|
-
2. 先读上一次 `cc-review` 的
|
|
18
|
-
3.
|
|
17
|
+
2. 先读上一次 `cc-review` 的 `review-ledger.jsonl` / `review-findings.json` / `review-agent-results.jsonl`,再看当前 git 或 artifact delta;旧 `cc-review-*` 文件只作 fallback。
|
|
18
|
+
3. 先用 `cc-devflow review start` 写入 `review-started` 事件,列出 Review 工具、节点、跳过理由和风险 lane。
|
|
19
19
|
4. 对适合独立审查的节点,优先派发只读 reviewer subAgent;没有工具时如实降级。
|
|
20
20
|
5. 复杂实现 diff 优先使用 intent/regression、security/privacy、performance/reliability、contracts/coverage 四类风险 lane;小 diff 可以合并但必须说明。
|
|
21
21
|
6. 按节点逐个 Review:review 一个、check 一个、ledger 记录一个。
|
|
@@ -30,15 +30,13 @@
|
|
|
30
30
|
15. 不允许固定只列 3 个问题;finding 数量由节点遍历和证据决定。
|
|
31
31
|
16. 输出前必须聚合 raw findings:合并重复,降级弱证据,拒收 speculative / out-of-scope / stale findings。
|
|
32
32
|
17. 发现计划合同错误,回 `cc-plan`;发现代码错误,回 `cc-do`;只差验收,进 `cc-check`。
|
|
33
|
-
18. 输出必须落到 `review/
|
|
33
|
+
18. 输出必须落到 `review/review-ledger.jsonl`,必要时补 `review/review-findings.json` / `review/review-agent-results.jsonl`;Markdown 报告只通过 `cc-devflow review render` 按需生成。
|
|
34
34
|
|
|
35
35
|
## Required Outputs
|
|
36
36
|
|
|
37
|
-
- `review/
|
|
38
|
-
- `review/
|
|
39
|
-
- `review/
|
|
40
|
-
- `review/cc-review-agent-results.jsonl` when subagent reviewers are used
|
|
41
|
-
- `review/cc-review-findings.json` when later agents need structured findings
|
|
37
|
+
- `review/review-ledger.jsonl`
|
|
38
|
+
- `review/review-agent-results.jsonl` when subagent reviewers are used
|
|
39
|
+
- `review/review-findings.json` when later agents need structured findings
|
|
42
40
|
|
|
43
41
|
## Local Kit
|
|
44
42
|
|
|
@@ -50,7 +48,7 @@
|
|
|
50
48
|
|
|
51
49
|
## Stateful Review Plan
|
|
52
50
|
|
|
53
|
-
`
|
|
51
|
+
`review-started` ledger event 必须至少包含:
|
|
54
52
|
|
|
55
53
|
- review mode:plan / implementation / mixed
|
|
56
54
|
- previous review state:上次 report、ledger、findings 是否存在
|
|
@@ -61,7 +59,7 @@
|
|
|
61
59
|
- risk lanes:implementation / mixed review 是否覆盖 intent-regression、security-privacy、performance-reliability、contracts-coverage
|
|
62
60
|
- node list:`R001`、`R002` ...,每个节点有 target、method、owner、evidence source、status
|
|
63
61
|
|
|
64
|
-
Review
|
|
62
|
+
Review 过程中每完成一个节点,就用 `cc-devflow review record-node` 追加一条 ledger;不要等最后一次性补记。
|
|
65
63
|
|
|
66
64
|
## SubAgent Review
|
|
67
65
|
|
|
@@ -70,7 +68,7 @@ Review 过程中每完成一个节点,就追加一条 ledger;不要等最后
|
|
|
70
68
|
调度规则:
|
|
71
69
|
|
|
72
70
|
- 大范围 / 多文件 / 多 facet review:至少尝试两个独立 reviewer。
|
|
73
|
-
- 小范围 review:至少尝试一个 combined reviewer,除非 `
|
|
71
|
+
- 小范围 review:至少尝试一个 combined reviewer,除非 `review-ledger.jsonl` 写明不需要。
|
|
74
72
|
- Plan 节点可分配 strategy、engineering、design、DX、TOC reviewer。
|
|
75
73
|
- Implementation 节点可分配 contract、smell、test、runtime reviewer。
|
|
76
74
|
- 复杂 implementation 节点优先按四类风险 lane 派发 reviewer:intent/regression、security/privacy、performance/reliability、contracts/coverage。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cc-review
|
|
3
|
-
version:
|
|
3
|
+
version: 2.0.0
|
|
4
4
|
description: Use when a complex requirement, bug fix, plan, or implementation diff needs optional deep multi-round review beyond cc-check. Builds a review plan from prior records and current git/artifact delta, dispatches independent read-only reviewer agents when available, applies a risk-lane review swarm profile for broad implementation diffs, records node results, identifies in-scope code smells, queues user decisions, and reroutes to cc-plan, cc-do, or cc-check.
|
|
5
5
|
triggers:
|
|
6
6
|
- 深度 review 这个方案
|
|
@@ -20,22 +20,17 @@ reads:
|
|
|
20
20
|
- references/e2e-and-plugin-verification.md
|
|
21
21
|
- scripts/collect-review-context.sh
|
|
22
22
|
writes:
|
|
23
|
-
- path: devflow/changes/<change-key>/review/
|
|
23
|
+
- path: devflow/changes/<change-key>/review/review-ledger.jsonl
|
|
24
24
|
durability: durable
|
|
25
25
|
required: true
|
|
26
|
-
- path: devflow/changes/<change-key>/review/
|
|
27
|
-
durability: durable
|
|
28
|
-
required: true
|
|
29
|
-
- path: devflow/changes/<change-key>/review/cc-review-ledger.jsonl
|
|
30
|
-
durability: durable
|
|
31
|
-
required: true
|
|
32
|
-
- path: devflow/changes/<change-key>/review/cc-review-agent-results.jsonl
|
|
26
|
+
- path: devflow/changes/<change-key>/review/review-findings.json
|
|
33
27
|
durability: durable
|
|
34
28
|
required: false
|
|
35
|
-
when:
|
|
36
|
-
- path: devflow/changes/<change-key>/review/
|
|
29
|
+
when: actionable findings need machine consumption
|
|
30
|
+
- path: devflow/changes/<change-key>/review/review-agent-results.jsonl
|
|
37
31
|
durability: durable
|
|
38
32
|
required: false
|
|
33
|
+
when: subagent reviewers are used
|
|
39
34
|
effects:
|
|
40
35
|
- optional deep review
|
|
41
36
|
- read-only reviewer agent dispatch
|
|
@@ -45,18 +40,18 @@ effects:
|
|
|
45
40
|
entry_gate:
|
|
46
41
|
- Read planning/design.md or planning/analysis.md when the work is still plan-stage.
|
|
47
42
|
- Read the current diff, task manifest, change metadata, and latest verification evidence when the work is execution-stage.
|
|
48
|
-
- Read prior
|
|
43
|
+
- Read prior `review-ledger.jsonl`, optional `review-findings.json`, optional `review-agent-results.jsonl`, and legacy `cc-review-*` files when present.
|
|
49
44
|
- Use git diff or scripts/collect-review-context.sh to identify content changed since the last review before deciding what to re-review.
|
|
50
45
|
- Classify the review branch as plan, implementation, or mixed before loading detailed references.
|
|
51
|
-
-
|
|
52
|
-
- Decide whether nodes need independent reviewer agents before starting node execution; record the decision in
|
|
53
|
-
- For broad implementation or mixed reviews, decide whether the risk-lane review swarm profile is required; record used, skipped, or unavailable lanes in
|
|
46
|
+
- Start the durable review with `cc-devflow review start` before producing findings; encode selected nodes, skipped nodes, risk lanes, scope, base SHA, and head SHA in the first ledger event.
|
|
47
|
+
- Decide whether nodes need independent reviewer agents before starting node execution; record the decision in the `review-started` event and optional `review-agent-results.jsonl`.
|
|
48
|
+
- For broad implementation or mixed reviews, decide whether the risk-lane review swarm profile is required; record used, skipped, or unavailable lanes in `review-ledger.jsonl`.
|
|
54
49
|
- Freeze the requested scope before finding smells; only report smells inside the requirement blast radius or clearly amplified by the current work.
|
|
55
50
|
exit_criteria:
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
51
|
+
- review-ledger.jsonl records selected tools, review nodes, skipped nodes with reasons, review order, and final route through CLI events.
|
|
52
|
+
- review-ledger.jsonl appends one record per reviewed node with status, evidence refs, findings, and follow-up route.
|
|
53
|
+
- review-agent-results.jsonl records read-only reviewer outputs when subagents are used, or the review ledger records why agents were unavailable or unnecessary.
|
|
54
|
+
- review-findings.json exists only when later agents need structured findings; human Markdown is rendered on demand with `cc-devflow review render`.
|
|
60
55
|
- Plan-stage reviews record every selected strategy/design/engineering/DX facet as checked, skipped, or blocked.
|
|
61
56
|
- Implementation-stage reviews include diff evidence, code-smell evidence, test and E2E/plugin verification evidence for every selected changed surface.
|
|
62
57
|
- Every in-scope code smell has a concrete recommendation or an explicit skip/defer rationale.
|
|
@@ -76,7 +71,7 @@ recovery_modes:
|
|
|
76
71
|
action: Stop the current pass, restate the correct branch classification, load the matching reference, and restart from the scope freeze.
|
|
77
72
|
- name: progressive-disclosure-reset
|
|
78
73
|
when: The review is drowning in unrelated methods or external review templates.
|
|
79
|
-
action: Return to
|
|
74
|
+
action: Return to the latest `review-started` event, keep only review nodes that are in scope, and continue node-by-node instead of collapsing to a short finding list.
|
|
80
75
|
tool_budget:
|
|
81
76
|
read_files: 24
|
|
82
77
|
search_steps: 16
|
|
@@ -97,7 +92,7 @@ tool_budget:
|
|
|
97
92
|
|
|
98
93
|
写入任何 durable Markdown 或 JSON metadata 前,先运行 `cc-devflow config resolve --format policy`。
|
|
99
94
|
|
|
100
|
-
- `Output language` 是机器约束,`review/
|
|
95
|
+
- `Output language` 是机器约束,`review/review-ledger.jsonl`、`review/review-findings.json` 和 on-demand rendered Markdown 中新增的人类可读摘要必须记录并遵守它。
|
|
101
96
|
- `agent_preferences` 是用户偏好建议,只影响表达方式和结构选择,不覆盖本 Skill 的 Review 边界。
|
|
102
97
|
- 如果配置解析失败,先修配置或向用户说明阻塞,不要用默认语言继续生成正式文档。
|
|
103
98
|
|
|
@@ -223,10 +218,10 @@ Low-confidence notes below `5` stay out of final findings unless they point to c
|
|
|
223
218
|
Every run follows this loop:
|
|
224
219
|
|
|
225
220
|
1. Collect prior review state:
|
|
226
|
-
- previous `
|
|
227
|
-
- previous `
|
|
228
|
-
- previous `
|
|
229
|
-
-
|
|
221
|
+
- previous `review-ledger.jsonl`
|
|
222
|
+
- previous `review-findings.json`
|
|
223
|
+
- previous `review-agent-results.jsonl`
|
|
224
|
+
- legacy `cc-review-plan.md` / `cc-review-report.md` / `cc-review-ledger.jsonl` / `cc-review-findings.json` only as fallback
|
|
230
225
|
2. Collect current delta:
|
|
231
226
|
- `git diff <last-reviewed-sha>...HEAD` when a reviewed SHA exists
|
|
232
227
|
- otherwise `git diff <base>...HEAD`
|
|
@@ -243,14 +238,12 @@ Every run follows this loop:
|
|
|
243
238
|
- which nodes need independent subagent review
|
|
244
239
|
- which nodes stay in main thread
|
|
245
240
|
- why any eligible reviewer was skipped
|
|
246
|
-
5.
|
|
247
|
-
- node
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
- check command or evidence source
|
|
253
|
-
- status: `pending`
|
|
241
|
+
5. Run `cc-devflow review start` before findings:
|
|
242
|
+
- selected node ids
|
|
243
|
+
- skipped nodes and reasons
|
|
244
|
+
- review mode and scope
|
|
245
|
+
- risk lanes
|
|
246
|
+
- base/head SHA
|
|
254
247
|
6. Traverse nodes one by one:
|
|
255
248
|
- review the node
|
|
256
249
|
- run the smallest useful check for that node
|
|
@@ -268,40 +261,23 @@ When re-reviewing the same file or plan, do not restart from zero. Compare curre
|
|
|
268
261
|
|
|
269
262
|
## Output Contract
|
|
270
263
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
1.
|
|
274
|
-
2.
|
|
275
|
-
3.
|
|
276
|
-
4.
|
|
277
|
-
5.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
Write `review/cc-review-report.md` with:
|
|
282
|
-
|
|
283
|
-
1. Review branch classification and scope.
|
|
284
|
-
2. Source artifacts read and prior review records used.
|
|
285
|
-
3. Current delta against previous review or base.
|
|
286
|
-
4. Review methods used and methods intentionally skipped.
|
|
287
|
-
5. Node coverage table.
|
|
288
|
-
6. Reviewer dispatch summary, risk-lane coverage, and agent result paths.
|
|
289
|
-
7. Raw finding triage: accepted, merged, downgraded, rejected.
|
|
290
|
-
8. Findings by severity, each with evidence, smell category when relevant, recommendation, and route.
|
|
291
|
-
9. Quick mechanical fixes that can be handled by `cc-do`.
|
|
292
|
-
10. Decision questions still needing user input.
|
|
293
|
-
11. E2E / Browser / Computer Use evidence when applicable.
|
|
294
|
-
12. Final next action.
|
|
295
|
-
|
|
296
|
-
Append one JSON line to `review/cc-review-ledger.jsonl` per reviewed node:
|
|
264
|
+
Use CLI records as the default durable output:
|
|
265
|
+
|
|
266
|
+
1. `cc-devflow review start --change <id> --change-key <key> --mode <plan|implementation|mixed> --scope <scope> --base-sha <sha> --head-sha <sha> --selected-node <node> --skipped-node <node:reason> --risk-lane <lane>`
|
|
267
|
+
2. `cc-devflow review record-node --review-id <id> --node-id <node> --target <artifact> --status checked|skipped|blocked --evidence-ref <ref> --finding <id> --next <skill>`
|
|
268
|
+
3. `cc-devflow review add-finding --review-id <id> --finding-id <id> --severity <level> --confidence <1-10> --display-tier <blocking|warning> --path <path> --evidence <evidence> --recommendation <text> --route <skill>`
|
|
269
|
+
4. `cc-devflow review close --review-id <id> --status clean|findings|blocked --blocking-count <n> --warning-count <n> --next <skill>`
|
|
270
|
+
5. `cc-devflow review render --review-id <id> --output <path>` only when a human Markdown report is explicitly needed.
|
|
271
|
+
|
|
272
|
+
Append one JSON line to `review/review-ledger.jsonl` per review event. A reviewed node event looks like:
|
|
297
273
|
|
|
298
274
|
```json
|
|
299
275
|
{"nodeId":"R001","status":"checked","target":"planning/design.md","tool":"engineering","headSha":"...","evidence":["..."],"findings":["F001"],"next":"cc-plan"}
|
|
300
276
|
```
|
|
301
277
|
|
|
302
|
-
Write `review/
|
|
278
|
+
Write `review/review-findings.json` only when findings need machine consumption by later agents.
|
|
303
279
|
|
|
304
|
-
Write `review/
|
|
280
|
+
Write `review/review-agent-results.jsonl` when subagents are used. It contains raw reviewer findings plus reviewer identity. The ledger or rendered report must say which raw findings were accepted, merged, downgraded, or rejected.
|
|
305
281
|
|
|
306
282
|
## Finding Rules
|
|
307
283
|
|
|
@@ -41,7 +41,7 @@ For broad or PR-landing diffs, prefer the risk-lane review swarm profile from `r
|
|
|
41
41
|
3. Performance and reliability
|
|
42
42
|
4. Contracts and coverage
|
|
43
43
|
|
|
44
|
-
The lanes may map onto the passes below, but they should stay separate in `
|
|
44
|
+
The lanes may map onto the passes below, but they should stay separate in `review-ledger.jsonl` and raw reviewer output when separate reviewers are used.
|
|
45
45
|
|
|
46
46
|
### 1. Contract Fidelity
|
|
47
47
|
|
|
@@ -57,7 +57,7 @@ Check whether implementation matches the frozen plan or investigation:
|
|
|
57
57
|
|
|
58
58
|
Use `review-methods.md` smell taxonomy.
|
|
59
59
|
|
|
60
|
-
If this pass finds duplication, over-complexity, awkward abstraction, branch forests, unclear ownership, or broad architecture cleanup risk, load `cc-simplify` and record it as a selected tool in `
|
|
60
|
+
If this pass finds duplication, over-complexity, awkward abstraction, branch forests, unclear ownership, or broad architecture cleanup risk, load `cc-simplify` and record it as a selected tool in `review-ledger.jsonl`.
|
|
61
61
|
|
|
62
62
|
Look for:
|
|
63
63
|
|
|
@@ -110,7 +110,7 @@ If changed behavior affects README, guides, CLI help, package install, public AP
|
|
|
110
110
|
Use git and prior review records:
|
|
111
111
|
|
|
112
112
|
1. Find changed files with `git diff <base>...HEAD --name-only`.
|
|
113
|
-
2. If prior `
|
|
113
|
+
2. If prior `review-ledger.jsonl` records a reviewed SHA, narrow to `git diff <reviewedSha>...HEAD`; fall back to legacy `cc-review-ledger.jsonl` only when needed.
|
|
114
114
|
3. Group changed files by behavior surface, not just extension.
|
|
115
115
|
4. Add dependent nodes for direct importers/callers when a shared helper, enum, state shape, API contract, or skill contract changes.
|
|
116
116
|
5. Preserve prior clean nodes only when the target file and dependent contract did not change.
|
|
@@ -136,7 +136,7 @@ If the user explicitly asks to fix findings in the same turn, switch to `cc-do`
|
|
|
136
136
|
|
|
137
137
|
## Output Requirements
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
Record in `review-ledger.jsonl` and render on-demand Markdown when a human report is needed:
|
|
140
140
|
|
|
141
141
|
- base branch and diff summary
|
|
142
142
|
- scope check
|
|
@@ -149,4 +149,4 @@ Add to `cc-review-report.md`:
|
|
|
149
149
|
- docs/DX notes
|
|
150
150
|
- final route
|
|
151
151
|
|
|
152
|
-
Write `
|
|
152
|
+
Write `review-findings.json` when there are actionable findings that later agents need to consume.
|
|
@@ -137,7 +137,7 @@ Each planning smell must become a plan finding and route to `cc-plan`.
|
|
|
137
137
|
|
|
138
138
|
## Output Requirements
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
Record in `review-ledger.jsonl` and render on-demand Markdown when a human report is needed:
|
|
141
141
|
|
|
142
142
|
- plan review nodes checked, skipped, or blocked
|
|
143
143
|
- plan reviewer agents used or fallback reason
|
|
@@ -4,7 +4,7 @@ Use this reference for every `cc-review` run. It defines the shared method libra
|
|
|
4
4
|
|
|
5
5
|
## Method Selection
|
|
6
6
|
|
|
7
|
-
Select every method needed by the current risk and write the selected methods into `
|
|
7
|
+
Select every method needed by the current risk and write the selected methods into the `review-started` event in `review-ledger.jsonl`. This table is a routing map, not a cap.
|
|
8
8
|
|
|
9
9
|
| Risk | Method |
|
|
10
10
|
| --- | --- |
|
|
@@ -53,7 +53,7 @@ Assignment rules:
|
|
|
53
53
|
|
|
54
54
|
- Assign independent reviewers by facet, not by random file chunks.
|
|
55
55
|
- Keep each reviewer packet self-contained: scope, delta, node ids, required artifacts, reference to use, and output schema.
|
|
56
|
-
- Do not ask one reviewer to wait for another reviewer result unless the dependency is explicit in `
|
|
56
|
+
- Do not ask one reviewer to wait for another reviewer result unless the dependency is explicit in `review-ledger.jsonl`.
|
|
57
57
|
- Do not assign two reviewers to the same node unless a critical finding needs a second opinion.
|
|
58
58
|
- Main thread validates reviewer evidence before final findings.
|
|
59
59
|
|
|
@@ -66,7 +66,7 @@ downgraded -> real note but not blocking or confidence too low
|
|
|
66
66
|
rejected -> out-of-scope, stale, speculative, or contradicted by evidence
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Record these states in `
|
|
69
|
+
Record these states in `review-ledger.jsonl` or on-demand rendered Markdown and preserve raw reviewer output in `review-agent-results.jsonl`.
|
|
70
70
|
|
|
71
71
|
## Risk-Lane Review Swarm Profile
|
|
72
72
|
|
|
@@ -93,7 +93,7 @@ The main thread owns aggregation:
|
|
|
93
93
|
|
|
94
94
|
Use git and prior records to avoid repeating stale work:
|
|
95
95
|
|
|
96
|
-
1. Find the previous reviewed SHA from `cc-review-ledger.jsonl` or `cc-review-report.md`.
|
|
96
|
+
1. Find the previous reviewed SHA from `review-ledger.jsonl`, falling back to legacy `cc-review-ledger.jsonl` or `cc-review-report.md`.
|
|
97
97
|
2. Compare `git diff <previous-sha>...HEAD` when possible.
|
|
98
98
|
3. If no previous SHA exists, compare against the base branch or reviewed artifact timestamps.
|
|
99
99
|
4. Re-review changed nodes and dependent nodes.
|