cc-devflow 4.5.11 → 4.5.12

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 (185) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +18 -0
  2. package/.claude/skills/cc-act/PLAYBOOK.md +17 -269
  3. package/.claude/skills/cc-act/SKILL.md +38 -425
  4. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md +2 -13
  5. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_TEMPLATE.md +1 -9
  6. package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +21 -177
  7. package/.claude/skills/cc-act/references/closure-contract.md +12 -63
  8. package/.claude/skills/cc-act/references/git-commit-guidelines.md +5 -5
  9. package/.claude/skills/cc-act/scripts/cc-act-common.sh +5 -322
  10. package/.claude/skills/cc-act/scripts/detect-ship-target.sh +11 -2
  11. package/.claude/skills/cc-act/scripts/inspect-git-index.sh +58 -0
  12. package/.claude/skills/cc-act/scripts/render-pr-brief.sh +40 -440
  13. package/.claude/skills/cc-act/scripts/verify-act-gate.sh +10 -50
  14. package/.claude/skills/cc-check/CHANGELOG.md +18 -0
  15. package/.claude/skills/cc-check/PLAYBOOK.md +19 -273
  16. package/.claude/skills/cc-check/SKILL.md +33 -456
  17. package/.claude/skills/cc-check/references/review-contract.md +12 -147
  18. package/.claude/skills/cc-dev/CHANGELOG.md +15 -0
  19. package/.claude/skills/cc-dev/PLAYBOOK.md +1 -1
  20. package/.claude/skills/cc-dev/SKILL.md +52 -137
  21. package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +181 -0
  22. package/.claude/skills/cc-do/CHANGELOG.md +11 -0
  23. package/.claude/skills/cc-do/PLAYBOOK.md +19 -113
  24. package/.claude/skills/cc-do/SKILL.md +39 -245
  25. package/.claude/skills/cc-do/references/execution-recovery.md +15 -109
  26. package/.claude/skills/cc-do/scripts/cc-do-common.sh +5 -57
  27. package/.claude/skills/cc-do/scripts/check-task-status.sh +35 -65
  28. package/.claude/skills/cc-do/scripts/mark-task-complete.sh +9 -46
  29. package/.claude/skills/cc-do/scripts/select-ready-tasks.sh +29 -97
  30. package/.claude/skills/cc-investigate/CHANGELOG.md +16 -0
  31. package/.claude/skills/cc-investigate/PLAYBOOK.md +20 -180
  32. package/.claude/skills/cc-investigate/SKILL.md +64 -246
  33. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +48 -98
  34. package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -218
  35. package/.claude/skills/cc-next/CHANGELOG.md +6 -0
  36. package/.claude/skills/cc-next/PLAYBOOK.md +12 -8
  37. package/.claude/skills/cc-next/SKILL.md +34 -140
  38. package/.claude/skills/cc-plan/CHANGELOG.md +16 -0
  39. package/.claude/skills/cc-plan/PLAYBOOK.md +22 -161
  40. package/.claude/skills/cc-plan/SKILL.md +45 -295
  41. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +30 -228
  42. package/.claude/skills/cc-plan/references/planning-contract.md +24 -161
  43. package/.claude/skills/cc-plan/scripts/next-change-key.sh +8 -44
  44. package/.claude/skills/cc-plan/scripts/parse-task-dependencies.js +2 -2
  45. package/.claude/skills/cc-plan/scripts/validate-scope.sh +1 -1
  46. package/.claude/skills/cc-pr-land/SKILL.md +14 -114
  47. package/.claude/skills/cc-pr-review/CHANGELOG.md +4 -0
  48. package/.claude/skills/cc-pr-review/SKILL.md +20 -103
  49. package/.claude/skills/cc-review/CHANGELOG.md +17 -0
  50. package/.claude/skills/cc-review/PLAYBOOK.md +13 -86
  51. package/.claude/skills/cc-review/SKILL.md +53 -241
  52. package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +2 -2
  53. package/.claude/skills/cc-review/references/implementation-review-branch.md +7 -147
  54. package/.claude/skills/cc-review/references/plan-review-branch.md +5 -147
  55. package/.claude/skills/cc-review/references/review-methods.md +10 -218
  56. package/.claude/skills/cc-review/scripts/collect-review-context.sh +4 -63
  57. package/.claude/skills/cc-roadmap/PLAYBOOK.md +1 -1
  58. package/.claude/skills/cc-roadmap/SKILL.md +3 -3
  59. package/.claude/skills/cc-simplify/CHANGELOG.md +7 -0
  60. package/.claude/skills/cc-simplify/SKILL.md +26 -21
  61. package/.claude/skills/cc-spec-init/PLAYBOOK.md +12 -48
  62. package/.claude/skills/cc-spec-init/SKILL.md +29 -132
  63. package/.claude/skills/cc-spec-init/references/spec-contract.md +8 -17
  64. package/CHANGELOG.md +13 -0
  65. package/bin/cc-devflow-cli.js +20 -260
  66. package/bin/cc-devflow.js +44 -7
  67. package/docs/commands/README.md +1 -1
  68. package/docs/commands/README.zh-CN.md +1 -1
  69. package/docs/examples/README.md +1 -1
  70. package/docs/examples/START-HERE.md +14 -15
  71. package/docs/examples/example-bindings.json +11 -11
  72. package/docs/examples/full-design-blocked/README.md +4 -6
  73. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/{planning/tasks.md → task.md} +20 -15
  74. package/docs/examples/local-handoff/README.md +8 -11
  75. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/pr-brief.md +31 -0
  76. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/{planning/tasks.md → task.md} +18 -13
  77. package/docs/examples/pdca-loop/README.md +6 -9
  78. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +9 -11
  79. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/{planning/tasks.md → task.md} +18 -13
  80. package/docs/examples/scripts/check-example-bindings.sh +11 -62
  81. package/docs/guides/artifact-contract.md +10 -40
  82. package/docs/guides/getting-started.md +8 -8
  83. package/docs/guides/getting-started.zh-CN.md +8 -8
  84. package/docs/guides/minimize-artifacts.md +16 -130
  85. package/docs/guides/project-postmortem.md +14 -71
  86. package/lib/compiler/__tests__/skills-registry.test.js +9 -8
  87. package/lib/compiler/resource-copier.js +29 -0
  88. package/lib/skill-runtime/__tests__/archive-change.test.js +2 -2
  89. package/lib/skill-runtime/__tests__/benchmark-skills.test.js +3 -3
  90. package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +14 -4
  91. package/lib/skill-runtime/errors.js +3 -3
  92. package/lib/skill-runtime/index.js +5 -23
  93. package/lib/skill-runtime/paths.js +5 -52
  94. package/lib/skill-runtime/query-registry.js +4 -4
  95. package/lib/skill-runtime/query.js +89 -201
  96. package/lib/skill-runtime/store.js +4 -40
  97. package/lib/skill-runtime/trace.js +2 -2
  98. package/package.json +2 -5
  99. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md +0 -29
  100. package/.claude/skills/cc-act/assets/RELEASE_NOTE_TEMPLATE.md +0 -54
  101. package/.claude/skills/cc-act/scripts/generate-status-report.sh +0 -92
  102. package/.claude/skills/cc-act/scripts/sync-act-docs.sh +0 -355
  103. package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +0 -234
  104. package/.claude/skills/cc-check/scripts/render-report-card.js +0 -438
  105. package/.claude/skills/cc-check/scripts/verify-gate.sh +0 -85
  106. package/.claude/skills/cc-do/scripts/build-task-context.sh +0 -175
  107. package/.claude/skills/cc-do/scripts/record-review-decision.sh +0 -88
  108. package/.claude/skills/cc-do/scripts/recover-workflow.sh +0 -82
  109. package/.claude/skills/cc-do/scripts/run-problem-analysis.sh +0 -70
  110. package/.claude/skills/cc-do/scripts/verify-task-gates.sh +0 -109
  111. package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +0 -92
  112. package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +0 -224
  113. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +0 -178
  114. package/.claude/skills/cc-spec-init/assets/CHANGE_META_TEMPLATE.json +0 -28
  115. package/.claude/skills/cc-spec-init/scripts/validate-spec-links.sh +0 -45
  116. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +0 -234
  117. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +0 -488
  118. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +0 -189
  119. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/resume-index.md +0 -39
  120. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/status.md +0 -29
  121. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +0 -123
  122. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +0 -292
  123. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +0 -136
  124. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/status.md +0 -29
  125. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +0 -124
  126. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +0 -292
  127. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +0 -136
  128. package/docs/get-shit-done-strategy-audit.md +0 -518
  129. package/docs/skill-runtime-migration.md +0 -46
  130. package/lib/skill-runtime/__tests__/approve.test.js +0 -92
  131. package/lib/skill-runtime/__tests__/autopilot.test.js +0 -253
  132. package/lib/skill-runtime/__tests__/benchmark-artifacts.test.js +0 -165
  133. package/lib/skill-runtime/__tests__/delegation.test.js +0 -97
  134. package/lib/skill-runtime/__tests__/dispatch.test.js +0 -237
  135. package/lib/skill-runtime/__tests__/intent.test.js +0 -203
  136. package/lib/skill-runtime/__tests__/lifecycle.test.js +0 -169
  137. package/lib/skill-runtime/__tests__/planner.tdd.test.js +0 -331
  138. package/lib/skill-runtime/__tests__/prepare-pr.test.js +0 -126
  139. package/lib/skill-runtime/__tests__/query.test.js +0 -860
  140. package/lib/skill-runtime/__tests__/readiness.test.js +0 -53
  141. package/lib/skill-runtime/__tests__/release.test.js +0 -85
  142. package/lib/skill-runtime/__tests__/review-check-integration.test.js +0 -148
  143. package/lib/skill-runtime/__tests__/review-records.test.js +0 -619
  144. package/lib/skill-runtime/__tests__/runtime.integration.test.js +0 -351
  145. package/lib/skill-runtime/__tests__/schemas.test.js +0 -337
  146. package/lib/skill-runtime/__tests__/task-contract-migrate.test.js +0 -137
  147. package/lib/skill-runtime/__tests__/task-contract.test.js +0 -874
  148. package/lib/skill-runtime/__tests__/team-state.test.js +0 -51
  149. package/lib/skill-runtime/__tests__/verify-artifacts.test.js +0 -203
  150. package/lib/skill-runtime/__tests__/worker-run.test.js +0 -275
  151. package/lib/skill-runtime/__tests__/worker.test.js +0 -56
  152. package/lib/skill-runtime/__tests__/workflow-context-legacy-fallback.test.js +0 -31
  153. package/lib/skill-runtime/__tests__/workflow-context.test.js +0 -98
  154. package/lib/skill-runtime/artifacts.js +0 -88
  155. package/lib/skill-runtime/context-index.js +0 -545
  156. package/lib/skill-runtime/delegation.js +0 -533
  157. package/lib/skill-runtime/intent.js +0 -309
  158. package/lib/skill-runtime/lifecycle.js +0 -294
  159. package/lib/skill-runtime/operations/CLAUDE.md +0 -19
  160. package/lib/skill-runtime/operations/approve.js +0 -81
  161. package/lib/skill-runtime/operations/autopilot-core.js +0 -337
  162. package/lib/skill-runtime/operations/autopilot-execution.js +0 -307
  163. package/lib/skill-runtime/operations/autopilot-shared.js +0 -48
  164. package/lib/skill-runtime/operations/autopilot.js +0 -163
  165. package/lib/skill-runtime/operations/dispatch.js +0 -416
  166. package/lib/skill-runtime/operations/init.js +0 -60
  167. package/lib/skill-runtime/operations/janitor.js +0 -61
  168. package/lib/skill-runtime/operations/plan.js +0 -59
  169. package/lib/skill-runtime/operations/prepare-pr.js +0 -25
  170. package/lib/skill-runtime/operations/release.js +0 -99
  171. package/lib/skill-runtime/operations/resume.js +0 -126
  172. package/lib/skill-runtime/operations/review-records.js +0 -265
  173. package/lib/skill-runtime/operations/snapshot.js +0 -45
  174. package/lib/skill-runtime/operations/task-contract.js +0 -593
  175. package/lib/skill-runtime/operations/verify.js +0 -170
  176. package/lib/skill-runtime/operations/worker-run.js +0 -531
  177. package/lib/skill-runtime/operations/worker.js +0 -33
  178. package/lib/skill-runtime/planner.js +0 -539
  179. package/lib/skill-runtime/readiness.js +0 -84
  180. package/lib/skill-runtime/review-records.js +0 -123
  181. package/lib/skill-runtime/review.js +0 -855
  182. package/lib/skill-runtime/schemas.js +0 -746
  183. package/lib/skill-runtime/task-contract.js +0 -188
  184. package/lib/skill-runtime/team-state.js +0 -122
  185. package/lib/skill-runtime/workflow-context.js +0 -748
