cc-devflow 4.5.9 → 4.5.11

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 (122) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +11 -0
  2. package/.claude/skills/cc-act/SKILL.md +19 -10
  3. package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +1 -1
  4. package/.claude/skills/cc-act/references/closure-contract.md +1 -1
  5. package/.claude/skills/cc-act/references/git-commit-guidelines.md +1 -1
  6. package/.claude/skills/cc-check/CHANGELOG.md +23 -0
  7. package/.claude/skills/cc-check/PLAYBOOK.md +1 -0
  8. package/.claude/skills/cc-check/SKILL.md +15 -9
  9. package/.claude/skills/cc-check/references/review-contract.md +7 -0
  10. package/.claude/skills/cc-check/scripts/render-report-card.js +6 -1
  11. package/.claude/skills/cc-dev/CHANGELOG.md +10 -0
  12. package/.claude/skills/cc-dev/SKILL.md +34 -2
  13. package/.claude/skills/cc-do/CHANGELOG.md +18 -0
  14. package/.claude/skills/cc-do/PLAYBOOK.md +7 -7
  15. package/.claude/skills/cc-do/SKILL.md +47 -40
  16. package/.claude/skills/cc-do/references/execution-recovery.md +18 -13
  17. package/.claude/skills/cc-do/scripts/build-task-context.sh +4 -17
  18. package/.claude/skills/cc-do/scripts/record-review-decision.sh +4 -5
  19. package/.claude/skills/cc-do/scripts/recover-workflow.sh +9 -11
  20. package/.claude/skills/cc-do/scripts/verify-task-gates.sh +12 -10
  21. package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +7 -29
  22. package/.claude/skills/cc-investigate/CHANGELOG.md +24 -0
  23. package/.claude/skills/cc-investigate/PLAYBOOK.md +10 -9
  24. package/.claude/skills/cc-investigate/SKILL.md +163 -417
  25. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +56 -10
  26. package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +6 -6
  27. package/.claude/skills/cc-investigate/assets/{ANALYSIS_TEMPLATE.md → legacy/ANALYSIS_TEMPLATE.md} +1 -0
  28. package/.claude/skills/cc-investigate/references/investigation-contract.md +5 -4
  29. package/.claude/skills/cc-investigate/scripts/bootstrap-analysis.sh +1 -1
  30. package/.claude/skills/cc-plan/CHANGELOG.md +32 -0
  31. package/.claude/skills/cc-plan/PLAYBOOK.md +55 -53
  32. package/.claude/skills/cc-plan/SKILL.md +209 -536
  33. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +50 -14
  34. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +5 -4
  35. package/.claude/skills/cc-plan/assets/{DESIGN_TEMPLATE.md → legacy/DESIGN_TEMPLATE.md} +1 -0
  36. package/.claude/skills/cc-plan/assets/{TINY_DESIGN_TEMPLATE.md → legacy/TINY_DESIGN_TEMPLATE.md} +1 -1
  37. package/.claude/skills/cc-plan/references/planning-contract.md +12 -10
  38. package/.claude/skills/cc-review/CHANGELOG.md +6 -0
  39. package/.claude/skills/cc-review/PLAYBOOK.md +9 -11
  40. package/.claude/skills/cc-review/SKILL.md +37 -61
  41. package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +1 -1
  42. package/.claude/skills/cc-review/references/implementation-review-branch.md +5 -5
  43. package/.claude/skills/cc-review/references/plan-review-branch.md +1 -1
  44. package/.claude/skills/cc-review/references/review-methods.md +4 -4
  45. package/.claude/skills/cc-review/scripts/collect-review-context.sh +14 -7
  46. package/CHANGELOG.md +30 -0
  47. package/CONTRIBUTING.md +40 -4
  48. package/CONTRIBUTING.zh-CN.md +40 -4
  49. package/README.md +22 -8
  50. package/README.zh-CN.md +22 -8
  51. package/bin/cc-devflow-cli.js +293 -36
  52. package/docs/examples/START-HERE.md +6 -4
  53. package/docs/examples/example-bindings.json +8 -8
  54. package/docs/examples/full-design-blocked/README.md +2 -2
  55. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +2 -1
  56. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +3 -2
  57. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +11 -8
  58. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +4 -4
  59. package/docs/examples/local-handoff/README.md +2 -2
  60. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +2 -1
  61. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +3 -2
  62. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +9 -6
  63. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +1 -1
  64. package/docs/examples/pdca-loop/README.md +2 -2
  65. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +2 -2
  66. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +2 -1
  67. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +2 -1
  68. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +9 -6
  69. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +1 -1
  70. package/docs/examples/scripts/check-example-bindings.sh +2 -0
  71. package/docs/get-shit-done-strategy-audit.md +22 -22
  72. package/docs/guides/artifact-contract.md +5 -1
  73. package/docs/guides/getting-started.md +11 -8
  74. package/docs/guides/getting-started.zh-CN.md +11 -8
  75. package/docs/guides/minimize-artifacts.md +137 -0
  76. package/lib/compiler/__tests__/skills-registry.test.js +2 -2
  77. package/lib/skill-runtime/CLAUDE.md +1 -1
  78. package/lib/skill-runtime/__tests__/autopilot.test.js +42 -6
  79. package/lib/skill-runtime/__tests__/benchmark-artifacts.test.js +165 -0
  80. package/lib/skill-runtime/__tests__/benchmark-skills.test.js +109 -0
  81. package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +2 -2
  82. package/lib/skill-runtime/__tests__/dispatch.test.js +8 -38
  83. package/lib/skill-runtime/__tests__/intent.test.js +4 -20
  84. package/lib/skill-runtime/__tests__/lifecycle.test.js +1 -1
  85. package/lib/skill-runtime/__tests__/paths.test.js +7 -1
  86. package/lib/skill-runtime/__tests__/planner.tdd.test.js +61 -0
  87. package/lib/skill-runtime/__tests__/prepare-pr.test.js +3 -16
  88. package/lib/skill-runtime/__tests__/query.test.js +388 -7
  89. package/lib/skill-runtime/__tests__/review-check-integration.test.js +148 -0
  90. package/lib/skill-runtime/__tests__/review-records.test.js +619 -0
  91. package/lib/skill-runtime/__tests__/runtime.integration.test.js +64 -23
  92. package/lib/skill-runtime/__tests__/schemas.test.js +43 -0
  93. package/lib/skill-runtime/__tests__/task-contract-migrate.test.js +137 -0
  94. package/lib/skill-runtime/__tests__/task-contract.test.js +874 -0
  95. package/lib/skill-runtime/__tests__/verify-artifacts.test.js +203 -0
  96. package/lib/skill-runtime/__tests__/worker-run.test.js +4 -11
  97. package/lib/skill-runtime/__tests__/workflow-context-legacy-fallback.test.js +31 -0
  98. package/lib/skill-runtime/__tests__/workflow-context.test.js +98 -0
  99. package/lib/skill-runtime/artifacts.js +0 -5
  100. package/lib/skill-runtime/context-index.js +545 -0
  101. package/lib/skill-runtime/intent.js +9 -33
  102. package/lib/skill-runtime/lifecycle.js +1 -1
  103. package/lib/skill-runtime/operations/CLAUDE.md +2 -2
  104. package/lib/skill-runtime/operations/dispatch.js +4 -42
  105. package/lib/skill-runtime/operations/init.js +2 -6
  106. package/lib/skill-runtime/operations/janitor.js +2 -18
  107. package/lib/skill-runtime/operations/resume.js +21 -38
  108. package/lib/skill-runtime/operations/review-records.js +265 -0
  109. package/lib/skill-runtime/operations/snapshot.js +1 -1
  110. package/lib/skill-runtime/operations/task-contract.js +593 -0
  111. package/lib/skill-runtime/operations/worker-run.js +2 -30
  112. package/lib/skill-runtime/paths.js +4 -4
  113. package/lib/skill-runtime/planner.js +24 -11
  114. package/lib/skill-runtime/query-registry.js +2 -2
  115. package/lib/skill-runtime/query.js +15 -2
  116. package/lib/skill-runtime/review-records.js +123 -0
  117. package/lib/skill-runtime/review.js +246 -11
  118. package/lib/skill-runtime/schemas.js +174 -12
  119. package/lib/skill-runtime/store.js +0 -10
  120. package/lib/skill-runtime/task-contract.js +188 -0
  121. package/lib/skill-runtime/workflow-context.js +748 -0
  122. package/package.json +6 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cc-do
