cc-devflow 4.5.13 → 4.5.14

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.
Files changed (43) hide show
  1. package/.claude/skills/cc-act/SKILL.md +1 -1
  2. package/.claude/skills/cc-check/CHANGELOG.md +6 -0
  3. package/.claude/skills/cc-check/PLAYBOOK.md +18 -1
  4. package/.claude/skills/cc-check/SKILL.md +59 -2
  5. package/.claude/skills/cc-check/references/gate-contract.md +34 -0
  6. package/.claude/skills/cc-check/references/review-contract.md +11 -0
  7. package/.claude/skills/cc-do/CHANGELOG.md +6 -0
  8. package/.claude/skills/cc-do/PLAYBOOK.md +23 -6
  9. package/.claude/skills/cc-do/SKILL.md +19 -2
  10. package/.claude/skills/cc-do/references/execution-recovery.md +15 -3
  11. package/.claude/skills/cc-investigate/CHANGELOG.md +6 -0
  12. package/.claude/skills/cc-investigate/PLAYBOOK.md +24 -0
  13. package/.claude/skills/cc-investigate/SKILL.md +38 -2
  14. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +67 -0
  15. package/.claude/skills/cc-investigate/references/investigation-contract.md +32 -0
  16. package/.claude/skills/cc-plan/CHANGELOG.md +6 -0
  17. package/.claude/skills/cc-plan/PLAYBOOK.md +18 -1
  18. package/.claude/skills/cc-plan/SKILL.md +67 -7
  19. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +48 -0
  20. package/.claude/skills/cc-plan/references/planning-contract.md +23 -4
  21. package/.claude/skills/cc-review/CHANGELOG.md +6 -0
  22. package/.claude/skills/cc-review/PLAYBOOK.md +9 -3
  23. package/.claude/skills/cc-review/SKILL.md +52 -1
  24. package/.claude/skills/cc-review/references/implementation-review-branch.md +106 -6
  25. package/.claude/skills/cc-review/references/plan-review-branch.md +109 -4
  26. package/.claude/skills/cc-review/references/review-methods.md +162 -9
  27. package/.claude/skills/cc-spec-init/PLAYBOOK.md +1 -1
  28. package/.claude/skills/cc-spec-init/SKILL.md +1 -1
  29. package/CHANGELOG.md +10 -0
  30. package/README.md +17 -18
  31. package/README.zh-CN.md +16 -17
  32. package/docs/examples/example-bindings.json +5 -5
  33. package/docs/examples/full-design-blocked/README.md +1 -1
  34. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/task.md +1 -1
  35. package/docs/examples/local-handoff/README.md +1 -1
  36. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/task.md +1 -1
  37. package/docs/examples/pdca-loop/README.md +1 -1
  38. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/task.md +1 -1
  39. package/docs/guides/artifact-contract.md +1 -1
  40. package/docs/guides/getting-started.md +3 -3
  41. package/docs/guides/getting-started.zh-CN.md +3 -3
  42. package/docs/guides/minimize-artifacts.md +1 -7
  43. package/package.json +1 -1
@@ -68,7 +68,7 @@ tool_budget:
68
68
  - `devflow/postmortems/INDEX.md`
69
69
  - `devflow/postmortems/incidents/<date>-<change-key>.md`
70
70
 
71
- 其余状态和历史交给 Git。不要写额外过程文件或 JSON 文档。
71
+ 其余状态和历史交给 Git。不要写额外过程文件。
72
72
 
73
73
  ## Ship Modes
74
74
 
@@ -1,5 +1,11 @@
1
1
  # CC-Check Skill Changelog
2
2
 
3
+ ## v1.12.2 - 2026-05-14
4
+
5
+ - restore the verification flow that was over-pruned during artifact minimization: reset contract, rerun reality, boundary checks, claim evidence, QA/test-quality review, diff/scope audit, and failure ownership
6
+ - keep check output in the response and Git commit instead of reviving local verification process files
7
+ - expand the short verdict shape with QA and diff sections so `pass` still requires fresh, mapped evidence
8
+
3
9
  ## v1.12.1 - 2026-05-13
4
10
 