@@ -1,30 +1,17 @@
1
- # TASKS
1
+ # task.md
2
2
 
3
- ## Investigation Meta
3
+ ## Plan Meta
4
4
 
5
- - Requirement version:
6
- - Analysis version:
7
- - Investigate skill version:
5
+ - CC-Investigate skill version:
8
6
  - Work branch:
9
7
  - Output language:
10
- - Source bug / incident:
11
- - Roadmap sync status:
12
- - Change meta: `change-meta.json`
13
-
14
- ## Progressive Disclosure Index
15
-
16
- - Default read: Investigation Meta, Root Cause Contract, Execution Handoff, current task block.
17
- - Runtime reset: run `cc-devflow query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact` before `cc-do`, `cc-check`, or `cc-act`; use `packetOnly` plus `mustNotForget` first, verify `sourceHashes`, open `defaultOpen` refs only when needed, and reserve `deepOpen` for matching `openWhen.conditions`.
18
- - Open for root-cause doubt: `planning/tasks.md#Root Cause Contract` Project Postmortem Recall, Feedback Loop, Evidence Chain, Boundary Probe Matrix.
19
- - Open for scheduling: `planning/task-manifest.json`, dependencies, touched files.
20
- - Open for audit/recovery: Git state, CLI logs, report-card findings, Workflow Forensics.
21
- - Machine JSON rule: after editing this file, run `cc-devflow task-contract compile --change <changeId> --change-key <changeKey>` and `cc-devflow task-contract validate --change <changeId> --change-key <changeKey>`; do not handwrite `task-manifest.json` or `change-meta.json`.
22
8
 
