cadre-ai 3.9.0 → 4.0.0

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 (234) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +213 -0
  4. package/README.md +68 -21
  5. package/dist/cadre-cli.mjs +4 -6
  6. package/dist/cadre-mcp.mjs +5397 -3973
  7. package/package.json +2 -2
  8. package/skills/archive/SKILL.md +12 -10
  9. package/skills/create/SKILL.md +9 -9
  10. package/skills/implement/SKILL.md +10 -8
  11. package/skills/implement/references/governed-mode.md +1 -1
  12. package/skills/implement/references/resume-recovery.md +2 -0
  13. package/skills/refresh/SKILL.md +25 -18
  14. package/skills/revert/SKILL.md +33 -13
  15. package/skills/review/SKILL.md +27 -34
  16. package/skills/revise/SKILL.md +21 -11
  17. package/skills/status/SKILL.md +2 -0
  18. package/skills/track/SKILL.md +11 -7
  19. package/templates/{v5 → v6}/init/workflow.md +1 -1
  20. package/templates/v1/init/gitignore.template +0 -5
  21. package/templates/v1/init/patterns/index.md +0 -6
  22. package/templates/v1/init/project.json +0 -26
  23. package/templates/v1/init/workflow.md +0 -181
  24. package/templates/v1/project/archive-operation.json +0 -15
  25. package/templates/v1/project/refresh-operation.json +0 -14
  26. package/templates/v1/track/execution.json +0 -19
  27. package/templates/v1/track/learning.md +0 -39
  28. package/templates/v1/track/plan.md +0 -39
  29. package/templates/v1/track/revert-operation.json +0 -13
  30. package/templates/v1/track/revise-operation.json +0 -14
  31. package/templates/v1/track/state.json +0 -25
  32. package/templates/v2/init/archive/.gitkeep +0 -1
  33. package/templates/v2/init/gitignore.template +0 -8
  34. package/templates/v2/init/guidelines.md +0 -25
  35. package/templates/v2/init/operations/.gitkeep +0 -1
  36. package/templates/v2/init/patterns/index.md +0 -6
  37. package/templates/v2/init/product.md +0 -30
  38. package/templates/v2/init/project.json +0 -27
  39. package/templates/v2/init/refreshes/.gitkeep +0 -1
  40. package/templates/v2/init/styleguides/general.md +0 -14
  41. package/templates/v2/init/styleguides/language.md +0 -21
  42. package/templates/v2/init/tech-stack.md +0 -21
  43. package/templates/v2/init/tracks/.gitkeep +0 -1
  44. package/templates/v2/init/tracks.md +0 -6
  45. package/templates/v2/init/wisps/.gitkeep +0 -1
  46. package/templates/v2/init/workflow.md +0 -72
  47. package/templates/v2/project/pattern.md +0 -20
  48. package/templates/v2/project/refresh.md +0 -21
  49. package/templates/v2/styleguides/dart.md +0 -27
  50. package/templates/v2/styleguides/flutter.md +0 -27
  51. package/templates/v2/styleguides/go.md +0 -29
  52. package/templates/v2/styleguides/gradle.md +0 -28
  53. package/templates/v2/styleguides/html-css.md +0 -39
  54. package/templates/v2/styleguides/index.md +0 -27
  55. package/templates/v2/styleguides/java.md +0 -27
  56. package/templates/v2/styleguides/javascript.md +0 -27
  57. package/templates/v2/styleguides/kotlin.md +0 -26
  58. package/templates/v2/styleguides/maven.md +0 -28
  59. package/templates/v2/styleguides/python.md +0 -27
  60. package/templates/v2/styleguides/react.md +0 -28
  61. package/templates/v2/styleguides/swift.md +0 -27
  62. package/templates/v2/styleguides/swiftui.md +0 -27
  63. package/templates/v2/styleguides/typescript.md +0 -26
  64. package/templates/v2/track/bug.md +0 -14
  65. package/templates/v2/track/execution.json +0 -19
  66. package/templates/v2/track/learning.md +0 -39
  67. package/templates/v2/track/plan.md +0 -39
  68. package/templates/v2/track/revision.md +0 -36
  69. package/templates/v2/track/spec.md +0 -38
  70. package/templates/v2/track/state.json +0 -31
  71. package/templates/v3/init/archive/.gitkeep +0 -1
  72. package/templates/v3/init/gitignore.template +0 -8
  73. package/templates/v3/init/guidelines.md +0 -25
  74. package/templates/v3/init/operations/.gitkeep +0 -1
  75. package/templates/v3/init/product.md +0 -30
  76. package/templates/v3/init/project.json +0 -27
  77. package/templates/v3/init/refreshes/.gitkeep +0 -1
  78. package/templates/v3/init/styleguides/general.md +0 -14
  79. package/templates/v3/init/styleguides/language.md +0 -21
  80. package/templates/v3/init/tech-stack.md +0 -21
  81. package/templates/v3/init/tracks/.gitkeep +0 -1
  82. package/templates/v3/init/tracks.md +0 -6
  83. package/templates/v3/init/wisps/.gitkeep +0 -1
  84. package/templates/v3/init/workflow.md +0 -82
  85. package/templates/v3/project/archive-operation.json +0 -19
  86. package/templates/v3/project/pattern.md +0 -20
  87. package/templates/v3/project/refresh-operation.json +0 -18
  88. package/templates/v3/project/refresh.md +0 -21
  89. package/templates/v3/styleguides/dart.md +0 -27
  90. package/templates/v3/styleguides/flutter.md +0 -27
  91. package/templates/v3/styleguides/go.md +0 -29
  92. package/templates/v3/styleguides/gradle.md +0 -28
  93. package/templates/v3/styleguides/html-css.md +0 -39
  94. package/templates/v3/styleguides/index.md +0 -27
  95. package/templates/v3/styleguides/java.md +0 -27
  96. package/templates/v3/styleguides/javascript.md +0 -27
  97. package/templates/v3/styleguides/kotlin.md +0 -26
  98. package/templates/v3/styleguides/maven.md +0 -28
  99. package/templates/v3/styleguides/python.md +0 -27
  100. package/templates/v3/styleguides/react.md +0 -28
  101. package/templates/v3/styleguides/swift.md +0 -27
  102. package/templates/v3/styleguides/swiftui.md +0 -27
  103. package/templates/v3/styleguides/typescript.md +0 -26
  104. package/templates/v3/track/bug.md +0 -14
  105. package/templates/v3/track/execution.json +0 -19
  106. package/templates/v3/track/plan.md +0 -39
  107. package/templates/v3/track/revert-operation.json +0 -17
  108. package/templates/v3/track/revise-operation.json +0 -18
  109. package/templates/v3/track/revision.md +0 -36
  110. package/templates/v3/track/spec.md +0 -38
  111. package/templates/v3/track/state.json +0 -31
  112. package/templates/v4/init/archive/.gitkeep +0 -1
  113. package/templates/v4/init/gitignore.template +0 -8
  114. package/templates/v4/init/guidelines.md +0 -25
  115. package/templates/v4/init/operations/.gitkeep +0 -1
  116. package/templates/v4/init/patterns/index.md +0 -8
  117. package/templates/v4/init/product.md +0 -30
  118. package/templates/v4/init/project.json +0 -27
  119. package/templates/v4/init/refreshes/.gitkeep +0 -1
  120. package/templates/v4/init/styleguides/general.md +0 -14
  121. package/templates/v4/init/styleguides/language.md +0 -21
  122. package/templates/v4/init/tech-stack.md +0 -21
  123. package/templates/v4/init/tracks/.gitkeep +0 -1
  124. package/templates/v4/init/tracks.md +0 -6
  125. package/templates/v4/init/wisps/.gitkeep +0 -1
  126. package/templates/v4/init/workflow.md +0 -91
  127. package/templates/v4/project/archive-operation.json +0 -19
  128. package/templates/v4/project/pattern.md +0 -20
  129. package/templates/v4/project/refresh-operation.json +0 -18
  130. package/templates/v4/project/refresh.md +0 -21
  131. package/templates/v4/styleguides/dart.md +0 -27
  132. package/templates/v4/styleguides/flutter.md +0 -27
  133. package/templates/v4/styleguides/go.md +0 -29
  134. package/templates/v4/styleguides/gradle.md +0 -28
  135. package/templates/v4/styleguides/html-css.md +0 -39
  136. package/templates/v4/styleguides/index.md +0 -27
  137. package/templates/v4/styleguides/java.md +0 -27
  138. package/templates/v4/styleguides/javascript.md +0 -27
  139. package/templates/v4/styleguides/kotlin.md +0 -26
  140. package/templates/v4/styleguides/maven.md +0 -28
  141. package/templates/v4/styleguides/python.md +0 -27
  142. package/templates/v4/styleguides/react.md +0 -28
  143. package/templates/v4/styleguides/swift.md +0 -27
  144. package/templates/v4/styleguides/swiftui.md +0 -27
  145. package/templates/v4/styleguides/typescript.md +0 -26
  146. package/templates/v4/track/bug.md +0 -14
  147. package/templates/v4/track/execution.json +0 -20
  148. package/templates/v4/track/learning.md +0 -45
  149. package/templates/v4/track/plan.md +0 -39
  150. package/templates/v4/track/revert-operation.json +0 -17
  151. package/templates/v4/track/revise-operation.json +0 -18
  152. package/templates/v4/track/revision.md +0 -36
  153. package/templates/v4/track/spec.md +0 -38
  154. package/templates/v4/track/state.json +0 -31
  155. package/templates/v5/init/archive/.gitkeep +0 -1
  156. package/templates/v5/init/guidelines.md +0 -25
  157. package/templates/v5/init/operations/.gitkeep +0 -1
  158. package/templates/v5/init/patterns/index.md +0 -8
  159. package/templates/v5/init/product.md +0 -30
  160. package/templates/v5/init/refreshes/.gitkeep +0 -1
  161. package/templates/v5/init/styleguides/general.md +0 -14
  162. package/templates/v5/init/styleguides/language.md +0 -21
  163. package/templates/v5/init/tech-stack.md +0 -21
  164. package/templates/v5/init/tracks/.gitkeep +0 -1
  165. package/templates/v5/init/tracks.md +0 -6
  166. package/templates/v5/init/wisps/.gitkeep +0 -1
  167. package/templates/v5/project/archive-operation.json +0 -19
  168. package/templates/v5/project/pattern.md +0 -20
  169. package/templates/v5/project/refresh-operation.json +0 -18
  170. package/templates/v5/project/refresh.md +0 -21
  171. package/templates/v5/styleguides/dart.md +0 -27
  172. package/templates/v5/styleguides/flutter.md +0 -27
  173. package/templates/v5/styleguides/go.md +0 -29
  174. package/templates/v5/styleguides/gradle.md +0 -28
  175. package/templates/v5/styleguides/html-css.md +0 -39
  176. package/templates/v5/styleguides/index.md +0 -27
  177. package/templates/v5/styleguides/java.md +0 -27
  178. package/templates/v5/styleguides/javascript.md +0 -27
  179. package/templates/v5/styleguides/kotlin.md +0 -26
  180. package/templates/v5/styleguides/maven.md +0 -28
  181. package/templates/v5/styleguides/python.md +0 -27
  182. package/templates/v5/styleguides/react.md +0 -28
  183. package/templates/v5/styleguides/swift.md +0 -27
  184. package/templates/v5/styleguides/swiftui.md +0 -27
  185. package/templates/v5/styleguides/typescript.md +0 -26
  186. package/templates/v5/track/bug.md +0 -14
  187. package/templates/v5/track/learning.md +0 -45
  188. package/templates/v5/track/revert-operation.json +0 -17
  189. package/templates/v5/track/revise-operation.json +0 -18
  190. package/templates/v5/track/revision.md +0 -36
  191. package/templates/v5/track/spec.md +0 -38
  192. /package/templates/{v1 → v6}/init/archive/.gitkeep +0 -0
  193. /package/templates/{v5 → v6}/init/gitignore.template +0 -0
  194. /package/templates/{v1 → v6}/init/guidelines.md +0 -0
  195. /package/templates/{v1 → v6}/init/operations/.gitkeep +0 -0
  196. /package/templates/{v3 → v6}/init/patterns/index.md +0 -0
  197. /package/templates/{v1 → v6}/init/product.md +0 -0
  198. /package/templates/{v5 → v6}/init/project.json +0 -0
  199. /package/templates/{v1 → v6}/init/refreshes/.gitkeep +0 -0
  200. /package/templates/{v1 → v6}/init/styleguides/general.md +0 -0
  201. /package/templates/{v1 → v6}/init/styleguides/language.md +0 -0
  202. /package/templates/{v1 → v6}/init/tech-stack.md +0 -0
  203. /package/templates/{v1 → v6}/init/tracks/.gitkeep +0 -0
  204. /package/templates/{v1 → v6}/init/tracks.md +0 -0
  205. /package/templates/{v1 → v6}/init/wisps/.gitkeep +0 -0
  206. /package/templates/{v2 → v6}/project/archive-operation.json +0 -0
  207. /package/templates/{v1 → v6}/project/pattern.md +0 -0
  208. /package/templates/{v2 → v6}/project/refresh-operation.json +0 -0
  209. /package/templates/{v1 → v6}/project/refresh.md +0 -0
  210. /package/templates/{v1 → v6}/styleguides/dart.md +0 -0
  211. /package/templates/{v1 → v6}/styleguides/flutter.md +0 -0
  212. /package/templates/{v1 → v6}/styleguides/go.md +0 -0
  213. /package/templates/{v1 → v6}/styleguides/gradle.md +0 -0
  214. /package/templates/{v1 → v6}/styleguides/html-css.md +0 -0
  215. /package/templates/{v1 → v6}/styleguides/index.md +0 -0
  216. /package/templates/{v1 → v6}/styleguides/java.md +0 -0
  217. /package/templates/{v1 → v6}/styleguides/javascript.md +0 -0
  218. /package/templates/{v1 → v6}/styleguides/kotlin.md +0 -0
  219. /package/templates/{v1 → v6}/styleguides/maven.md +0 -0
  220. /package/templates/{v1 → v6}/styleguides/python.md +0 -0
  221. /package/templates/{v1 → v6}/styleguides/react.md +0 -0
  222. /package/templates/{v1 → v6}/styleguides/swift.md +0 -0
  223. /package/templates/{v1 → v6}/styleguides/swiftui.md +0 -0
  224. /package/templates/{v1 → v6}/styleguides/typescript.md +0 -0
  225. /package/templates/{v1 → v6}/track/bug.md +0 -0
  226. /package/templates/{v5 → v6}/track/dependency-context.json +0 -0
  227. /package/templates/{v5 → v6}/track/execution.json +0 -0
  228. /package/templates/{v3 → v6}/track/learning.md +0 -0
  229. /package/templates/{v5 → v6}/track/plan.md +0 -0
  230. /package/templates/{v2 → v6}/track/revert-operation.json +0 -0
  231. /package/templates/{v2 → v6}/track/revise-operation.json +0 -0
  232. /package/templates/{v1 → v6}/track/revision.md +0 -0
  233. /package/templates/{v1 → v6}/track/spec.md +0 -0
  234. /package/templates/{v5 → v6}/track/state.json +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cadre",