5
11
  - compress the visible output contract to `Verdict / Evidence / Review / Route`
@@ -11,7 +11,10 @@
11
11
  3. Re-run commands; do not inherit green claims from chat.
12
12
  4. Do not generate process files.
13
13
  5. Separate missing evidence from proven failure.
14
- 6. Commit the completed Check stage when the environment finishes.
14
+ 6. Map every claim to evidence before verdict.
15
+ 7. Review test quality for behavior changes and bugfixes.
16
+ 8. Classify failure ownership before routing.
17
+ 9. Commit the completed Check stage when the environment finishes.
15
18
 
16
19
  ## Verdict Shape
17
20
 
@@ -26,6 +29,20 @@ Short response only:
26
29
  - Verdict: `pass` / `fail` / `blocked`
27
30
  - Evidence: commands, exit status, and proven claims
28
31
  - Review: clean, findings remain, or not reviewed
32
+ - QA: feedback loop and test quality where applicable
33
+ - Diff: scope match or drift
29
34
  - Route: `cc-act` / `cc-do` / `cc-investigate` / `cc-plan` / `stop`
30
35
 
31
36
  Do not write process files.
37
+
38
+ ## Reset Signals
39
+
40
+ Stop and rebuild the verdict when:
41
+
42
+ - output is inherited from chat
43
+ - command output is stale
44
+ - test is green but never proved Red
45
+ - behavior is tested through private implementation only
46
+ - failure owner is unknown
47
+ - current diff does not match `task.md`
48
+ - review finding is unresolved or stale
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cc-check
3
- version: 1.12.1
3
+ version: 1.12.2
4
4
  description: Use when a planned or investigated change needs fresh verification evidence and an honest pass/fail/blocked verdict before cc-act.
5
5
  triggers:
6
6
  - 验收这个需求
@@ -27,10 +27,15 @@ entry_gate:
27
27
  - Resolve the CLI with `../cc-dev/scripts/resolve-cc-devflow.sh require query workflow-context` when workflow query is needed; unsupported CLIs are blockers.
28
28
  - Read `task.md`, current Git diff, relevant code/tests, PR text when present, and fresh command output.
29
29
  - Re-run fresh commands instead of inheriting cc-do narration.
30
+ - Classify the current reality as pass-candidate, fail-candidate, or blocked-candidate before writing a verdict.
31
+ - Map every completion claim to command output, exit status, and key observation.
30
32
  - Do not create process files.
31
33
  exit_criteria:
32
34
  - Verdict is exactly pass, fail, or blocked.
33
35
  - Every passing statement cites fresh command output, exit status, and what claim it proves.
36
+ - Behavior changes and bugfixes include feedback-loop and test-quality review.
37
+ - Current diff is checked against `task.md` for missing scope, scope creep, and unintended file touch.
38
+ - Failures are classified as branch, baseline, environment, external, or unknown.
34
39
  - Missing evidence is separated from real failure.
35
40
  - After pass/fail/blocked, commit the stage state when repository policy allows it.
36
41
  - The next step is unambiguous: cc-act, cc-do, cc-investigate, cc-plan, or stop.
@@ -79,11 +84,63 @@ NO PASS WITHOUT FRESH EVIDENCE
79
84
  - `blocked`: required environment, auth, input, or evidence is missing.
80
85
  6. Commit the stage when this PDCA/IDCA environment completes.
81
86
 