23
9
  ## Root Cause Contract
24
10
 
25
11
  Change:
26
12
  Mode: investigation
27
- Approval:
13
+ Profile: tiny | standard | deep
14
+ Diagnosis:
28
15
 
29
16
  Symptom:
30
17
  -
@@ -32,100 +19,63 @@ Symptom:
32
19
  Reproduction:
33
20
  -
34
21
 
35
- Feedback Loop:
22
+ Expected:
36
23
  -
37
24
 
38
- Root Cause Proof Ladder:
39
- - Symptom site:
40
- - First bad state:
41
- - Violated contract:
42
- - Original trigger:
43
- - Counterfactual proof:
44
- - Escape reason:
25
+ Actual:
26
+ -
45
27
 
46
- Confirmed Root Cause:
28
+ Root Cause:
47
29
  -
48
30
 
49
- Frozen Repair Boundary:
50
- - Allowed files:
51
- - Forbidden files:
52
- - Blast radius:
31
+ Evidence Chain:
32
+ -
33
+
34
+ Repair Boundary:
35
+ -
53
36
 
54
37
  Verification:
55
38
  -
56
39
 
40
+ Prevention:
41
+ -
42
+
57
43
  Risk / Escalate If:
58
44
  -
59
45
 
60
- > This is the default human-authored investigation contract. Do not create
61
- > `planning/analysis.md` for new investigations unless the user explicitly
62
- > requests a legacy artifact or a migration requires preserving one.
63
- > `task-manifest.json` and `change-meta.json` are generated by
64
- > `cc-devflow task-contract compile`, not by manual AI JSON authoring.
65
-
66
- ## Execution Handoff
67
-
68
- - Canonical contract: `planning/tasks.md#Root Cause Contract`
69
- - Canonical change meta: `change-meta.json`
70
- - Execution mode: `single-path` | `parallel-ready`
71
- - Confirmed root cause:
72
- - Root-cause hypothesis:
73
- - Root Cause Proof Ladder:
74
- - First bad state:
75
- - Original trigger:
76
- - Counterfactual proof:
77
- - Feedback loop:
78
- - Symptom match evidence:
79
- - Frozen repair boundary:
80
- - Boundary probes:
81
- - Backward trace:
82
- - Reference comparison:
83
- - Project postmortem recall:
84
- - Allowed files:
85
- - Forbidden files:
86
- - Blast radius:
87
- - Capability specs:
88
- - Read first:
89
- - Commands to trust:
90
- - Do not re-decide:
91
- - Parallel boundaries:
92
- - Correct test seam:
93
- - Evidence request if blocked:
94
- - Do not repair symptom site unless Root Cause Contract proves it is the original trigger:
95
-
96
- ## Phase 1: Reproduce And Probe Guard
97
-
98
- - [ ] T001 [TEST] Capture the failing behavior as a stable reproduction (dependsOn:none) `path/to/test`
99
- Goal: 让 bug 先变成一个快、准、可复跑且匹配用户症状的失败事实。
100
- Files: `path/to/test`
101
- Read first: `tasks.md`
102
- Project postmortem search: `rg -n "<symptom|test seam|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
103
- Verification: `npm test -- path/to/test`
104
- Evidence: failing output or reproducible log + symptom match evidence
105
- Correct seam: test must exercise the real trigger chain through a public interface
106
- Root cause proof: must expose or preserve evidence for first bad state and original trigger
107
- Ready when: feedback loop 已稳定,Root Cause Contract 已记录必要的 boundary / trace / comparison / root-cause-ladder evidence
46
+ ## Execution Protocol
47
+
48
+ Codex / ClaudeCode must treat this `task.md` as the only repair contract.
108
49
 
109
- ## Phase 2: Repair
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 `query workflow-context` and `next-change-key`, stop blocked.
51
+ - Do not generate process files beyond this `task.md`.
52
+ - Complete tasks with `scripts/mark-task-complete.sh --tasks devflow/changes/<change-key>/task.md --task <task-id>`.
53
+ - Stage commit rule: when PDCA or IDCA finishes in the current environment, commit the completed stage to Git.
110
54
 
111
- - [ ] T002 [IMPL] Apply the minimal root-cause fix (dependsOn:T001) `path/to/file`
112
- Goal: 只修已确认根因,不扩成重写。
55
+ ## Phase 1: Repair
56
+
57
+ - [ ] T001 [TEST] Capture the confirmed failure (dependsOn:none) `path/to/test`
58
+ Goal: 证明 Root Cause Contract 的失败链在当前代码中可复现。
59
+ Root cause proof: reference the Root Cause Contract fields above.
60
+ Do not re-decide: first bad state, original trigger, repair boundary.
61
+ TDD phase: red
62
+ Files: `path/to/test`
63
+ Read first: `task.md`
64
+ Verification: `npm test -- path/to/test`
65
+ Evidence: failing output
66
+ Completion: after failing evidence exists, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --tasks devflow/changes/<change-key>/task.md --task T001`.
67
+ Public verification path: public interface / caller flow / CLI / API / UI / trace replay / harness.
68
+ Ready when: reproduction path is available.
69
+
70
+ - [ ] T002 [IMPL] Repair the first bad state (dependsOn:T001) `path/to/file`
71
+ Goal: 用最小代码修复已证明的根因。
72
+ Root cause proof: do not repair symptom site unless Root Cause Contract proves it is the original trigger.
73
+ Do not re-decide: repair boundary, test seam, forbidden files.
74
+ TDD phase: green
113
75
  Files: `path/to/file`
