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,108 @@
|
|
|
1
|
+
# CC-Review Playbook
|
|
2
|
+
|
|
3
|
+
## Visible State Machine
|
|
4
|
+
|
|
5
|
+
`cc-plan / cc-investigate -> cc-review -> cc-plan | cc-do`
|
|
6
|
+
|
|
7
|
+
`cc-do -> cc-review -> cc-do | cc-check`
|
|
8
|
+
|
|
9
|
+
- Enter from: a complex plan, investigated bug, implementation diff, review comment, or user request for deep review.
|
|
10
|
+
- Stay in: `cc-review` until the branch type, scope, findings, plugin/E2E evidence needs, and next route are explicit.
|
|
11
|
+
- Exit to: `cc-plan` for broken plan contracts, `cc-do` for implementation fixes, or `cc-check` for fresh verification.
|
|
12
|
+
- Reroute to: `cc-act` only if `cc-check` is already fresh and clean.
|
|
13
|
+
|
|
14
|
+
## Core Rules
|
|
15
|
+
|
|
16
|
+
1. 先判断 review 对象是计划、实现,还是混合。
|
|
17
|
+
2. 先读上一次 `cc-review` 的 plan / report / ledger / findings,再看当前 git 或 artifact delta。
|
|
18
|
+
3. 先写 `cc-review-plan.md`,列出要用哪些 Review 工具和哪些节点需要遍历。
|
|
19
|
+
4. 对适合独立审查的节点,优先派发只读 reviewer subAgent;没有工具时如实降级。
|
|
20
|
+
5. 复杂实现 diff 优先使用 intent/regression、security/privacy、performance/reliability、contracts/coverage 四类风险 lane;小 diff 可以合并但必须说明。
|
|
21
|
+
6. 按节点逐个 Review:review 一个、check 一个、ledger 记录一个。
|
|
22
|
+
7. 主线程必须验证 subAgent findings,不盲信 reviewer。
|
|
23
|
+
8. 只读当前需求范围内的坏味道;历史债只在被本次变更放大时进入。
|
|
24
|
+
9. `cc-check` 是证据验收,`cc-review` 是深度诊断,两者不要混成一个门。
|
|
25
|
+
10. 计划分支按 strategy / design / engineering / DX 选择节点,不把所有方法一次塞进上下文,但不能因为渐进加载而跳过未审节点。
|
|
26
|
+
11. 实现分支先读 diff 和意图,再读周边代码;每个 changed surface 都要 checked、skipped 或 blocked。
|
|
27
|
+
12. UI 或运行时链路有风险时,必须用 Browser / Computer Use / CLI / logs 做端到端证明或写清阻塞原因。
|
|
28
|
+
13. 每个坏味道必须有 evidence、scope、recommendation 和 route。
|
|
29
|
+
14. 没有证据就写 unknown,不准把审美判断伪装成缺陷。
|
|
30
|
+
15. 不允许固定只列 3 个问题;finding 数量由节点遍历和证据决定。
|
|
31
|
+
16. 输出前必须聚合 raw findings:合并重复,降级弱证据,拒收 speculative / out-of-scope / stale findings。
|
|
32
|
+
17. 发现计划合同错误,回 `cc-plan`;发现代码错误,回 `cc-do`;只差验收,进 `cc-check`。
|
|
33
|
+
18. 输出必须落到 `review/cc-review-plan.md`、`review/cc-review-ledger.jsonl` 和 `review/cc-review-report.md`,不能只留在聊天里。
|
|
34
|
+
|
|
35
|
+
## Required Outputs
|
|
36
|
+
|
|
37
|
+
- `review/cc-review-plan.md`
|
|
38
|
+
- `review/cc-review-ledger.jsonl`
|
|
39
|
+
- `review/cc-review-report.md`
|
|
40
|
+
- `review/cc-review-agent-results.jsonl` when subagent reviewers are used
|
|
41
|
+
- `review/cc-review-findings.json` when later agents need structured findings
|
|
42
|
+
|
|
43
|
+
## Local Kit
|
|
44
|
+
|
|
45
|
+
- `references/review-methods.md`: TOC / logic tree / smells / severity rules
|
|
46
|
+
- `references/plan-review-branch.md`: plan-stage deep review
|
|
47
|
+
- `references/implementation-review-branch.md`: diff and code-stage deep review
|
|
48
|
+
- `references/e2e-and-plugin-verification.md`: Browser / Computer Use / logs evidence
|
|
49
|
+
- `scripts/collect-review-context.sh`: git delta and prior-review state helper
|
|
50
|
+
|
|
51
|
+
## Stateful Review Plan
|
|
52
|
+
|
|
53
|
+
`cc-review-plan.md` 必须至少包含:
|
|
54
|
+
|
|
55
|
+
- review mode:plan / implementation / mixed
|
|
56
|
+
- previous review state:上次 report、ledger、findings 是否存在
|
|
57
|
+
- delta:本次相对哪个 SHA、哪些文件、哪些 artifacts 变了
|
|
58
|
+
- selected tools:CEO/strategy、engineering、design、DX、TOC、code smell、cc-simplify、E2E/plugin/logs
|
|
59
|
+
- skipped tools:为什么不需要
|
|
60
|
+
- reviewer dispatch:哪些节点交给 subAgent、哪些主线程执行、为什么
|
|
61
|
+
- risk lanes:implementation / mixed review 是否覆盖 intent-regression、security-privacy、performance-reliability、contracts-coverage
|
|
62
|
+
- node list:`R001`、`R002` ...,每个节点有 target、method、owner、evidence source、status
|
|
63
|
+
|
|
64
|
+
Review 过程中每完成一个节点,就追加一条 ledger;不要等最后一次性补记。
|
|
65
|
+
|
|
66
|
+
## SubAgent Review
|
|
67
|
+
|
|
68
|
+
触发 `cc-review` 本身就授权只读 reviewer subAgent。主线程不要为了“再确认是否能用 subAgent”打断用户。
|
|
69
|
+
|
|
70
|
+
调度规则:
|
|
71
|
+
|
|
72
|
+
- 大范围 / 多文件 / 多 facet review:至少尝试两个独立 reviewer。
|
|
73
|
+
- 小范围 review:至少尝试一个 combined reviewer,除非 `cc-review-plan.md` 写明不需要。
|
|
74
|
+
- Plan 节点可分配 strategy、engineering、design、DX、TOC reviewer。
|
|
75
|
+
- Implementation 节点可分配 contract、smell、test、runtime reviewer。
|
|
76
|
+
- 复杂 implementation 节点优先按四类风险 lane 派发 reviewer:intent/regression、security/privacy、performance/reliability、contracts/coverage。
|
|
77
|
+
- Codex 环境优先用 `explorer`;ClaudeCode 环境用可用的 `Task` / subAgent。
|
|
78
|
+
- reviewer 只读,不编辑文件,不改计划,不直接决定最终 route。
|
|
79
|
+
- reviewer 的上下文应独立,只给 review packet,不给完整聊天历史。
|
|
80
|
+
- 主线程负责合并、验证、去重和降级 false positive。
|
|
81
|
+
|
|
82
|
+
如果没有 subAgent 工具,报告必须写:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
Agents used: no (subagent tool unavailable)
|
|
86
|
+
Fallback: main-thread node-by-node review
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Review Standard
|
|
90
|
+
|
|
91
|
+
`cc-review` 至少回答:
|
|
92
|
+
|
|
93
|
+
- 这次 Review 的对象是什么?
|
|
94
|
+
- 当前 scope 的真实意图是什么?
|
|
95
|
+
- 现有代码或计划已经解决了哪些子问题?
|
|
96
|
+
- 哪些设计约束会让实现变脆?
|
|
97
|
+
- 哪些代码坏味道在当前 blast radius 内?
|
|
98
|
+
- 哪些测试、日志、UI 操作或端到端证据缺失?
|
|
99
|
+
- 哪些 finding 必须修,哪些可以 defer,哪些只是 advisory?
|
|
100
|
+
- 哪些节点已经被审过,哪些因为 delta 需要复审?
|
|
101
|
+
- 哪些节点没有审,为什么 skip 或 blocked?
|
|
102
|
+
- 哪些 reviewer 被派发,哪些 findings 被接受、合并、降级或拒绝?
|
|
103
|
+
- 四类风险 lane 哪些覆盖了,哪些因为 scope 小或工具不可用而跳过?
|
|
104
|
+
- 下一步为什么是 `cc-plan` / `cc-do` / `cc-check`?
|
|
105
|
+
|
|
106
|
+
## Decision Rule
|
|
107
|
+
|
|
108
|
+
一个 finding 如果会改变范围、架构、用户可见行为、公共 API、测试策略或超过机械局部清理,必须进入用户决策队列或 reroute 到上游 skill。先列完整决策清单,再逐个问题向用户确认;确认前不做非机械修复。机械且低风险的问题可以作为 `cc-do` 的明确修复项,但 `cc-review` 自身不偷偷改代码。
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-review
|
|
3
|
+
version: 1.3.0
|
|
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
|
+
triggers:
|
|
6
|
+
- 深度 review 这个方案
|
|
7
|
+
- review 这个复杂需求
|
|
8
|
+
- review 这个 bug 修复
|
|
9
|
+
- 做一次 cc-review
|
|
10
|
+
- deep review this plan
|
|
11
|
+
- review this implementation deeply
|
|
12
|
+
- check code smells
|
|
13
|
+
- run cc-review
|
|
14
|
+
reads:
|
|
15
|
+
- PLAYBOOK.md
|
|
16
|
+
- CHANGELOG.md
|
|
17
|
+
- references/review-methods.md
|
|
18
|
+
- references/plan-review-branch.md
|
|
19
|
+
- references/implementation-review-branch.md
|
|
20
|
+
- references/e2e-and-plugin-verification.md
|
|
21
|
+
- scripts/collect-review-context.sh
|
|
22
|
+
writes:
|
|
23
|
+
- path: devflow/changes/<change-key>/review/cc-review-plan.md
|
|
24
|
+
durability: durable
|
|
25
|
+
required: true
|
|
26
|
+
- path: devflow/changes/<change-key>/review/cc-review-report.md
|
|
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
|
|
33
|
+
durability: durable
|
|
34
|
+
required: false
|
|
35
|
+
when: subagent reviewers are used
|
|
36
|
+
- path: devflow/changes/<change-key>/review/cc-review-findings.json
|
|
37
|
+
durability: durable
|
|
38
|
+
required: false
|
|
39
|
+
effects:
|
|
40
|
+
- optional deep review
|
|
41
|
+
- read-only reviewer agent dispatch
|
|
42
|
+
- risk-lane finding aggregation
|
|
43
|
+
- durable findings
|
|
44
|
+
- reroute recommendation
|
|
45
|
+
entry_gate:
|
|
46
|
+
- Read planning/design.md or planning/analysis.md when the work is still plan-stage.
|
|
47
|
+
- Read the current diff, task manifest, change metadata, and latest verification evidence when the work is execution-stage.
|
|
48
|
+
- Read prior cc-review-plan.md, cc-review-report.md, cc-review-ledger.jsonl, and cc-review-findings.json when present.
|
|
49
|
+
- Use git diff or scripts/collect-review-context.sh to identify content changed since the last review before deciding what to re-review.
|
|
50
|
+
- Classify the review branch as plan, implementation, or mixed before loading detailed references.
|
|
51
|
+
- Write or refresh cc-review-plan.md before producing findings.
|
|
52
|
+
- Decide whether nodes need independent reviewer agents before starting node execution; record the decision in cc-review-plan.md.
|
|
53
|
+
- For broad implementation or mixed reviews, decide whether the risk-lane review swarm profile is required; record used, skipped, or unavailable lanes in cc-review-plan.md.
|
|
54
|
+
- Freeze the requested scope before finding smells; only report smells inside the requirement blast radius or clearly amplified by the current work.
|
|
55
|
+
exit_criteria:
|
|
56
|
+
- cc-review-plan.md records selected tools, review nodes, skipped nodes with reasons, and checkpoint order.
|
|
57
|
+
- cc-review-ledger.jsonl appends one record per reviewed node with status, evidence, findings, and follow-up route.
|
|
58
|
+
- cc-review-agent-results.jsonl records read-only reviewer outputs when subagents are used, or cc-review-report.md records why agents were unavailable or unnecessary.
|
|
59
|
+
- cc-review-report.md records branch classification, scope, prior-review delta, methods used, node coverage, reviewer-lane coverage, findings triage, user decisions needed, quick fixes, and next route.
|
|
60
|
+
- Plan-stage reviews record every selected strategy/design/engineering/DX facet as checked, skipped, or blocked.
|
|
61
|
+
- Implementation-stage reviews include diff evidence, code-smell evidence, test and E2E/plugin verification evidence for every selected changed surface.
|
|
62
|
+
- Every in-scope code smell has a concrete recommendation or an explicit skip/defer rationale.
|
|
63
|
+
- No artificial finding cap was applied; review stops only when planned nodes are checked, skipped with reason, or blocked.
|
|
64
|
+
- Main thread validates subagent findings before promoting them to final findings; no subagent output is trusted blindly.
|
|
65
|
+
- The next action is exactly one of cc-plan, cc-do, cc-check, cc-act, or no-op.
|
|
66
|
+
reroutes:
|
|
67
|
+
- when: Plan assumptions, scope, architecture, design, or DX contracts are wrong or incomplete.
|
|
68
|
+
target: cc-plan
|
|
69
|
+
- when: Implementation findings require code, test, docs, or UI behavior changes.
|
|
70
|
+
target: cc-do
|
|
71
|
+
- when: Deep review is clean and only fresh evidence verification remains.
|
|
72
|
+
target: cc-check
|
|
73
|
+
recovery_modes:
|
|
74
|
+
- name: branch-reclassification
|
|
75
|
+
when: The review started on the wrong branch type or new evidence shows both plan and implementation need review.
|
|
76
|
+
action: Stop the current pass, restate the correct branch classification, load the matching reference, and restart from the scope freeze.
|
|
77
|
+
- name: progressive-disclosure-reset
|
|
78
|
+
when: The review is drowning in unrelated methods or external review templates.
|
|
79
|
+
action: Return to cc-review-plan.md, keep only review nodes that are in scope, and continue node-by-node instead of collapsing to a short finding list.
|
|
80
|
+
tool_budget:
|
|
81
|
+
read_files: 24
|
|
82
|
+
search_steps: 16
|
|
83
|
+
shell_commands: 16
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
# CC-Review
|
|
87
|
+
|
|
88
|
+
> [PROTOCOL]: 变更时同步更新 `version`、`CHANGELOG.md`、公开分发配置和相关文档,然后检查 `CLAUDE.md`
|
|
89
|
+
|
|
90
|
+
## Role
|
|
91
|
+
|
|
92
|
+
`cc-review` 是可选的深度 Review 节点。
|
|
93
|
+
|
|
94
|
+
它不替代 `cc-check`。`cc-check` 负责流程式证据验收和 pass/fail/blocked 裁决;`cc-review` 负责在复杂需求、复杂 bug、架构风险、UI/DX 风险、代码坏味道出现时做更深的多轮审查。
|
|
95
|
+
|
|
96
|
+
## Runtime Output Policy
|
|
97
|
+
|
|
98
|
+
写入任何 durable Markdown 或 JSON metadata 前,先运行 `cc-devflow config resolve --format policy`。
|
|
99
|
+
|
|
100
|
+
- `Output language` 是机器约束,`review/cc-review-report.md` 和 `review/cc-review-findings.json` 中新增的人类可读摘要必须记录并遵守它。
|
|
101
|
+
- `agent_preferences` 是用户偏好建议,只影响表达方式和结构选择,不覆盖本 Skill 的 Review 边界。
|
|
102
|
+
- 如果配置解析失败,先修配置或向用户说明阻塞,不要用默认语言继续生成正式文档。
|
|
103
|
+
|
|
104
|
+
## Iron Law
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
REVIEW THE RIGHT THING AT THE RIGHT STAGE.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
计划还没进入实现时,Review 计划。代码已经改了时,Review diff 和运行效果。两者都有时,先 Review 计划合同,再 Review 实现是否兑现合同。
|
|
111
|
+
|
|
112
|
+
深度 Review 不能靠“最多列 3 个问题”收尾。必须先制定 Review 计划,再逐节点检查、逐节点记录。问题数量由证据决定,不由输出习惯决定。
|
|
113
|
+
|
|
114
|
+
## Read First
|
|
115
|
+
|
|
116
|
+
1. `PLAYBOOK.md`
|
|
117
|
+
2. `CHANGELOG.md`
|
|
118
|
+
3. `references/review-methods.md`
|
|
119
|
+
4. Branch-specific reference:
|
|
120
|
+
- plan-stage: `references/plan-review-branch.md`
|
|
121
|
+
- implementation-stage: `references/implementation-review-branch.md`
|
|
122
|
+
- UI/runtime/plugin evidence: `references/e2e-and-plugin-verification.md`
|
|
123
|
+
5. When prior review state may exist, run or inspect `scripts/collect-review-context.sh`
|
|
124
|
+
|
|
125
|
+
## Use This Skill When
|
|
126
|
+
|
|
127
|
+
- 复杂需求或复杂 bug 需要比 `cc-check` 更深的 Review。
|
|
128
|
+
- `cc-plan` 已有方案,但你怀疑范围、根因、架构、测试或 DX 没压实。
|
|
129
|
+
- `cc-do` 已经实现,但你要在进入 `cc-check` 前找设计坏味道、代码坏味道和端到端落地风险。
|
|
130
|
+
- 需要检查僵化、冗余、循环依赖、脆弱性、晦涩性、数据泥团、不必要复杂。
|
|
131
|
+
- UI 或 Codex 插件链路需要用浏览器、电脑操作、日志和点击验证证明实际效果。
|
|
132
|
+
|
|
133
|
+
不要把每个小改动都送进 `cc-review`。简单、低风险、证据充分的变更直接走 `cc-check`。
|
|
134
|
+
|
|
135
|
+
## Branch Classifier
|
|
136
|
+
|
|
137
|
+
先分类,再加载详细方法:
|
|
138
|
+
|
|
139
|
+
| Branch | Signal | Load |
|
|
140
|
+
| --- | --- | --- |
|
|
141
|
+
| `plan` | 用户说“先别写代码”、只有 `planning/design.md` / `planning/analysis.md`,或没有实现 diff | `plan-review-branch.md` |
|
|
142
|
+
| `implementation` | 当前分支已有代码 diff、review comment、UI 改动、测试改动或用户说“Review 代码” | `implementation-review-branch.md` |
|
|
143
|
+
| `mixed` | 计划和实现都存在,且实现可能偏离计划 | 先 plan,再 implementation |
|
|
144
|
+
|
|
145
|
+
如果分类不清,先读 change artifacts 和 diff。仍然不清时,用一个 Decision Question 问用户,不要猜。
|
|
146
|
+
|
|
147
|
+
## Harness Contract
|
|
148
|
+
|
|
149
|
+
- Allowed actions: read artifacts, inspect code and diff, run safe read-only or verification commands, dispatch read-only reviewer subagents when available, use Browser/Computer Use for behavior proof, write review reports.
|
|
150
|
+
- Forbidden actions: silently rewriting the plan, silently editing production code, turning optional review into mandatory ship gate, reviewing unrelated historical debt, or stopping after a small fixed number of findings while planned nodes remain unchecked.
|
|
151
|
+
- Required evidence: every finding must cite plan text, code path, diff line, command output, browser action, UI state, log line, or explicit missing evidence.
|
|
152
|
+
- Reroute rule: plan contract defects return to `cc-plan`; implementation defects return to `cc-do`; clean deep review proceeds to `cc-check`.
|
|
153
|
+
|
|
154
|
+
## Independent Reviewer Dispatch
|
|
155
|
+
|
|
156
|
+
触发 `cc-review` 本身就构成用户对只读 reviewer subAgent 的授权。不要再要求用户补一句“请开启子智能体”。
|
|
157
|
+
|
|
158
|
+
主线程负责:制定 Review 计划、拆分节点、分配 reviewer、合并 findings、验证证据、去重、决定 quick fix / decision queue / reroute。
|
|
159
|
+
|
|
160
|
+
只读 reviewer 负责:在独立上下文里审指定节点,不编辑文件,不修改计划,不直接决定最终结论。
|
|
161
|
+
|
|
162
|
+
### Dispatch Rules
|
|
163
|
+
|
|
164
|
+
- ClaudeCode 环境:使用可用的 `Task` / subAgent 机制创建只读 reviewer。
|
|
165
|
+
- Codex App / Codex 工具环境:优先使用内置 `explorer` 子智能体;如果只有 `default`,prompt 必须写明只读审查、禁止编辑。
|
|
166
|
+
- 暴露 `spawn_agent` 的 Codex 环境:使用 `spawn_agent(agent_type="explorer", fork_context=false, ...)`。只有在用户明确要求继承完整上下文时才 `fork_context=true`。
|
|
167
|
+
- 不依赖 repo-local 自定义 agent 名称完成核心流程;自定义 agent 只能作为增强。
|
|
168
|
+
- 如果当前运行时没有 subagent 工具,或工具调用被上层策略禁止,主线程按同一节点计划串行执行,并在报告里写 `Agents used: no (subagent tool unavailable)`。
|
|
169
|
+
- subagent 只拿自己的 review packet,不拿主线程完整聊天历史;这样保持独立性。
|
|
170
|
+
- 每个 subagent 必须输出 JSONL findings;没有发现时输出 `NO FINDINGS`。
|
|
171
|
+
- 主线程必须验证 subagent finding 的路径、证据、scope 和置信度,不能因为 reviewer 说了就接受。
|
|
172
|
+
|
|
173
|
+
### Risk-Lane Review Swarm Profile
|
|
174
|
+
|
|
175
|
+
复杂实现、跨模块 diff、PR landing 前复审、或用户要求 parallel / swarm review 时,优先把实现节点拆成四类只读风险 lane。小 diff 可以由一个 combined reviewer 覆盖全部 lane,但计划里必须写明。
|
|
176
|
+
|
|
177
|
+
1. Intent and regression reviewer: 检查 diff 是否兑现意图、是否引入范围外行为漂移、边界和 fallback 是否坏掉、caller/callee 合同是否漂移。
|
|
178
|
+
2. Security and privacy reviewer: 检查 authn/authz、输入验证、注入风险、secret/token/sensitive data 暴露、默认权限扩大、信任未验证数据。
|
|
179
|
+
3. Performance and reliability reviewer: 检查热路径重复 I/O、启动/渲染/请求成本、cleanup 泄漏、retry storm、订阅漂移、排序/竞态/失败处理。
|
|
180
|
+
4. Contracts and coverage reviewer: 检查 API/schema/type/config/flag 不匹配、迁移/兼容 fallout、回归测试缺口、日志/metrics/assertion/error-path 缺失。
|
|
181
|
+
|
|
182
|
+
这些 lane 是审查视角,不是 finding 配额。主线程必须把 raw findings 合并后再输出:重复项合并,弱证据或 speculative claim 降级或拒收,和冻结意图冲突的 finding 转成 decision question 或 reject。
|
|
183
|
+
|
|
184
|
+
### Dispatch Heuristics
|
|
185
|
+
|
|
186
|
+
- Plan review:
|
|
187
|
+
- Strategy reviewer: outcome, scope, goal tree, do-nothing risk.
|
|
188
|
+
- Engineering reviewer: architecture, data flow, state, testability, rollback.
|
|
189
|
+
- Design reviewer: user-visible flows, states, accessibility, visual/interaction risk.
|
|
190
|
+
- DX reviewer: CLI/API/docs/operator journey, errors, examples.
|
|
191
|
+
- TOC reviewer: current reality tree, conflict diagram, future reality tree for complex bugs.
|
|
192
|
+
- Implementation review:
|
|
193
|
+
- Contract reviewer: diff vs plan/investigation contract.
|
|
194
|
+
- Smell reviewer: rigidity, duplication, cycle, fragility, obscurity, data-clump, unnecessary complexity; may load `cc-simplify`.
|
|
195
|
+
- Test reviewer: public seam, regression quality, fixture honesty, coverage gaps.
|
|
196
|
+
- Runtime reviewer: Browser/Computer Use/CLI/log proof for UI or behavior surfaces.
|
|
197
|
+
- Risk-lane reviewers: intent/regression, security/privacy, performance/reliability, contracts/coverage when a broad diff benefits from parallel independent context.
|
|
198
|
+
|
|
199
|
+
Large or multi-surface reviews should use at least two independent reviewers when the host supports it. Small reviews should use at least one combined read-only reviewer unless the plan explicitly records why subagent dispatch is unnecessary.
|
|
200
|
+
|
|
201
|
+
### Reviewer Packet
|
|
202
|
+
|
|
203
|
+
Each reviewer receives:
|
|
204
|
+
|
|
205
|
+
```text
|
|
206
|
+
You are a read-only cc-review reviewer. Do not edit files.
|
|
207
|
+
Repo root: <path>
|
|
208
|
+
Review mode: plan | implementation | mixed
|
|
209
|
+
Node ids: <R001,R002>
|
|
210
|
+
Scope: <requirement blast radius>
|
|
211
|
+
Current delta: <base/reviewed sha -> head sha + changed files>
|
|
212
|
+
Required artifacts: <paths>
|
|
213
|
+
Reference to use: <review-methods / plan / implementation / e2e / cc-simplify>
|
|
214
|
+
Output: JSONL findings or NO FINDINGS.
|
|
215
|
+
Finding schema:
|
|
216
|
+
{"nodeId":"R001","severity":"critical|important|advisory","confidence":8,"path":"file","line":12,"smell":"rigidity|duplication|cycle|fragility|obscurity|data-clump|unnecessary-complexity|none","summary":"...","evidence":"...","recommendation":"...","route":"cc-plan|cc-do|cc-check|cc-act|no-op","fingerprint":"...","reviewer":"strategy|engineering|design|dx|toc|contract|smell|test|runtime|intent-regression|security-privacy|performance-reliability|contracts-coverage"}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Low-confidence notes below `5` stay out of final findings unless they point to critical impact. Put those in report notes as leads, not findings.
|
|
220
|
+
|
|
221
|
+
## Stateful Review Loop
|
|
222
|
+
|
|
223
|
+
Every run follows this loop:
|
|
224
|
+
|
|
225
|
+
1. Collect prior review state:
|
|
226
|
+
- previous `cc-review-plan.md`
|
|
227
|
+
- previous `cc-review-report.md`
|
|
228
|
+
- previous `cc-review-ledger.jsonl`
|
|
229
|
+
- previous `cc-review-findings.json`
|
|
230
|
+
2. Collect current delta:
|
|
231
|
+
- `git diff <last-reviewed-sha>...HEAD` when a reviewed SHA exists
|
|
232
|
+
- otherwise `git diff <base>...HEAD`
|
|
233
|
+
- changed planning artifacts, changed code, changed tests, changed docs, changed runtime/UI surfaces
|
|
234
|
+
3. Select review tools:
|
|
235
|
+
- strategy / CEO-style outcome review
|
|
236
|
+
- engineering review
|
|
237
|
+
- design review
|
|
238
|
+
- DX/operator review
|
|
239
|
+
- TOC root-cause review
|
|
240
|
+
- code-smell / simplification review
|
|
241
|
+
- E2E / Browser / Computer Use / logs review
|
|
242
|
+
4. Decide reviewer dispatch:
|
|
243
|
+
- which nodes need independent subagent review
|
|
244
|
+
- which nodes stay in main thread
|
|
245
|
+
- why any eligible reviewer was skipped
|
|
246
|
+
5. Write `cc-review-plan.md` before findings:
|
|
247
|
+
- node id
|
|
248
|
+
- target artifact or code surface
|
|
249
|
+
- tool/reference to load
|
|
250
|
+
- reason selected
|
|
251
|
+
- owner: `main` or reviewer name
|
|
252
|
+
- check command or evidence source
|
|
253
|
+
- status: `pending`
|
|
254
|
+
6. Traverse nodes one by one:
|
|
255
|
+
- review the node
|
|
256
|
+
- run the smallest useful check for that node
|
|
257
|
+
- collect subagent JSONL output when assigned
|
|
258
|
+
- validate and deduplicate reviewer findings
|
|
259
|
+
- append one ledger record
|
|
260
|
+
- mark the node `checked`, `skipped`, or `blocked`
|
|
261
|
+
7. Summarize:
|
|
262
|
+
- quick mechanical fixes
|
|
263
|
+
- user-decision queue
|
|
264
|
+
- reroute list
|
|
265
|
+
- final next skill
|
|
266
|
+
|
|
267
|
+
When re-reviewing the same file or plan, do not restart from zero. Compare current content with the last reviewed content or SHA, then re-review changed nodes and any dependent nodes made stale by that delta.
|
|
268
|
+
|
|
269
|
+
## Output Contract
|
|
270
|
+
|
|
271
|
+
Write `review/cc-review-plan.md` before the review pass with:
|
|
272
|
+
|
|
273
|
+
1. Branch classification and review scope.
|
|
274
|
+
2. Prior review records found.
|
|
275
|
+
3. Current git/artifact delta.
|
|
276
|
+
4. Selected tools and skipped tools with reasons.
|
|
277
|
+
5. Reviewer dispatch plan: agents used, unavailable, skipped, or unnecessary.
|
|
278
|
+
6. Risk-lane coverage for implementation or mixed reviews.
|
|
279
|
+
7. Ordered review nodes and per-node check plan.
|
|
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:
|
|
297
|
+
|
|
298
|
+
```json
|
|
299
|
+
{"nodeId":"R001","status":"checked","target":"planning/design.md","tool":"engineering","headSha":"...","evidence":["..."],"findings":["F001"],"next":"cc-plan"}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Write `review/cc-review-findings.json` when findings need machine consumption by later agents.
|
|
303
|
+
|
|
304
|
+
Write `review/cc-review-agent-results.jsonl` when subagents are used. It contains raw reviewer findings plus reviewer identity. The report must say which raw findings were accepted, merged, downgraded, or rejected.
|
|
305
|
+
|
|
306
|
+
## Finding Rules
|
|
307
|
+
|
|
308
|
+
Each finding must include:
|
|
309
|
+
|
|
310
|
+
- severity: `critical` / `important` / `advisory`
|
|
311
|
+
- confidence: 1-10
|
|
312
|
+
- scope: why this is inside the current requirement blast radius
|
|
313
|
+
- evidence: concrete path, line, artifact, command, browser action, or log
|
|
314
|
+
- smell: one of `rigidity`, `duplication`, `cycle`, `fragility`, `obscurity`, `data-clump`, `unnecessary-complexity`, or `none`
|
|
315
|
+
- recommendation: exact next move
|
|
316
|
+
- route: `cc-plan`, `cc-do`, `cc-check`, `cc-act`, or `no-op`
|
|
317
|
+
|
|
318
|
+
Bad smells inside the requested scope are never hidden. Every in-scope smell must produce either a decision question, a routed fix recommendation, or an explicit defer/skip rationale. Ask whether to optimize when the smell is real and the fix is not a purely mechanical local cleanup.
|
|
319
|
+
|
|
320
|
+
Decision questions are collected after the full independent node pass unless the answer blocks the next node. Present the full decision queue first, then ask the user to confirm decisions one by one. Do not start non-mechanical fixes until those decisions are answered.
|
|
321
|
+
|
|
322
|
+
## Progressive Disclosure
|
|
323
|
+
|
|
324
|
+
Progressive disclosure controls context size, not review depth. Do not load every reference by default, but do build the full review plan first.
|
|
325
|
+
|
|
326
|
+
1. Always read `review-methods.md`.
|
|
327
|
+
2. Read `plan-review-branch.md` only for plan or mixed reviews.
|
|
328
|
+
3. Read `implementation-review-branch.md` only for implementation or mixed reviews.
|
|
329
|
+
4. Read `e2e-and-plugin-verification.md` only when UI, browser behavior, desktop app behavior, CLI runtime, or Codex plugin chain evidence is relevant.
|
|
330
|
+
5. Read `cc-simplify` only when the review plan selects code-smell, duplication, simplification, or architecture-cleanup nodes.
|
|
331
|
+
|
|
332
|
+
## Exit Rule
|
|
333
|
+
|
|
334
|
+
`cc-review` is complete only when the next route is unambiguous:
|
|
335
|
+
|
|
336
|
+
- `cc-plan`: revise design, scope, root cause, UI/DX contract, or task split.
|
|
337
|
+
- `cc-do`: fix implementation, tests, docs, UI behavior, logs, or review findings.
|
|
338
|
+
- `cc-check`: deep review is clean enough for evidence verification.
|
|
339
|
+
- `cc-act`: only when a fresh `cc-check` pass already exists.
|
|
340
|
+
- `no-op`: review found no relevant issue and no downstream action is needed.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# E2E and Plugin Verification
|
|
2
|
+
|
|
3
|
+
Use this reference when implementation review touches UI, browser behavior, desktop app behavior, local app flows, CLI runtime, logs, or Codex plugin interactions.
|
|
4
|
+
|
|
5
|
+
## Applicability
|
|
6
|
+
|
|
7
|
+
Run this pass when any of these are true:
|
|
8
|
+
|
|
9
|
+
- frontend/UI files changed
|
|
10
|
+
- user-visible interaction changed
|
|
11
|
+
- route, API, or CLI output changed
|
|
12
|
+
- background job or log-based progress changed
|
|
13
|
+
- user asked to use Browser, Computer Use, or Codex plugins
|
|
14
|
+
- plan claims UI and implementation are consistent
|
|
15
|
+
|
|
16
|
+
Skip with reason for backend-only, docs-only, or pure planning reviews.
|
|
17
|
+
|
|
18
|
+
## Evidence Chain
|
|
19
|
+
|
|
20
|
+
Each affected path becomes a review node. Do not claim E2E/plugin review is done until each selected path is checked, skipped, or blocked.
|
|
21
|
+
|
|
22
|
+
1. Identify the user path:
|
|
23
|
+
- page, route, command, app screen, or plugin operation
|
|
24
|
+
- expected visible result
|
|
25
|
+
- logs or artifacts that prove backend behavior
|
|
26
|
+
2. Start the smallest safe runtime:
|
|
27
|
+
- use repo scripts when available
|
|
28
|
+
- avoid production spend unless explicitly required
|
|
29
|
+
- record blocked env vars or missing services
|
|
30
|
+
3. Use the right tool:
|
|
31
|
+
- Browser plugin for local web targets and screenshots
|
|
32
|
+
- Computer Use plugin for native desktop apps or real app UI
|
|
33
|
+
- shell/CLI for commands and logs
|
|
34
|
+
4. Click or run every affected primary action.
|
|
35
|
+
5. Check:
|
|
36
|
+
- visible result
|
|
37
|
+
- console/errors/logs
|
|
38
|
+
- persisted artifact or backend state
|
|
39
|
+
- empty/error/loading states when applicable
|
|
40
|
+
|
|
41
|
+
## UI Verification Checklist
|
|
42
|
+
|
|
43
|
+
For each changed flow:
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
FLOW
|
|
47
|
+
├── page opened
|
|
48
|
+
├── primary action clicked
|
|
49
|
+
├── expected UI state observed
|
|
50
|
+
├── error/empty/loading state checked or explicitly skipped
|
|
51
|
+
├── console/log checked
|
|
52
|
+
└── backend artifact/log checked when relevant
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Plugin Verification Checklist
|
|
56
|
+
|
|
57
|
+
When Codex plugins are part of the expected path:
|
|
58
|
+
|
|
59
|
+
- confirm the plugin exists in the current environment
|
|
60
|
+
- use Browser for localhost/file targets instead of shell-only inspection
|
|
61
|
+
- use Computer Use for desktop app interactions
|
|
62
|
+
- record if plugin access is unavailable and what verification replaced it
|
|
63
|
+
- never claim end-to-end UI proof from code inspection alone
|
|
64
|
+
|
|
65
|
+
## Report Format
|
|
66
|
+
|
|
67
|
+
Add an E2E section to `cc-review-report.md`:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
## E2E / Plugin Evidence
|
|
71
|
+
|
|
72
|
+
| Flow | Tool | Evidence | Result |
|
|
73
|
+
| --- | --- | --- | --- |
|
|
74
|
+
| ... | Browser / Computer Use / CLI | screenshot, log, command, artifact | pass / fail / blocked |
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Also append one ledger record per flow so a later review can skip unchanged flows or re-open only changed flows.
|
|
78
|
+
|
|
79
|
+
If blocked, include:
|
|
80
|
+
|
|
81
|
+
- missing dependency
|
|
82
|
+
- command attempted
|
|
83
|
+
- exact error or missing tool
|
|
84
|
+
- fallback evidence
|
|
85
|
+
- whether this blocks `cc-check`
|