87
+ ## Verification Phases
88
+
89
+ 1. Reset Contract:读取 `task.md`、当前 diff、相关代码 / 测试、PR 文本(如果存在),明确本轮验证对象。
90
+ 2. Re-run Reality:重新运行可信 gate,不继承 `cc-do` 叙述;记录命令、退出码、关键输出、skip / blocked 原因。
91
+ 3. Check Boundaries:检查 runtime、task completion、requirement diff、claim evidence、QA/test quality、review freshness、docs / UI / DX 影响。
92
+ 4. Freeze Verdict:只输出 `pass` / `fail` / `blocked`,并给出 route。
93
+
94
+ 任一阶段发现证据过期、边界矛盾、结论无法诚实成立,都先 reset 或 reroute,不硬凑 `pass`。
95
+
96
+ ## Evidence Layers
97
+
98
+ `cc-check` 不是只看测试绿不绿。按风险选择必要层,至少说明未覆盖层的 skip reason:
99
+
100
+ 1. Runtime:test、lint、typecheck、build、脚本 gate。
101
+ 2. Task Completion:`task.md` 的任务是否真的完成,完成证据是否对应当前 diff。
102
+ 3. Requirement Diff:当前改动是否兑现需求,是否有 scope creep、missing requirement、意外文件触点。
103
+ 4. Claim Evidence:每个通过声明都有命令、退出码、观察和证明的 claim。
104
+ 5. QA Test Quality:red/green、public seam、mock boundary、fixture honesty、test-only API smell。
105
+ 6. Behavior Evidence:用户可见 expected / actual / reproduction steps 是否被当前反馈环覆盖。
106
+ 7. Review Freshness:本轮 review 是否覆盖当前 HEAD;未 review 要说清风险。
107
+ 8. Failure Ownership:失败归属 branch、baseline、environment、external 或 unknown。
108
+ 9. Docs / Browser / Operator:UI、CLI、docs、operator workflow 受影响时有证据或 skip reason。
109
+
110
+ ## Claim Evidence Matrix
111
+
112
+ 不要把所有绿色写成“测试过了”:
113
+
114
+ | Claim | Required proof | Not enough |
115
+ | --- | --- | --- |
116
+ | Tests pass | current command, exit 0, failures 0 | old output |
117
+ | Lint clean | current lint command, no errors | formatter only |
118
+ | Build succeeds | build command exit 0 | tests only |
119
+ | Bug fixed | original symptom or regression loop passes | code changed |
120
+ | Regression test works | red -> green evidence | green only |
121
+ | Requirements met | each task/acceptance mapped to proof | self-report |
122
+
123
+ 缺关键 claim 证据时,结论至少是 `blocked`。
124
+
125
+ ## Failure Ownership
126
+
127
+ 失败不能只写“红了”:
128
+
129
+ - `branch`:本分支引入或当前改动相关。
130
+ - `baseline`:有 base branch 或历史证据证明预先存在。
131
+ - `environment`:缺依赖、权限、服务、密钥或平台条件。
132
+ - `external`:外部系统或第三方服务失败。
133
+ - `unknown`:归属不明;不能支撑 `pass`。
134
+
135
+ 每个失败写清 error name、证据、owner、rescue action。
136
+
82
137
  ## Output
83
138
 
84
139
  只输出短结论,不写过程文件:
85
140
 
86
141
  - Verdict: `pass` / `fail` / `blocked`
87
142
  - Evidence: command, exit status, and the claim it proves
88
- - Review: clean, findings remain, or not reviewed
143
+ - Review: clean, findings remain, not reviewed, or skipped with reason
144
+ - QA: feedback loop, test quality, and behavior evidence when applicable
145
+ - Diff: scope match, missing scope, or scope drift
89
146
  - Route: `cc-act` / `cc-do` / `cc-investigate` / `cc-plan` / `stop`
@@ -16,6 +16,15 @@
16
16
 
17
17
  所有通过结论都必须来自本次新鲜证据;旧输出只能当线索,不能直接继承 verdict。
18
18
 
19
+ ## Verification Phases
20
+
21
+ 1. Reset Contract: read `task.md`, current diff, relevant code/tests, and PR text when present.
22
+ 2. Re-run Reality: run fresh commands and record exit code plus key observation.
23
+ 3. Check Boundaries: map task completion, requirement diff, claim evidence, QA/test quality, review freshness, and docs/UI/operator impact.
24
+ 4. Freeze Verdict: choose `pass`, `fail`, or `blocked` and route honestly.
25
+
26
+ Skipping a relevant phase requires a concrete reason in the response.
27
+
19
28
  ## QA Feedback Loop
20
29
 
21
30
  行为变更和 bugfix 的 evidence 还必须说明反馈环:
@@ -27,6 +36,31 @@
27
36
 
28
37
  没有可信 loop 的 bugfix 默认不能 `pass`。
