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
|
@@ -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
|
- Requirement ID:
|
|
10
11
|
- Design mode: `full-design`
|
|
@@ -19,6 +20,13 @@
|
|
|
19
20
|
- Date:
|
|
20
21
|
- Owner:
|
|
21
22
|
|
|
23
|
+
## Progressive Disclosure Index
|
|
24
|
+
|
|
25
|
+
- Default read: Requirement Snapshot, Approved Direction, Validation Strategy, Roadmap Sync Gate.
|
|
26
|
+
- Open for scope/design questions: Source Handoff, Options Considered, Design, Implementation Surface Map.
|
|
27
|
+
- Open for trust/conflict questions: Source Trust Boundary, External Document Conflicts, Domain Language & Durable Decisions.
|
|
28
|
+
- Open for audit/recovery: Project Postmortem Recall, Review Gate, Bounded Review Loop, Decision Questions, Risks.
|
|
29
|
+
|
|
22
30
|
## Source Handoff
|
|
23
31
|
|
|
24
32
|
- Source stage:
|
|
@@ -55,6 +63,20 @@
|
|
|
55
63
|
- Gate verdict: `pass` | `blocked`
|
|
56
64
|
- Blocked question if any:
|
|
57
65
|
|
|
66
|
+
## Deep Planning Funnel
|
|
67
|
+
|
|
68
|
+
| Round | Decision focus | Confirmed answer | Evidence / user answer | Status | Artifact impact |
|
|
69
|
+
|-------|----------------|------------------|------------------------|--------|-----------------|
|
|
70
|
+
| Requirement Reality | user / operator, pain, status quo, success, non-goals | | | confirmed / auto-decided / blocked / not-applicable | Requirement Snapshot / PRD brief |
|
|
71
|
+
| System Shape | current codepath, module ownership, state/data flow, invariants | | | confirmed / auto-decided / blocked / not-applicable | Design / File Plan |
|
|
72
|
+
| Interface & Data Contract | callers, inputs, outputs, key fields, errors, permissions, categories | | | confirmed / auto-decided / blocked / not-applicable | Interface Contract / Validation Strategy |
|
|
73
|
+
| Abstraction & Encapsulation | hidden complexity, rejected abstractions, public vs private methods, branch elimination | | | confirmed / auto-decided / blocked / not-applicable | Interface / Deep Module Check |
|
|
74
|
+
| Execution Architecture | foundation/core/integration/polish decisions, failure recovery, distribution | | | confirmed / auto-decided / blocked / not-applicable | Implementation Decision Horizon |
|
|
75
|
+
| Task Contract | tracer bullets, Red/Green/Refactor, AFK/HITL, 2-5 min grain, completion script | | | confirmed / auto-decided / blocked / not-applicable | planning/tasks.md / task-manifest.json |
|
|
76
|
+
| Final Approval | approved direction and task contract summary | | | confirmed / blocked | Approval |
|
|
77
|
+
|
|
78
|
+
> 如果某轮是 `blocked`,停止生成任务。先问一个 blocked question、拆分需求,或记录用户明确接受的 HITL 边界。
|
|
79
|
+
|
|
58
80
|
## External Document Conflicts
|
|
59
81
|
|
|
60
82
|
| Source | Bucket | Conflict | Resolution / blocker |
|
|
@@ -101,6 +123,28 @@
|
|
|
101
123
|
- Changes to options / tasks:
|
|
102
124
|
- Skipped reason:
|
|
103
125
|
|
|
126
|
+
## Project Postmortem Recall
|
|
127
|
+
|
|
128
|
+
- Search status: `no-project-postmortems-yet` | `searched-no-match` | `matches-found`
|
|
129
|
+
- Search command:
|
|
130
|
+
- Search terms:
|
|
131
|
+
- Sources opened:
|
|
132
|
+
- `devflow/postmortems/INDEX.md`
|
|
133
|
+
- `devflow/postmortems/principles.md`
|
|
134
|
+
- `devflow/postmortems/incidents/<date>-<change-key>.md`
|
|
135
|
+
- Matching incidents:
|
|
136
|
+
- Matching principles:
|
|
137
|
+
- Relevant Git evidence:
|
|
138
|
+
- Planning impact:
|
|
139
|
+
- Scope impact:
|
|
140
|
+
- Test seam impact:
|
|
141
|
+
- Verification impact:
|
|
142
|
+
- Files / surfaces to avoid:
|
|
143
|
+
- Review gate impact:
|
|
144
|
+
- No-op reason:
|
|
145
|
+
|
|
146
|
+
> 尸检报告先做检索提醒,再做深读。只有标签、模块、失败类或模型风险匹配时,才打开具体 incident。
|
|
147
|
+
|
|
104
148
|
## Capability Handoff
|
|
105
149
|
|
|
106
150
|
- Canonical capability spec:
|
|
@@ -231,6 +275,22 @@
|
|
|
231
275
|
|
|
232
276
|
> 新增或改动公共接口时,优先小接口深模块。若有两个合理形态,写清为什么没有选择另一个。
|
|
233
277
|
|
|
278
|
+
## Interface & Data Contract
|
|
279
|
+
|
|
280
|
+
| Surface | Caller / owner | Method or operation | Input fields | Output fields | Error shape | Category / type source | Compatibility / migration |
|
|
281
|
+
|---------|----------------|---------------------|--------------|---------------|-------------|------------------------|---------------------------|
|
|
282
|
+
| | | | | | | repo term / new term / user term | |
|
|
283
|
+
|
|
284
|
+
> 关键字段、方法、分类和错误形态必须在这里冻结。没有进入这张表的接口细节,不能在 `cc-do` 阶段临场发明。
|
|
285
|
+
|
|
286
|
+
## Abstraction & Encapsulation Contract
|
|
287
|
+
|
|
288
|
+
| Decision | Keep public | Keep private | Complexity hidden in | Rejected abstraction | Branches eliminated |
|
|
289
|
+
|----------|-------------|--------------|----------------------|----------------------|---------------------|
|
|
290
|
+
| | | | | | |
|
|
291
|
+
|
|
292
|
+
> 好计划不是把 if/else 分发给执行者,而是提前决定哪些特殊情况应被设计消除。
|
|
293
|
+
|
|
234
294
|
## Interface Testability Check
|
|
235
295
|
|
|
236
296
|
| Surface | Dependency shape | Result shape | Boundary adapter shape | Test setup complexity | Decision |
|
|
@@ -301,6 +361,14 @@
|
|
|
301
361
|
- Manual:
|
|
302
362
|
- Observability / evidence:
|
|
303
363
|
|
|
364
|
+
## Task Contract Preview
|
|
365
|
+
|
|
366
|
+
| Task | User / edge story | File responsibility | Method / interface | Key fields | Input / output | Failure path | Verification | AFK / HITL |
|
|
367
|
+
|------|-------------------|---------------------|--------------------|------------|----------------|--------------|--------------|------------|
|
|
368
|
+
| T001 | | | | | | | | AFK / HITL |
|
|
369
|
+
|
|
370
|
+
> 这里是 `planning/tasks.md` 和 `task-manifest.json.tasks[].contract` 的来源。前面问过但这里没落盘,就等于没问。
|
|
371
|
+
|
|
304
372
|
## Test Coverage Map
|
|
305
373
|
|
|
306
374
|
| Code path / user flow | Public seam | Public verification path | Behavior asserted | One logical behavior? | Existing coverage | Quality | Required test | Level | Mock boundary | Implementation-detail risk | Regression? |
|
package/.claude/skills/cc-plan/assets/{TINY_DESIGN_TEMPLATE.md → legacy/TINY_DESIGN_TEMPLATE.md}
RENAMED
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
- Primary capability:
|
|
17
17
|
- Secondary capabilities:
|
|
18
18
|
|
|
19
|
+
## Progressive Disclosure Index
|
|
20
|
+
|
|
21
|
+
- Default read: Frozen Design Card, Validation, Main Risk, Approval.
|
|
22
|
+
- Open for scope questions: Source Handoff, Capability Handoff, Implementation Surface Map.
|
|
23
|
+
- Open for trust/conflict questions: Source Trust Boundary, External Document Conflicts, Domain Language & Decisions.
|
|
24
|
+
- Open for audit/recovery: Project Postmortem Recall, Review Gate, Bounded Review Loop, Decision Questions.
|
|
25
|
+
|
|
19
26
|
## Source Handoff
|
|
20
27
|
|
|
21
28
|
- Why now:
|
|
@@ -42,6 +49,20 @@
|
|
|
42
49
|
- Gate verdict: `pass` | `blocked`
|
|
43
50
|
- Blocked question if any:
|
|
44
51
|
|
|
52
|
+
## Deep Planning Funnel
|
|
53
|
+
|
|
54
|
+
| Round | Confirmed answer | Evidence / user answer | Status | Artifact impact |
|
|
55
|
+
|-------|------------------|------------------------|--------|-----------------|
|
|
56
|
+
| Requirement Reality | | | confirmed / auto-decided / blocked / not-applicable | Frozen Design Card |
|
|
57
|
+
| System Shape | | | confirmed / auto-decided / blocked / not-applicable | Implementation Surface Map |
|
|
58
|
+
| Interface & Data Contract | | | confirmed / auto-decided / blocked / not-applicable | Interface Shape / Validation |
|
|
59
|
+
| Abstraction & Encapsulation | | | confirmed / auto-decided / blocked / not-applicable | Interface Shape |
|
|
60
|
+
| Execution Architecture | | | confirmed / auto-decided / blocked / not-applicable | Validation / Roadmap Sync Gate |
|
|
61
|
+
| Task Contract | | | confirmed / auto-decided / blocked / not-applicable | planning/tasks.md / task-manifest.json |
|
|
62
|
+
| Final Approval | | | confirmed / blocked | Approval |
|
|
63
|
+
|
|
64
|
+
> tiny-design 也必须把关键确认落盘。若出现新接口、字段、状态机或跨模块决策,优先升级 `full-design`。
|
|
65
|
+
|
|
45
66
|
## External Document Conflicts
|
|
46
67
|
|
|
47
68
|
- Auto-resolved:
|
|
@@ -76,6 +97,19 @@
|
|
|
76
97
|
- Changes to frozen design:
|
|
77
98
|
- Skipped reason:
|
|
78
99
|
|
|
100
|
+
## Project Postmortem Recall
|
|
101
|
+
|
|
102
|
+
- Search status: `no-project-postmortems-yet` | `searched-no-match` | `matches-found`
|
|
103
|
+
- Search command:
|
|
104
|
+
- Search terms:
|
|
105
|
+
- Sources opened:
|
|
106
|
+
- Matching incidents:
|
|
107
|
+
- Matching principles:
|
|
108
|
+
- Planning impact:
|
|
109
|
+
- No-op reason:
|
|
110
|
+
|
|
111
|
+
> tiny-design 也必须查尸检报告。越小的改动越容易让模型凭直觉重复旧错误。
|
|
112
|
+
|
|
79
113
|
## Capability Handoff
|
|
80
114
|
|
|
81
115
|
- Canonical capability spec:
|
|
@@ -121,9 +155,15 @@
|
|
|
121
155
|
|
|
122
156
|
- Callers:
|
|
123
157
|
- Public operations:
|
|
158
|
+
- Methods / operations:
|
|
159
|
+
- Key fields:
|
|
160
|
+
- Input / output:
|
|
161
|
+
- Error shape:
|
|
162
|
+
- Category / type source:
|
|
124
163
|
- Complexity hidden:
|
|
125
164
|
- Misuse risk:
|
|
126
165
|
- Why this stays simple:
|
|
166
|
+
- Rejected abstraction:
|
|
127
167
|
|
|
128
168
|
## Interface Testability
|
|
129
169
|
|
|
@@ -154,13 +194,19 @@
|
|
|
154
194
|
- Tracer bullet order:
|
|
155
195
|
- Green implementation check:
|
|
156
196
|
- Green minimality guard:
|
|
157
|
-
- Refactor
|
|
197
|
+
- Refactor gate:
|
|
158
198
|
- Refactor candidates:
|
|
159
199
|
- TDD exceptions:
|
|
160
200
|
- Regression test required:
|
|
161
201
|
- Primary check:
|
|
162
202
|
- Secondary checks:
|
|
163
203
|
|
|
204
|
+
## Task Contract Preview
|
|
205
|
+
|
|
206
|
+
| Task | User / edge story | File responsibility | Method / interface | Key fields | Failure path | Verification | AFK / HITL |
|
|
207
|
+
|------|-------------------|---------------------|--------------------|------------|--------------|--------------|------------|
|
|
208
|
+
| T001 | | | | | | | AFK / HITL |
|
|
209
|
+
|
|
164
210
|
## Roadmap Sync Gate
|
|
165
211
|
|
|
166
212
|
- Source RM:
|
|
@@ -2,37 +2,40 @@
|
|
|
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`、`planning/task-manifest.json`、`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/
|
|
10
|
-
6.
|
|
11
|
-
7.
|
|
12
|
-
8.
|
|
13
|
-
9.
|
|
14
|
-
10.
|
|
15
|
-
11.
|
|
16
|
-
12.
|
|
17
|
-
13.
|
|
18
|
-
14.
|
|
19
|
-
15.
|
|
20
|
-
16.
|
|
21
|
-
17.
|
|
22
|
-
18. Red
|
|
23
|
-
19.
|
|
24
|
-
20.
|
|
25
|
-
21.
|
|
26
|
-
22.
|
|
27
|
-
23.
|
|
28
|
-
24.
|
|
29
|
-
25.
|
|
30
|
-
26.
|
|
31
|
-
27.
|
|
32
|
-
28.
|
|
33
|
-
29.
|
|
34
|
-
30.
|
|
35
|
-
31.
|
|
9
|
+
5. `planning/tasks.md`、`planning/task-manifest.json` 必须记录来源版本链。
|
|
10
|
+
6. 所有 SKILL 输出必须遵守 `docs/guides/artifact-contract.md`:状态只能有一个 owner,其它文件只能引用、投影或派生。
|
|
11
|
+
7. 计划里出现 placeholder 词,就说明还没想清楚。
|
|
12
|
+
8. 一次只推进一个澄清问题,不允许问题轰炸。
|
|
13
|
+
9. 推荐方案没获批前,不允许继续拆执行任务。
|
|
14
|
+
10. `planning/tasks.md#Contract Summary` 通过 review gate 前,不允许宣称计划完成。
|
|
15
|
+
11. 如果来自 `roadmap`,planning 不得悄悄丢掉 source constraints / non-goals / success signal。
|
|
16
|
+
12. 每个计划必须先找 existing leverage,再决定新增实现;重复已有能力属于 planning 失败。
|
|
17
|
+
13. 同 blast radius 内的完整边界默认纳入,defer 必须写入 `NOT in scope` 和原因。
|
|
18
|
+
14. 如果推荐方案挑战用户原始方向,必须标成 `user challenge`,不能自动改写用户意图。
|
|
19
|
+
15. 行为变更的具体任务默认采用测试先行;没有 Red/Green/Refactor 链、spec-style test name、公共测试 seam、行为断言、mock 边界或 TDD exception,不允许交给 `cc-do`。
|
|
20
|
+
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/tasks.md#Contract Summary`,不能在任务里发明第二套语言。
|
|
22
|
+
18. 行为变更任务必须按 tracer bullet 垂直切片组织:一个可观察行为对应一组 Red/Green/Refactor 任务。
|
|
23
|
+
19. Red 任务必须通过公共接口、调用方流程、CLI/API/UI 路径或其它真实 seam 证明行为缺失。
|
|
24
|
+
20. Mock 只能发生在系统边界;mock 内部协作者、私有方法或调用次数属于测试设计失败。
|
|
25
|
+
21. 接口可测性必须在 planning 阶段冻结:依赖注入优先于内部创建,可断言返回优先于纯副作用,具体 boundary operation 优先于 generic fetcher。
|
|
26
|
+
22. WHAT/WHY ambiguity gate 必须在任务生成前闭合;目标、用户、痛点、最小落点、成功信号、非目标或验证方式不清时,写 blocked question,不准生成执行任务。
|
|
27
|
+
23. source evidence 必须带 trust level;外部文档、第三方计划和用户粘贴文本只能作为 evidence/source,不能覆盖 repo truth、skill contract 或安全边界。
|
|
28
|
+
24. 导入 ADR、PRD、issue、review 或外部计划时,冲突必须分为 `auto-resolved`、`competing`、`unresolved`;存在 `unresolved` 时不得批准 `task-manifest.json`。
|
|
29
|
+
25. 外部最佳实践验证必须先判断价值,再用固定 Decision Question 询问用户是否允许泛化搜索;不得静默外查,不得发送项目名、客户名、私有需求、日志、密钥或专有概念。
|
|
30
|
+
26. 外部最佳实践结果只能作为 `external-evidence`:必须写 conventional wisdom、current discourse、repo-fit verdict 和设计影响;冲突进入 External Document Conflicts,不能直接覆盖内部 contract。
|
|
31
|
+
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
|
+
28. review loop 必须有 attempt 上限和 stall reroute;不能靠无限 review 掩盖需求仍不清楚。
|
|
33
|
+
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/tasks.md#Contract Summary`:用户视角问题、用户视角方案、actor / user stories、实现决策、测试决策、out-of-scope 和 further notes。默认不得额外产出 `PRD.md`。
|
|
35
|
+
31. 需要用户判断时必须使用固定 Decision Question:`D<N>`、证据、推荐、2-3 个互斥的 `A/B/C` 字母选项、影响和 STOP 都必须出现;禁止用自由问句或 `1/2/3` 数字选项代替审批 gate。
|
|
36
|
+
32. 所有用户决策必须写入 `planning/tasks.md#Contract Summary` 的 `Decision Questions`,并同步到 `task-manifest.json.planningMeta.decisionQuestions`,不能只留在聊天里。
|
|
37
|
+
33. Deep Planning Funnel 必须在任务生成前闭合:requirement reality、system shape、interface/data contract、abstraction/encapsulation、execution architecture、task contract、final approval 都要记录状态、证据和 artifact impact。
|
|
38
|
+
34. 每个任务必须继承 funnel 结论形成 task contract:user story / edge story、文件职责、方法或接口、关键字段、输入输出、失败路径、验证方式和 AFK/HITL。没有 task contract 的任务不允许交给 `cc-do`。
|
|
36
39
|
|
|
37
40
|
## Design Modes
|
|
38
41
|
|
|
@@ -58,7 +61,16 @@
|
|
|
58
61
|
每个任务至少写清:
|
|
59
62
|
|
|
60
63
|
- 目标
|
|
64
|
+
- source funnel rounds
|
|
61
65
|
- 对应 user story / edge story
|
|
66
|
+
- 文件职责
|
|
67
|
+
- 方法或接口
|
|
68
|
+
- 关键字段
|
|
69
|
+
- 输入输出
|
|
70
|
+
- 失败路径
|
|
71
|
+
- AFK / HITL
|
|
72
|
+
- do-not-re-decide items
|
|
73
|
+
- artifact updates
|
|
62
74
|
- TDD phase:`red` / `green` / `refactor` / `exception`
|
|
63
75
|
- Vertical slice / tracer bullet
|
|
64
76
|
- Spec-style test name
|
|
@@ -76,18 +88,21 @@
|
|
|
76
88
|
- Completion command:调用 `mark-task-complete.sh`,同步 `planning/task-manifest.json` 与 `planning/tasks.md`
|
|
77
89
|
- Forbidden shortcuts:禁止手工改 checkbox、manifest status 或 `currentTaskId`
|
|
78
90
|
|
|
79
|
-
行为变更任务必须先有 `[TEST]` 红灯任务,再有 `[IMPL]` 绿灯任务,最后有 `[REFACTOR]` 或明确 refactor
|
|
91
|
+
行为变更任务必须先有 `[TEST]` 红灯任务,再有 `[IMPL]` 绿灯任务,最后有 `[REFACTOR]` 或明确 refactor gate。纯文档、纯配置、纯生成文件、throwaway prototype 可以例外,但必须写明原因、风险和替代验证。
|
|
80
92
|
不要把计划拆成水平层:一批测试、一批服务、一批 UI。每个切片完成后都应该能证明一个真实行为。
|
|
81
93
|
也不要把一批 Red 一次性写完再批量实现。每条 tracer bullet 只证明一个可观察行为,Green 只做当前红灯要求的最小实现;下一条 Red 可以吸收上一轮学到的事实,但不能越过冻结边界。
|
|
82
94
|
|
|
83
95
|
## Execution Protocol Fields
|
|
84
96
|
|
|
85
|
-
`planning/tasks.md` 必须有 `Execution Protocol`
|
|
97
|
+
`planning/tasks.md` 必须有 `Execution Protocol` 区块。`planning/task-manifest.json` 不再复制这段协议;它只保留执行图和调度状态,避免把同一条 shell 命令复制进全局 metadata 和每个 task。
|
|
86
98
|
|
|
87
99
|
- task 选择来自 `currentTaskId` 或 `select-ready-tasks.sh`
|
|
88
100
|
- 每个 task 必须按模板字段完整展开,不能退化成标题清单
|
|
89
101
|
- 完成 task 必须调用 `mark-task-complete.sh`
|
|
90
|
-
- 脚本失败时修 evidence /
|
|
102
|
+
- 脚本失败时修 evidence / review gate / dependency state 后重跑,禁止手工绕过
|
|
103
|
+
- 禁止规划或要求生成执行过程文件:`execution/tasks/<task-id>/context.md`、`checkpoint.json`、review markdown 或其它 AI 手写过程文件都不是默认真相源;恢复只看代码、Git、`planning/tasks.md`、`task-manifest.json` 和 CLI 自动日志。
|
|
104
|
+
- completion command、required-before-completion 和 forbidden-shortcuts 写在 `planning/tasks.md` 的 task block;不得再写入 `task-manifest.json.executionProtocol` 或 `tasks[].completion`
|
|
105
|
+
- `task-manifest.json` 不写顶层 `status`、`activePhase`、`sourceRoadmap` 或 `spec`;整体完成度从 `tasks[].status` 派生,phase 从任务图派生,roadmap/spec 状态从 `change-meta.json` 和 `devflow/roadmap.json` 读取。
|
|
91
106
|
|
|
92
107
|
## Decision Question Fields
|
|
93
108
|
|
|
@@ -106,7 +121,7 @@
|
|
|
106
121
|
|
|
107
122
|
## Review Gate
|
|
108
123
|
|
|
109
|
-
`planning/
|
|
124
|
+
`planning/tasks.md#Contract Summary` 至少完成:
|
|
110
125
|
|
|
111
126
|
1. Placeholder scan
|
|
112
127
|
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.
|