114
- Read first: `tasks.md`, `path/to/test`
115
- Project postmortem search: `rg -n "<root cause|module|failure-class|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
76
+ Read first: `task.md`, `path/to/test`
116
77
  Verification: `npm test -- path/to/test`
117
78
  Evidence: passing output + Git diff
118
- Do not re-decide: root cause, first bad state, original trigger, allowed files, forbidden files
119
- Ready when: T001 已证明同一个用户症状存在,Root Cause Contract 已证明根因源头和 counterfactual proof
120
-
121
- ## Phase 3: Verify
122
-
123
- - [ ] T003 Run checks and collect fresh evidence (dependsOn:T002) `command or file`
124
- Goal: 为 `cc-check` 准备新鲜证据。
125
- Files: `command or file`
126
- Read first: `tasks.md`, `task-manifest.json`
127
- Project postmortem search: `rg -n "<verification|release|tooling|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
128
- Verification: `npm test && npm run lint`
129
- Evidence: gate output
130
- Root cause proof: verification must prove the first bad state no longer forms, not only that the symptom disappeared
131
- Ready when: repair task 已收口
79
+ Completion: after green evidence exists, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --tasks devflow/changes/<change-key>/task.md --task T002`.
80
+ Public verification path: same as T001.
81
+ Ready when: T001 has the expected failing evidence.
@@ -2,236 +2,32 @@
2
2
 
3
3
  ## Iron Law
4
4
 
5
- - 没有根因,不准修 bug。
6
- - 没有 frozen root-cause contract,不准生成 repair task
5
+ - No root cause, no repair.
6
+ - No frozen `task.md#Root Cause Contract`, no repair task.
7
7
 