29
38
 
39
+ ## Claim Evidence
40
+
41
+ Every claim needs proof:
42
+
43
+ - tests pass: current command and exit 0
44
+ - lint clean: current lint command and no errors
45
+ - build succeeds: build command exit 0
46
+ - bug fixed: original symptom or regression loop now passes
47
+ - regression test works: red then green evidence
48
+ - requirements met: each task or acceptance item mapped to proof
49
+
50
+ Missing proof is `blocked`, not `pass`.
51
+
52
+ ## Failure Ownership
53
+
54
+ Classify every failure:
55
+
56
+ - `branch`
57
+ - `baseline`
58
+ - `environment`
59
+ - `external`
60
+ - `unknown`
61
+
62
+ `unknown` cannot support `pass`. It needs a rescue action or a reroute.
63
+
30
64
  ## Reroute
31
65
 
32
66
  - `none`
@@ -13,9 +13,20 @@ Use current evidence:
13
13
  - code and test inspection
14
14
  - cc-review findings from the current conversation when available
15
15
 
16
+ ## Review Layers
17
+
18
+ - Task completion: every checked task in `task.md` has matching evidence.
19
+ - Requirement diff: current diff matches approved scope and has no unexplained extra touch.
20
+ - Critical pass: check data safety, injection, trust boundary, time/window safety, errors swallowed, and silent data loss when relevant.
21
+ - Test quality: Red/Green proof, public seam, mock boundary, fixture honesty, and no test-only production API.
22
+ - Docs/UI/operator: affected surfaces have evidence or explicit skip reason.
23
+ - Freshness: review facts cover current HEAD, not an earlier diff.
24
+
16
25
  ## Gate Rules
17
26
 
18
27
  - Unfixed important findings route to `cc-do`.
19
28
  - Missing behavior evidence is `blocked`, not `pass`.
20
29
  - Stale command output is ignored.
21
30
  - Review facts belong in the response, PR brief, or Git commits, not in process files.
31
+ - Low-confidence concerns are warnings unless evidence makes them blocking.
32
+ - Scope or design invalidation routes to `cc-plan`; disproven root cause routes to `cc-investigate`.
@@ -1,5 +1,11 @@
1
1
  # CC-Do Skill Changelog
2
2
 
3
+ ## v1.7.2 - 2026-05-14
4
+
5
+ - restore the execution discipline that was over-pruned during artifact minimization: tracer-bullet TDD, public seam Red evidence, mock/fixture honesty, Green minimality, refactor-after-green, and repeated-failure reroutes
6
+ - keep execution proof in `task.md`, command output, final response, and Git commits instead of reviving per-task process files
7
+ - strengthen recovery rules so stale chat memory and manual checkbox edits cannot substitute for task evidence
8
+
3
9
  ## v1.7.1 - 2026-05-13
4
10
 
5
11
  - simplify execution recovery so state comes from `task.md`, Git, and current repo truth
@@ -9,12 +9,22 @@
9
9
  ## Task Gates
10
10
 
11
11
  1. Task selected from `task.md`
12
- 2. Red observed or TDD exception recorded
13
- 3. Green observed
14
- 4. Refactor complete or unnecessary
15
- 5. Verification run
16
- 6. `mark-task-complete.sh` updates `task.md`
17
- 7. Git commit created
12
+ 2. Task shape checked: one behavior, public seam, mock boundary, Green minimality
13
+ 3. Red observed for the expected behavior or TDD exception recorded
14
+ 4. Green observed with minimal production change
15
+ 5. Refactor complete or explicitly unnecessary
16
+ 6. Verification run
17
+ 7. `mark-task-complete.sh` updates `task.md`
18
+ 8. Git commit created
19
+
20
+ ## TDD Gates
21
+
22
+ - No production code before an expected failing test unless the task records a TDD exception.
23
+ - Red must fail because the target behavior is missing, not because of syntax, fixture, or mock mistakes.
24
+ - Red must enter through a public seam; private implementation tests do not unlock Green.
25
+ - Green must satisfy only the current Red.
26
+ - Refactor happens only after Green and stays inside the current slice.
27
+ - Fixture shortcuts and boundary mocks must not hide input contract problems.
18
28
 
