cc-devflow 4.5.6 → 4.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/cc-act/CHANGELOG.md +6 -0
- package/.claude/skills/cc-act/PLAYBOOK.md +11 -2
- package/.claude/skills/cc-act/SKILL.md +17 -7
- package/.claude/skills/cc-act/references/closure-contract.md +4 -0
- package/.claude/skills/cc-act/scripts/{archive-requirement.sh → archive-change.sh} +7 -7
- package/.claude/skills/cc-act/scripts/detect-ship-target.sh +27 -0
- package/.claude/skills/cc-act/scripts/ensure-ship-branch.sh +93 -0
- package/.claude/skills/cc-act/scripts/generate-status-report.sh +6 -0
- package/.claude/skills/cc-act/scripts/render-pr-brief.sh +6 -0
- package/.claude/skills/cc-act/scripts/sync-act-docs.sh +14 -0
- package/.claude/skills/cc-dev/CHANGELOG.md +5 -0
- package/.claude/skills/cc-dev/PLAYBOOK.md +63 -0
- package/.claude/skills/cc-dev/SKILL.md +168 -0
- package/.claude/skills/cc-do/CHANGELOG.md +6 -0
- package/.claude/skills/cc-do/SKILL.md +23 -1
- package/.claude/skills/cc-investigate/CHANGELOG.md +5 -0
- package/.claude/skills/cc-investigate/SKILL.md +2 -2
- package/.claude/skills/cc-next/CHANGELOG.md +5 -0
- package/.claude/skills/cc-next/PLAYBOOK.md +52 -0
- package/.claude/skills/cc-next/SKILL.md +161 -0
- package/.claude/skills/cc-plan/CHANGELOG.md +28 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +20 -17
- package/.claude/skills/cc-plan/SKILL.md +135 -21
- package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +42 -0
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +28 -0
- package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +84 -2
- package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +30 -0
- package/.claude/skills/cc-plan/references/planning-contract.md +31 -15
- package/.claude/skills/cc-plan/scripts/next-change-key.sh +78 -0
- package/.claude/skills/cc-pr-land/CHANGELOG.md +5 -0
- package/.claude/skills/cc-pr-land/PLAYBOOK.md +45 -0
- package/.claude/skills/cc-pr-land/SKILL.md +157 -0
- package/.claude/skills/cc-pr-review/CHANGELOG.md +5 -0
- package/.claude/skills/cc-pr-review/PLAYBOOK.md +46 -0
- package/.claude/skills/cc-pr-review/SKILL.md +142 -0
- package/.claude/skills/cc-review/CHANGELOG.md +28 -0
- package/.claude/skills/cc-review/PLAYBOOK.md +108 -0
- package/.claude/skills/cc-review/SKILL.md +340 -0
- package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +85 -0
- package/.claude/skills/cc-review/references/implementation-review-branch.md +152 -0
- package/.claude/skills/cc-review/references/plan-review-branch.md +151 -0
- package/.claude/skills/cc-review/references/review-methods.md +221 -0
- package/.claude/skills/cc-review/scripts/collect-review-context.sh +80 -0
- package/.claude/skills/cc-roadmap/CHANGELOG.md +6 -0
- package/.claude/skills/cc-roadmap/SKILL.md +102 -8
- package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +3 -0
- package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +23 -0
- package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +20 -1
- package/.claude/skills/cc-roadmap/references/roadmap-dialogue.md +28 -13
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/markdown.js +18 -0
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/schema.js +8 -0
- package/.claude/skills/cc-simplify/CHANGELOG.md +6 -0
- package/.claude/skills/cc-simplify/SKILL.md +19 -8
- package/CHANGELOG.md +16 -0
- package/README.md +58 -4
- package/README.zh-CN.md +58 -4
- package/bin/cc-devflow-cli.js +119 -0
- package/config/distributable-skills.json +10 -0
- package/docs/assets/cc-devflow-pr-harness-en.svg +153 -0
- package/docs/assets/cc-devflow-pr-harness-zh.svg +152 -0
- package/docs/assets/wechat-group-qr.jpg +0 -0
- package/docs/examples/example-bindings.json +11 -6
- package/docs/examples/full-design-blocked/BACKLOG.md +1 -1
- package/docs/examples/full-design-blocked/README.md +1 -1
- package/docs/examples/full-design-blocked/ROADMAP.md +16 -1
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +36 -3
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +604 -76
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +46 -1
- package/docs/examples/full-design-blocked/roadmap.json +18 -2
- package/docs/examples/local-handoff/BACKLOG.md +1 -1
- package/docs/examples/local-handoff/README.md +1 -1
- package/docs/examples/local-handoff/ROADMAP.md +16 -1
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +27 -1
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +366 -44
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +36 -1
- package/docs/examples/local-handoff/roadmap.json +16 -2
- package/docs/examples/pdca-loop/BACKLOG.md +1 -1
- package/docs/examples/pdca-loop/README.md +1 -1
- package/docs/examples/pdca-loop/ROADMAP.md +16 -1
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +27 -1
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +259 -14
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +36 -1
- package/docs/examples/pdca-loop/roadmap.json +16 -2
- package/docs/examples/scripts/check-example-bindings.sh +21 -1
- package/docs/guides/getting-started.md +12 -9
- package/docs/guides/getting-started.zh-CN.md +12 -9
- package/lib/skill-runtime/__tests__/archive-change.test.js +124 -0
- package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +1 -0
- package/lib/skill-runtime/__tests__/paths.test.js +81 -1
- package/lib/skill-runtime/archive-change.js +64 -0
- package/lib/skill-runtime/paths.js +32 -0
- package/package.json +7 -1
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Implementation Review Branch
|
|
2
|
+
|
|
3
|
+
Use this reference when the review target is code, tests, docs, UI behavior, or a current branch diff.
|
|
4
|
+
|
|
5
|
+
## Intake
|
|
6
|
+
|
|
7
|
+
Read, in order:
|
|
8
|
+
|
|
9
|
+
1. current branch and base branch
|
|
10
|
+
2. `git diff <base>...HEAD --stat`
|
|
11
|
+
3. full diff for changed files
|
|
12
|
+
4. `planning/design.md` or `planning/analysis.md`
|
|
13
|
+
5. `planning/tasks.md` and `planning/task-manifest.json`
|
|
14
|
+
6. changed code plus direct importers/callers for enum, state, API, and behavior changes
|
|
15
|
+
|
|
16
|
+
If no plan exists, infer intent from user request, commits, TODOs, and PR body if present. Mark intent confidence.
|
|
17
|
+
|
|
18
|
+
## Scope Check
|
|
19
|
+
|
|
20
|
+
Produce:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
Scope Check: CLEAN | DRIFT DETECTED | REQUIREMENTS MISSING
|
|
24
|
+
Intent: ...
|
|
25
|
+
Delivered: ...
|
|
26
|
+
Diff surface: ...
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Out-of-scope files are findings only when they change behavior or expand blast radius.
|
|
30
|
+
|
|
31
|
+
## Diff Review Passes
|
|
32
|
+
|
|
33
|
+
Turn these passes into review nodes before reporting findings. Every changed file, public behavior, test surface, documentation surface, and UI/runtime flow must belong to a node or have a skip reason.
|
|
34
|
+
|
|
35
|
+
For complex diffs, assign independent read-only reviewers by facet: contract, smell, test, docs/DX, and runtime. Keep reviewer outputs separate until the main thread validates evidence and merges duplicates.
|
|
36
|
+
|
|
37
|
+
For broad or PR-landing diffs, prefer the risk-lane review swarm profile from `review-methods.md` before reporting findings:
|
|
38
|
+
|
|
39
|
+
1. Intent and regression
|
|
40
|
+
2. Security and privacy
|
|
41
|
+
3. Performance and reliability
|
|
42
|
+
4. Contracts and coverage
|
|
43
|
+
|
|
44
|
+
The lanes may map onto the passes below, but they should stay separate in `cc-review-plan.md` and raw reviewer output when separate reviewers are used.
|
|
45
|
+
|
|
46
|
+
### 1. Contract Fidelity
|
|
47
|
+
|
|
48
|
+
Check whether implementation matches the frozen plan or investigation:
|
|
49
|
+
|
|
50
|
+
- required tasks done
|
|
51
|
+
- rejected scope not implemented
|
|
52
|
+
- root cause still true
|
|
53
|
+
- expected spec delta honored
|
|
54
|
+
- behavior visible at public seam
|
|
55
|
+
|
|
56
|
+
### 2. Code Smell Scan
|
|
57
|
+
|
|
58
|
+
Use `review-methods.md` smell taxonomy.
|
|
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 `cc-review-plan.md`.
|
|
61
|
+
|
|
62
|
+
Look for:
|
|
63
|
+
|
|
64
|
+
- copy-paste helper logic
|
|
65
|
+
- broad catch-all errors
|
|
66
|
+
- parameter clumps
|
|
67
|
+
- shallow pass-through modules
|
|
68
|
+
- internal mocks driving production design
|
|
69
|
+
- new branch forests where a data shape would collapse cases
|
|
70
|
+
- hidden state or multiple truth sources
|
|
71
|
+
- cycles between modules
|
|
72
|
+
|
|
73
|
+
### 3. Structural Risk
|
|
74
|
+
|
|
75
|
+
Check:
|
|
76
|
+
|
|
77
|
+
- security and trust boundaries
|
|
78
|
+
- enum/value completeness outside the diff
|
|
79
|
+
- migrations and rollback
|
|
80
|
+
- concurrency and double-submit
|
|
81
|
+
- external service failures
|
|
82
|
+
- logs/metrics for new paths
|
|
83
|
+
|
|
84
|
+
### 4. Test Quality
|
|
85
|
+
|
|
86
|
+
Build a coverage map:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
CODE PATHS USER/RUNTIME FLOWS
|
|
90
|
+
file.ts feature flow
|
|
91
|
+
├── [tested] happy ├── [tested] main path
|
|
92
|
+
├── [gap] empty ├── [gap] double action
|
|
93
|
+
└── [gap] upstream error └── [gap] navigate away / timeout
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Flag:
|
|
97
|
+
|
|
98
|
+
- no regression test for changed behavior
|
|
99
|
+
- tests only assert implementation shape
|
|
100
|
+
- tests mock internal modules instead of public seam
|
|
101
|
+
- fixture lies with missing fields or type casts
|
|
102
|
+
- no UI/E2E proof for user-visible change
|
|
103
|
+
|
|
104
|
+
### 5. Documentation and DX
|
|
105
|
+
|
|
106
|
+
If changed behavior affects README, guides, CLI help, package install, public API, agent skill usage, or examples, check whether docs changed too.
|
|
107
|
+
|
|
108
|
+
## Delta Node Selection
|
|
109
|
+
|
|
110
|
+
Use git and prior review records:
|
|
111
|
+
|
|
112
|
+
1. Find changed files with `git diff <base>...HEAD --name-only`.
|
|
113
|
+
2. If prior `cc-review-ledger.jsonl` records a reviewed SHA, narrow to `git diff <reviewedSha>...HEAD`.
|
|
114
|
+
3. Group changed files by behavior surface, not just extension.
|
|
115
|
+
4. Add dependent nodes for direct importers/callers when a shared helper, enum, state shape, API contract, or skill contract changes.
|
|
116
|
+
5. Preserve prior clean nodes only when the target file and dependent contract did not change.
|
|
117
|
+
|
|
118
|
+
Example:
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
R101 implementation.contract.skill-frontmatter
|
|
122
|
+
R102 implementation.smell.review-state
|
|
123
|
+
R103 implementation.tests.distribution
|
|
124
|
+
R104 implementation.docs.workflow-map
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Fix Policy
|
|
128
|
+
|
|
129
|
+
`cc-review` does not silently edit code. It writes findings and routes:
|
|
130
|
+
|
|
131
|
+
- mechanical local issue -> `cc-do` with direct fix recommendation
|
|
132
|
+
- architecture/contract issue -> `cc-plan`
|
|
133
|
+
- clean implementation -> `cc-check`
|
|
134
|
+
|
|
135
|
+
If the user explicitly asks to fix findings in the same turn, switch to `cc-do` behavior after writing the review report.
|
|
136
|
+
|
|
137
|
+
## Output Requirements
|
|
138
|
+
|
|
139
|
+
Add to `cc-review-report.md`:
|
|
140
|
+
|
|
141
|
+
- base branch and diff summary
|
|
142
|
+
- scope check
|
|
143
|
+
- implementation review nodes checked, skipped, or blocked
|
|
144
|
+
- implementation reviewer agents used or fallback reason
|
|
145
|
+
- risk-lane coverage and raw finding triage
|
|
146
|
+
- code smell findings
|
|
147
|
+
- structural findings
|
|
148
|
+
- test and E2E coverage map
|
|
149
|
+
- docs/DX notes
|
|
150
|
+
- final route
|
|
151
|
+
|
|
152
|
+
Write `cc-review-findings.json` when there are actionable findings.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Plan Review Branch
|
|
2
|
+
|
|
3
|
+
Use this reference when the review target is a plan, investigation handoff, or mixed branch whose plan contract may be wrong.
|
|
4
|
+
|
|
5
|
+
## Intake
|
|
6
|
+
|
|
7
|
+
Read, in order:
|
|
8
|
+
|
|
9
|
+
1. `planning/design.md` or `planning/analysis.md`
|
|
10
|
+
2. `planning/tasks.md`
|
|
11
|
+
3. `planning/task-manifest.json`
|
|
12
|
+
4. `change-meta.json`
|
|
13
|
+
5. related roadmap/spec/docs/code referenced by the plan
|
|
14
|
+
|
|
15
|
+
If no change directory exists, review the user-provided plan text and clearly mark missing durable artifacts.
|
|
16
|
+
|
|
17
|
+
## Review Shape
|
|
18
|
+
|
|
19
|
+
First select applicable facets, then create one or more review nodes for each selected facet. Do not load every facet when the plan is small, but do not skip a selected facet merely to keep the answer short.
|
|
20
|
+
|
|
21
|
+
For complex plans, assign selected facets to independent read-only reviewers when subagent support is available. Strategy, engineering, design, DX, and TOC reviewers should not share intermediate conclusions; the main thread merges their findings after each reviewer returns.
|
|
22
|
+
|
|
23
|
+
### 1. Strategy Facet
|
|
24
|
+
|
|
25
|
+
Use a native strategy review question set:
|
|
26
|
+
|
|
27
|
+
- Is this the right problem?
|
|
28
|
+
- Is the stated user/business outcome direct or a proxy?
|
|
29
|
+
- What happens if we do nothing?
|
|
30
|
+
- What does the 12-month ideal look like?
|
|
31
|
+
- What existing code or workflow already solves part of this?
|
|
32
|
+
|
|
33
|
+
Output:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
CURRENT -> THIS PLAN -> 12-MONTH IDEAL
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Node examples:
|
|
40
|
+
|
|
41
|
+
- `plan.strategy.problem-fit`
|
|
42
|
+
- `plan.strategy.outcome-signal`
|
|
43
|
+
- `plan.strategy.do-nothing-risk`
|
|
44
|
+
|
|
45
|
+
### 2. Engineering Facet
|
|
46
|
+
|
|
47
|
+
Review:
|
|
48
|
+
|
|
49
|
+
- component boundaries
|
|
50
|
+
- data flow and shadow paths
|
|
51
|
+
- state transitions
|
|
52
|
+
- security boundaries
|
|
53
|
+
- rollback shape
|
|
54
|
+
- testability seam
|
|
55
|
+
- parallelization risk
|
|
56
|
+
|
|
57
|
+
Required diagram for non-trivial plans:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
Entry -> validate -> transform -> persist -> output
|
|
61
|
+
| | | | |
|
|
62
|
+
nil invalid exception conflict stale
|
|
63
|
+
empty wrong type timeout duplicate partial
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Node examples:
|
|
67
|
+
|
|
68
|
+
- `plan.engineering.boundaries`
|
|
69
|
+
- `plan.engineering.data-flow`
|
|
70
|
+
- `plan.engineering.state-transitions`
|
|
71
|
+
- `plan.engineering.testability`
|
|
72
|
+
|
|
73
|
+
### 3. Design Facet
|
|
74
|
+
|
|
75
|
+
Run only for user-facing UI or interaction flows.
|
|
76
|
+
|
|
77
|
+
Check:
|
|
78
|
+
|
|
79
|
+
- first, second, third thing the user sees
|
|
80
|
+
- loading / empty / error / success / partial states
|
|
81
|
+
- responsive and accessibility intent
|
|
82
|
+
- generic UI or AI slop risk
|
|
83
|
+
- whether live design review will be needed after implementation
|
|
84
|
+
|
|
85
|
+
Node examples:
|
|
86
|
+
|
|
87
|
+
- `plan.design.primary-flow`
|
|
88
|
+
- `plan.design.states`
|
|
89
|
+
- `plan.design.responsive-accessibility`
|
|
90
|
+
|
|
91
|
+
### 4. DX Facet
|
|
92
|
+
|
|
93
|
+
Run only for API, CLI, SDK, package, docs, agent skill, MCP, or developer/operator surfaces.
|
|
94
|
+
|
|
95
|
+
Check:
|
|
96
|
+
|
|
97
|
+
- target developer/operator persona
|
|
98
|
+
- time to first value
|
|
99
|
+
- install/run/debug/upgrade path
|
|
100
|
+
- actionable errors: problem + cause + fix
|
|
101
|
+
- copy-paste examples and escape hatches
|
|
102
|
+
|
|
103
|
+
Node examples:
|
|
104
|
+
|
|
105
|
+
- `plan.dx.first-value`
|
|
106
|
+
- `plan.dx.errors`
|
|
107
|
+
- `plan.dx.examples`
|
|
108
|
+
|
|
109
|
+
## TOC Root-Cause Pass
|
|
110
|
+
|
|
111
|
+
For complex bugs, use:
|
|
112
|
+
|
|
113
|
+
1. Current reality tree: symptoms, causes, enabling conditions.
|
|
114
|
+
2. Conflict diagram: why the obvious fix conflicts with a real need.
|
|
115
|
+
3. Future reality tree: what the proposed fix changes and what it may break.
|
|
116
|
+
|
|
117
|
+
If the root cause is not proven, reroute to `cc-investigate`, not `cc-do`.
|
|
118
|
+
|
|
119
|
+
Record each TOC pass as a separate node so the review can resume:
|
|
120
|
+
|
|
121
|
+
- current reality tree
|
|
122
|
+
- conflict diagram
|
|
123
|
+
- future reality tree
|
|
124
|
+
|
|
125
|
+
## Code Smell Pass In Planning
|
|
126
|
+
|
|
127
|
+
Plans can contain smells before code exists:
|
|
128
|
+
|
|
129
|
+
- repeated implementation steps with slight variations
|
|
130
|
+
- parallel data sources
|
|
131
|
+
- task split by technical layer instead of behavior
|
|
132
|
+
- fake abstraction or one-adapter seam
|
|
133
|
+
- missing owner for shared state
|
|
134
|
+
- hand-wavy "handle edge cases" or "add validation"
|
|
135
|
+
|
|
136
|
+
Each planning smell must become a plan finding and route to `cc-plan`.
|
|
137
|
+
|
|
138
|
+
## Output Requirements
|
|
139
|
+
|
|
140
|
+
Add to `cc-review-report.md`:
|
|
141
|
+
|
|
142
|
+
- plan review nodes checked, skipped, or blocked
|
|
143
|
+
- plan reviewer agents used or fallback reason
|
|
144
|
+
- plan artifacts read
|
|
145
|
+
- strategy/engineering/design/DX facets used
|
|
146
|
+
- diagrams produced
|
|
147
|
+
- in-scope bad smells
|
|
148
|
+
- decisions needed
|
|
149
|
+
- reroute recommendation
|
|
150
|
+
|
|
151
|
+
If any plan facet changes the task list or implementation contract, route to `cc-plan`.
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# CC-Review Methods
|
|
2
|
+
|
|
3
|
+
Use this reference for every `cc-review` run. It defines the shared method library. Load branch-specific references for concrete workflow steps.
|
|
4
|
+
|
|
5
|
+
## Method Selection
|
|
6
|
+
|
|
7
|
+
Select every method needed by the current risk and write the selected methods into `cc-review-plan.md`. This table is a routing map, not a cap.
|
|
8
|
+
|
|
9
|
+
| Risk | Method |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| unclear goal | goal tree |
|
|
12
|
+
| repeated symptom | current reality tree |
|
|
13
|
+
| hidden tradeoff | conflict diagram |
|
|
14
|
+
| uncertain fix impact | future reality tree |
|
|
15
|
+
| implementation complexity | logic tree and smell scan |
|
|
16
|
+
| UI/runtime mismatch | E2E/plugin verification |
|
|
17
|
+
| code quality or simplification risk | cc-simplify reference plus smell scan |
|
|
18
|
+
| broad implementation diff | risk-lane review swarm profile |
|
|
19
|
+
|
|
20
|
+
## Review Plan Nodes
|
|
21
|
+
|
|
22
|
+
Before findings, create ordered nodes:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
R001 plan.strategy.outcome
|
|
26
|
+
target: planning/design.md
|
|
27
|
+
method: goal tree
|
|
28
|
+
check: outcome and scope consistency
|
|
29
|
+
status: pending
|
|
30
|
+
|
|
31
|
+
R002 plan.engineering.data-flow
|
|
32
|
+
target: planning/design.md + referenced code
|
|
33
|
+
method: engineering facet
|
|
34
|
+
check: single truth source and state transitions
|
|
35
|
+
status: pending
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Node rules:
|
|
39
|
+
|
|
40
|
+
- one node reviews one coherent question, artifact, or changed surface
|
|
41
|
+
- every selected method creates at least one node
|
|
42
|
+
- every changed file or user-facing surface is assigned to a node or explicitly skipped
|
|
43
|
+
- every node has an owner: `main` or a named read-only reviewer
|
|
44
|
+
- every node ends as `checked`, `skipped`, or `blocked`
|
|
45
|
+
- no finding limit exists while nodes remain pending
|
|
46
|
+
- when a prior ledger exists, reuse checked nodes only if their target and dependencies did not change
|
|
47
|
+
|
|
48
|
+
## Independent Reviewer Assignment
|
|
49
|
+
|
|
50
|
+
Use subagents to preserve independent context when the host supports them.
|
|
51
|
+
|
|
52
|
+
Assignment rules:
|
|
53
|
+
|
|
54
|
+
- Assign independent reviewers by facet, not by random file chunks.
|
|
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 `cc-review-plan.md`.
|
|
57
|
+
- Do not assign two reviewers to the same node unless a critical finding needs a second opinion.
|
|
58
|
+
- Main thread validates reviewer evidence before final findings.
|
|
59
|
+
|
|
60
|
+
Reviewer result states:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
accepted -> finding has concrete in-scope evidence
|
|
64
|
+
merged -> duplicate finding folded into stronger finding
|
|
65
|
+
downgraded -> real note but not blocking or confidence too low
|
|
66
|
+
rejected -> out-of-scope, stale, speculative, or contradicted by evidence
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Record these states in `cc-review-report.md` and preserve raw reviewer output in `cc-review-agent-results.jsonl`.
|
|
70
|
+
|
|
71
|
+
## Risk-Lane Review Swarm Profile
|
|
72
|
+
|
|
73
|
+
Use this profile when a broad implementation diff, PR landing review, or mixed review benefits from independent read-only context. The profile is a default decomposition, not a requirement to manufacture findings.
|
|
74
|
+
|
|
75
|
+
| Lane | Reviewer question |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| intent-regression | Does the diff match the intended behavior without extra behavior drift, broken edge cases, fallback loss, or caller/callee contract drift? |
|
|
78
|
+
| security-privacy | Did the diff weaken auth, validation, secret handling, sensitive data boundaries, defaults, or trust of external input? |
|
|
79
|
+
| performance-reliability | Did the diff add duplicate work, hot-path cost, missing cleanup, retry storms, ordering races, or brittle failure handling? |
|
|
80
|
+
| contracts-coverage | Did the diff miss API/schema/type/config/flag alignment, migration fallout, regression tests, logs, metrics, assertions, or error paths? |
|
|
81
|
+
|
|
82
|
+
Small diffs may use one combined reviewer that covers all lanes. Large or multi-surface diffs should assign separate reviewers for the highest-risk lanes when the host supports subagents.
|
|
83
|
+
|
|
84
|
+
The main thread owns aggregation:
|
|
85
|
+
|
|
86
|
+
- Merge duplicate findings under the clearest evidence.
|
|
87
|
+
- Reject style preferences, nits, and speculative concerns with no concrete impact.
|
|
88
|
+
- Downgrade low-confidence notes unless they point to critical impact.
|
|
89
|
+
- Convert intent-unclear claims into decision questions instead of findings.
|
|
90
|
+
- Order final findings by severity, confidence, and current-scope impact.
|
|
91
|
+
|
|
92
|
+
## Stateful Delta Review
|
|
93
|
+
|
|
94
|
+
Use git and prior records to avoid repeating stale work:
|
|
95
|
+
|
|
96
|
+
1. Find the previous reviewed SHA from `cc-review-ledger.jsonl` or `cc-review-report.md`.
|
|
97
|
+
2. Compare `git diff <previous-sha>...HEAD` when possible.
|
|
98
|
+
3. If no previous SHA exists, compare against the base branch or reviewed artifact timestamps.
|
|
99
|
+
4. Re-review changed nodes and dependent nodes.
|
|
100
|
+
5. Preserve previous clean nodes only when their target content and assumptions are unchanged.
|
|
101
|
+
|
|
102
|
+
If git cannot identify the delta, mark the delta source as `unknown` and review the full in-scope surface.
|
|
103
|
+
|
|
104
|
+
## Thinking Tools
|
|
105
|
+
|
|
106
|
+
### Goal Tree
|
|
107
|
+
|
|
108
|
+
Use when the plan has too many proposed actions and not enough outcome clarity.
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
GOAL
|
|
112
|
+
├── necessary condition A
|
|
113
|
+
│ ├── measurable signal
|
|
114
|
+
│ └── blocked by
|
|
115
|
+
├── necessary condition B
|
|
116
|
+
└── NOT IN SCOPE
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Current Reality Tree
|
|
120
|
+
|
|
121
|
+
Use for bugs and recurring failures.
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
SYMPTOM
|
|
125
|
+
├── direct cause
|
|
126
|
+
│ └── deeper cause
|
|
127
|
+
├── enabling condition
|
|
128
|
+
└── missing control
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Conflict Diagram
|
|
132
|
+
|
|
133
|
+
Use when two requirements appear incompatible.
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
Objective
|
|
137
|
+
├── Need A -> Want X
|
|
138
|
+
└── Need B -> Want not-X
|
|
139
|
+
Assumption to break: ...
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Future Reality Tree
|
|
143
|
+
|
|
144
|
+
Use before recommending a non-trivial redesign.
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
CHANGE
|
|
148
|
+
├── desired effect
|
|
149
|
+
├── possible negative branch
|
|
150
|
+
│ └── prevention
|
|
151
|
+
└── verification signal
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Logic Tree
|
|
155
|
+
|
|
156
|
+
Use for implementation reviews.
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
Entry point
|
|
160
|
+
├── path A
|
|
161
|
+
│ ├── happy
|
|
162
|
+
│ ├── empty
|
|
163
|
+
│ └── error
|
|
164
|
+
└── path B
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Code Smell Taxonomy
|
|
168
|
+
|
|
169
|
+
Only report smells inside the current requirement blast radius or smells made worse by the current work.
|
|
170
|
+
|
|
171
|
+
| Smell | Review question | Preferred fix shape |
|
|
172
|
+
| --- | --- | --- |
|
|
173
|
+
| rigidity | Does a small change force unrelated edits? | move decision to one owner |
|
|
174
|
+
| duplication | Is the same logic repeated with small variations? | reuse existing helper or make one narrow helper |
|
|
175
|
+
| cycle | Do modules know each other's internals? | invert dependency or extract boundary |
|
|
176
|
+
| fragility | Can one change break unrelated behavior? | isolate side effects and add focused tests |
|
|
177
|
+
| obscurity | Is intent hidden behind clever names or control flow? | rename, split, or make data shape explicit |
|
|
178
|
+
| data-clump | Do fields always travel together? | group them into one object/value |
|
|
179
|
+
| unnecessary-complexity | Is abstraction solving a hypothetical future? | delete seam or collapse to direct code |
|
|
180
|
+
|
|
181
|
+
## Severity
|
|
182
|
+
|
|
183
|
+
- `critical`: ships wrong behavior, data/security risk, silent failure, broken root cause, or impossible verification.
|
|
184
|
+
- `important`: likely maintenance, test, UX, DX, performance, or operability problem in current scope.
|
|
185
|
+
- `advisory`: good improvement but not required for this change.
|
|
186
|
+
|
|
187
|
+
## Confidence
|
|
188
|
+
|
|
189
|
+
- `9-10`: directly verified in code, artifact, command output, UI run, or log.
|
|
190
|
+
- `7-8`: strong evidence from nearby patterns and diff.
|
|
191
|
+
- `5-6`: plausible but needs confirmation; mark as verify-first.
|
|
192
|
+
- `<5`: do not put in main findings unless critical impact.
|
|
193
|
+
|
|
194
|
+
## Decision Questions
|
|
195
|
+
|
|
196
|
+
Ask only when a finding requires user judgment. Do not stop the whole review at the first decision unless that answer blocks the next review node.
|
|
197
|
+
|
|
198
|
+
Use:
|
|
199
|
+
|
|
200
|
+
```text
|
|
201
|
+
D<N> - <decision title>
|
|
202
|
+
Evidence: <concrete artifact/path/line/log/UI action>
|
|
203
|
+
Risk: <what breaks if ignored>
|
|
204
|
+
Recommendation: A because <principle>
|
|
205
|
+
Options:
|
|
206
|
+
A) <fix now> (recommended) - impact
|
|
207
|
+
B) <defer> - impact
|
|
208
|
+
C) <skip> - impact
|
|
209
|
+
STOP: wait for the user answer before continuing.
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
After the node pass, present a decision queue:
|
|
213
|
+
|
|
214
|
+
```text
|
|
215
|
+
Decision Queue
|
|
216
|
+
├── D1 scope or architecture decision
|
|
217
|
+
├── D2 user-visible behavior decision
|
|
218
|
+
└── D3 test strategy decision
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Then ask decisions one by one. Do not batch unrelated issues inside one decision.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
# ------------------------------------------------------------
|
|
6
|
+
# 收集 cc-review 的增量上下文
|
|
7
|
+
# ------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
change_dir="${1:-}"
|
|
10
|
+
base_ref="${2:-origin/main}"
|
|
11
|
+
|
|
12
|
+
if [[ -z "$change_dir" ]]; then
|
|
13
|
+
echo "Usage: collect-review-context.sh <change-dir> [base-ref]" >&2
|
|
14
|
+
exit 2
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
review_dir="$change_dir/review"
|
|
18
|
+
ledger="$review_dir/cc-review-ledger.jsonl"
|
|
19
|
+
report="$review_dir/cc-review-report.md"
|
|
20
|
+
plan="$review_dir/cc-review-plan.md"
|
|
21
|
+
findings="$review_dir/cc-review-findings.json"
|
|
22
|
+
|
|
23
|
+
head_sha="$(git rev-parse HEAD)"
|
|
24
|
+
base_sha=""
|
|
25
|
+
if git rev-parse --verify "$base_ref" >/dev/null 2>&1; then
|
|
26
|
+
base_sha="$(git merge-base "$base_ref" HEAD)"
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
reviewed_sha=""
|
|
30
|
+
if [[ -f "$ledger" ]]; then
|
|
31
|
+
reviewed_sha="$(
|
|
32
|
+
sed -n 's/.*"headSha"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$ledger" |
|
|
33
|
+
tail -n 1
|
|
34
|
+
)"
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
if [[ -z "$reviewed_sha" && -f "$report" ]]; then
|
|
38
|
+
reviewed_sha="$(
|
|
39
|
+
sed -n 's/.*Reviewed head SHA:[[:space:]]*`\?\([0-9a-f]\{7,40\}\)`\?.*/\1/p' "$report" |
|
|
40
|
+
tail -n 1
|
|
41
|
+
)"
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
diff_base="$base_sha"
|
|
45
|
+
if [[ -n "$reviewed_sha" ]] && git rev-parse --verify "$reviewed_sha^{commit}" >/dev/null 2>&1; then
|
|
46
|
+
diff_base="$reviewed_sha"
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
echo "CC_REVIEW_CONTEXT"
|
|
50
|
+
echo "change_dir=$change_dir"
|
|
51
|
+
echo "review_dir=$review_dir"
|
|
52
|
+
echo "base_ref=$base_ref"
|
|
53
|
+
echo "base_sha=${base_sha:-unknown}"
|
|
54
|
+
echo "reviewed_sha=${reviewed_sha:-none}"
|
|
55
|
+
echo "head_sha=$head_sha"
|
|
56
|
+
echo "diff_base=${diff_base:-unknown}"
|
|
57
|
+
|
|
58
|
+
echo
|
|
59
|
+
echo "PRIOR_REVIEW_FILES"
|
|
60
|
+
for file in "$plan" "$report" "$ledger" "$findings"; do
|
|
61
|
+
if [[ -f "$file" ]]; then
|
|
62
|
+
printf 'present %s\n' "$file"
|
|
63
|
+
else
|
|
64
|
+
printf 'missing %s\n' "$file"
|
|
65
|
+
fi
|
|
66
|
+
done
|
|
67
|
+
|
|
68
|
+
echo
|
|
69
|
+
echo "CHANGED_FILES"
|
|
70
|
+
if [[ -n "$diff_base" ]]; then
|
|
71
|
+
git diff --name-status "$diff_base...HEAD"
|
|
72
|
+
else
|
|
73
|
+
git diff --name-status HEAD
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
if [[ -f "$ledger" ]]; then
|
|
77
|
+
echo
|
|
78
|
+
echo "RECENT_LEDGER"
|
|
79
|
+
tail -n 20 "$ledger"
|
|
80
|
+
fi
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Roadmap Skill Changelog
|
|
2
2
|
|
|
3
|
+
## v5.2.0 - 2026-05-09
|
|
4
|
+
|
|
5
|
+
- add project-direction routing and brand-neutral founder guardrails
|
|
6
|
+
- add the AI Leverage Route Lens so roadmap recommendations must name the real user/operator, current workaround, human-vs-agent effort, complete-lake boundary, ocean boundary, first success signal, kill signal, and boil-lake/sharp-wedge/needs-evidence/pivot verdict
|
|
7
|
+
- update roadmap and tracking templates so AI-era scope choices can choose complete same-blast-radius lakes instead of timid MVP slices
|
|
8
|
+
|
|
3
9
|
## v5.0.0 - 2026-05-01
|
|
4
10
|
|
|
5
11
|
- replace the roadmap/backlog/tracking split with `devflow/roadmap.json` as the single editable roadmap state
|