3
- "version": "3.9.0",
3
+ "version": "4.0.0",
4
4
  "description": "A human-governed, Git-aware product delivery harness for Codex, Claude Code, and Zed Agent.",
5
5
  "author": {
6
6
  "name": "Cadre contributors"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cadre",
3
- "version": "3.9.0",
3
+ "version": "4.0.0",
4
4
  "description": "A human-governed, Git-aware product delivery harness for Codex, Claude Code, and Zed Agent.",
5
5
  "author": {
6
6
  "name": "Cadre contributors"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,218 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.0.0] - 2026-10-14
4
+
5
+ Cadre 4.0.0 is a breaking runtime/API release that removes parallel legacy
6
+ mutation paths while preserving supported project state and delivery workflows.
7
+ The package, runtime, docs and native plugin manifests are versioned together at
8
+ 4.0.0. This release also includes the revision, review and recovery hardening
9
+ recorded in the unreleased 3.9.2 development notes below.
10
+
11
+ ### One active mutation contract
12
+
13
+ - Use operation receipts for initialization, implementation completion, clean review and archive. Remove legacy direct-write completion paths and the `archive_batch_record`, `setup_record_commit` and `setup_record_git_initialized` tools. The MCP surface now has 22 tools.
14
+ - Ship only immutable template set v6. Published v1–v5 source bytes remain unchanged for historical fixtures; they are excluded from the npm and installed plugin payloads.
15
+ - Keep schema-2 project/track state, schema-1 execution journals and receipts, approval policy v2, retained-context reuse, all ten workflows, four approval modes and both schedules.
16
+ - Continue existing 3.9.0/3.9.1/3.9.2 schema-2/v5 projects without rewriting metadata or requiring a project refresh. Install the new runtime and reload the client. Receipt recovery and historical evidence remain supported.
17
+ - Warn on unsupported older formats with `PROJECT_UPGRADE_REQUIRED` and prevent delivery mutations. Do not silently translate approval authority or change old version labels.
18
+ - Clarify active revision drafting: use the combined revision preparation path, exact completed-task commit markers, and sequential task ordinals. Preserve completed IDs and renumber only pending work; do not compare a proposed graph against its unsuperseded execution through separate candidate inspection. This addresses rejected proposals observed in a native Codex interruption/revision test.
19
+ - Keep scope, retained-context tokens and knowledge arguments stable across context pages; adding `knownSources` midway invalidates the cursor. Native testing exercised the rejection and recovery, and the shared workflow guidance now states this constraint.
20
+
21
+ ### Compatibility and verification
22
+
23
+ - Reconcile public guides and the package README with the 4.0 receipt/recovery paths, approval modes, archive selection and all 22 MCP tools.
24
+ - Fix documentation heading links containing underscores or punctuation. Add social-preview images, page structured data and export validation for metadata, internal links, sitemap and robots directives.
25
+ - Keep homepage content near the top on tall mobile viewports instead of stretching the hero to the viewport height. Add npm package links to desktop and mobile navigation, and run content/SEO validation before Cloudflare deployment.
26
+
27
+ All ten skills, four approval modes, sequential/parallel scheduling, schema-2
28
+ project/track state, historical journals and approval evidence remain supported.
29
+ Direct MCP consumers must replace the three removed setup/archive tools with
30
+ receipt-based initialization and archive operations plus `candidate_apply`
31
+ reconciliation. New template requests use v6; older template catalogs are no
32
+ longer shipped. Compatible 3.9.x/v5 projects do not need a migration.
33
+
34
+ Verification passed **480/480 harness tests**, type checking, package validation,
35
+ pack dry run and the full documentation check. A disposable brownfield project
36
+ completed **14 real Codex sessions** through interrupted track drafting, revision
37
+ during implementation, a seeded defect and review/remediation cycle, stale
38
+ completion rejection after a manual edit, clean completion, interrupted archive
39
+ recovery and refresh. Its **26 tests** and **200,020 independent arithmetic
40
+ comparisons** passed. All nine operation receipts mapped to exactly one commit;
41
+ original authority, completed-task evidence and archived history were preserved.
42
+
43
+ The native run used Autonomous approval and sequential scheduling with labelled
44
+ synthetic fixture approvals. It does not establish exhaustive native coverage of
45
+ every client/mode. Final 4.0.0 installation and activation checks passed for
46
+ Codex, Claude Code and Zed, including packaged server parity, narrow approval
47
+ settings and discovery of all ten skills.
48
+
49
+ ### Upcoming roadmap
50
+
51
+ Three optional capabilities are planned beyond 4.0.0:
52
+
53
+ 1. **Deeper GitHub / GitLab integration** for coordinating work across multiple
54
+ people, including shared work status, ownership and review handoffs.
55
+ 2. **A knowledge base built as work happens**, capturing decisions and learning
56
+ during delivery and using relevant knowledge as context for subsequent work.
57
+ 3. **Polyrepo support** for coordinating dependencies and delivery across
58
+ multiple repositories while retaining per-repository history and approvals.
59
+
60
+ Each capability will be independently **opt-in and disabled by default**. The
61
+ core single-repository workflow will remain usable without enabling any of them.
62
+ These are upcoming roadmap items, not features shipped in 4.0.0; no delivery dates
63
+ are committed. See the [roadmap](https://cadre-docs.pages.dev/team-and-polyrepo/).
64
+
65
+ ### Older-project upgrade route
66
+
67
+ 1. Install the bridge: `npm install -g cadre-ai@3.9.0`, then `cadre-ai install --target all --scope user`. Reload the client.
68
+ 2. In 3.9.0, complete or reconcile interrupted operations and run Cadre refresh for an explicitly approved migration to schema-2 project/active-track state and template v5 at a quiescent boundary. Preserve historical records. Make any required approval-policy choice explicitly.
69
+ 3. Install `cadre-ai@4.0.0`, run `cadre-ai install --target all --scope user`, reload the client and continue.
70
+
71
+ This bridge is unnecessary for compatible 3.9.x/v5 projects. An already inconsistent track still requires its existing approved recovery; installation never repairs approval records by changing labels.
72
+
73
+ ## [3.9.2] - Unreleased
74
+
75
+ Cadre 3.9.2 fixes an active-revision bug in 3.9.1 that could strand a revised track with **“Autonomous scope changed; obtain explicit authority through refresh/revise.”** A revision record could be committed while canonical state still retained revision 1 and the original execution authority. Repeating receipt reconciliation could not advance fields missing from that approved promotion.
76
+
77
+ ### Active revision fix
78
+
79
+ - Preview and approve the revision record, state revision, scope authority, and execution disposition together. Reject incomplete scope-only promotions and inconsistent revision numbers before mutation.
80
+ - At a quiescent boundary, preserve the old journal as `superseded` history and start a new execution for the revised graph. Keep original authorization, cumulative review baseline, finding identities/attempts, completed-task commits, verification, and handoffs. Superseded does not claim successful completion.
81
+ - Inherit approval and scheduling modes. An empty historical scheduler now routes to the new execution instead of becoming a delivery blocker.
82
+ - Preserve completed tasks and phases. Reject new members in completed commit groups, rewritten authority/history, and unfinished worker/task activity; appended delivery uses a fresh group.
83
+ - Clarify the v5 revise prepare path so it does not run legacy inspection against the old execution binding. Existing committed retries remain zero-change and preserve their original receipt.
84
+ - Treat removed worker worktrees and branches as historical provenance, including paths inherited from earlier executions. Revise and refresh check actual Git/filesystem activity, retain completed evidence, and still reject live workers, orphaned paths, retained branches, and unsafe symlinks.
85
+ - Support active scope cascades within one v5 refresh approval. Each affected track supplies a fresh revision record, synchronized counters, and reassessed learning/dependency context; the runtime derives journal supersession and renewed Autonomous scope authority. Context-only refresh keeps the journal and scope references stable, including identical copied spec/plan files.
86
+ - Reject standalone revision-record promotions and records that disagree with canonical spec/plan counters. Reject counter-only context refreshes while retaining learning-only dependent reseeding.
87
+ - Preserve the complete original Autonomous authority during context refresh, including its cumulative review baseline, finding attempts and blockers. Reject authored authority/policy rewrites before mutation; verify explicitly created legacy migration authority against its original execution.
88
+ - Persist approved unchanged-input fingerprints in the temporary recovery journal. Resume rejects changed pattern, dependency and context inputs before any remaining writes, preserves dirty files and pending intent, and retains zero-change committed replay. Published receipt formats remain unchanged; older pending receipts check fingerprints retained in their proposed artifacts.
89
+ - Support approved-spec revisions in imported `drafting-plan` tracks after refresh. Retain prior spec approval, keep the draft plan unapproved, and return to track planning before implementation. Initial drafts without a plan use explicit previous plan revision 0.
90
+
91
+ ### Review, reversal and retry safeguards
92
+
93
+ - Enforce the persisted blocked/stalled Autonomous gate before automatic remediation and generic recovery. A proposed checkpoint cannot remove a blocker; only the explicit approved refresh retry renews authority. Pending remediation retains its original authority even after state promotion or candidate-stage loss.
94
+ - Bind revert reconciliation to the complete original artifact manifest from `candidate_inspect.files`. Reject changed, missing or extra authored artifacts before writing state; preserve exact authority through self-contained ignored recovery proof. Correct the regression fixture that previously read the nonexistent `manifest` result field.
95
+ - Verify actual reversal patches/results in an isolated Git index and object directory. Reject empty, unrelated, incomplete, reordered or wrong-result reversals; require retained execution provenance and explicitly approved merge mainlines. Conflict resolutions require an approved result tree limited to the target paths. Published receipt schemas and immutable templates remain unchanged.
96
+ - Reject changed product or verification-policy content before clean completion in every approval mode. Interrupted clean and finding-bearing review recovery checks the reviewed HEAD before remaining writes; already committed approvals retain historical zero-change replay.
97
+ - Constrain revert reconciliation to its persisted approved reversal, reachable additive reversal commits, exact durable reversal record, retained original journal and matching restored execution. Preserve the original Autonomous authorization, cumulative baseline, finding attempts and blockers; reject state-only authority rewrites.
98
+ - Add an explicit `reviewRetry` request to refresh prepare for blocked/stalled policy-v2 Autonomous loops. A new digest-bound approval records the full prior loop and human instructions, retains every attempt and the original cumulative baseline, and grants a new bounded two-attempt budget. Healthy loops cannot silently renew authority.
99
+ - Correct archive interruption guidance: resume the original pending promotion through `candidate_apply`, commit/reconcile once, and use the original archive token only for committed replay. Do not repeat apply or create another batch to bypass `COMMIT_PENDING`.
100
+
101
+ ### Create and target-scoped reversal fixes
102
+
103
+ - Bind create approval to the repository HEAD, index and tracked/untracked product inputs. Recheck canonical setup before initial promotion; stale proposals cannot overwrite a newer initialized project. Interrupted setup retains the original repository evidence, while committed receipt replay remains zero-change after later delivery.
104
+ - Require reversal commits and journal resets to match the named task, phase or track and approved whole shared group. Reject commits from another scope and omitted delivery boundaries; a phase integration reverses its introduced tasks once. Preserve unrelated nodes, worker history, handoffs and the execution contract.
105
+ - Compute Git’s rename-aware reversal result in disposable refs, worktree, index and object storage. Verify exact resulting trees and bound approved conflict resolutions to target paths and verified later renames, preserving the delivery Git state.
106
+ - Retain pre-existing user edits through an approved `reverts/revert-<id>-baseline.json` artifact. Stage preparation returns `revertBaseline`; the operation names its `repositoryBaselinePath`. Changed product/policy inputs still block apply and recovery. The runtime never stashes, cleans or commits those user files.
107
+ - Published receipts and immutable templates remain unchanged. Existing projects need no schema migration. Older pending operations retain their original approval contract; missing required evidence needs an explicitly approved repair rather than fabricated hashes or repeated Git reversals.
108
+
109
+ ### Shared review and execution-history invariants
110
+
111
+ - Apply completed-plan preservation to every review mode. Remediation keeps the specification revision and completed phases/tasks intact, increments the plan revision once, and appends one execution-bound review cycle. Ordinary review cannot silently reopen delivered work.
112
+ - Preserve completed and superseded execution journals byte-for-byte during refresh. Active journal changes are limited to an explicitly supported legacy policy migration or runtime-derived supersession; context refresh cannot replace verification, approvals, commits or handoffs.
113
+ - Distinguish actual merge deltas from direct-main and fast-forward completion heads during phase/track reversal. Require every uncovered task boundary, require separate reversals for tasks already present in the selected merge mainline, and reject reversing a task twice through its covering merge.
114
+ - Enforce the same preservation rules before preview/promotion and during pending recovery. New ignored recovery journals retain exact original state, plan and journal bytes. Older intents reuse matching original evidence when available and otherwise require an approved repair; committed receipts remain historical zero-change replay.
115
+ - Published receipt schemas and immutable templates remain unchanged. Existing healthy projects need a runtime update/server restart, without a project migration. Already-affected state needs an explicitly approved evidence-based repair.
116
+
117
+ ### Project-wide transition admission
118
+
119
+ - Share project configuration, track identity, terminal review, dependency readiness and cycle rules between candidate promotion and canonical validation. Validate the proposed overlay without writing a temporary control plane, including during interrupted recovery.
120
+ - Preserve lifecycle status, checkpoint, execution ownership and commit authority during context-only refresh. Completion belongs to clean review; scope changes use their approved revision transition.
121
+ - Reserve track IDs across active and archived locations. Archived work requires a distinct successor ID; an older pending duplicate proposal is retained for approved repair.
122
+ - Treat dependency changes as scope revisions even when plan text is unchanged. Require the next track revision and a fresh revision record, and reject active delivery with unfinished dependencies.
123
+ - Reject invalid project context and removal of required ignore rules before promotion. Shared configuration checks cover recovery after stage loss as well as fresh proposals.
124
+ - Keep published receipt schemas and immutable templates unchanged. Healthy projects need the updated runtime and server restart, without a project migration. Invalid older pending operations retain their intent and files for an explicitly approved repair.
125
+
126
+ ### Workflow routing and refresh records
127
+
128
+ - Correct Zed upgrade guidance: run `workspace: reload` before opening a new Agent thread. Native testing found that replacing the installed payload can leave a running workspace with an empty cached skill list; reloading restores all ten skills.
129
+
130
+ - Require a fresh, nonempty Markdown audit record for every refresh, including context-only updates, policy migration and approved Autonomous retries. Preserve earlier records and bind the selected new record into project refresh metadata and history. Multiple fresh migration records remain supported.
131
+ - Reject revise proposals that create a track without an existing approved active baseline. New tracks use track; completed or archived work uses a distinct successor.
132
+ - Preserve the committed approved specification, revision and dependencies when finishing an imported draft plan. Scope changes use revise, even when the working copy already contains an unapproved specification edit.
133
+ - Recheck these boundaries during interrupted promotion using original before-images, including after partial writes and stage loss. Reject invalid older pending intents without changing their files; preserve zero-change replay for already-committed approvals. Healthy projects need only the updated runtime and server restart, without a schema migration.
134
+
135
+ ### Revision recovery and draft counter boundaries
136
+
137
+ - Share basic track-state validation between canonical reads and proposed overlays. Reject empty checkpoints and malformed state before approval or interrupted promotion, rather than reporting a valid proposal that becomes invalid canonical state.
138
+ - Enforce fresh revision records, synchronized specification/plan/track counters and retained history during pending revision recovery. Reject incomplete older specification-only promotions, reused records, stale counters and erased history without changing the pending intent or remaining files. Refresh scope revisions use the same record checks.
139
+ - Bind draft planning's specification revision counter to the reachable specification approval, even if an unapproved on-disk draft has already changed its counter. Valid draft planning and partial recovery remain supported.
140
+ - Preserve already-committed receipt replay and supported evidence-based repairs. These guards do not change published receipt schemas or immutable templates; healthy projects need the updated runtime and server restart, without a project migration.
141
+
142
+ ### Imported draft revision authority
143
+
144
+ - Resolve imported draft specification counters from their reachable approval commit during track, revise and refresh. Edited unapproved draft counters cannot become the baseline for a new scope revision.
145
+ - Recheck the draft lifecycle during pending revision recovery. A specification revision retains `drafting-plan`, its prior specification evidence and an unapproved plan; it cannot create plan or execution approval. Invalid older intents remain available for approved repair.
146
+ - Allow a scope refresh to introduce the first draft plan when the approved specification predates it. Missing proposed artifacts count as additions instead of causing a filesystem error.
147
+ - Repeated revise/refresh sequences and interrupted promotion retain valid draft approvals. Receipt schemas and templates are unchanged; healthy projects need a runtime update and client restart, without migration.
148
+
149
+ ### Repairing an already stuck track
150
+
151
+ Updating the runtime prevents the faulty transition; it does **not** silently rewrite previously approved state. Reconcile the original receipt once, preserve it and the original revision record, and use revise to prepare a fresh, explicitly approved repair from actual canonical counters and verified execution evidence. When the current plan and journal differ, the repair names the original execution graph and reachable plan commit under `Recovery evidence`; the runtime verifies that committed baseline. Do not manually clear operations or rewrite journals to bypass the scope guard.
152
+
153
+ ### Validation
154
+
155
+ Latest verification passed **450/450 maintained tests**, including 11 new imported-draft regressions. A further **24/24 packaged stdio cases** passed across three client identities, four approval modes and both schedules. The matrix rotated all four two-step revise/refresh orders and initial-plan variants, recovered 48 revisions, and completed planning, implementation, review and archive for all 24 tracks. Frozen installation, type checking, package validation, pack dry run, all ten skill validators and full documentation checks passed. The final candidate is installed and enabled in Codex and Claude; all three installed MCP bundles match the tested build and initialize with 25 tools. Native Zed lists all ten skills and shows an active server after workspace reload. The locally packed global CLI reports 3.9.2 and passes doctor. These are synthetic runtime fixtures plus native installation checks, not exhaustive model-driven conversations. No additional defect appeared in the final pass; publication has not been performed.
156
+
157
+ Previous verification passed **439/439 maintained tests**, including 19 new revision-recovery and draft-counter regressions. A further **24/24 packaged stdio matrix cases** passed across three client identities, four approval modes and both schedules; all 24 tracks completed revision, implementation, review and archive. Frozen installation, strict type checking, package validation, pack dry run, all ten skill validators and full documentation checks passed. Codex and Claude report the updated candidate enabled; all three installed MCP bundles match the tested build and initialize with 25 tools. Native Zed lists all ten skills and shows an active server after workspace reload. The locally packed global CLI reports 3.9.2 and passes doctor. These are synthetic runtime fixtures plus native installation checks, not exhaustive model-driven conversations. No known blockers remain in this tested scope; publication has not been performed.
158
+
159
+ Previous verification passed **420/420 maintained tests**, including 20 new workflow-routing and refresh-record regressions. A further **48/48 matrix cases** passed: 24 full lifecycle cases and 24 packaged stdio routing/restart cases across three client identities, four approval modes and both schedules. These cases completed review and archive for 72 tracks. Frozen installation, type checking, package validation, pack dry run, all ten skill validators and full docs checks passed; the final installer guidance also passed all eight CLI tests. The updated candidate is installed and enabled in Codex and Claude. All three installed MCP bundles match the tested build and initialize with 25 tools; native Zed lists all ten skills and shows an active server after `workspace: reload`. The global CLI reports 3.9.2 and passes doctor. These are synthetic runtime fixtures plus native installation checks, not exhaustive model-driven conversations. No known blockers remain in the tested scope; publication has not been performed.
160
+
161
+ Previous verification passed **400/400 maintained tests**, including 21 new regressions for project-wide admission, context-refresh preservation, dependency revisions and interrupted recovery. **144/144 packaged stdio cases** passed across three client identities, four approval modes and both scheduling modes: 96 unsafe transition cases, 24 repeated remediation flows through archive, and 24 final configuration/restart flows through refresh, review and archive. A separate **24/24 lifecycle matrix** completed revision, revert, review, archive, refresh and successor delivery. Type checking, package validation, pack dry run, complete docs checks and all ten skill validators passed. These are runtime fixtures with explicit synthetic approvals, not exhaustive native AI conversations. The final candidate installed successfully in Codex, Claude and Zed; Codex/Claude report enabled candidate versions, all three installed MCP bundles match the tested build and initialize with 25 tools, and unrelated client settings are preserved. Zed native verification also passed: its Skills settings list all ten Cadre workflows, and MCP settings show Cadre enabled with a green server status. The native Zed process launches the tested packaged bundle. No known release blockers remain in the tested scope; publication has not been performed.
162
+
163
+ Previous follow-up verification passed **357/357 maintained tests**, with 40 new regressions for repository-bound create, target-aligned reversals, rename semantics, retained edits and recovery. **169/169 packaged stdio checks** passed: 156 matrix cases, three unborn-Git checks, seven existing review/revert recovery checks and three nested-baseline restart recoveries. The matrix covers all four approval modes and both requested scheduling modes across three client identities; 120 valid reversals finished review/archive and 24 wrong-scope reconciliations were rejected. These are runtime fixtures, not exhaustive native AI conversations. Native installer/activation validation remains a publication gate.
164
+
165
+ Earlier verification on 2026-10-13 recorded **317/317 maintained harness tests**, including 38 new regressions for blocked review, approval manifests, reversal results and recovery. The follow-up matrix passed **78/78 cases** and **15/15 packaged stdio server checks**, covering former defect rejection, complete lifecycle, repeated retry budgets, interrupted archive and restart recovery. Earlier verification passed 102 matrix and nine packaged cases. Type, package, packaging, and documentation checks pass. These are disposable runtime fixtures with explicit test approvals; exhaustive native AI-session coverage is not claimed. Final patched-payload installation and activation remain publication gates.
166
+
167
+ ### Upgrade
168
+
169
+ ```bash
170
+ npm install -g cadre-ai@3.9.2
171
+ cadre-ai --version
172
+ cadre-ai doctor
173
+ cadre-ai install --target all --scope user
174
+ ```
175
+
176
+ Start a new Codex task, reload Claude Code plugins, and run `workspace: reload` in Zed before opening a new Agent thread. Existing 3.9.0/3.9.1 projects using v5 need no routine refresh or schema/template migration. Older contracts retain their existing approved refresh requirements. Codex, Claude Code, and native Zed Agent remain stable integrations. Final clean completion still requires explicit approval.
177
+
178
+
179
+ ## [3.9.1] - 2026-10-01
180
+
181
+ Cadre 3.9.1 fixes implementation/review bookkeeping loops and interrupted-operation recovery. Native Zed Agent joins Codex and Claude Code as a stable integration. Track remains the default approval mode and Parallel remains the default scheduling mode; clean completion still requires explicit final approval.
182
+
183
+ ### Lifecycle and recovery fixes
184
+
185
+ - Preserve the verified implementation HEAD and original Autonomous execution authority across bookkeeping commits. Route already committed prerequisites forward instead of requesting another bookkeeping commit.
186
+ - Replay completed implementation, clean-review, revision, refresh, and archive operations from their original immutable receipts. Verify approval identity and unique reachable Git evidence; successful retries make zero changes and do not append history or create another commit.
187
+ - Resolve archive receipts before checking moved-track eligibility or reading removed candidate stages, and return the actual receipt path.
188
+ - Permit only exact runtime-generated track-index changes during parallel integration, with proposal-bound hashes. Continue rejecting tampered state, unrelated dirty files, and worker edits to protected Cadre artifacts.
189
+ - Include exact derived state changes in candidate and archive previews, including project history and refresh metadata. Archive preview and apply share one deterministic derivation so reviewers can reconstruct the final files and verify their hashes.
190
+ - Reject incomplete specification sections before promotion. Stale dependency diagnostics identify the exact expected sources and fingerprints for reassessment.
191
+ - Clarify exact scheduler node IDs, safe artifact filenames, governed pause/resume, apply-time approval confirmation, and approval ordering around additive Git reverts. Explicitly map `implement auto` to Autonomous approval mode.
192
+ - Fix the homepage Digests label contrast in dark mode by giving its amber background a matching dark-theme token.
193
+
194
+ ### Stable Zed Agent
195
+
196
+ Zed Agent support is stable as of 3.9.1. The integration continues to use ten global `cadre-*` skills, the packaged custom MCP server, exact tool permission entries, and the existing chat fallback for approval forms. Native plugins remain the integration path for Codex and Claude Code.
197
+
198
+ ### Validation
199
+
200
+ Native Codex fixtures exercised all ten workflows and all eight approval/scheduling combinations: Governed, Phase, Track, and Autonomous with Sequential and Parallel scheduling. Nine fixtures ended valid and clean with 11 archived tracks, 56 uniquely verified receipts, and no live workers or managed worktrees. Additional paths covered planned revision, active task reversal/reimplementation, archived revise and completed revert successors, batch archive, and two context refreshes. Fixtures used explicitly scoped test approvals; these results cover representative lifecycle paths rather than every possible repository or conflict.
201
+
202
+ All 118 harness tests passed, along with package and documentation checks. Automated regressions cover receipt replay, approval identity, derived-state hash reconstruction, integration tampering, dependency diagnostics, and patch compatibility. Installed Codex and Claude plugins are enabled at the candidate version; Zed discovers all ten skills with the packaged server active. Homepage checks cover light/dark themes and desktop/mobile rendering.
203
+
204
+ ### Upgrade and compatibility
205
+
206
+ ```bash
207
+ npm install -g cadre-ai@3.9.1
208
+ cadre-ai doctor
209
+ cadre-ai install --target all --scope user
210
+ ```
211
+
212
+ Start a new Codex task, reload Claude Code plugins, and open a new Zed Agent thread. Existing 3.9.0/v5 projects continue without a refresh, schema migration, or rewritten history. Template set v5 and schema-2 state are unchanged. Interrupted tracks may still need their existing receipt reconciled before continuation. Older runtime/template contracts retain their approved refresh requirements. Installation does not approve project work.
213
+
214
+ Direct MCP clients should accept the additional `stateChanges` preview fields and zero-change committed retry results. Re-run previews in a new server session; process-local proposal tokens are not portable between sessions.
215
+
3
216
  ## [3.9.0] - 2026-09-25
4
217
 
5
218
  Cadre 3.9.0 reduces bookkeeping commits and repeated context while preserving human approval, verification, provenance, and interruption recovery. Track remains the default approval mode and Parallel remains the default scheduling mode. Codex and Claude Code are stable integrations; native Zed Agent remains beta.
package/README.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # Cadre
2
2
 
3
- **Cadre 3.9.0** reduces bookkeeping commits and repeated context while preserving approval, verification, recovery, and provenance. New v5 projects use cohesive task commits, verified operation receipts, approved dependency context, and retained-context tokens. Track remains the default approval mode; Parallel remains the default scheduling mode. Existing projects migrate through one approved refresh at a quiescent boundary. Historical SHA records, execution contracts, and immutable v1–v4 templates remain supported.
3
+ **Cadre 4.0.0** simplifies the runtime around one receipt-based mutation path
4
+ and the current v6 template catalog. All ten workflows, four approval modes,
5
+ both scheduling modes, and stable Codex, Claude Code and Zed integrations remain
6
+ available. Install [cadre-ai from npm](https://www.npmjs.com/package/cadre-ai).
4
7
 
5
8
  Cadre is a human-governed, Git-aware delivery harness for Codex, Claude Code,
6
- and Zed Agent. Codex and Claude Code support is stable; native Zed Agent support
7
- is beta. Cadre turns project context into resumable feature and bug tracks,
9
+ and Zed Agent. All three integrations are stable as of Cadre 3.9.1.
10
+ Cadre turns project context into resumable feature and bug tracks,
8
11
  carries learning forward between phases, and records implementation provenance
9
12
  in Git.
10
13
 
@@ -18,6 +21,45 @@ templates. A project keeps only approved, mutable delivery state under
18
21
  [Quickstart](https://cadre-docs.pages.dev/quickstart/) ·
19
22
  [Release notes](https://cadre-docs.pages.dev/release-notes/)
20
23
 
24
+ ## What changes in 4.0.0
25
+
26
+ - **One recovery contract:** initialization, implementation completion, clean
27
+ review and archive use immutable operation receipts. Commit each operation
28
+ once, then reconcile its receipt; no follow-up commit is needed to record its SHA.
29
+ - **Smaller public surface:** 22 MCP tools and only template v6 in the installed
30
+ payload. Direct integrations must stop calling `archive_batch_record`,
31
+ `setup_record_commit` and `setup_record_git_initialized`.
32
+ - **Existing projects:** 3.9.0/3.9.1/3.9.2 projects with schema-2 state and v5
33
+ templates continue without a project migration or version-only refresh.
34
+ Historical journals, approval evidence and interrupted receipt recovery remain
35
+ supported.
36
+ - **Older formats:** `PROJECT_UPGRADE_REQUIRED` provides the bridge route:
37
+ install Cadre 3.9.0, reconcile interrupted work and run its approved refresh to
38
+ schema-2/v5, then install 4.0.0 and reload the client. Never change version labels
39
+ by hand. See the [release notes](https://cadre-docs.pages.dev/release-notes/).
40
+
41
+ Verification passed 480 harness tests and a dummy-project lifecycle across 14
42
+ fresh Codex sessions: brownfield create, interrupted track drafting, active
43
+ revision, review/remediation, manual-edit freshness checks, archive recovery and
44
+ refresh. The dummy app passed 26 tests and 200,020 arithmetic comparisons. Native
45
+ workflow coverage was Autonomous/sequential; it does not establish exhaustive
46
+ coverage of every mode or client. See the [testing and release documentation](https://cadre-docs.pages.dev/testing-and-release/).
47
+
48
+ ## Upcoming roadmap
49
+
50
+ Three optional capabilities are planned beyond 4.0.0:
51
+
52
+ 1. **Deeper GitHub / GitLab integration** for coordinating work across multiple
53
+ people, including shared work status, ownership and review handoffs.
54
+ 2. **A knowledge base built as work happens**, capturing decisions and learning
55
+ during delivery and using relevant knowledge as context for subsequent work.
56
+ 3. **Polyrepo support** for coordinating dependencies and delivery across
57
+ multiple repositories while retaining per-repository history and approvals.
58
+
59
+ Each capability will be independently **opt-in and disabled by default**. The
60
+ core single-repository workflow will remain usable without enabling any of them.
61
+ These are upcoming roadmap items, not features shipped in 4.0.0; no delivery dates
62
+ are committed. See the [roadmap](https://cadre-docs.pages.dev/team-and-polyrepo/).
21
63
 
22
64
  ## Capabilities
23
65
 
@@ -90,7 +132,7 @@ cadre-ai install --target codex
90
132
  # Claude Code only
91
133
  cadre-ai install --target claude
92
134
 
93
- # Zed Agent only (beta)
135
+ # Zed Agent only
94
136
  cadre-ai install --target zed
95
137
  ```
96
138
 
@@ -113,7 +155,7 @@ By default, installation applies these narrowly scoped rules:
113
155
  - Codex: `default_tools_approval_mode = "approve"` under `plugins."cadre@cadre".mcp_servers.cadre` in the user Codex configuration.
114
156
  - Claude Code: `cadre` in `enabledMcpjsonServers` and `mcp__cadre__*` in the
115
157
  user permission allowlist.
116
- - Zed Agent (beta): one exact `mcp:cadre:<tool>` allow entry for each Cadre MCP tool
158
+ - Zed Agent: one exact `mcp:cadre:<tool>` allow entry for each Cadre MCP tool
117
159
  under `agent.tool_permissions.tools`.
118
160
 
119
161
  Existing configuration, comments, and unrelated permission rules are preserved. A Claude deny rule is never removed or overridden. These rules suppress the host application's per-tool prompt; they do not bypass Cadre's requirement to present artifacts and lifecycle mutations to the human for approval.
@@ -166,8 +208,10 @@ After installation or update:
166
208
 
167
209
  - Start a new Codex conversation so the new skills and MCP tools are loaded.
168
210
  - In Claude Code, run `/reload-plugins` or start a new session.
169
- - In Zed, open a new Agent thread; global skills reload live and the Cadre MCP
170
- server should appear active under AI → MCP Servers.
211
+ - In Zed, run `workspace: reload` from the command palette, then open a new
212
+ Agent thread. Confirm all ten skills under AI → Skills and the active Cadre
213
+ server under AI → MCP Servers. Replacing the installed payload can leave
214
+ an already-open workspace with stale skill discovery until it reloads.
171
215
 
172
216
  You can inspect installation state with:
173
217
 
@@ -236,7 +280,7 @@ Zed Agent: /cadre-implement passwordless-login sequentially
236
280
 
237
281
  Implementation starts only after declared track dependencies are completed. Phase and task dependencies form a hierarchical DAG: phase dependencies activate phases, task dependencies expose phase-local work, and main allocates one global worker bound across every ready task. The generated workflow defaults to three delegated workers, the execution runtime accepts `maxWorkers` from 1 through 32, and effective concurrency is clamped by safe ready nodes and available host worker slots. Different phases can use direct execution, a sequential phase worker, or task-worker fan-out concurrently. Within one phase, execution can switch between sequential and fan-out modes only at a clean, journaled checkpoint. The main agent remains the only scheduler, operational owner of phase integration worktrees, state owner, merger, conflict resolver, worktree cleaner, and recorder of human approval.
238
282
 
239
- Every delivery phase ends with a derived manual-verification barrier over its tasks. The final track-level manual verification depends on every delivery phase and always runs in the main agent against the canonical worktree. Cadre resumes from its execution journal, reads dependency-phase learning, verifies and presents each change before commit, records task and phase provenance, and advances the track to `ready_for_review` only after all barriers pass.
283
+ Every delivery phase ends with a derived verification barrier over its tasks. The final track-level verification depends on every delivery phase and always runs in the main agent against the canonical worktree. Governed and Phase modes require human phase approval; Governed, Phase and Track require human track verification. Autonomous verifies under persisted authority and requires explicit final clean-completion approval. Cadre resumes from its execution journal, reads dependency-phase learning, verifies changes under the selected mode, records task and phase provenance, and advances the track to `ready_for_review` only after all barriers pass.
240
284
 
241
285
  ### 4. Review and complete the track
242
286
 
@@ -309,7 +353,8 @@ An initialized project has this shape:
309
353
  ├── tracks.md
310
354
  ├── styleguides/
311
355
  ├── patterns/
312
- ├── operations/
356
+ ├── receipts/ # tracked immutable operation evidence
357
+ ├── operations/ # retained historical journals, when present
313
358
  ├── refreshes/
314
359
  ├── tracks/
315
360
  │ └── <track-id>/
@@ -321,7 +366,7 @@ An initialized project has this shape:
321
366
  │ ├── bugs/
322
367
  │ └── revisions/
323
368
  ├── archive/
324
- ├── stage/ # ignored, unapproved candidate artifacts
369
+ ├── stage/ # ignored candidates and approved recovery journals
325
370
  ├── .worktrees/ # ignored, temporary execution worktrees
326
371
  └── wisps/ # ignored, disposable exploration output
327
372
  ```
@@ -333,41 +378,43 @@ Important sources of truth:
333
378
  - `executions/execution-<id>.json` is the resumable runtime journal. Ready and active nodes are derived from it; track state does not duplicate an active phase or task.
334
379
  - Track-local `state.json` defines identity, type, lifecycle status, track dependencies, revision, checkpoints, operation history, and the last completed execution reference.
335
380
  - `project.json` contains project setup and refresh history; it does not duplicate track records.
336
- - `.cadre/operations/refresh-<id>.json` and archive operation files preserve project-wide mutation checkpoints.
381
+ - `.cadre/receipts/<operation-id>.json` preserves immutable operation evidence. Commit it with the promoted artifacts once; reconciliation verifies that commit without writing a follow-up SHA commit.
382
+ - `.cadre/stage/operations/<operation-id>.json` retains ignored approved recovery state until reconciliation. Preserve it across interruptions. Historical `.cadre/operations/` records remain supported evidence.
337
383
  - `tracks.md` is generated from track-local state and is never hand-edited.
338
384
  - Track directory paths are derived from status and ID. A path is never persisted in track state.
339
385
 
340
386
  ## MCP capabilities
341
387
 
342
- The `cadre` stdio server exposes active immutable resources at `cadre://templates/v4/...` and 23 tools:
388
+ The `cadre` stdio server exposes active immutable resources at `cadre://templates/v6/...` and 22 tools:
343
389
 
344
390
  | Tool | Mutation | Purpose |
345
391
  | --- | --- | --- |
392
+ | `workflow_elicit` | No | Return required workflow questions through native elicitation or a structured fallback. |
346
393
  | `template_get_many` | No | Read an ordered template bundle in one call; immutable catalog contents are cached for the server lifetime. |
347
394
  | `styleguide_resolve` | No | Resolve default styleguide descriptors and hashes for an approved technology list. |
348
395
  | `context_read` | No | Read required track/node context with source hashes, freshness findings, and complete continuation pages. |
396
+ | `diagnostic_read` | No | Page through a full process-local diagnostic after a bounded error response. |
349
397
  | `project_status` | No | Return complete validation plus scoped canonical, staged, shadowed, or implementation status. |
350
398
  | `state_validate` | No | Validate project, track, plan, learning, dependency, review, and archive invariants. |
351
399
  | `candidate_stage_prepare` | Atomic | Create/resume a stage and optionally prune files outside its exact `expectedFiles` set. |
352
400
  | `candidate_inspect` | No | Return one exact manifest and validate every staged root or nested plan against its declared target status. |
401
+ | `candidate_apply` | Approval-aware | Prepare/apply approved candidates and resume/reconcile immutable operation receipts. |
353
402
  | `execution_graph_validate` | No | Parse and validate phase/task dependencies, cycles, and derived manual-verification barriers. |
354
- | `review_complete` | Adaptive | Derive the full execution-base review range, then prepare/apply an idempotent clean completion. |
403
+ | `review_complete` | Adaptive | Derive the review range from the execution base or original Autonomous baseline, then prepare/apply clean completion. |
355
404
  | `archive_batch_candidate` | Adaptive | Read staged pattern/seed files, return the complete batch for approval, then apply its unchanged token. |
356
- | `archive_batch_record` | Atomic | Record the resulting archive commit in track, project, and batch provenance without a second decision. |
357
405
  | `execution_start` | Atomic | Create the authorized execution journal and enter `in_progress` in one call. |
358
406
  | `execution_checkpoint` | Atomic | Apply one strict `scope` + event-specific `action` with required evidence. |
359
407
  | `execution_status` | No | Return a compact ready/active/blocked scheduler view, with optional focused node detail. |
360
- | `execution_finish` | Atomic | Convergently write completed execution, plan markers, `ready_for_review` state, and index. |
408
+ | `execution_finish` | Atomic | Promote completed execution, plan markers, `ready_for_review` state, index and receipt with resumable per-file writes. |
361
409
  | `worktree_create` | Atomic | Create/reconcile a worktree and record node start. |
362
410
  | `integration` | Adaptive | Merge and record integration; require a second call only in governed mode. |
363
411
  | `worktree_cleanup` | Atomic | Remove a verified integrated worktree and record completion. |
364
412
  | `project_init_candidate` | Adaptive | Generate defaults around staged authored context and apply after approval. |
365
- | `setup_record_git_initialized` | Yes | Record the verified Git-initialization checkpoint. |
366
- | `setup_record_commit` | Yes | Record the already-created setup commit SHA and complete setup state. |
367
413
  | `tracks_render` | Atomic | Validate and write deterministic `tracks.md` from current track state. |
368
414
 
369
- The four adaptive tools use a strict `request` union: prepare accepts only its
370
- declared fields, while apply accepts only an unchanged `proposalToken`. The MCP
415
+ Adaptive prepare/apply tools use a strict `request` union: prepare accepts only
416
+ its declared fields, while apply accepts only an unchanged `proposalToken`.
417
+ `candidate_apply` also supports explicit resume and reconcile requests. The MCP
371
418
  selects one result representation: structured JSON and output schemas for recognized structured clients, compact text for other clients. Server-side output validation remains strict in both cases. Template bodies appear once. The Node-18-compatible serialized tool catalog is kept below 80 KiB, including the context and handoff contracts. The MCP
372
419
  server cannot approve its own proposals or run arbitrary shell commands. Its
373
420
  Git surface is limited to derived Cadre worktree creation, non-squash
@@ -377,7 +424,7 @@ Multi-file state operations use atomic individual writes and converge from
377
424
  matching partial state; mismatched bytes, hashes, journals, or Git HEAD remain
378
425
  hard failures.
379
426
 
380
- Review and archive minimize approval fragmentation without weakening governance. A finding disposition and its exact remediation artifacts may share one approval; explicit reject-and-complete records accepted risks in the clean review; and a uniquely eligible archive target is included directly in the full batch proposal. Archive prepare computes the post-move `tracks.md` before approval, including archived rows. Any changed content, selection, digest, or consequence requires a corrected proposal and renewed approval.
427
+ Review and archive minimize approval fragmentation without weakening governance. A finding disposition and its exact remediation artifacts may share one approval. Outside Autonomous, explicit reject-and-complete records accepted risks; Autonomous completion requires no unresolved findings or accepted risks. Omitting archive track IDs selects all eligible completed tracks in dependency order. Archive prepare computes the post-move `tracks.md` before approval, including archived rows. Any changed content, selection, digest, or consequence requires a corrected proposal and renewed approval.
381
428
 
382
429
  ### Worktree layout and worker model
383
430
 
@@ -431,7 +478,7 @@ pnpm --filter cadre-ai validate
431
478
 
432
479
  ### Memory format upgrade
433
480
 
434
- The current source uses template set v4 and requires an approved refresh of older projects before delivery. It preserves v1/v2/v3 templates and terminal learning. Active Pattern Seeds record revisions and exact pattern fingerprints; changed guidance requires reassessment. Task handoffs preserve decisions, failed approaches, uncertainty, and next actions alongside existing checkpoints. Use all `context_read` pages before acting, and retain source inspection and approval gates. Routine `project_status` uses summaries; request `detail: "full"` for history/graph diagnostics. Filtered/paged listings never narrow validation coverage.
481
+ The current package ships template set v6. Existing 3.9.0/3.9.1/3.9.2 schema-2/v5 projects need no project migration or version-only refresh. Older formats must use Cadre 3.9.0 for an approved refresh to schema-2/v5 before installing 4.0. Published v1–v5 templates remain unchanged in source, and terminal learning remains historical evidence. Active Pattern Seeds record revisions and exact pattern fingerprints; changed guidance requires reassessment. Task handoffs preserve decisions, failed approaches, uncertainty, and next actions alongside existing checkpoints. Use all `context_read` pages before acting, and retain source inspection and approval gates. Routine `project_status` uses summaries; request `detail: "full"` for history/graph diagnostics. Filtered/paged listings never narrow validation coverage.
435
482
 
436
483
  Release preparation includes regression tests, package inspection, and documentation checks. Publishing still requires native installer/discovery/activation checks for Codex, Claude Code, and Zed. Local model tests and byte benchmarks do not establish universal token savings or semantic correctness of generated learning.
437
484
 
@@ -74,8 +74,8 @@ import { dirname, extname, join as join2, relative, resolve as resolve2, sep } f
74
74
  import { fileURLToPath } from "node:url";
75
75
 
76
76
  // src/domain/version.ts
77
- var CADRE_RUNTIME_VERSION = "3.9.0";
78
- var TEMPLATE_SET_VERSION = "v5";
77
+ var CADRE_RUNTIME_VERSION = "4.0.0";
78
+ var TEMPLATE_SET_VERSION = "v6";
79
79
 
80
80
  // src/domain/templates.ts
81
81
  var TEMPLATE_IDS = [
@@ -312,7 +312,7 @@ function removeZedSkillLinks(marketplaceRoot) {
312
312
  var sourceRoot = resolve4(dirname3(fileURLToPath2(import.meta.url)), "..");
313
313
  var requiredEntries = [
314
314
  "skills",
315
- "templates",
315
+ `templates/${TEMPLATE_SET_VERSION}`,
316
316
  "dist/cadre-mcp.mjs",
317
317
  ".mcp.json",
318
318
  ".mcp.codex.json",
@@ -2493,7 +2493,6 @@ var CADRE_MCP_TOOLS = {
2493
2493
  executionGraphValidate: "execution_graph_validate",
2494
2494
  reviewComplete: "review_complete",
2495
2495
  archiveBatchCandidate: "archive_batch_candidate",
2496
- archiveBatchRecord: "archive_batch_record",
2497
2496
  executionStart: "execution_start",
2498
2497
  executionCheckpoint: "execution_checkpoint",
2499
2498
  executionStatus: "execution_status",
@@ -2502,8 +2501,6 @@ var CADRE_MCP_TOOLS = {
2502
2501
  integration: "integration",
2503
2502
  worktreeCleanup: "worktree_cleanup",
2504
2503
  projectInitCandidate: "project_init_candidate",
2505
- setupRecordCommit: "setup_record_commit",
2506
- setupRecordGitInitialized: "setup_record_git_initialized",
2507
2504
  tracksRender: "tracks_render"
2508
2505
  };
2509
2506
  var CADRE_MCP_TOOL_NAMES = Object.freeze(Object.values(CADRE_MCP_TOOLS));
@@ -2976,6 +2973,7 @@ function runInstall(args) {
2976
2973
  process.stdout.write(`Installed Cadre for ${clients.join(", ")}.
2977
2974
  `);
2978
2975
  process.stdout.write("Start a new client conversation; in Claude Code, run /reload-plugins first.\n");
2976
+ if (clients.includes("zed")) process.stdout.write("In Zed, run workspace: reload from the command palette, then open a new Agent thread.\n");
2979
2977
  return 0;
2980
2978
  }
2981
2979