19
29
  ## Recovery
20
30
 
@@ -28,6 +38,13 @@ Recover from Git and `task.md`:
28
38
 
29
39
  Do not recover from process files. Only `task.md`, Git, and current repo truth count.
30
40
 
41
+ ## Reroute Triggers
42
+
43
+ - New evidence disproves root cause: `cc-investigate`
44
+ - New evidence breaks scope, interface, or task contract: `cc-plan`
45
+ - Repeated patch attempts fail after the same task: stop and reroute
46
+ - Review feedback exceeds frozen scope: `cc-plan`
47
+
31
48
  ## Commit Rule
32
49
 
33
50
  Every completed task or execution environment gets its own commit. Split by behavior or layer when needed, but do not leave completed work uncommitted between stages.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cc-do
3
- version: 1.7.1
3
+ version: 1.7.2
4
4
  description: Use when implementing frozen tasks, resuming interrupted work, applying an investigation handoff, or fixing review feedback inside the approved scope.
5
5
  triggers:
6
6
  - 开始做 T003
@@ -29,8 +29,11 @@ entry_gate:
29
29
  - Run `query workflow-context --change <changeId> --change-key <changeKey> --data-only --no-trace --compact`.
30
30
  - Read `task.md`, current Git status, and only the code/tests needed by the current task.
31
31
  - Reject execution if the task cannot be restated from `task.md` and repo evidence.
32
+ - Validate the task's execution shape before coding: Red test name, one observable behavior, public verification path, allowed boundary mocks, Green minimality guard, and refactor candidates.
32
33
  exit_criteria:
33
34
  - Current task has Red/Green evidence or a recorded TDD exception in `task.md`.
35
+ - Red evidence proves the target behavior through a public seam; Green evidence is minimal and does not pre-build future behavior.
36
+ - Refactor evidence names the smell removed or states why no refactor was needed.
34
37
  - Verification commands have been run or explicitly blocked.
35
38
  - Task status is updated through `scripts/mark-task-complete.sh`.
36
39
  - The completed task/environment is committed to Git.
@@ -58,7 +61,7 @@ tool_budget:
58
61
  - `devflow/changes/<change-key>/task.md` 中的任务状态
59
62
  - Git commit
60
63
 
61
- 不要生成额外过程文件或 JSON 文档。失败和阻塞写在对用户的响应里;需要长期保留的失败教训交给 `cc-act` 写 incident postmortem。
64
+ 不要生成额外过程文件。失败和阻塞写在对用户的响应里;需要长期保留的失败教训交给 `cc-act` 写 incident postmortem。
62
65
 
63
66
  ## TDD Iron Law
64
67
 
@@ -79,6 +82,20 @@ NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
79
82
  7. Complete:运行 `scripts/mark-task-complete.sh --tasks devflow/changes/<change-key>/task.md --task <task-id>`。
80
83
  8. Commit:每个任务或执行环境完成后提交 Git commit。
81
84
 
85
+ ## Execution Discipline
86
+
87
+ 执行质量写进 `task.md` 的当前 task block、完成证据、最终回复和 Git commit,不写额外过程文件。
88
+
89
+ 1. 每次只推进一个 tracer bullet:一个用户可观察行为的 Red -> Green -> Refactor。
90
+ 2. Red 必须从公共接口、调用方流程、CLI/API/UI 路径或真实边界进入系统;私有函数、内部调用次数、临时结构断言不算 Red 证据。
91
+ 3. 一个 Red 只证明一个逻辑行为;bulk Red、实现步骤式测试名、直接查内部状态都要先修测试设计。
92
+ 4. Mock 只能放在系统边界:外部 API、时间、随机性、文件系统、网络或必要数据库边界;mock 自家模块默认说明 seam 有问题。
93
+ 5. Fixture 必须诚实:partial fixture、cast、generated stub、缺字段 payload 都要说明真实 contract 字段和测试填充字段。
94
+ 6. Green 只写当前红灯要求的最小实现;新增接口优先小而深,依赖从调用方传入,边界 adapter 用具体操作而不是 generic catch-all。
95
+ 7. Refactor 只能在 Green 后做,只清理当前 slice 暴露出的重复、命名、浅模块、长方法、feature envy、primitive obsession、错误处理或三层以上分支。
96
+ 8. 三次修补仍失败时,先质疑 `Root Cause Contract` 或 `Contract Summary`,reroute 到 `cc-investigate` / `cc-plan`,不要继续堆补丁。
97
+ 9. 完成脚本失败时,修缺失证据、依赖或 task block,不手改 checkbox 绕过。
98
+
82
99
  ## Parallel Rule