3
- version: 1.6.5
3
+ version: 1.6.8
4
4
  description: Use when implementing planned tasks, resuming interrupted work, applying a frozen investigation handoff, or landing review feedback after cc-plan or cc-investigate.
5
5
  triggers:
6
6
  - 开始做 T003
@@ -17,9 +17,6 @@ reads:
17
17
  - references/parallel-dispatch.md
18
18
  - docs/guides/project-postmortem.md
19
19
  writes:
20
- - path: devflow/changes/<change-key>/execution/tasks/<task-id>/checkpoint.json
21
- durability: durable
22
- required: true
23
20
  - path: devflow/changes/<change-key>/execution/tasks/<task-id>/events.jsonl
24
21
  durability: durable
25
22
  required: false
@@ -35,20 +32,21 @@ writes:
35
32
  effects:
36
33
  - code changes
37
34
  - test changes
38
- - workspace scratch runtime updates
35
+ - task status updates in planning/tasks.md and planning/task-manifest.json
39
36
  entry_gate:
40
- - Read planning/design.md or planning/analysis.md, then planning/tasks.md, planning/task-manifest.json, change-meta.json, related capability specs, and the latest checkpoint before changing code.
37
+ - Run `cc-devflow query workflow-context --change <changeId> --change-key <changeKey> --data-only --no-trace --compact` first and follow its context-index `packetOnly`, `mustNotForget`, `sourceHashes`, `defaultOpen`, `currentTask`, `commandsToTrust`, and `openWhen.conditions` fields before opening deep artifacts.
38
+ - Before editing, read the direct caller, exported surface, shared helper, and local convention for the touched path.
39
+ - Read `planning/tasks.md`, `planning/task-manifest.json`, `change-meta.json`, related specs, Git state, and CLI logs only when workflow-context says the deep section is needed; legacy `planning/design.md` / `planning/analysis.md` are fallback inputs only.
41
40
  - Select only ready tasks whose dependencies, wave, touched paths, and file ownership are clear.
42
41
  - Reject parallel execution when touched paths overlap by exact path or parent/child path; submodule touches must be isolated unless the task explicitly owns that submodule.
43
42
  - If the current task cannot be restated from canonical artifacts, run a context reset before coding.
44
- - Before each single-task execution, run a quick Project Postmortem search against `devflow/postmortems` using the task's touched files, capability, failure class, and model-risk terms; record applicable reminders or `no-project-postmortems-yet` in the checkpoint/events.
43
+ - Before each single-task execution, run a quick Project Postmortem search against `devflow/postmortems` using the task's touched files, capability, failure class, and model-risk terms; apply applicable reminders to the code path and mention only blocking/failure facts in CLI events.
45
44
  - "Validate the current task's TDD shape before coding: spec-style test name, one logical behavior, public verification path, allowed boundary mocks, Green minimality guard, and refactor candidates."
46
45
  exit_criteria:
47
- - The current task has red/green evidence, public-seam test quality evidence, review evidence, and a resumable checkpoint trail.
46
+ - The current task has red/green evidence, public-seam test quality evidence, review evidence, and synchronized task status.
48
47
  - Red evidence proves one observable behavior through a public verification path; Green evidence shows only the minimal production change; Refactor evidence names the concrete smell removed or says why none was needed.
49
48
  - The completed task was closed through `scripts/mark-task-complete.sh`; manual checkbox/status edits are not valid completion evidence.
50
- - Execution leaves the next verifier enough runtime truth to judge the task without chat memory.
51
- - The task checkpoint or event log records the postmortem recall result for this task, including relevant principle/incident links or an explicit no-match verdict.
49
+ - Execution leaves the next verifier enough code, Git, task-status, verification-command, and CLI-log truth to judge the task without chat memory.
52
50
  - The honest next step is cc-check or an explicit reroute.
53
51
  reroutes:
54
52
  - when: Three failed repair attempts or new evidence show the investigation contract is wrong.