8
8
  ## Minimum Evidence
9
9
 
10
- 每次调查至少留下这些事实:
11
-
12
10
  - symptom
13
11
  - reproduction path
14
- - feedback loop contract
15
- - symptom match evidence
16
12
  - expected vs actual
17
13
  - code path
18
14
  - recent change signal
19
- - prior investigation signal
20
- - boundary probe matrix, when the failure crosses components
21
- - backward trace chain, when the error appears below the original trigger
22
- - root cause proof ladder: symptom site, first bad state, violated contract, original trigger, counterfactual proof, escape reason
23
- - reference comparison, when a similar working path exists
24
- - diagnostic instrumentation plan, when probes are needed
25
- - pattern analysis
26
- - ranked candidate hypotheses
27
- - root-cause hypothesis
28
- - falsification method
29
- - confirmed root cause
30
- - correct test seam
31
- - root cause class
15
+ - prior postmortem signal
16
+ - first bad state
17
+ - violated contract
18
+ - original trigger
19
+ - counterfactual proof
20
+ - escape reason
32
21
  - repair boundary
33
- - blast radius
34
- - roadmap sync status
22
+ - verification command
35
23
 
36
24
  ## Output Shape
37
25
 
38
- - `planning/tasks.md#Root Cause Contract` 是人类真相源
39
- - `planning/tasks.md` task blocks 是修复 handoff
40
- - `planning/task-manifest.json` CLI 生成的执行真相源,不手写
41
- - `change-meta.json` 必须由 CLI / 模板更新,记录 roadmap sync status、spec diagnosis 和 no-op reason / updated files
42
- - 修改机器态结构时改 `cc-devflow task-contract` / 模板 / validator,再重新生成;不要在 change 目录里补 JSON
43
-
44
- ## Root-Cause Hypothesis
45
-
46
- 每条假设都必须可证伪:
47
-
48
- - `candidateRank`:候选假设排序,避免第一直觉锚定
49
- - `hypothesis`:具体说明什么坏了,为什么会导致症状
50
- - `evidenceFor`
51
- - `evidenceAgainst`
52
- - `falsificationMethod`
53
- - `expectedObservation`
54
- - `actualObservation`
55
- - `status`:`pending` / `confirmed` / `rejected` / `needs-more-evidence`
56
-
57
- 只有 `confirmed` 假设可以进入 Root Cause。
58
-
59
- ## Root Cause Proof Ladder
60
-
61
- confirmed root cause 必须证明:
62
-
63
- - `symptomSite`:用户实际看到的失败点
64
- - `firstBadState`:状态第一次变坏的位置和证据
65
- - `violatedContract`:被破坏的契约、invariant、schema、协议或时序条件
66
- - `originalTrigger`:制造 first bad state 的动作、事件、diff、配置或外部响应
67
- - `counterfactualProof`:恢复契约、替换输入、回滚 diff 或断言边界后的实际观察
68
- - `escapeReason`:为什么测试、类型、review、监控或 artifact gate 没挡住
69
-
70
- 缺 `firstBadState`、`originalTrigger` 或 `counterfactualProof` 时,根因状态只能是 `needs-more-evidence`;不允许生成 repair task。
71
-
72
- ## Feedback Loop Contract
73
-
74
- 调查必须先构造一个可信 pass/fail loop:
75
-
76
- - `loopType`: failing-test / http-script / cli-fixture / browser-script / trace-replay / throwaway-harness / property-fuzz / bisect / differential / hitl
77
- - `commandOrDriver`
78
- - `expectedFailingSignal`
79
- - `actualFailingSignal`
80
- - `symptomMatchEvidence`
81
- - `runtime`
82
- - `determinism`
83
- - `failureRate`
84
- - `sharpeningPlan`
85
-
86
- loop 必须复现用户报告的同一失败。无法构造 loop 时,只能进入 `Evidence Request`,不能冻结根因。
87
-
88
- ## Pattern Analysis
89
-
90
- 调查必须显式选择或排除常见模式:
91
-
92
- - race condition
93
- - null propagation
94
- - state corruption
95
- - integration failure
96
- - configuration drift
97
- - stale cache
98
- - resource leak
99
- - performance regression
100
- - trust boundary drift
101
- - timing guess / flaky wait
102
-
103
- 模式分析只是检索索引,不是 root cause。
104
-
105
- ## Boundary Probe Matrix
106
-
107
- 多组件链路必须记录每个边界的事实:
108
-
109
- - `componentBoundary`
110
- - `inputObserved`
111
- - `outputObserved`
112
- - `configEnvObserved`
113
- - `stateObserved`
114
- - `verdict`: `pass` / `fail` / `unknown`
115
-
116
- 第一个失败边界决定下一轮调查收缩点;多个边界同时失败时,优先追共同上游。
117
-
118
- ## Backward Trace Chain
119
-
120
- 深层堆栈或坏值来源不明时,必须追到源头:
121
-
122
- - immediate failure site
123
- - direct caller
124
- - caller chain
125
- - bad value origin
126
- - original trigger
127
- - why symptom-site fix is rejected
128
-
129
- 找不到 original trigger 时,不能冻结根因。
130
-
131
- ## Reference Comparison
132
-
133
- 有相似可用实现时,必须记录:
134
-
135
- - similar working example
136
- - broken path
137
- - differences found
138
- - differences accepted as hypothesis
139
- - differences ruled out
140
-
141
- 不能用“差不多”跳过差异。
142
-
143
- ## Diagnostic Instrumentation
144
-
145
- 临时探针必须回答一个明确问题:
146
-
147
- - probe tag
148
- - probe location
149
- - question answered
150
- - command to run
151
- - expected signal
152
- - actual signal
153
- - cleanup requirement
154
-
155
- 探针不是修复。handoff 必须说明删除、保留为正式日志,或转成测试断言。
156
-
157
- debug 日志必须带唯一前缀,例如 `[DEBUG-FIX123-a4f2]`,确保 cleanup 可以用 grep 验证。
158
-
159
- ## Correct Test Seam
160
-
161
- 修复 handoff 必须记录回归测试是否覆盖真实触发链:
162
-
163
- - `testSeam`
164
- - `publicInterfaceExercised`
165
- - `realTriggerChainCoverage`
166
- - `whyShallowTestRejected`
167
- - `ifNoCorrectSeam`
168
-
169
- 没有正确 seam 时,必须把它记录为架构事实,并保留原始 feedback loop 作为修复验证。
170
-
171
- ## Domain And Decision Context
172
-
173
- 调查前先读 cc-devflow 原生上下文:`devflow/specs/INDEX.md`、相关 capability specs、roadmap/backlog handoff、历史 `planning/design.md` / `planning/analysis.md`、`change-meta.json`。
174
-
175
- - 输出中的领域概念、假设名、测试名使用项目既有词汇
176
- - 如果根因或修复方向违反 capability spec、roadmap decision 或历史 design decision,必须显式记录冲突和理由
177
- - 缺失领域词汇是调查信号,不要临时发明同义词掩盖契约缺口
178
-
179
- ## Prior History
180
-
181
- 调查必须记录是否检查了:
182
-
183
- - `git log --oneline -20 -- <affected-files>`
184
- - historical `planning/analysis.md`
185
- - `TODOS.md` / backlog / roadmap
186
- - previous `report-card.json` findings
187
-
188
- 如果同一区域重复出现 bug,必须标记为 architectural smell candidate。
189
-
190
- ## External Research
191
-
192
- 外部调研必须脱敏:
193
-
194
- - 不搜索 host、IP、token、customer id、内部路径、SQL、私有 repo 名
195
- - 只搜索通用错误类别、框架 / 库名、版本、组件名
196
- - research finding 只能作为候选假设,必须回到本仓库验证
197
-
198
- ## No Code Root Cause
199
-
200
- 如果结论不是代码根因,必须写清:
201
-
202
- - `rootCauseClass`: `code` / `config` / `environment` / `external` / `timing`
203
- - why not code root cause
204
- - monitoring or future evidence needed
205
- - operator handling after fix
206
-
207
- 环境、外部服务、时序窗口仍然需要证据;不能把调查不足写成外因。
208
-
209
- ## Repair Boundary
210
-
211
- 修复边界至少记录:
212
-
213
- - affected module
214
- - allowed files
215
- - forbidden files
216
- - expected spec delta
217
- - verification after fix
218
- - blast radius file count
219
- - blast radius risk
220
-
221
- 预计触碰超过 5 个文件时,必须 split / justify / reroute。
222
-
223
- ## Escalation
224
-
225
- 三次假设失败后,不再继续猜。必须记录:
226
-
227
- - failed hypothesis count
228
- - attempted evidence
229
- - why current entry is suspect
230
- - recommended next option:continue / instrument-and-wait / human-review / reroute-cc-plan
231
- - evidence request:repro env / HAR / log dump / core dump / timestamped recording / temporary production instrumentation
26
+ - `task.md#Root Cause Contract` is the human truth.
27
+ - `task.md` task blocks are the repair handoff.
28
+ - Git commit records Investigate completion.
29
+ - No process file beyond `task.md`.
232
30
 