83
100
 
84
101
  只有任务显式允许并行、依赖已满足、触碰路径无重叠、且每个执行环境都能独立提交时,才并行。否则串行。
@@ -15,6 +15,18 @@ Do not recover from process files. They are not part of the workflow.
15
15
  1. Read `task.md`.
16
16
  2. Run `git status --short`.
17
17
  3. Inspect recent commits.
18
- 4. Select the first unchecked task.
19
- 5. Re-run the task's verification command if previous output is stale.
20
- 6. Continue or reroute.
18
+ 4. Select the first unchecked task whose dependencies are satisfied.
19
+ 5. Restate the task's goal, public seam, files, verification, and do-not-re-decide items.
20
+ 6. Re-run the task's verification command if previous output is stale.
21
+ 7. If Red/Green evidence is missing, rebuild the TDD loop before editing production code.
22
+ 8. Continue or reroute.
23
+
24
+ ## Bad Recovery Signals
25
+
26
+ - Current task cannot be restated from `task.md`.
27
+ - Dirty files do not match the selected task.
28
+ - Prior green output is stale or came from chat memory.
29
+ - Test seam is private or mock-heavy.
30
+ - Completion script would only be satisfied by hand-editing status.
31
+
32
+ Any of these forces a reset from Git, `task.md`, and fresh command output.
@@ -1,5 +1,11 @@
1
1
  # CC-Investigate Skill Changelog
2
2
 
3
+ ## v1.6.2 - 2026-05-14
4
+
5
+ - restore the investigation flow that was over-pruned during artifact minimization: mode classification, feedback loop contract, evidence chain, hypothesis falsification, boundary/backward/reference evidence, diagnostic instrumentation, and correct test seam
6
+ - keep root-cause proof and diagnose-only/reroute boundaries inside `task.md#Root Cause Contract` instead of reviving analysis, manifest, or report process files
7
+ - update the task template and investigation contract so `cc-investigate` stays artifact-light without becoming a shallow bug checklist
8
+
3
9
  ## v1.6.1 - 2026-05-13
4
10
 
5
11
  - simplify the investigation artifact contract to `task.md` plus Git history
@@ -15,18 +15,42 @@
15
15
  3. Write only `task.md`; Git records the stage.
16
16
  4. No process file beyond `task.md`.
17
17
  5. Reroute instead of mixing feature planning into bug investigation.
18
+ 6. Classify the investigation mode before tracing evidence.
19
+ 7. Record hypotheses with falsification methods and actual observations.
20
+ 8. Missing first bad state, original trigger, or counterfactual proof stops repair tasks.
18
21
 
19
22
  ## Investigation Modes
20
23
 
21
24
  - `reproduce-first`
25
+ - `feedback-loop`
22
26
  - `diff-trace`
23
27
  - `boundary-probe`
24
28
  - `backward-trace`
25
29
  - `condition-wait`
26
30
  - `reference-compare`
27
31
  - `workflow-forensics`
32
+ - `performance`
28
33
  - `diagnose-only`
29
34
 
35
+ ## Root Cause Contract Fields
36
+
37
+ `task.md#Root Cause Contract` includes:
38
+
39
+ - Investigation mode
40
+ - Symptom, expected, actual, reproduction
41
+ - Feedback loop contract
42
+ - Evidence chain
43
+ - Root Cause Proof Ladder
44
+ - Hypothesis table
45
+ - Boundary probe matrix when applicable
46
+ - Backward trace chain when applicable
47
+ - Reference comparison when applicable
48
+ - Diagnostic instrumentation and cleanup when used
49
+ - Repair boundary
50
+ - Correct test seam
51
+ - Prevention / escape reason
52
+ - Diagnose-only or reroute next action when repair is not valid
53
+
30
54
  ## Exit