@@ -58,12 +56,12 @@ reroutes:
58
56
  - when: Implementation and reviews are complete for the current task set.
59
57
  target: cc-check
60
58
  recovery_modes:
61
- - name: resume-from-checkpoint
59
+ - name: resume-from-task-state
62
60
  when: Work was interrupted but the current design contract is still valid.
63
- action: Reload the latest checkpoint, rebuild task context, and continue from the last confirmed red/green/review milestone.
61
+ action: Reload workflow-context, planning/tasks.md, task-manifest.json, current Git state, and CLI logs; continue from the first pending or failed task.
64
62
  - name: context-reset
65
63
  when: The conversation history is noisy, stale, or cannot reproduce the exact task state.
66
- action: Discard chat memory, reread planning/design.md or planning/analysis.md plus planning/tasks.md/planning/task-manifest.json and the latest checkpoint, then restate the next action before coding.
64
+ action: Discard chat memory, reread planning/tasks.md, planning/task-manifest.json, change-meta.json, current Git state, and CLI logs; use legacy design/analysis only as fallback.
67
65
  tool_budget:
68
66
  read_files: 9
69
67
  search_steps: 6
@@ -86,14 +84,14 @@ tool_budget:
86
84
 
87
85
  写入任何 durable Markdown 或 JSON metadata 前,先运行 `cc-devflow config resolve --format policy`。
88
86
 
89
- - `Output language` 是机器约束,checkpoint、events、team-state 中新增的人类可读摘要必须记录并遵守它。
87
+ - `Output language` 是机器约束;如果失败或 debug CLI 日志需要人类可读摘要,必须记录并遵守它。
90
88
  - `agent_preferences` 是用户偏好建议,只影响表达方式和结构选择,不覆盖本 Skill 的工作流边界。
91
89
  - 如果配置解析失败,先修配置或向用户说明阻塞,不要用默认语言继续生成正式文档。
92
90
 
93
- 上游冻结合同可以来自两条路:
91
+ 上游冻结合同来自 `planning/tasks.md`:
94
92
 
95
- - `cc-plan` 产出的 `planning/design.md`
96
- - `cc-investigate` 产出的 `planning/analysis.md`
93
+ - `cc-plan` 产出的 `planning/tasks.md#Contract Summary`
94
+ - `cc-investigate` 产出的 `planning/tasks.md#Root Cause Contract`
97
95
 
98
96
  ## Read First
99
97
 
@@ -124,15 +122,23 @@ tool_budget:
124
122
  | bug 还没搞清根因 | reroute 到 `cc-investigate` |
125
123
  | 收到 review comment,要在既定范围内修正 | `review-fix` |
126
124
 
127
- 如果连“当前 task 是什么”都说不清,先别写代码,先跑 `scripts/select-ready-tasks.sh` 和 `scripts/build-task-context.sh`。
125
+ 如果连“当前 task 是什么”都说不清,先别写代码,先跑 `cc-devflow query workflow-context`。只有它的 `openWhen` 指向 scheduling 或 recovery 时,才继续跑 `scripts/select-ready-tasks.sh`;`scripts/build-task-context.sh` 只能输出 stdout,不得生成 `context.md`。
128
126
 
129
127
  ## Harness Contract
130
128
 
131
- - Allowed actions: implement ready tasks, debug inside frozen scope, write runtime evidence, and apply review feedback that does not reopen design.
129
+ - Allowed actions: implement ready tasks, debug inside frozen scope, update task status through the completion script, and apply review feedback that does not reopen design.
132
130
  - Forbidden actions: re-planning the requirement in place, blindly rerunning the whole requirement, or delegating tasks without full task context.
133
- - Required evidence: every task must leave red/green/review checkpoints plus objective failure notes when blocked.
131
+ - Required evidence: every task must leave objective code/Git/test evidence; blocked or failed work may leave compact CLI events, but must not create AI-written process files.
134
132
  - Reroute rule: after repeated failed repairs or root-cause drift, stop patching and go back to `cc-investigate`; if scope or design truth breaks, go back to `cc-plan`; after task closure, hand off to `cc-check`.
135
133
 
134
+ ## Execution Discipline
135
+
136
+ - Make the smallest task-scoped diff; do not add features, abstractions, or adjacent cleanup outside the frozen task. Clean only traces introduced by this task.
137
+ - Match existing style and conventions even when another pattern looks nicer; harmful conventions require reroute/discussion, not private divergence.
138
+ - Deterministic state changes use scripts (`mark-task-complete.sh`, ready-task selectors); the model does not hand-edit status JSON.
139
+ - Tests must prove the behavior's intent through a public seam; tests that would pass after the wrong business behavior changes are invalid.
140
+ - Blockers, skipped tests, stale context, or unclear ownership are reported loudly before continuing.
141
+
136
142
  ## TDD Iron Law
137
143
 