233
31
  ## Reroute
234
32
 
235
- - 根因明确,修复边界清楚 -> `cc-do`
236
- - 发现这不是 bug,而是范围/设计问题 -> `cc-plan`
237
- - 发现这其实是项目优先级问题 -> `roadmap`
33
+ If the issue is missing product scope, go to `cc-plan`. If it is roadmap priority, go to `cc-roadmap`. If evidence is unavailable, return an Evidence Request.
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.1
4
+
5
+ - replace manifest and verification-report wording with `task.md`, fresh evidence, and response-only routing
6
+ - compress required output to queue truth, selected goal, reason, goal packet, and route
7
+ - forbid JSON/status/resume/report process files during next-work selection
8
+
3
9
  ## 1.0.1
4
10
 
5
11
  - Include unarchived `devflow/changes/<REQ|FIX>-*` directories as next-work candidates before fresh issue selection.
@@ -33,22 +33,26 @@ find devflow/changes -maxdepth 1 -type d \
33
33
 
34
34
  分类规则:
35
35
 
36
- - `resume-planning`: planning / analysis 还没冻结。
37
- - `resume-execution`: manifest 还有 pending ready task。
38
- - `resume-check`: tasks 完成但没有 passing report-card。
39
- - `resume-act`: report-card pass,但交付材料、roadmap/spec sync 或 PR/handoff 未闭合。
36
+ - `resume-planning`: `task.md` 还没冻结。
37
+ - `resume-execution`: `task.md` 还有未完成任务。
38
+ - `resume-check`: tasks 完成但缺少当前新鲜验证结论。
39
+ - `resume-act`: 当前验证已过,但 PR / handoff / closeout 未闭合。
40
40
  - `archive-closeout`: 已 merged/done,但仍在 active changes 根目录。
41
41
  - `archive-blocked`: handoff 写了 `ArchiveSkip`、archive target 冲突或用户要求暂不归档。
42
42
 
43
43
  同一 roadmap 优先级下,优先继续已有 active change,再选择新的 issue。已经在 `devflow/changes/archive/YYYY-MM/` 下的目录不进入普通候选。
44
44
 
45
- ## Required Outputs
45
+ ## Required Output
46
+
47
+ Short response only:
46
48
 
47
49
  - Queue truth
48
- - Selected goal or no-ready-goal
49
- - Selection reason
50
+ - Selected goal or `no-ready-goal`
51
+ - Reason
50
52
  - Goal Packet when selected
51
- - Next gate
53
+ - Route: `cc-dev` / `cc-roadmap` / `stop`
54
+
55
+ Do not create process files.
52
56
 
53
57
  ## No-Ready Reasons
54
58