cc-devflow 4.5.13 → 4.5.15
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/SKILL.md +2 -2
- package/.claude/skills/cc-check/CHANGELOG.md +6 -0
- package/.claude/skills/cc-check/PLAYBOOK.md +18 -1
- package/.claude/skills/cc-check/SKILL.md +59 -3
- package/.claude/skills/cc-check/references/gate-contract.md +34 -0
- package/.claude/skills/cc-check/references/review-contract.md +11 -0
- package/.claude/skills/cc-dev/SKILL.md +1 -1
- package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +8 -26
- package/.claude/skills/cc-do/CHANGELOG.md +6 -0
- package/.claude/skills/cc-do/PLAYBOOK.md +23 -6
- package/.claude/skills/cc-do/SKILL.md +20 -4
- package/.claude/skills/cc-do/references/execution-recovery.md +15 -3
- package/.claude/skills/cc-investigate/CHANGELOG.md +6 -0
- package/.claude/skills/cc-investigate/PLAYBOOK.md +24 -0
- package/.claude/skills/cc-investigate/SKILL.md +39 -3
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +68 -1
- package/.claude/skills/cc-investigate/references/investigation-contract.md +32 -0
- package/.claude/skills/cc-plan/CHANGELOG.md +14 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +21 -1
- package/.claude/skills/cc-plan/SKILL.md +77 -10
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +61 -3
- package/.claude/skills/cc-plan/references/planning-contract.md +28 -4
- package/.claude/skills/cc-review/CHANGELOG.md +6 -0
- package/.claude/skills/cc-review/PLAYBOOK.md +9 -3
- package/.claude/skills/cc-review/SKILL.md +52 -1
- package/.claude/skills/cc-review/references/implementation-review-branch.md +106 -6
- package/.claude/skills/cc-review/references/plan-review-branch.md +109 -4
- package/.claude/skills/cc-review/references/review-methods.md +162 -9
- package/.claude/skills/cc-spec-init/PLAYBOOK.md +1 -1
- package/.claude/skills/cc-spec-init/SKILL.md +1 -1
- package/CHANGELOG.md +22 -0
- package/README.md +16 -18
- package/README.zh-CN.md +15 -17
- package/bin/cc-devflow-cli.js +8 -94
- package/docs/examples/example-bindings.json +5 -5
- package/docs/examples/full-design-blocked/README.md +1 -1
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/task.md +17 -5
- package/docs/examples/local-handoff/README.md +1 -1
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/task.md +17 -5
- package/docs/examples/pdca-loop/README.md +1 -1
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/task.md +17 -5
- package/docs/guides/artifact-contract.md +1 -1
- package/docs/guides/getting-started.md +3 -3
- package/docs/guides/getting-started.zh-CN.md +3 -3
- package/docs/guides/minimize-artifacts.md +1 -7
- package/lib/skill-runtime/CLAUDE.md +1 -1
- package/lib/skill-runtime/index.js +1 -9
- package/package.json +1 -1
- package/lib/skill-runtime/errors.js +0 -39
- package/lib/skill-runtime/query-registry.js +0 -101
- package/lib/skill-runtime/query.js +0 -126
- package/lib/skill-runtime/trace.js +0 -22
|
@@ -13,6 +13,9 @@ Mode: investigation
|
|
|
13
13
|
Profile: tiny | standard | deep
|
|
14
14
|
Diagnosis:
|
|
15
15
|
|
|
16
|
+
Investigation Mode:
|
|
17
|
+
-
|
|
18
|
+
|
|
16
19
|
Symptom:
|
|
17
20
|
-
|
|
18
21
|
|
|
@@ -31,15 +34,79 @@ Root Cause:
|
|
|
31
34
|
Evidence Chain:
|
|
32
35
|
-
|
|
33
36
|
|
|
37
|
+
Feedback Loop Contract:
|
|
38
|
+
- Type:
|
|
39
|
+
- Command / driver:
|
|
40
|
+
- Expected failing signal:
|
|
41
|
+
- Actual failing signal:
|
|
42
|
+
- Symptom match:
|
|
43
|
+
- Runtime / determinism / failure rate:
|
|
44
|
+
- Sharpening plan:
|
|
45
|
+
|
|
46
|
+
Root Cause Proof Ladder:
|
|
47
|
+
| Level | Evidence | Verdict |
|
|
48
|
+
|-------|----------|---------|
|
|
49
|
+
| L1 Symptom Site | | |
|
|
50
|
+
| L2 First Bad State | | |
|
|
51
|
+
| L3 Violated Contract | | |
|
|
52
|
+
| L4 Original Trigger | | |
|
|
53
|
+
| L5 Counterfactual Proof | | |
|
|
54
|
+
| L6 Escape Reason | | |
|
|
55
|
+
|
|
56
|
+
Hypothesis Table:
|
|
57
|
+
| Hypothesis | Support | Counter-evidence | Falsification method | Observation | Status |
|
|
58
|
+
|------------|---------|------------------|----------------------|-------------|--------|
|
|
59
|
+
| H1 | | | | | active |
|
|
60
|
+
|
|
61
|
+
Boundary Probe Matrix:
|
|
62
|
+
| Boundary | Input | Output | Config / env | State | Verdict |
|
|
63
|
+
|----------|-------|--------|--------------|-------|---------|
|
|
64
|
+
| N/A | | | | | not-applicable |
|
|
65
|
+
|
|
66
|
+
Backward Trace Chain:
|
|
67
|
+
- Immediate failure site:
|
|
68
|
+
- Direct caller:
|
|
69
|
+
- Caller chain:
|
|
70
|
+
- Bad value origin:
|
|
71
|
+
- Original trigger:
|
|
72
|
+
- Why symptom-site fix is rejected:
|
|
73
|
+
|
|
74
|
+
Reference Comparison:
|
|
75
|
+
- Similar working example:
|
|
76
|
+
- Broken path:
|
|
77
|
+
- Differences found:
|
|
78
|
+
- Accepted hypothesis:
|
|
79
|
+
- Ruled-out differences:
|
|
80
|
+
|
|
81
|
+
Diagnostic Instrumentation:
|
|
82
|
+
- Probe tag:
|
|
83
|
+
- Location:
|
|
84
|
+
- Question answered:
|
|
85
|
+
- Command:
|
|
86
|
+
- Expected signal:
|
|
87
|
+
- Actual signal:
|
|
88
|
+
- Cleanup requirement:
|
|
89
|
+
|
|
34
90
|
Repair Boundary:
|
|
35
91
|
-
|
|
36
92
|
|
|
93
|
+
Correct Test Seam:
|
|
94
|
+
- Public seam:
|
|
95
|
+
- Real trigger chain covered:
|
|
96
|
+
- Mock boundary:
|
|
97
|
+
- Private implementation assertions avoided:
|
|
98
|
+
|
|
37
99
|
Verification:
|
|
38
100
|
-
|
|
39
101
|
|
|
40
102
|
Prevention:
|
|
41
103
|
-
|
|
42
104
|
|
|
105
|
+
Diagnose-Only / Reroute:
|
|
106
|
+
- Applies: yes | no
|
|
107
|
+
- Next action:
|
|
108
|
+
- Why no repair task:
|
|
109
|
+
|
|
43
110
|
Risk / Escalate If:
|
|
44
111
|
-
|
|
45
112
|
|
|
@@ -47,7 +114,7 @@ Risk / Escalate If:
|
|
|
47
114
|
|
|
48
115
|
Codex / ClaudeCode must treat this `task.md` as the only repair contract.
|
|
49
116
|
|
|
50
|
-
- CLI resolver: all workflow commands must run through `.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh` or `.codex/skills/cc-dev/scripts/resolve-cc-devflow.sh`; if it cannot prove `
|
|
117
|
+
- CLI resolver: all workflow commands must run through `.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh` or `.codex/skills/cc-dev/scripts/resolve-cc-devflow.sh`; if it cannot prove `next-change-key`, stop blocked.
|
|
51
118
|
- Do not generate process files beyond this `task.md`.
|
|
52
119
|
- Complete tasks with `scripts/mark-task-complete.sh --tasks devflow/changes/<change-key>/task.md --task <task-id>`.
|
|
53
120
|
- Stage commit rule: when PDCA or IDCA finishes in the current environment, commit the completed stage to Git.
|
|
@@ -7,20 +7,52 @@
|
|
|
7
7
|
|
|
8
8
|
## Minimum Evidence
|
|
9
9
|
|
|
10
|
+
- investigation mode
|
|
10
11
|
- symptom
|
|
11
12
|
- reproduction path
|
|
12
13
|
- expected vs actual
|
|
14
|
+
- feedback loop contract
|
|
13
15
|
- code path
|
|
14
16
|
- recent change signal
|
|
15
17
|
- prior postmortem signal
|
|
18
|
+
- evidence chain
|
|
19
|
+
- tested hypotheses and falsification results
|
|
16
20
|
- first bad state
|
|
17
21
|
- violated contract
|
|
18
22
|
- original trigger
|
|
19
23
|
- counterfactual proof
|
|
20
24
|
- escape reason
|
|
25
|
+
- boundary probe, backward trace, or reference comparison when applicable
|
|
21
26
|
- repair boundary
|
|
27
|
+
- correct test seam
|
|
22
28
|
- verification command
|
|
23
29
|
|
|
30
|
+
## Investigation Modes
|
|
31
|
+
|
|
32
|
+
- `reproduce-first`: stabilize the reported failure before naming root cause.
|
|
33
|
+
- `feedback-loop`: sharpen a slow, broad, or flaky signal before proof.
|
|
34
|
+
- `diff-trace`: inspect recent changes and behavioral breakpoints.
|
|
35
|
+
- `boundary-probe`: inspect every component boundary before localizing repair.
|
|
36
|
+
- `backward-trace`: trace from symptom site to bad value origin and original trigger.
|
|
37
|
+
- `reference-compare`: compare working and broken paths before guessing.
|
|
38
|
+
- `condition-wait`: replace sleeps/timeouts with real completion conditions.
|
|
39
|
+
- `workflow-forensics`: classify artifact, Git, state, tool, permission, or process failure.
|
|
40
|
+
- `performance`: collect baseline/profile/query/bisect evidence.
|
|
41
|
+
- `diagnose-only`: produce evidence handoff, monitoring, human action, or reroute; do not invent repair tasks.
|
|
42
|
+
|
|
43
|
+
## Root Cause Proof
|
|
44
|
+
|
|
45
|
+
The contract must climb the ladder:
|
|
46
|
+
|
|
47
|
+
1. Symptom Site
|
|
48
|
+
2. First Bad State
|
|
49
|
+
3. Violated Contract
|
|
50
|
+
4. Original Trigger
|
|
51
|
+
5. Counterfactual Proof
|
|
52
|
+
6. Escape Reason
|
|
53
|
+
|
|
54
|
+
Missing first bad state, original trigger, or counterfactual proof means no confirmed repair task. Return an Evidence Request, diagnose-only handoff, or reroute.
|
|
55
|
+
|
|
24
56
|
## Output Shape
|
|
25
57
|
|
|
26
58
|
- `task.md#Root Cause Contract` is the human truth.
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# CC-Plan Skill Changelog
|
|
2
2
|
|
|
3
|
+
## v3.10.4 - 2026-05-14
|
|
4
|
+
|
|
5
|
+
- require product discovery before engineering planning
|
|
6
|
+
|
|
7
|
+
## v3.10.3 - 2026-05-14
|
|
8
|
+
|
|
9
|
+
- add Second-Move Review before plan approval
|
|
10
|
+
|
|
11
|
+
## v3.10.2 - 2026-05-14
|
|
12
|
+
|
|
13
|
+
- restore the planning flow that was over-pruned during artifact minimization: requirement reality, system shape, interface/data contract, abstraction boundary, execution architecture, task contract, and final approval
|
|
14
|
+
- keep decision questions, option comparison, PRD/user-story thinking, and engineering review inside `task.md#Contract Summary` instead of reviving separate process files
|
|
15
|
+
- update the task template and planning contract so `cc-plan` remains artifact-light but still guides multi-round planning
|
|
16
|
+
|
|
3
17
|
## v3.10.1 - 2026-05-13
|
|
4
18
|
|
|
5
19
|
- simplify the planning artifact contract to `task.md` plus Git history
|
|
@@ -14,7 +14,12 @@
|
|
|
14
14
|
2. Git commits record Plan completion; do not create process files beyond `task.md`.
|
|
15
15
|
3. Current branch must bind to the full change key before writing durable output.
|
|
16
16
|
4. The task list must let `cc-do` continue without chat memory.
|
|
17
|
-
5. Ask only
|
|
17
|
+
5. Ask only decisions that change product value, product shape, scope, design, task split, interface, or verification; otherwise choose from repo evidence.
|
|
18
|
+
6. Product/creative questions come before engineering questions when worth or shape is unclear.
|
|
19
|
+
7. Preserve planning thought inside `task.md#Contract Summary`: product/creative discovery, requirement reality, system shape, interface/data contract, abstraction boundary, execution architecture, task contract, Second-Move Review, and final approval.
|
|
20
|
+
8. Non-trivial plans complete Second-Move Review: first good move, simpler move, better architecture, selected move, and rejected tradeoff. Tiny plans still record why the short path is enough.
|
|
21
|
+
9. Non-trivial plans use at least two confirmation rounds unless source evidence already answers one: product/creative confirmation, then engineering/task confirmation.
|
|
22
|
+
10. User-facing decisions use `D<N>` questions with recommendation, options, impact, and STOP.
|
|
18
23
|
|
|
19
24
|
## Required Task Fields
|
|
20
25
|
|
|
@@ -29,6 +34,21 @@ Each task block includes:
|
|
|
29
34
|
- completion evidence
|
|
30
35
|
- commit point if the task closes an execution environment
|
|
31
36
|
|
|
37
|
+
## Contract Summary Fields
|
|
38
|
+
|
|
39
|
+
`task.md#Contract Summary` includes:
|
|
40
|
+
|
|
41
|
+
- Source handoff and repo evidence
|
|
42
|
+
- Product/creative discovery: worth doing, desired product shape, narrowest wedge, 10x/better version, do-nothing consequence
|
|
43
|
+
- Requirement reality
|
|
44
|
+
- Decision questions and answers
|
|
45
|
+
- Planning flow table
|
|
46
|
+
- Second-Move Review when non-trivial
|
|
47
|
+
- Approved direction and non-goals
|
|
48
|
+
- User stories and edge stories
|
|
49
|
+
- Engineering review gate
|
|
50
|
+
- Verification and escalation triggers
|
|
51
|
+
|
|
32
52
|
## Exit
|
|
33
53
|
|
|
34
54
|
Run the smallest relevant validation for the plan artifacts, stage only owned changes, and commit the Plan stage. Then hand off to `cc-do`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cc-plan
|
|
3
|
-
version: 3.10.
|
|
3
|
+
version: 3.10.4
|
|
4
4
|
description: Use when a requirement, roadmap item, or bug needs scope clarification, design decisions, and executable task breakdown before coding starts.
|
|
5
5
|
triggers:
|
|
6
6
|
- 帮我规划这个需求
|
|
@@ -25,14 +25,18 @@ effects:
|
|
|
25
25
|
- roadmap progress sync when a source item exists
|
|
26
26
|
- Git commit after the Plan stage is complete
|
|
27
27
|
entry_gate:
|
|
28
|
-
- Resolve the CLI with `../cc-dev/scripts/resolve-cc-devflow.sh require
|
|
28
|
+
- Resolve the CLI with `../cc-dev/scripts/resolve-cc-devflow.sh require next-change-key config` before workflow commands.
|
|
29
29
|
- Assign a canonical REQ/FIX change key through `next-change-key` before writing `task.md`.
|
|
30
30
|
- Enforce the Worktree Branch Contract immediately after the change key exists.
|
|
31
|
-
- Read
|
|
32
|
-
-
|
|
31
|
+
- Read repo evidence before asking the user: roadmap handoff, specs, relevant code/tests/docs, recent commits, and existing task truth when present.
|
|
32
|
+
- Run the planning flow before task generation: product/creative discovery, requirement reality, system shape, interface/data contract, abstraction boundary, execution architecture, task contract, Second-Move Review, and final approval.
|
|
33
|
+
- Ask with the Decision Question Protocol when the answer changes scope, design, implementation boundary, or verification.
|
|
33
34
|
exit_criteria:
|
|
34
|
-
- "`task.md#Contract Summary` states the approved solution, non-goals, frozen decisions, work branch, verification expectations, and open assumptions."
|
|
35
|
+
- "`task.md#Contract Summary` states the approved solution, non-goals, frozen decisions, work branch, user stories, decision questions, planning-flow results, review gate, verification expectations, and open assumptions."
|
|
35
36
|
- "`task.md` contains executable task blocks generated from `assets/TASKS_TEMPLATE.md`."
|
|
37
|
+
- "Non-trivial plans complete product/creative discovery before engineering design: worth doing, desired product shape, narrowest wedge, 10x/better version, and do-nothing consequence."
|
|
38
|
+
- "Non-trivial plans complete Second-Move Review before approval: first good move, simpler move, better architecture, selected move, and rejected tradeoff."
|
|
39
|
+
- "User decisions that changed the plan were asked as D<N> questions and recorded in `task.md`."
|
|
36
40
|
- "No process file is created beyond `task.md`."
|
|
37
41
|
- "Source roadmap progress is synced or explicitly skipped in the final response."
|
|
38
42
|
- "Plan-stage changes are committed to Git before handing off to `cc-do`."
|
|
@@ -53,15 +57,15 @@ tool_budget:
|
|
|
53
57
|
|
|
54
58
|
- `devflow/changes/<change-key>/task.md`
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
不要生成额外过程文件。Git commit 是阶段历史,`task.md` 是任务真相。
|
|
57
61
|
|
|
58
62
|
## Operating Contract
|
|
59
63
|
|
|
60
|
-
1. 先用 resolver 找到当前仓库的 `cc-devflow`,并确认支持 `
|
|
64
|
+
1. 先用 resolver 找到当前仓库的 `cc-devflow`,并确认支持 `next-change-key`、`config`。
|
|
61
65
|
2. 用 `next-change-key --prefix REQ|FIX --description "..."` 生成 `changeId` 和完整 `changeKey`,不要手动扫描编号。
|
|
62
66
|
3. 分配 change key 后立刻锚定分支:`REQ-003-copy-link` 对应 `REQ/003-copy-link`,`FIX-014-auth-race` 对应 `FIX/014-auth-race`。当前在 default branch 时停止并报告 setup blocker。
|
|
63
|
-
4. 写
|
|
64
|
-
5. `task.md` 必须包含 `Contract Summary
|
|
67
|
+
4. 写 task blocks 前先确认方案。tiny 计划仍要过 planning flow,只是更短。
|
|
68
|
+
5. `task.md` 必须包含 `Contract Summary`、决策问题、planning flow、review gate、任务列表、验证命令、完成证据、禁止重决策事项和阶段 commit 要求。
|
|
65
69
|
6. 完成 Plan 后提交 Git commit。下一阶段从 Git history 和 `task.md` 恢复,不靠过程文件。
|
|
66
70
|
|
|
67
71
|
```bash
|
|
@@ -73,11 +77,74 @@ bash "$DEVFLOW" config resolve --format policy
|
|
|
73
77
|
|
|
74
78
|
- 用最小可逆方案解决真实需求,不扩张到假想未来。
|
|
75
79
|
- 缺证据就写 assumption,不伪装成事实。
|
|
76
|
-
-
|
|
80
|
+
- 工程计划前先做产品/创意确认:这个问题值不值得做,用户想得到什么体验,最窄可交付楔子是什么,10x / better version 是什么,不做会损失什么。
|
|
81
|
+
- 非 trivial 计划至少经过两轮用户确认:先确认产品价值和形态,再确认工程方案和任务合同;只有 roadmap / spec 已经给出等价证据时才能记录 skip reason。
|
|
82
|
+
- 第一手好方案不能直接冻结;非 trivial 计划必须过 Second-Move Review:先写 first good move,再找 simpler move 和 better architecture,最后选择一个当前可执行的 move。
|
|
83
|
+
- 计划先做上下文和设计判断,再拆 task;不能把架构、接口、字段、测试缝隙留给 `cc-do` 猜。
|
|
84
|
+
- 用户视角必须清楚:真实用户 / operator、status quo、最痛失败场景、最小成功信号和非目标。
|
|
77
85
|
- 行为变更任务按 tracer bullet 写:`[TEST] -> [IMPL] -> [REFACTOR]`,不要水平切层。
|
|
78
86
|
- 每个任务写清目标、文件、依赖、TDD phase、读什么、怎么验证、完成证据。
|
|
79
87
|
- 回归测试不能 defer;缺 seam 时先计划 spike 或设计修正。
|
|
80
88
|
|
|
89
|
+
## Planning Flow
|
|
90
|
+
|
|
91
|
+
先把调查和引导结果写进 `task.md#Contract Summary`,再生成任务。不要把这些内容拆成其它过程文件。
|
|
92
|
+
|
|
93
|
+
1. Product / Creative Discovery:确认这个问题值不值得做、目标体验、最窄楔子、10x / better version、do-nothing consequence;证据不足时先问用户,不先谈实现。
|
|
94
|
+
2. Requirement Reality:确认真实用户 / operator、当前 workaround、最痛失败场景、最小成功信号、非目标。
|
|
95
|
+
3. System Shape:确认现有代码链路、模块归属、状态 / 数据流、复用点、边界外系统和必须保留的不变量。
|
|
96
|
+
4. Interface / Data Contract:确认 public interface、调用方、输入输出、关键字段、错误形态、权限 / 边界和命名来源。
|
|
97
|
+
5. Abstraction Boundary:确认复杂度藏在哪个模块,哪些抽象被拒绝,哪些公共方法必须保持小而深。
|
|
98
|
+
6. Execution Architecture:确认 foundation、core logic、integration、polish/tests 阶段的冻结决策、文件职责、耦合风险和失败恢复。
|
|
99
|
+
7. Task Contract:确认每条 tracer bullet 的 user / edge story、Red test name、public seam、Green minimality guard、refactor candidates 和 2-5 分钟任务粒度。
|
|
100
|
+
8. Second-Move Review:记录 first good move、simpler move、better architecture、selected move 和 rejected tradeoff;tiny 计划可压成一句,非 trivial 计划必须说明为什么没有选择另一个好走法。
|
|
101
|
+
9. Final Approval:展示冻结方案和任务合同摘要;用户批准前不生成执行 task blocks。
|
|
102
|
+
|
|
103
|
+
`tiny-design` 可以把每轮压成一句话;`full-design` 必须保留足够证据让执行者不二次设计。任一轮 `blocked` 时,只能问一个 blocking question、拆回 roadmap / 多个 REQ/FIX,或记录用户明确接受的人工边界。非 trivial 计划的产品/创意确认和工程方案确认必须分成至少两次确认,不能一次性把所有问题塞给用户。
|
|
104
|
+
|
|
105
|
+
## Decision Question Protocol
|
|
106
|
+
|
|
107
|
+
只在答案会改变范围、方案、接口、任务切分或验证口径时提问。能从 repo evidence、roadmap、spec、测试或 git history 确认的,不问用户。
|
|
108
|
+
提问前先做一次 Second-Move Review:这个问题是否能由 repo evidence 回答,是否把用户拉进实现细节,是否有更高质量的问题能一次冻结更多下游决策。
|
|
109
|
+
产品/创意问题优先于工程问题。若“值不值得做”或“做成什么样”仍不清楚,只问产品/创意层 D<N>;不要提前问文件、接口、字段、测试实现。
|
|
110
|
+
|
|
111
|
+
固定格式:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
D<N> - <decision title>
|
|
115
|
+
Planning object: <REQ/FIX/RM/change key>
|
|
116
|
+
Known evidence: <repo / roadmap / code / test facts>
|
|
117
|
+
Decision needed: <what changes downstream>
|
|
118
|
+
Recommendation: <A/B/C> because <reason>
|
|
119
|
+
Options:
|
|
120
|
+
A) <label> (recommended)
|
|
121
|
+
Good: <upside>
|
|
122
|
+
Cost/Risk: <cost or risk>
|
|
123
|
+
B) <label>
|
|
124
|
+
Good: <upside>
|
|
125
|
+
Cost/Risk: <cost or risk>
|
|
126
|
+
C) <label, optional>
|
|
127
|
+
Good: <upside>
|
|
128
|
+
Cost/Risk: <cost or risk>
|
|
129
|
+
Impact: <what cc-do will do differently>
|
|
130
|
+
STOP: wait for the user answer before continuing.
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
用户回答后,把决定写入 `task.md#Contract Summary` 的 `Decision Questions`。聊天不是长期真相源。
|
|
134
|
+
|
|
135
|
+
## Engineering Review Gate
|
|
136
|
+
|
|
137
|
+
冻结 task blocks 前,在 `task.md#Contract Summary` 里完成轻量 review:
|
|
138
|
+
|
|
139
|
+
1. Existing leverage map:每个子问题先映射到现有代码、脚本、spec、模板或测试。
|
|
140
|
+
2. Scope challenge:超过 8 个文件、2 个新 service/class、或跨模块连锁时,说明为什么不是过度设计。
|
|
141
|
+
3. Second-Move Review:非 trivial 方案必须比较 first good move、simpler move、better architecture,并说明 selected move 与 rejected tradeoff。
|
|
142
|
+
4. Domain language check:核心名词、文件名、测试名、任务标题对齐项目真相;没有来源就写 assumption。
|
|
143
|
+
5. Interface depth check:公共面小而深,复杂度藏进模块内部,边界 adapter 是具体操作而不是 generic catch-all。
|
|
144
|
+
6. Test seam check:Red 任务从公共接口、调用方流程或用户可见路径证明行为;不要测私有实现细节。
|
|
145
|
+
7. Mock boundary check:只 mock 外部 API、时间、随机性、文件系统或必要数据库边界。
|
|
146
|
+
8. Feedback loop check:为每个行为选定最短可信反馈循环。
|
|
147
|
+
|
|
81
148
|
## Required Output
|
|
82
149
|
|
|
83
150
|
`task.md` 的结构由 `assets/TASKS_TEMPLATE.md` 提供。模板外只允许补充对当前需求必要的事实,不允许新建额外过程文件。
|
|
@@ -20,9 +20,68 @@ Goal:
|
|
|
20
20
|
Do Not Do:
|
|
21
21
|
-
|
|
22
22
|
|
|
23
|
+
Source Handoff:
|
|
24
|
+
- Roadmap / issue / user source:
|
|
25
|
+
- Repo evidence read:
|
|
26
|
+
- Existing leverage:
|
|
27
|
+
- Canonical language:
|
|
28
|
+
|
|
29
|
+
Product / Creative Discovery:
|
|
30
|
+
- Worth doing because:
|
|
31
|
+
- Desired product shape:
|
|
32
|
+
- Narrowest wedge:
|
|
33
|
+
- 10x / better version:
|
|
34
|
+
- Do-nothing consequence:
|
|
35
|
+
- Product confirmation rounds:
|
|
36
|
+
|
|
37
|
+
Requirement Reality:
|
|
38
|
+
- User / operator:
|
|
39
|
+
- Status quo workaround:
|
|
40
|
+
- Most painful failure:
|
|
41
|
+
- Smallest success signal:
|
|
42
|
+
- Non-goals:
|
|
43
|
+
|
|
44
|
+
Decision Questions:
|
|
45
|
+
| ID | Decision | Evidence | Choice | Impact |
|
|
46
|
+
|----|----------|----------|--------|--------|
|
|
47
|
+
| D1 | | | | |
|
|
48
|
+
|
|
49
|
+
Planning Flow:
|
|
50
|
+
| Round | Status | Evidence / decision | Opens task? |
|
|
51
|
+
|-------|--------|---------------------|-------------|
|
|
52
|
+
| Product / Creative Discovery | confirmed | | |
|
|
53
|
+
| Requirement Reality | confirmed | | |
|
|
54
|
+
| System Shape | confirmed | | |
|
|
55
|
+
| Interface / Data Contract | confirmed | | |
|
|
56
|
+
| Abstraction Boundary | confirmed | | |
|
|
57
|
+
| Execution Architecture | confirmed | | |
|
|
58
|
+
| Task Contract | confirmed | | |
|
|
59
|
+
| Second-Move Review | confirmed | | |
|
|
60
|
+
| Final Approval | confirmed | | yes |
|
|
61
|
+
|
|
62
|
+
Second-Move Review:
|
|
63
|
+
- First good move:
|
|
64
|
+
- Simpler move:
|
|
65
|
+
- Better architecture:
|
|
66
|
+
- Selected move:
|
|
67
|
+
- Rejected tradeoff:
|
|
68
|
+
|
|
23
69
|
Approved Direction:
|
|
24
70
|
-
|
|
25
71
|
|
|
72
|
+
User Stories:
|
|
73
|
+
| ID | Actor | Story | Acceptance | Edge / recovery |
|
|
74
|
+
|----|-------|-------|------------|-----------------|
|
|
75
|
+
| US-001 | | | | |
|
|
76
|
+
|
|
77
|
+
Engineering Review Gate:
|
|
78
|
+
- Existing leverage map:
|
|
79
|
+
- Scope challenge:
|
|
80
|
+
- Interface depth:
|
|
81
|
+
- Test seam:
|
|
82
|
+
- Mock boundary:
|
|
83
|
+
- Feedback loop:
|
|
84
|
+
|
|
26
85
|
Acceptance:
|
|
27
86
|
-
|
|
28
87
|
|
|
@@ -36,7 +95,7 @@ Risk / Escalate If:
|
|
|
36
95
|
|
|
37
96
|
ClaudeCode / Codex 执行本计划时,必须把 `task.md` 当成唯一任务合同。
|
|
38
97
|
|
|
39
|
-
- CLI resolver: all workflow commands must run through `.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh` or `.codex/skills/cc-dev/scripts/resolve-cc-devflow.sh`; if it cannot prove `
|
|
98
|
+
- CLI resolver: all workflow commands must run through `.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh` or `.codex/skills/cc-dev/scripts/resolve-cc-devflow.sh`; if it cannot prove `next-change-key`, stop blocked.
|
|
40
99
|
- Task selection: use `scripts/select-ready-tasks.sh --tasks devflow/changes/<change-key>/task.md`.
|
|
41
100
|
- Completion: after Red/Green/Refactor evidence and review pass, run `scripts/mark-task-complete.sh --tasks devflow/changes/<change-key>/task.md --task <task-id>`.
|
|
42
101
|
- Stage commit rule: when PDCA or IDCA finishes in the current environment, commit the completed stage to Git.
|
|
@@ -47,8 +106,7 @@ DEVFLOW=".claude/skills/cc-dev/scripts/resolve-cc-devflow.sh"
|
|
|
47
106
|
if [[ ! -f "$DEVFLOW" && -f ".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh" ]]; then
|
|
48
107
|
DEVFLOW=".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh"
|
|
49
108
|
fi
|
|
50
|
-
bash "$DEVFLOW" require
|
|
51
|
-
bash "$DEVFLOW" query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact
|
|
109
|
+
bash "$DEVFLOW" require next-change-key
|
|
52
110
|
SCRIPT_ROOT=".claude/skills/cc-do/scripts"
|
|
53
111
|
if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
|
|
54
112
|
SCRIPT_ROOT=".codex/skills/cc-do/scripts"
|
|
@@ -9,9 +9,33 @@
|
|
|
9
9
|
5. New change keys come from `cc-devflow next-change-key`.
|
|
10
10
|
6. Branch binds to the full change key before durable output.
|
|
11
11
|
7. User decisions that affect scope, design, or verification are written into `task.md#Contract Summary`.
|
|
12
|
-
8.
|
|
13
|
-
9.
|
|
14
|
-
10.
|
|
12
|
+
8. Planning flow results are written into `task.md#Contract Summary`; removing old process files must not remove planning thought.
|
|
13
|
+
9. Placeholder tasks are invalid.
|
|
14
|
+
10. Behavior work uses tracer bullets and TDD unless an exception is recorded.
|
|
15
|
+
11. Roadmap sync, when needed, happens through roadmap files and Git commit, not change metadata.
|
|
16
|
+
12. Non-trivial plans complete Second-Move Review before approval; the first workable plan is not frozen until a simpler move and a better-architecture move have both been considered.
|
|
17
|
+
13. Non-trivial plans complete product/creative discovery before engineering design; if worth, shape, wedge, or 10x/better version is unclear, ask product questions before implementation questions.
|
|
18
|
+
14. Product/creative confirmation and engineering confirmation are separate rounds unless roadmap/spec evidence already answers one of them and `task.md` records the skip reason.
|
|
19
|
+
|
|
20
|
+
## Planning Flow
|
|
21
|
+
|
|
22
|
+
Every non-trivial plan confirms these rounds before task generation:
|
|
23
|
+
|
|
24
|
+
1. Product/Creative Discovery: worth doing, desired product shape, narrowest wedge, 10x/better version, do-nothing consequence.
|
|
25
|
+
2. Requirement Reality: real user/operator, workaround, painful failure, smallest success signal, non-goals.
|
|
26
|
+
3. System Shape: existing code path, module owner, state/data flow, reuse point, boundary systems.
|
|
27
|
+
4. Interface/Data Contract: public seam, caller, input/output, fields, error shape, permission/boundary.
|
|
28
|
+
5. Abstraction Boundary: where complexity lives, rejected abstractions, public/private method split.
|
|
29
|
+
6. Execution Architecture: foundation/core/integration/polish decisions, file responsibility, failure recovery.
|
|
30
|
+
7. Task Contract: tracer bullets, Red test names, public seams, Green minimality, refactor candidates.
|
|
31
|
+
8. Second-Move Review: first good move, simpler move, better architecture, selected move, and rejected tradeoff.
|
|
32
|
+
9. Final Approval: approved option and task contract summary.
|
|
33
|
+
|
|
34
|
+
Tiny plans may compress a round to one evidence-backed line. Full designs must preserve enough detail that `cc-do` does not invent architecture, fields, interfaces, or tests.
|
|
35
|
+
|
|
36
|
+
## Decision Questions
|
|
37
|
+
|
|
38
|
+
Ask only when the answer changes product value, product shape, scope, design, task split, interface, or verification. Before asking, run Second-Move Review on the question itself: can repo evidence answer it, is it too implementation-shaped for the user, and would a better question freeze more downstream decisions? Product/creative questions come before engineering questions when worth or shape is unclear. Use `D<N>` with known evidence, recommendation, 2-3 mutually exclusive options, impact, and a stop point. Record the answer in `task.md#Contract Summary`.
|
|
15
39
|
|
|
16
40
|
## Required Task Fields
|
|
17
41
|
|
|
@@ -28,4 +52,4 @@
|
|
|
28
52
|
|
|
29
53
|
## Review Gate
|
|
30
54
|
|
|
31
|
-
Before exit, check scope, existing leverage,
|
|
55
|
+
Before exit, check product/creative discovery, scope, existing leverage, Second-Move Review, domain language, interface depth, test seam, mock boundary, feedback loop, and failure modes. If the plan is not executable from `task.md`, it is not done.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# CC-Review Changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.1 - 2026-05-14
|
|
4
|
+
|
|
5
|
+
- restore deep review method flow without restoring review process files
|
|
6
|
+
- add node-by-node review, risk-lane coverage, finding aggregation, decision question, plan facet, implementation diff, and test-quality guidance
|
|
7
|
+
- keep plan review output in `task.md` and implementation review output in the response/user-choice loop
|
|
8
|
+
|
|
3
9
|
## 2.2.0 - 2026-05-13
|
|
4
10
|
|
|
5
11
|
- split review exits by branch: plan and investigation reviews write findings directly into `task.md`
|
|
@@ -11,9 +11,12 @@
|
|
|
11
11
|
3. 不读取、不生成、不维护过程文件。
|
|
12
12
|
4. Git history 是唯一持久 review 记忆;重复 review 时用 `git diff <old>...HEAD` 缩小范围。
|
|
13
13
|
5. 可用 subagent 时可以派发只读 reviewer;raw output 留在会话里,主线程验证后再进入最终 findings。
|
|
14
|
-
6.
|
|
15
|
-
7.
|
|
16
|
-
8.
|
|
14
|
+
6. 复杂实现或 mixed review 考虑 intent/regression、security/privacy、performance/reliability、contracts/coverage 四类风险 lane。
|
|
15
|
+
7. 按 selected facet 或 changed surface 逐节点检查;每个节点 checked、skipped 或 blocked。
|
|
16
|
+
8. 不固定 finding 数量。证据决定输出。
|
|
17
|
+
9. 每条 finding 必须有 evidence、impact、recommendation 和 route。
|
|
18
|
+
10. 输出前聚合 raw findings:合并重复,降级弱证据,拒收 speculative / out-of-scope / stale findings。
|
|
19
|
+
11. 计划 review 的结果直接写回 `task.md`;执行 review 的结果先询问用户选择修复方案;只差验收,进 `cc-check`。
|
|
17
20
|
|
|
18
21
|
## Review Standard
|
|
19
22
|
|
|
@@ -26,6 +29,9 @@
|
|
|
26
29
|
- 哪些代码坏味道在当前 blast radius 内?
|
|
27
30
|
- 哪些测试、日志、UI 操作或端到端证据缺失?
|
|
28
31
|
- 哪些 finding 必须修,哪些可以 defer,哪些只是 advisory?
|
|
32
|
+
- 哪些节点已经审过,哪些 skipped / blocked,原因是什么?
|
|
33
|
+
- 四类风险 lane 哪些覆盖了,哪些因为 scope 小或工具不可用跳过?
|
|
34
|
+
- subagent findings 哪些被接受、合并、降级或拒收?
|
|
29
35
|
- 下一步为什么是 `cc-plan` / `cc-do` / `cc-check` / `cc-act` / `stop`?
|
|
30
36
|
|
|
31
37
|
## Decision Rule
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cc-review
|
|
3
|
-
version: 2.2.
|
|
3
|
+
version: 2.2.1
|
|
4
4
|
description: Use when a plan, bug fix, PR, or implementation diff needs review findings. Plan reviews write findings into task.md; implementation reviews ask the user to choose a repair option before fixing.
|
|
5
5
|
triggers:
|
|
6
6
|
- 深度 review 这个方案
|
|
@@ -17,6 +17,7 @@ reads:
|
|
|
17
17
|
- references/plan-review-branch.md
|
|
18
18
|
- references/implementation-review-branch.md
|
|
19
19
|
- references/e2e-and-plugin-verification.md
|
|
20
|
+
- scripts/collect-review-context.sh
|
|
20
21
|
writes:
|
|
21
22
|
- path: current response
|
|
22
23
|
durability: ephemeral
|
|
@@ -34,6 +35,7 @@ entry_gate:
|
|
|
34
35
|
- Classify the review target as plan, implementation, PR, or mixed.
|
|
35
36
|
- Read only the task, PR, diff, code, tests, logs, screenshots, and docs needed to review the requested scope.
|
|
36
37
|
- Use Git history and current diff as the only durable review memory; do not load or create process files.
|
|
38
|
+
- For repeat reviews, use `git diff <old>...HEAD` or `scripts/collect-review-context.sh` to narrow the delta before re-reviewing.
|
|
37
39
|
- Freeze the requested scope before finding smells; report only issues inside the change blast radius or clearly amplified by it.
|
|
38
40
|
- Subagents are optional read-only reviewers; their raw output stays in the conversation and is not saved to files.
|
|
39
41
|
exit_criteria:
|
|
@@ -42,6 +44,8 @@ exit_criteria:
|
|
|
42
44
|
- Plan or investigation review findings are written into the relevant `task.md` section before exit.
|
|
43
45
|
- Implementation review findings are returned with concrete repair options and a blocking user choice; no repair happens until the user selects an option.
|
|
44
46
|
- In-scope code smells are either findings, explicit defers, or clean with reason.
|
|
47
|
+
- Selected review facets or changed surfaces are checked, skipped with reason, or blocked; no artificial finding cap was applied.
|
|
48
|
+
- Subagent findings, when used, are accepted, merged, downgraded, or rejected by the main thread before final output.
|
|
45
49
|
- If no issues are found, the answer says so and names residual test or evidence risk.
|
|
46
50
|
- No process file was created.
|
|
47
51
|
reroutes:
|
|
@@ -97,6 +101,21 @@ Review 的价值在于问题质量,不在于过程记录数量。没有证据
|
|
|
97
101
|
| `PR` | 用户要求 review PR | PR diff, body accuracy, CI/test proof, merge risk |
|
|
98
102
|
| `mixed` | 方案和实现都变了 | plan contract first, then implementation conformance |
|
|
99
103
|
|
|
104
|
+
## Review Loop
|
|
105
|
+
|
|
106
|
+
每次 review 都保留深度流程,但不保留过程文件:
|
|
107
|
+
|
|
108
|
+
1. Classify:判断 plan / implementation / PR / mixed。
|
|
109
|
+
2. Scope Freeze:写清本次 review 的意图、blast radius、明确不审的历史债。
|
|
110
|
+
3. Delta:用 Git、PR diff、`task.md` 和当前命令输出确定相对上次或 base 的真实变化。
|
|
111
|
+
4. Facets:按风险选择 strategy / engineering / design / DX / TOC / contract / smell / test / runtime / docs。
|
|
112
|
+
5. Nodes:把每个 selected facet 或 changed surface 当成一个 review node,在 scratch reasoning 中逐个检查;每个 node 只能 checked、skipped、blocked。
|
|
113
|
+
6. Findings:每个 finding 必须有 evidence、impact、recommendation、route;没有证据的怀疑只能是 residual risk 或 blocked evidence。
|
|
114
|
+
7. Aggregate:合并重复 finding,降级弱证据,拒收 out-of-scope、stale、speculative finding。
|
|
115
|
+
8. Exit:计划问题写 `task.md`;实现问题回对话给修复选项;只差验证进 `cc-check`。
|
|
116
|
+
|
|
117
|
+
渐进加载只控制读多少上下文,不允许把该审的节点省掉。
|
|
118
|
+
|
|
100
119
|
## Exit Contract
|
|
101
120
|
|
|
102
121
|
- Plan / investigation review: directly update `devflow/changes/<change-key>/task.md` with the review findings, decision options, blocked assumptions, and required task changes. Final response only summarizes what was written and the next route.
|
|
@@ -104,6 +123,17 @@ Review 的价值在于问题质量,不在于过程记录数量。没有证据
|
|
|
104
123
|
- PR review: return findings in the response or GitHub review only; do not write local files.
|
|
105
124
|
- Clean review: say `No findings`, name residual verification risk, and route to `cc-check` or `stop`.
|
|
106
125
|
|
|
126
|
+
## Risk Lanes
|
|
127
|
+
|
|
128
|
+
复杂实现、跨模块 diff、PR landing 前复审、或 mixed review 默认考虑四条风险 lane。小 diff 可以由一个 combined pass 覆盖,但必须说明 skip reason。
|
|
129
|
+
|
|
130
|
+
1. Intent / regression: diff 是否兑现意图,是否引入范围外行为、fallback 退化、caller/callee contract 漂移。
|
|
131
|
+
2. Security / privacy: auth、输入验证、注入、secret、敏感数据、默认权限、外部输入信任边界。
|
|
132
|
+
3. Performance / reliability: 热路径重复 I/O、启动/渲染/请求成本、cleanup 泄漏、retry storm、排序/竞态、失败处理。
|
|
133
|
+
4. Contracts / coverage: API/schema/type/config/flag、迁移 fallout、回归测试、日志、metrics、assertion、error path。
|
|
134
|
+
|
|
135
|
+
这些是审查视角,不是 finding 配额。
|
|
136
|
+
|
|
107
137
|
## Finding Rules
|
|
108
138
|
|
|
109
139
|
每条 finding 必须包含:
|
|
@@ -121,6 +151,27 @@ Review 的价值在于问题质量,不在于过程记录数量。没有证据
|
|
|
121
151
|
|
|
122
152
|
可以使用只读 reviewer subagent,但输出只在主线程汇总,不写文件。主线程必须验证、去重、降级或拒收 subagent finding。
|
|
123
153
|
|
|
154
|
+
Subagent 只拿自己的 review packet:scope、delta、node/facet、需要读取的文件、输出格式。不要把完整聊天历史当作 reviewer 上下文。没有 subagent 工具时,主线程按同样 node/facet 串行检查,并在输出中说明 fallback。
|
|
155
|
+
|
|
156
|
+
## Decision Questions
|
|
157
|
+
|
|
158
|
+
只有 finding 需要用户判断时才提问。不要在第一个问题处打断整个 review,除非答案会阻塞下一个 node。
|
|
159
|
+
|
|
160
|
+
格式:
|
|
161
|
+
|
|
162
|
+
```text
|
|
163
|
+
D<N> - <decision title>
|
|
164
|
+
Evidence: <file/line/diff/log/UI action>
|
|
165
|
+
Risk: <what breaks if ignored>
|
|
166
|
+
Recommendation: <recommended option and why>
|
|
167
|
+
Options:
|
|
168
|
+
A) <smallest safe fix> - impact
|
|
169
|
+
B) <broader cleanup> - impact
|
|
170
|
+
C) <defer> - risk
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Plan / investigation review 的 decision question 写进 `task.md`。Implementation review 的 repair options 留在当前回复,等待用户选择。
|
|
174
|
+
|
|
124
175
|
## Output
|
|
125
176
|
|
|
126
177
|
按 review 类型输出:
|