138
144
  ```text
@@ -144,13 +150,13 @@ NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
144
150
  1. Red:先写一个最小失败测试,运行并确认它因为目标行为缺失而失败。
145
151
  2. Green:只写让当前失败测试通过的最小生产代码。
146
152
  3. Refactor:只有 Green 之后才能清理命名、重复、结构和坏味道。
147
- 4. Record:每一站都写入 `checkpoint.json`,必要时写入 `events.jsonl`。
153
+ 4. Record:任务状态只通过 `mark-task-complete.sh` 同步到 `planning/tasks.md` 与 `planning/task-manifest.json`;失败或 debug 时才写 `events.jsonl`。
148
154
 
149
155
  Red 不是形式上的红,而是公共 seam 上的行为缺失证明。测试必须通过公共接口、调用方流程、CLI/API/UI 路径或其它真实边界进入系统;只验证私有函数、内部调用次数、临时数据结构或 mock 自己控制的内部协作者,不算 TDD 证据。
150
156
 
151
157
  一个 Red 只证明一个逻辑行为。测试名要像规格说明,而不是实现步骤;结果要从同一类公共入口读回。直接查数据库、读内部状态、扫描临时文件或绕过 API 来证明行为,只在那个边界本身就是被测对象时成立。
152
158
 
153
- 例外只能用于 throwaway prototype、纯生成文件、纯配置改动;例外必须写进 checkpoint `tddException`,包含原因、风险和替代验证命令。测试第一次就绿,说明测试没有证明新行为,必须修测试而不是继续写生产代码。
159
+ 例外只能用于 throwaway prototype、纯生成文件、纯配置改动;例外必须写在当前 task block 或 manifest task context 中,包含原因、风险和替代验证命令。测试第一次就绿,说明测试没有证明新行为,必须修测试而不是继续写生产代码。
154
160
 
155
161
  禁止水平切片:不要先写一批测试,再写一批实现。每次只推进一个 tracer bullet:一个可观察行为的 Red -> 让它变绿的最小实现 -> 必要重构 -> 记录证据,然后再进入下一个行为。
156
162
 
@@ -162,14 +168,15 @@ Refactor 只能发生在 Green 之后。优先处理当前 slice 暴露出的重
162
168
 
163
169
  ## Entry Gate
164
170
 
165
- 1. 先读 `planning/design.md` `planning/analysis.md`,再读 `planning/tasks.md`、`planning/task-manifest.json`;如果是恢复执行,再补读最近 checkpoint 或已有 `handoff/resume-index.md`。
166
- 2. 先用 `scripts/select-ready-tasks.sh` 判断现在到底哪几个任务真的 ready。
167
- 3. 只锁定当前 ready task,或一组经依赖、wave、精确触点与父子路径触点校验后可并行的 ready tasks
168
- 4. 如果这次来自 `cc-investigate`,必须把 `planning/analysis.md` 当成 canonical contract,而不是一边实现一边重新调查。
169
- 5. 没有任务上下文,不准把任务扔给 subagent;先用 `scripts/build-task-context.sh` `planning/design.md` `planning/analysis.md`、`planning/tasks.md`、`planning/task-manifest.json`、`change-meta.json` 与相关 capability spec 组装上下文。
170
- 6. 如果 `task-manifest.json.metadata.lane == "quick"`,仍然必须有 current task、verification、checkpoint 和 handoff;quick 只缩短文档密度,不跳过证据。
171
- 7. 如果仓库含 `.gitmodules`manifest 提供 `submodulePaths`,先用 `scripts/detect-file-conflicts.sh` 标出 `submoduleTouches`;只有触达该 submodule 的任务失去默认 worktree 隔离资格,未触达任务不能被无辜串行化。
172
- 8. 每个单 task 开工前,用当前 task touched files、capability、错误类型、模型风险词快速检索 `devflow/postmortems`;命中时把相关原则转成当前 task guardrail,未命中也要在 checkpoint / events 里记录。
171
+ 1. 先运行 `cc-devflow query workflow-context --change <changeId> --change-key <changeKey> --data-only --no-trace --compact`,把 `nextAction.skill == "cc-do"` `currentTask.id` 作为执行入口。
172
+ 2. 先只用 `workflow-context.progressiveDisclosure.packetOnly` `mustNotForget` 做导航与护栏,必要时打开 `defaultOpen` 的 section / JSON refs;如果 `sourceHashes` 不匹配、命令缺失、scope/依赖/触点不确定,必须按 `openWhen.conditions` 打开 `deepOpen`,不能靠猜。
173
+ 3. 先用 `workflow-context.queues.readyTasks` 判断现在到底哪几个任务真的 ready;需要 shell 复核时再跑 `scripts/select-ready-tasks.sh`。
174
+ 4. 只锁定当前 ready task,或一组经依赖、wave、精确触点与父子路径触点校验后可并行的 ready tasks。
175
+ 5. 如果这次来自 `cc-investigate`,必须把 `planning/tasks.md#Root Cause Contract` 当成 canonical contract,而不是一边实现一边重新调查。
176
+ 6. 没有任务上下文,不准把任务扔给 subagent;先用 `workflow-context.currentTask`,不够时再用 `scripts/build-task-context.sh` canonical artifacts 组装上下文。
177
+ 7. 如果 `task-manifest.json.metadata.lane == "quick"`,仍然必须有 current task、verification、task status 和唯一 next action;quick 只缩短文档密度,不跳过证据。
178
+ 8. 如果仓库含 `.gitmodules` manifest 提供 `submodulePaths`,先用 `scripts/detect-file-conflicts.sh` 标出 `submoduleTouches`;只有触达该 submodule 的任务失去默认 worktree 隔离资格,未触达任务不能被无辜串行化。
179
+ 9. 每个单 task 开工前,用当前 task 的 touched files、capability、错误类型、模型风险词快速检索 `devflow/postmortems`;命中时把相关原则转成当前 task 的 guardrail。不要为 no-match 生成过程文件。
173
180
 
174
181
  ## Loop
175
182
 
@@ -184,7 +191,7 @@ Refactor 只能发生在 Green 之后。优先处理当前 slice 暴露出的重
184
191
  9. 按 `Red -> Green -> Refactor` 推进,Green 只允许最小实现,不预铺未来测试尚未要求的分支、状态或 API。
185
192
  10. 如果当前 Red 需要新的 fixture 或 mock,先证明它仍从公共 seam 触发真实行为;fixture 缺字段、类型强转或内部 mock 都要写入 `tdd.testQuality.fixtureRisk` 或先修 seam。
186
193
  11. Refactor 后必须重跑相关测试,保持 Green;Red 状态下不重构。
187
- 12. 每次推进都写 task runtime:`events.jsonl` + `checkpoint.json`,并记录 `postmortemRecall`、`tdd.testQuality`、`tdd.greenMinimality`、`tdd.refactorCandidates` 或 `tddException`。
194
+ 12. 每次推进都以代码 diff、Git 状态、验证命令输出和 task 状态为真相源;只有失败、阻塞或 debug 需要机器日志时才写 `events.jsonl`。
188
195
  13. 任务实现后,先过 `spec review`,再过 `code review`,两道门都过才算任务收口;这里只验证 spec delta,不回写长期 spec。
189
196
  14. 当前任务完成后,把可验证证据留给 `cc-check`。
190
197
 
@@ -192,8 +199,8 @@ Refactor 只能发生在 Green 之后。优先处理当前 slice 暴露出的重
192
199
 
193
200
  - 代码变更
194
201
  - 测试变更