31
55
 
32
56
  `task.md` must tell `cc-do` what to fix, what not to touch, and what command proves the repair. Commit the Investigate stage before handing off.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cc-investigate
3
- version: 1.6.1
3
+ version: 1.6.2
4
4
  description: Use when a bug, regression, broken task, or unexpected behavior needs root-cause investigation before coding resumes.
5
5
  triggers:
6
6
  - 帮我查这个 bug
@@ -29,10 +29,14 @@ entry_gate:
29
29
  - Assign a FIX change key through `next-change-key --prefix FIX --description "<short bug name>"`.
30
30
  - Enforce the Worktree Branch Contract before writing `task.md`.
31
31
  - Reproduce or build the closest honest feedback loop before naming root cause.
32
+ - Classify the investigation mode before tracing: reproduce-first, diff-trace, boundary-probe, backward-trace, reference-compare, condition-wait, workflow-forensics, performance, or diagnose-only.
32
33
  - Search relevant code, logs, recent history, and project postmortems before declaring the bug novel.
34
+ - Record hypotheses with falsification methods; do not collapse first intuition into root cause.
33
35
  exit_criteria:
34
36
  - "`task.md#Root Cause Contract` proves symptom site, first bad state, violated contract, original trigger, counterfactual proof, and escape reason."
37
+ - "`task.md#Root Cause Contract` records investigation mode, feedback loop, evidence chain, tested hypotheses, boundary/backward/reference evidence when applicable, correct test seam, and diagnose-only boundary when applicable."
35
38
  - "`task.md` contains the repair tasks needed by `cc-do`."
39
+ - "Evidence gaps produce Evidence Request, diagnose-only, or reroute tasks instead of fake repair tasks."
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
  - "Investigate-stage changes are committed to Git before handing off to `cc-do`."
@@ -57,7 +61,7 @@ tool_budget:
57
61
 
58
62
  - `devflow/changes/<change-key>/task.md`
59
63
 
60
- 不要生成额外过程文件或 JSON 文档。Git commit 是阶段历史,`task.md` 是根因合同。
64
+ 不要生成额外过程文件。Git commit 是阶段历史,`task.md` 是根因合同。
61
65
 
62
66
  ## Iron Law
63
67
 
@@ -77,6 +81,36 @@ NO REPAIR WITHOUT A FROZEN ROOT-CAUSE CONTRACT
77
81
  6. Freeze:把根因、修复边界、测试 seam、allowed/forbidden files 写进 `task.md`。
78
82
  7. Commit:提交 Investigate 阶段,再交给 `cc-do`。
79
83
 