195
- - `devflow/changes/<change-key>/execution/tasks/<task-id>/checkpoint.json`
196
- - `devflow/changes/<change-key>/execution/tasks/<task-id>/events.jsonl`(仅 debug / failed 默认保留)
202
+ - `planning/tasks.md` 与 `planning/task-manifest.json` 的 task 状态
203
+ - `devflow/changes/<change-key>/execution/tasks/<task-id>/events.jsonl`(仅 debug / failed 默认保留;CLI 自动日志,不写叙事 Markdown)
197
204
  - `planning/task-manifest.json` 里的 task review verdict
198
205
 
199
206
  ## Good Output
@@ -205,8 +212,8 @@ Refactor 只能发生在 Green 之后。优先处理当前 slice 暴露出的重
205
212
  - Green 证据说明 minimality guard:本轮只满足当前红灯,没有提前实现未来分支
206
213
  - Refactor 证据说明清掉了哪个具体坏味道,或者为什么当前 slice 不需要 refactor
207
214
  - 测试 fixture 说明真实 contract 字段和测试填充字段,没有用类型欺骗或内部 mock 制造假绿
208
- - runtime / checkpoint 足够让下一位接手者无损恢复
209
- - quick lane 也有 mini manifest、checkpoint、verification 和唯一 next action,不靠聊天记录继续
215
+ - task status、Git diff、验证命令和必要 CLI 日志足够让下一位接手者恢复
216
+ - quick lane 也有 mini manifest、verification 和唯一 next action,不靠聊天记录继续
210
217
  - reviewer 能顺着 review 记录和验证命令复盘这次实现
211
218
 
212
219
  ## Bundled Resources
@@ -217,8 +224,8 @@ Refactor 只能发生在 Green 之后。优先处理当前 slice 暴露出的重
217
224
  - 恢复分析:`scripts/recover-workflow.sh`
218
225
  - 任务状态:`scripts/check-task-status.sh`
219
226
  - ready 任务选择:`scripts/select-ready-tasks.sh`
220
- - 任务上下文组装:`scripts/build-task-context.sh`
221
- - checkpoint 记录:`scripts/write-task-checkpoint.sh`
227
+ - 任务上下文组装:`scripts/build-task-context.sh`(stdout only,不落盘)
228
+ - checkpoint 兼容入口:`scripts/write-task-checkpoint.sh`(不写 checkpoint,只在失败 / debug 时写事件)
222
229
  - review 记录:`scripts/record-review-decision.sh`
223
230
  - 任务闭环校验:`scripts/verify-task-gates.sh`
224
231
  - 任务勾选:`scripts/mark-task-complete.sh`
@@ -242,7 +249,7 @@ Refactor 只能发生在 Green 之后。优先处理当前 slice 暴露出的重
242
249
  14. 给 subagent 的输入必须包含:当前进度、当前任务全文、依赖状态、必读文件、验收标准、可信命令。
243
250
  15. 三次失败修补后必须先质疑调查合同或设计合同,而不是继续堆补丁。
244
251
  16. 完成任务后必须调用 `scripts/mark-task-complete.sh` 同步 `planning/task-manifest.json` 和 `planning/tasks.md`;禁止手工改 checkbox、status、currentTaskId 来冒充完成。
245
- 17. 如果 `mark-task-complete.sh` 失败,说明 checkpoint、review gate 或任务依赖还没闭合;先修证据,再重跑脚本,不准绕过。
252
+ 17. 如果 `mark-task-complete.sh` 失败,说明 review gate 或任务依赖还没闭合;先修证据,再重跑脚本,不准绕过。
246
253
 
247
254
  ## Task Status Protocol
248
255
 
@@ -261,13 +268,13 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key
261
268
  ```
262
269
 
263
270
  4. 脚本会先跑任务 gate,再同步 manifest、checkbox、`currentTaskId` 和整体状态。不要手动改这些字段。
264
- 5. 如果任务不能完成,写 checkpoint / event / blocker;不要把失败任务标成完成。
271
+ 5. 如果任务不能完成,只在失败 / debug 需要时写 CLI event;不要生成过程 Markdown,也不要把失败任务标成完成。
265
272
 
266
273
  ## Exit Criteria
267
274
 
268
275
  - 当前任务有 Red/Green 证据
269
276
  - 当前任务有 `spec review` / `code review` 两道门证据
270
- - 恢复点已更新到 `devflow/changes/<change-key>/execution/tasks/<task-id>/`
277
+ - 恢复点可从 `planning/tasks.md`、`planning/task-manifest.json`、Git 状态和必要 CLI 日志判断
271
278
  - 阻塞原因已写清楚
272
279
  - 下一步应进入 `cc-check`,或明确退回 `cc-investigate` / `cc-plan`
273
280
 
@@ -22,19 +22,24 @@
22
22
  2. 为什么停在这
23
23
  3. 下一步必须先做什么
24
24
 
25
- 如果这三件事不能只靠规范产物和最新 checkpoint 回答,就先做 context reset,不准继续依赖聊天记忆。
25
+ 如果这三件事不能只靠规范产物、Git 状态和 CLI 日志回答,就先做 context reset,不准继续依赖聊天记忆。
26
26
 
27
27
  ## Runtime Layout
28
28
 
29
- 运行态证据按任务落在:
29
+ 默认执行真相来自:
30
30
 
31
- - `devflow/changes/<change-key>/execution/tasks/<task-id>/checkpoint.json`
32
- - `devflow/changes/<change-key>/execution/tasks/<task-id>/events.jsonl`(仅 debug / failed 默认保留)
31
+ - 代码和测试 diff
32
+ - Git 状态
33
+ - `planning/tasks.md` 的 checkbox
34
+ - `planning/task-manifest.json` 的 task status / reviews / currentTaskId
35
+ - `devflow/changes/<change-key>/execution/tasks/<task-id>/events.jsonl`(仅 debug / failed 默认保留;CLI 自动日志)
33
36
  - `planning/task-manifest.json` 里的 `tasks[*].reviews`
34
37
 
35
- ## Required Event Spine
38
+ 不得生成 `context.md`、`checkpoint.json`、review markdown 或其它 AI 手写过程文件。需要复盘时重新读取代码、Git、task 状态和 CLI 自动日志。
36
39
 
37
- 一个健康任务最少要看见这些事件:
40
+ ## Optional Event Spine
41
+
42
+ `events.jsonl` 只在 debug 或 failed 时存在。存在时可以包含这些事件:
38
43
 
39
44
  1. `context_ready`
40
45
  2. `red_failed`
@@ -48,11 +53,11 @@
48
53
  10. `spec_review_pass`
49
54
  11. `code_review_pass`
50
55
 
51
- 如果 `events.jsonl` 没开启,至少仍要有最新 `checkpoint.json` 和 manifest review verdict
56
+ 如果 `events.jsonl` 没开启,使用 manifest task status、`tasks.md` checkbox、review verdict 和验证命令输出恢复。
52
57
 
53
- ## Checkpoint TDD Fields
58
+ ## Task Evidence Fields
54
59
 
55
- 最新 checkpoint 至少能回答:
60
+ 当前 task block / manifest task / 验证输出至少能回答:
56
61
 
57
62
  - `red.command`
58
63
  - `red.exitStatus`
@@ -80,7 +85,7 @@
80
85
  - `review.spec.status`
81
86
  - `review.code.status`
82
87
 
83
- 如果跳过 TDD,必须有 `tddException`,并写清替代验证。没有这些字段时,恢复执行先补证据,不准直接继续实现。
88
+ 如果跳过 TDD,必须有 `tddException` 或 task-level exception 说明,并写清替代验证。没有这些字段时,恢复执行先补证据,不准直接继续实现。
84
89
 
85
90
  ## Bug Rule
86
91
 
@@ -92,7 +97,7 @@
92
97
  ## Local Recovery Ladder
93
98
 
94
99
  1. 先重试当前命令或当前 task,而不是重跑整条 requirement
95
- 2. 两次失败后回看证据链和 task context
100
+ 2. 两次失败后回看证据链、task block、Git diff 和 CLI 日志
96
101
  3. 三次失败后默认怀疑上游合同:根因漂移回 `cc-investigate`,范围 / 设计漂移回 `cc-plan`
97
102
 
98
103
  ## Subagent Rule
@@ -100,10 +105,10 @@
100
105
  给 subagent 的上下文至少包含:
101
106
 
102
107
  - 当前任务全文
103
- - 当前进度与最近 checkpoint
108
+ - 当前进度与 manifest task status
104
109
  - 已满足 / 未满足的依赖
105
110
  - 必读文件
106
111
  - 验收标准
107
112
  - 验证命令
108
113
  - 不做项 / 边界
109
- - quick lane 是否仍有 mini manifest、checkpoint、verification 和唯一 next action
114
+ - quick lane 是否仍有 mini manifest、verification 和唯一 next action
@@ -3,7 +3,7 @@
3
3
  set -euo pipefail
4
4
 
5
5
  # ------------------------------------------------------------
6
- # 组装当前任务的执行上下文,并记录 context_ready 事件
6
+ # 组装当前任务的执行上下文,只输出到 stdout
7
7
  # ------------------------------------------------------------
8
8
 
9
9
  usage() {
@@ -51,12 +51,8 @@ if [[ -z "$task_json" ]]; then
51
51
  fi
52
52
 
53
53
  change_id="$(jq -r '.changeId // .requirementId // "REQ-UNKNOWN"' "$manifest")"
54
- runtime_task_dir="$(req_do_task_runtime_dir "$CHANGE_DIR" "$TASK_ID")"
55
- output_path="$runtime_task_dir/context.md"
56
54
  ready_json="$("$SCRIPT_DIR/select-ready-tasks.sh" --manifest "$manifest")"
57
55
 
58
- mkdir -p "$runtime_task_dir"
59
-
60
56
  list_or_none() {
61
57
  local value="$1"
62
58
  if [[ -z "${value//$'\n'/}" ]]; then
@@ -168,21 +164,12 @@ sync_status="$(jq -r '.spec.syncStatus // "unknown"' "$spec_source" 2>/dev/null
168
164
  echo
169
165
  echo "## Context Reset"
170
166
  echo
171
- echo "- If chat context drifts, discard conversational memory and reload only the canonical files above plus the latest checkpoint."
172
- echo "- Do not continue from memory if the current task, active phase, or latest checkpoint summary cannot be restated exactly."
167
+ echo "- If chat context drifts, discard conversational memory and reload only the canonical files above, current Git state, and CLI logs."
168
+ echo "- Do not continue from memory if the current task, active phase, or latest verification status cannot be restated exactly."
173
169
  echo
174
170
  if [[ -f "$resume_index" ]]; then
175
171
  echo "## Optional Resume Index"
176
172
  echo
177
173
  cat "$resume_index"
178
174
  fi
179
- } > "$output_path"
180
-
181
- "$SCRIPT_DIR/write-task-checkpoint.sh" \
182
- --dir "$CHANGE_DIR" \
183
- --task "$TASK_ID" \
184
- --status pending \
185
- --summary "Task context assembled" \
186
- --next-action "Write the failing test for $TASK_ID" >/dev/null
187
-
188
- cat "$output_path"
175
+ }
@@ -3,7 +3,7 @@
3
3
  set -euo pipefail
4
4
 
5
5
  # ------------------------------------------------------------
6
- # 记录 spec / code review 结论,并同步 runtime / manifest
6
+ # 记录 spec / code review 结论,并同步 manifest;失败时保留 CLI 事件
7
7
  # ------------------------------------------------------------
8
8
 
9
9
  usage() {
@@ -46,12 +46,9 @@ fi
46
46
  CHANGE_DIR="$(req_do_resolve_change_dir "$REQ_DIR")"
47
47
  manifest="$(req_do_manifest_path "$CHANGE_DIR")"
48
48
  change_id="$(jq -r '.changeId // .requirementId // "REQ-UNKNOWN"' "$manifest" 2>/dev/null || basename "$CHANGE_DIR")"
49
- runtime_task_dir="$(req_do_task_runtime_dir "$CHANGE_DIR" "$TASK_ID")"
50
49
  timestamp="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
51
50
  event_name="${GATE}_review_${VERDICT}"
52
51
 
53
- mkdir -p "$runtime_task_dir"
54
-
55
52
  if [[ -f "$manifest" ]]; then
56
53
  tmp_manifest="$(mktemp)"
57
54
  jq --arg task "$TASK_ID" --arg gate "$GATE" --arg verdict "$VERDICT" '
@@ -66,7 +63,9 @@ if [[ -f "$manifest" ]]; then
66
63
  mv "$tmp_manifest" "$manifest"
67
64
  fi
68
65
 
69
- if [[ -f "$runtime_task_dir/events.jsonl" || "$VERDICT" != "pass" ]]; then
66
+ if [[ "$VERDICT" != "pass" ]]; then
67
+ runtime_task_dir="$(req_do_task_runtime_dir "$CHANGE_DIR" "$TASK_ID")"
68
+ mkdir -p "$runtime_task_dir"
70
69
  jq -nc \
71
70
  --arg type "$event_name" \
72
71
  --arg changeId "$change_id" \
@@ -68,17 +68,15 @@ if [[ -f "$report" ]]; then
68
68
  echo "- Latest check verdict: $verdict"
69
69
  fi
70
70
 
71
- if [[ -n "$change_id" ]]; then
72
- runtime_dir="$(req_do_execution_dir "$CHANGE_DIR")/tasks"
71
+ if [[ -f "$manifest" ]]; then
72
+ echo
73
+ echo "## Task Status"
74
+ jq -r '.tasks[]? | "- " + .id + ": " + (.status // "pending") + (if .lastError then " - " + .lastError else "" end)' "$manifest" 2>/dev/null || true
73
75
  fi
74
76
 
75
- if [[ -n "${runtime_dir:-}" && -d "$runtime_dir" ]]; then
76
- echo "- Runtime dir: $runtime_dir"
77
-
78
- while IFS= read -r checkpoint_path; do
79
- task_id="$(jq -r '.taskId // "unknown"' "$checkpoint_path" 2>/dev/null || echo unknown)"
80
- checkpoint_status="$(jq -r '.status // "unknown"' "$checkpoint_path" 2>/dev/null || echo unknown)"
81
- checkpoint_summary="$(jq -r '.summary // ""' "$checkpoint_path" 2>/dev/null || echo "")"
82
- echo "- Checkpoint $task_id: $checkpoint_status ${checkpoint_summary:+- $checkpoint_summary}"
83
- done < <(find "$runtime_dir" -name checkpoint.json | sort)
77
+ if git -C "$CHANGE_DIR" rev-parse --show-toplevel >/dev/null 2>&1; then
78
+ repo_root="$(git -C "$CHANGE_DIR" rev-parse --show-toplevel)"
79
+ echo
80
+ echo "## Git State"
81
+ git -C "$repo_root" status --short
84
82
  fi
@@ -3,7 +3,7 @@
3
3
  set -euo pipefail
4
4
 
5
5
  # ------------------------------------------------------------
6
- # 校验任务是否完成 Red / Green / Refactor / Review 闭环
6
+ # 校验任务状态、依赖和可选 CLI 事件顺序
7
7
  # ------------------------------------------------------------
8
8
 
9
9
  usage() {
@@ -36,19 +36,21 @@ CHANGE_DIR="$(req_do_resolve_change_dir "$REQ_DIR")"
36
36
  manifest="$(req_do_manifest_path "$CHANGE_DIR")"
37
37
  runtime_task_dir="$(req_do_task_runtime_dir "$CHANGE_DIR" "$TASK_ID")"
38
38
  events_file="$runtime_task_dir/events.jsonl"
39
- checkpoint_file="$runtime_task_dir/checkpoint.json"
40
39
 
41
- if [[ ! -f "$checkpoint_file" ]]; then
42
- echo "Missing $checkpoint_file" >&2
43
- exit 1
44
- fi
45
-
46
- checkpoint_status="$(jq -r '.status // "unknown"' "$checkpoint_file" 2>/dev/null || echo unknown)"
47
- [[ "$checkpoint_status" == "passed" ]] || {
48
- echo "Task $TASK_ID checkpoint status is not passed" >&2
40
+ task_json="$(jq -c --arg task "$TASK_ID" '.tasks[] | select(.id == $task)' "$manifest" 2>/dev/null || true)"
41
+ [[ -n "$task_json" ]] || {
42
+ echo "Task $TASK_ID not found in manifest" >&2
49
43
  exit 1
50
44
  }
51
45
 
46
+ while IFS= read -r dependency; do
47
+ dep_status="$(jq -r --arg dep "$dependency" '.tasks[] | select(.id == $dep) | .status // "pending"' "$manifest" 2>/dev/null || echo pending)"
48
+ [[ "$dep_status" == "passed" || "$dep_status" == "completed" || "$dep_status" == "done" || "$dep_status" == "verified" ]] || {
49
+ echo "Task $TASK_ID dependency $dependency is not complete" >&2
50
+ exit 1
51
+ }
52
+ done < <(jq -r '(.dependsOn // [])[]?' <<<"$task_json")
53
+
52
54
  spec_verdict="$(jq -r --arg task "$TASK_ID" '.tasks[] | select(.id == $task) | .reviews.spec // "pending"' "$manifest" 2>/dev/null || echo pending)"
53
55
  code_verdict="$(jq -r --arg task "$TASK_ID" '.tasks[] | select(.id == $task) | .reviews.code // "pending"' "$manifest" 2>/dev/null || echo pending)"
54
56
 
@@ -3,13 +3,13 @@
3
3
  set -euo pipefail
4
4
 
5
5
  # ------------------------------------------------------------
6
- # 写入 task checkpoint.json / events.jsonl
6
+ # 兼容旧入口:只写必要的 CLI 事件,不再生成 checkpoint.json
7
7
  # ------------------------------------------------------------
8
8
 
9
9
  usage() {
10
10
  cat <<'EOF'
11
11
  Usage:
12
- write-task-checkpoint.sh --dir path/to/change --task T001 --status pending|running|passed|failed|skipped --summary "..." [--event context_ready] [--attempt 0] [--session session-id] [--next-action "..."] [--tdd-json '{"red":...}']
12
+ write-task-checkpoint.sh --dir path/to/change --task T001 --status pending|running|passed|failed|skipped [--summary "..."] [--event context_ready] [--attempt 0] [--session session-id] [--next-action "..."] [--tdd-json '{"red":...}']
13
13
  EOF
14
14
  }
15
15
 
@@ -41,7 +41,7 @@ while [[ $# -gt 0 ]]; do
41
41
  esac
42
42
  done
43
43
 
44
- if [[ -z "$REQ_DIR" || -z "$TASK_ID" || -z "$STATUS" || -z "$SUMMARY" ]]; then
44
+ if [[ -z "$REQ_DIR" || -z "$TASK_ID" || -z "$STATUS" ]]; then
45
45
  usage
46
46
  exit 1
47
47
  fi
@@ -49,12 +49,9 @@ fi
49
49
  CHANGE_DIR="$(req_do_resolve_change_dir "$REQ_DIR")"
50
50
  manifest="$(req_do_manifest_path "$CHANGE_DIR")"
51
51
  change_id="$(jq -r '.changeId // .requirementId // "REQ-UNKNOWN"' "$manifest" 2>/dev/null || basename "$REQ_DIR")"
52
- plan_version="$(jq -r '.metadata.planVersion // 1' "$manifest" 2>/dev/null || echo 1)"
53
52
  timestamp="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
54
53
  runtime_task_dir="$(req_do_task_runtime_dir "$CHANGE_DIR" "$TASK_ID")"
55
54
 
56
- mkdir -p "$runtime_task_dir"
57
-
58
55
  if [[ -z "$SESSION_ID" ]]; then
59
56
  SESSION_ID="${TASK_ID}-$(date -u +%s)"
60
57
  fi
@@ -68,28 +65,8 @@ if [[ -n "$TDD_JSON" ]]; then
68
65
  fi
69
66
  fi
70
67
 
71
- jq -nc \
72
- --arg changeId "$change_id" \
73
- --arg taskId "$TASK_ID" \
74
- --arg sessionId "$SESSION_ID" \
75
- --arg planVersion "$plan_version" \
76
- --arg status "$STATUS" \
77
- --arg summary "$SUMMARY" \
78
- --arg timestamp "$timestamp" \
79
- --arg attempt "$ATTEMPT" \
80
- --argjson tdd "$tdd_payload" \
81
- '{
82
- changeId: $changeId,
83
- taskId: $taskId,
84
- sessionId: $sessionId,
85
- planVersion: ($planVersion | tonumber),
86
- status: $status,
87
- summary: $summary,
88
- timestamp: $timestamp,
89
- attempt: ($attempt | tonumber)
90
- } + (if $tdd == null then {} else {tdd: $tdd} end)' > "$runtime_task_dir/checkpoint.json"
91
-
92
68
  if [[ -n "$EVENT_TYPE" || "$STATUS" == "failed" ]]; then
69
+ mkdir -p "$runtime_task_dir"
93
70
  jq -nc \
94
71
  --arg type "${EVENT_TYPE:-status_$STATUS}" \
95
72
  --arg changeId "$change_id" \
@@ -99,6 +76,7 @@ if [[ -n "$EVENT_TYPE" || "$STATUS" == "failed" ]]; then
99
76
  --arg summary "$SUMMARY" \
100
77
  --arg nextAction "$NEXT_ACTION" \
101
78
  --arg timestamp "$timestamp" \
79
+ --argjson tdd "$tdd_payload" \
102
80
  '{
103
81
  type: $type,
104
82
  changeId: $changeId,
@@ -108,7 +86,7 @@ if [[ -n "$EVENT_TYPE" || "$STATUS" == "failed" ]]; then
108
86
  summary: $summary,
109
87
  nextAction: $nextAction,
110
88
  timestamp: $timestamp
111
- }' >> "$runtime_task_dir/events.jsonl"
89
+ } + (if $tdd == null then {} else {tdd: $tdd} end)' >> "$runtime_task_dir/events.jsonl"
112
90
  fi
113
91
 
114
- echo "Wrote $runtime_task_dir/checkpoint.json"
92
+ echo "No checkpoint written; task truth lives in planning/tasks.md and planning/task-manifest.json"
@@ -1,5 +1,29 @@
1
1
  # CC-Investigate Skill Changelog
2
2
 
3
+ ## v1.5.1 - 2026-05-13
4
+
5
+ - slim the public `SKILL.md` entrypoint into a thin root-cause contract with conditional escalation packs
6
+ - make CLI-owned machine artifacts a hard rule: AI writes `planning/tasks.md#Root Cause Contract`, then runs `cc-devflow task-contract compile` / `validate` for `task-manifest.json` and `change-meta.json`
7
+ - add CLI compile support for Root Cause Contract handoffs so investigations do not require hand-authored JSON
8
+ - internalize investigation operating rules: assumptions first, evidence over guesses, explicit conflict choice, reroute spec/roadmap ambiguity, and loud Evidence Requests
9
+
10
+ ## v1.5.0 - 2026-05-13
11
+
12
+ - collapse default investigation output to `planning/tasks.md` plus CLI-generated `task-manifest.json` and `change-meta.json`
13
+ - move root-cause truth into `planning/tasks.md#Root Cause Contract` so `planning/analysis.md` is legacy fallback only
14
+ - archive the legacy analysis template under `assets/legacy/` and keep repair handoffs rooted in `assets/TASKS_TEMPLATE.md`
15
+
16
+ ## v1.4.3 - 2026-05-13
17
+
18
+ - add the Worktree Branch Contract so new `FIX` investigations anchor detached worktrees to `FIX/<task>` before artifacts are written
19
+ - treat investigations on `main` / the default branch as a setup blocker instead of allowing the main checkout to accumulate repair state
20
+ - require analysis, tasks, and change metadata to record the canonical work branch for downstream `cc-do`
21
+
22
+ ## v1.4.2 - 2026-05-12
23
+
24
+ - require IDCA repair handoffs to be consumable by `cc-devflow query workflow-context`
25
+ - add the compact runtime reset to investigation task templates so `cc-do`, `cc-check`, and `cc-act` continue from the frozen root-cause packet instead of chat history
26
+
3
27
  ## v1.4.1 - 2026-05-11
4
28
 
5
29
  - add the Project Postmortem Recall Gate so investigations search `devflow/postmortems` before final hypotheses are frozen