84
+ ## Investigation Modes
85
+
86
+ 先说清这是什么类问题,再决定证据路径:
87
+
88
+ - `reproduce-first`:症状真实但复现不稳,先把现象钉死。
89
+ - `feedback-loop`:已有复现但信号慢、宽或偶然,先让 loop 更快、更准、更可复跑。
90
+ - `diff-trace`:明显 regression,先查最近变化和行为断点。
91
+ - `boundary-probe`:多组件链路断裂,逐边界记录 input、output、config/env、state、verdict。
92
+ - `backward-trace`:报错点很深或坏值来源不明,从 symptom site 追到 original trigger。
93
+ - `reference-compare`:仓库里有相似可用路径,先列 working vs broken 差异。
94
+ - `condition-wait`:flaky / sleep / timeout,找真实完成条件,不先加大等待。
95
+ - `workflow-forensics`:坏在 artifact、Git、state、tool、permission 或流程。
96
+ - `performance`:性能回归先拿 baseline、profile、query plan 或 bisect 信号。
97
+ - `diagnose-only`:只做根因报告;task blocks 只能是证据交接、监控、人工动作或 reroute。
98
+
99
+ ## Evidence Flow
100
+
101
+ 调查结果写入 `task.md#Root Cause Contract`,不要拆新文件:
102
+
103
+ 1. Symptom Capture:用户看见什么、期望 / 实际、触发条件、影响面、复现入口。
104
+ 2. Feedback Loop Contract:loop type、命令或手动 driver、expected failing signal、actual failing signal、symptom match、runtime、determinism、failure rate、sharpening plan。
105
+ 3. Evidence Chain:按时间和数据流记录证据,不把代码阅读伪装成复现。
106
+ 4. Boundary Probe Matrix:多组件时记录每个边界的 input、output、config/env、state、verdict。
107
+ 5. Backward Trace Chain:deep error 时记录 immediate failure site、direct caller、caller chain、bad value origin、original trigger、rejected symptom-site fix。
108
+ 6. Reference Comparison:记录 similar working example、broken path、differences found、accepted hypotheses、ruled-out differences。
109
+ 7. Hypothesis Table:列 3-5 个候选,收敛到 1-3 个 active hypotheses;每个都有 support、counter-evidence、falsification method、expected observation、actual observation。
110
+ 8. Diagnostic Instrumentation:临时 probe 必须有 tag、location、question answered、command、expected signal、actual signal、cleanup requirement。
111
+ 9. Correct Test Seam:说明 regression test 是否覆盖真实触发链;只能测私有实现时,先记录设计缺口或 reroute。
112
+ 10. Repair Boundary:affected module、allowed files、forbidden files、blast radius、split-or-reroute decision。
113
+
80
114
  ## Root Cause Proof Ladder
81
115
 
82
116
  - L1 Symptom Site
@@ -88,6 +122,8 @@ NO REPAIR WITHOUT A FROZEN ROOT-CAUSE CONTRACT
88
122
 
89
123
  缺 L2、L4 或 L5 时,只能写 Evidence Request、diagnose-only 或 reroute。
90
124
 
125
+ Escape reason 不能写成人工提醒;它必须变成 regression test、artifact guard、capability invariant、operator check 或明确 follow-up。
126
+
91
127
  ## Handoff
92
128
 
93
129
  退出时只说清:
@@ -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
 
@@ -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,11 @@
1
1
  # CC-Plan Skill Changelog
2
2
 
3
+ ## v3.10.2 - 2026-05-14
4
+
5
+ - 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
6
+ - keep decision questions, option comparison, PRD/user-story thinking, and engineering review inside `task.md#Contract Summary` instead of reviving separate process files
7
+ - update the task template and planning contract so `cc-plan` remains artifact-light but still guides multi-round planning
8
+
3
9
  ## v3.10.1 - 2026-05-13
4
10
 
5
11
  - simplify the planning artifact contract to `task.md` plus Git history
@@ -14,7 +14,10 @@
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 blocking questions; otherwise choose from repo evidence.
17
+ 5. Ask only decisions that change scope, design, task split, interface, or verification; otherwise choose from repo evidence.
18
+ 6. Preserve planning thought inside `task.md#Contract Summary`: requirement reality, system shape, interface/data contract, abstraction boundary, execution architecture, task contract, and final approval.
19
+ 7. Non-trivial plans compare `minimal viable` and `ideal architecture`; tiny plans still record why the short path is enough.
20
+ 8. User-facing decisions use `D<N>` questions with recommendation, options, impact, and STOP.
18
21
 
19
22
  ## Required Task Fields
20
23
 
@@ -29,6 +32,20 @@ Each task block includes:
29
32
  - completion evidence
30
33
  - commit point if the task closes an execution environment
31
34
 
35
+ ## Contract Summary Fields
36
+
37
+ `task.md#Contract Summary` includes:
38
+
39
+ - Source handoff and repo evidence
40
+ - Requirement reality
41
+ - Decision questions and answers
42
+ - Planning flow table
43
+ - Minimal viable / ideal architecture comparison when non-trivial
44
+ - Approved direction and non-goals
45
+ - User stories and edge stories
46
+ - Engineering review gate
47
+ - Verification and escalation triggers
48
+
32
49
  ## Exit
33
50
 
34
51
  Run the smallest relevant validation for the plan artifacts, stage only owned changes, and commit the Plan stage. Then hand off to `cc-do`.