cadre-ai 3.7.1 → 3.9.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 (110) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +66 -1
  4. package/README.md +42 -6
  5. package/agents/cadre-phase-worker.md +5 -1
  6. package/agents/cadre-task-worker.md +5 -1
  7. package/dist/cadre-cli.mjs +6 -3
  8. package/dist/cadre-mcp.mjs +3192 -2079
  9. package/package.json +1 -1
  10. package/skills/archive/SKILL.md +18 -4
  11. package/skills/create/SKILL.md +15 -3
  12. package/skills/implement/SKILL.md +39 -13
  13. package/skills/implement/agents/openai.yaml +1 -1
  14. package/skills/implement/references/conflict-handling.md +1 -1
  15. package/skills/implement/references/parallel-workers.md +4 -0
  16. package/skills/implement/references/resume-recovery.md +6 -0
  17. package/skills/refresh/SKILL.md +28 -5
  18. package/skills/revert/SKILL.md +20 -2
  19. package/skills/review/SKILL.md +87 -11
  20. package/skills/revise/SKILL.md +18 -5
  21. package/skills/status/SKILL.md +4 -0
  22. package/skills/track/SKILL.md +19 -9
  23. package/skills/wisp/SKILL.md +4 -0
  24. package/templates/v4/init/archive/.gitkeep +1 -0
  25. package/templates/v4/init/gitignore.template +8 -0
  26. package/templates/v4/init/guidelines.md +25 -0
  27. package/templates/v4/init/operations/.gitkeep +1 -0
  28. package/templates/v4/init/patterns/index.md +8 -0
  29. package/templates/v4/init/product.md +30 -0
  30. package/templates/v4/init/project.json +27 -0
  31. package/templates/v4/init/refreshes/.gitkeep +1 -0
  32. package/templates/v4/init/styleguides/general.md +14 -0
  33. package/templates/v4/init/styleguides/language.md +21 -0
  34. package/templates/v4/init/tech-stack.md +21 -0
  35. package/templates/v4/init/tracks/.gitkeep +1 -0
  36. package/templates/v4/init/tracks.md +6 -0
  37. package/templates/v4/init/wisps/.gitkeep +1 -0
  38. package/templates/v4/init/workflow.md +91 -0
  39. package/templates/v4/project/archive-operation.json +19 -0
  40. package/templates/v4/project/pattern.md +20 -0
  41. package/templates/v4/project/refresh-operation.json +18 -0
  42. package/templates/v4/project/refresh.md +21 -0
  43. package/templates/v4/styleguides/dart.md +27 -0
  44. package/templates/v4/styleguides/flutter.md +27 -0
  45. package/templates/v4/styleguides/go.md +29 -0
  46. package/templates/v4/styleguides/gradle.md +28 -0
  47. package/templates/v4/styleguides/html-css.md +39 -0
  48. package/templates/v4/styleguides/index.md +27 -0
  49. package/templates/v4/styleguides/java.md +27 -0
  50. package/templates/v4/styleguides/javascript.md +27 -0
  51. package/templates/v4/styleguides/kotlin.md +26 -0
  52. package/templates/v4/styleguides/maven.md +28 -0
  53. package/templates/v4/styleguides/python.md +27 -0
  54. package/templates/v4/styleguides/react.md +28 -0
  55. package/templates/v4/styleguides/swift.md +27 -0
  56. package/templates/v4/styleguides/swiftui.md +27 -0
  57. package/templates/v4/styleguides/typescript.md +26 -0
  58. package/templates/v4/track/bug.md +14 -0
  59. package/templates/v4/track/execution.json +20 -0
  60. package/templates/v4/track/learning.md +45 -0
  61. package/templates/v4/track/plan.md +39 -0
  62. package/templates/v4/track/revert-operation.json +17 -0
  63. package/templates/v4/track/revise-operation.json +18 -0
  64. package/templates/v4/track/revision.md +36 -0
  65. package/templates/v4/track/spec.md +38 -0
  66. package/templates/v4/track/state.json +31 -0
  67. package/templates/v5/init/archive/.gitkeep +1 -0
  68. package/templates/v5/init/gitignore.template +9 -0
  69. package/templates/v5/init/guidelines.md +25 -0
  70. package/templates/v5/init/operations/.gitkeep +1 -0
  71. package/templates/v5/init/patterns/index.md +8 -0
  72. package/templates/v5/init/product.md +30 -0
  73. package/templates/v5/init/project.json +27 -0
  74. package/templates/v5/init/refreshes/.gitkeep +1 -0
  75. package/templates/v5/init/styleguides/general.md +14 -0
  76. package/templates/v5/init/styleguides/language.md +21 -0
  77. package/templates/v5/init/tech-stack.md +21 -0
  78. package/templates/v5/init/tracks/.gitkeep +1 -0
  79. package/templates/v5/init/tracks.md +6 -0
  80. package/templates/v5/init/wisps/.gitkeep +1 -0
  81. package/templates/v5/init/workflow.md +103 -0
  82. package/templates/v5/project/archive-operation.json +19 -0
  83. package/templates/v5/project/pattern.md +20 -0
  84. package/templates/v5/project/refresh-operation.json +18 -0
  85. package/templates/v5/project/refresh.md +21 -0
  86. package/templates/v5/styleguides/dart.md +27 -0
  87. package/templates/v5/styleguides/flutter.md +27 -0
  88. package/templates/v5/styleguides/go.md +29 -0
  89. package/templates/v5/styleguides/gradle.md +28 -0
  90. package/templates/v5/styleguides/html-css.md +39 -0
  91. package/templates/v5/styleguides/index.md +27 -0
  92. package/templates/v5/styleguides/java.md +27 -0
  93. package/templates/v5/styleguides/javascript.md +27 -0
  94. package/templates/v5/styleguides/kotlin.md +26 -0
  95. package/templates/v5/styleguides/maven.md +28 -0
  96. package/templates/v5/styleguides/python.md +27 -0
  97. package/templates/v5/styleguides/react.md +28 -0
  98. package/templates/v5/styleguides/swift.md +27 -0
  99. package/templates/v5/styleguides/swiftui.md +27 -0
  100. package/templates/v5/styleguides/typescript.md +26 -0
  101. package/templates/v5/track/bug.md +14 -0
  102. package/templates/v5/track/dependency-context.json +9 -0
  103. package/templates/v5/track/execution.json +21 -0
  104. package/templates/v5/track/learning.md +45 -0
  105. package/templates/v5/track/plan.md +42 -0
  106. package/templates/v5/track/revert-operation.json +17 -0
  107. package/templates/v5/track/revise-operation.json +18 -0
  108. package/templates/v5/track/revision.md +36 -0
  109. package/templates/v5/track/spec.md +38 -0
  110. package/templates/v5/track/state.json +19 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cadre",
3
- "version": "3.7.1",
3
+ "version": "3.9.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.7.1",
3
+ "version": "3.9.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,6 +1,71 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## [3.9.0] - 2026-09-25
4
+
5
+ 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.
6
+
7
+ ### Cohesive commits and verifiable lineage
8
+
9
+ - Introduce immutable template set **v5** and schema-2 project/track state. Preserve published v1–v4 templates and historical SHA-based records.
10
+ - Replace follow-up SHA-recording commits with stable operation references and immutable receipts. Each receipt binds the approval digest, base commit, and exact artifact hashes; Git trailers identify it. Resolution verifies a unique commit reachable from HEAD and its committed contents rather than trusting a trailer alone.
11
+ - Persist recovery intent before promotion. Pending commits block dependent delivery; reconciliation changes temporary state only. Commit execution stays with the agent's Git tools.
12
+ - Use one initialization commit; one combined specification, plan, learning and dependency-context commit; one commit per approved revision, refresh or archive batch; and one execution-completion and clean-review commit each. Remove automatic execution-start, phase-record, final-verification-phase and clean-evidence-only commits. Explicit handoff/blocker checkpoints remain available.
13
+ - Let related tasks in one phase share an approved commit group. Preserve individual task verification, authorization and handoffs; validate the collapsed dependency graph and schedule independent groups in parallel. A shared-commit reversal requires approval and reconciliation for every affected task.
14
+
15
+ ### Bounded context and MCP work
16
+
17
+ - Capture approved, source-linked dependency contracts and inherited constraints on active tracks. Verify source fingerprints and approval provenance; missing or stale coverage triggers explicit reassessment or an identified full-source fallback. Required project instructions and the complete current specification/plan remain authoritative.
18
+ - Add compact retained-context tokens after complete retrieval, section-level reuse, 48 KiB default pages and the existing 64 KiB maximum. Preserve inventory compatibility, expiry handling, context-loss resets, stale-memory checks and pagination drift detection.
19
+ - Add atomic `complete_group` checkpoints, composite verification without separate starts, direct-main phase completion and reusable scheduler results.
20
+ - Add constrained `candidate_apply` for track, revise, refresh, review remediation and revert reconciliation. It promotes only approved Cadre artifacts and records recovery/provenance; it cannot edit arbitrary product files or execute Git commands.
21
+ - Cap ordinary serialized runtime errors at **8 KiB**, retaining complete diagnostics through explicit `diagnostic_read` pagination. The purpose-built MCP catalog now has 25 tools.
22
+
23
+ ### Integration and recovery fixes
24
+
25
+ - Permit only validated, execution-bound coordinator state/journal changes during integration, and verify their contents remain unchanged. Continue rejecting unrelated dirty files and worker edits to protected Cadre state.
26
+ - Prefer fast-forward integration; create merge commits only for divergent histories. Record integration provenance in either case.
27
+ - Provide a narrowly ignored, ownership-checked build-cache directory and reject unowned content or symlink escapes.
28
+ - Recover receipts whose trailers were supplied in separate Git message paragraphs, allow empty archive update manifests, and accept standard review bug artifact paths.
29
+ - Rebase active dependency-context source paths under the approved archive batch while preserving archived learning. Batch committed artifact reads and reuse receipt resolution during an inspection.
30
+
31
+ ### Measured validation
32
+
33
+ - **111 automated tests** cover receipts, crash recovery, grouped scheduling/reverts, dirty-state integration, bounded errors, context freshness/pagination, legacy migration and historical evidence.
34
+ - A fresh native Codex lifecycle completed create → track → implement → clean review → archive, plus status and read-only Wisp, with **6 commits, 37 Cadre calls and zero separate verification starts**.
35
+ - Disposable native Codex sessions exercised all ten workflows, including revision recovery, whole-group additive reversal and review remediation.
36
+ - Controlled FRM-shaped context replay reduced combined request/response bytes by **93.4%** (743,728 → 49,033) and calls from **45 to 5**. The smaller Dhivon-shaped replay reduced bytes by **19.9%** (46,742 → 37,442), with no call-count regression.
37
+ - A synthetic 6,113-path error serialized to **700 bytes** in the ordinary MCP response. Full diagnostics remained readable.
38
+
39
+ These are synthetic regression/native-fixture results, not a same-scope rerun of the original FRM and Dhivon sessions. Token usage, elapsed time, calls and bytes are reported separately in the audit; byte reduction is not a token-savings claim.
40
+
41
+ ### Upgrade and compatibility
42
+
43
+ ```bash
44
+ npm install -g cadre-ai@3.9.0
45
+ cadre-ai doctor
46
+ cadre-ai install --target all --scope user
47
+ ```
48
+
49
+ Start a new Codex task, reload Claude Code plugins, and open a new Zed Agent thread. Installation updates the runtime and skills; it does not migrate project state or approve work.
50
+
51
+ Use one approved refresh at a quiescent boundary to migrate an existing project to runtime 3.9.0, template set v5 and schema-2 state. Include reassessed dependency context for active tracks. Preserve approvals, findings, completed nodes, historical journals and SHA references. Existing executions retain their original contract; commit grouping applies to new executions. Cadre 3.8.0/v4 executions may continue their original contract to a safe boundary before refresh. Earlier legacy policy migrations still require their explicit authority choice.
52
+
53
+ Curated dependency context requires human review for completeness. Fingerprints establish freshness and receipt verification establishes provenance; neither substitutes for assessing the actual requirements. No existing Git history is rewritten.
54
+
55
+
56
+ ## [3.8.0] - 2026-09-08
57
+
58
+ - Make Track the default approval mode, retaining Governed and Phase with independent Parallel/Sequential scheduling.
59
+ - Add continuous policy-v2 Autonomous implementation, verification, cumulative review, and in-scope remediation until clean; return a summary and exact completion proposal for the author's explicit decision.
60
+ - Route continuation through MCP `nextStep` and installed implement/review skills across Codex, Claude, and Zed. `ready_for_review` is an internal handoff; approving unchanged clean evidence does not require another review command.
61
+ - Persist originating authority, cumulative baseline, stable finding identities, and loop checkpoints. Preserve completed phases and execution history across new remediation graphs and interruption recovery.
62
+ - Pause for material scope decisions, unavailable verification, external blockers, or the same finding after two failed remediation attempts. Revalidate staged digests and changed completion evidence.
63
+ - Require explicit Track-or-Autonomous migration for legacy Autonomous executions through the existing quiescent, journaled, digest-bound refresh. Preserve Governed/Phase choices and conservative missing-mode handling.
64
+ - Introduce immutable template v4 while preserving v1–v3 and v3 memory requirements.
65
+ - Fix MCP startup through symlinked payload paths; accept null current-execution selection in status; reject malformed review journals before promotion.
66
+ - Clarify that authors can approve a clean completion proposal or report additional bugs; persisted Autonomous authority never substitutes for the final decision.
67
+
68
+ Validated with 96 automated tests, harness types, package validation and dry-run inspection, docs checks, and native Codex/Claude/Zed tests. Native Zed fresh-task recovery preserved exact staged authorization and history; tool-input retries remain a non-blocking beta reliability limitation.
4
69
 
5
70
  ## [3.7.1] - 2026-09-07
6
71
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Cadre
2
2
 
3
- **Cadre 3.7.1** fixes review and revision proposals that could not obtain an approval digest, preserves completed verification phases when remediation is appended, and keeps historical handoffs readable before replacement execution. It retains durable memory, selective context, and template set **v3**. Existing projects remain readable and use an approved refresh to record the new runtime before delivery; published templates remain unchanged.
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.
4
4
 
5
5
  Cadre is a human-governed, Git-aware delivery harness for Codex, Claude Code,
6
6
  and Zed Agent. Codex and Claude Code support is stable; native Zed Agent support
@@ -18,10 +18,11 @@ templates. A project keeps only approved, mutable delivery state under
18
18
  [Quickstart](https://cadre-docs.pages.dev/quickstart/) ·
19
19
  [Release notes](https://cadre-docs.pages.dev/release-notes/)
20
20
 
21
+
21
22
  ## Capabilities
22
23
 
23
24
  - Greenfield and brownfield project onboarding, with an explicit classification gate when the repository is ambiguous.
24
- - Human approval of every generated artifact and lifecycle state transition.
25
+ - Human approval of scope and approval policy, with explicit author approval for clean track completion.
25
26
  - Resumable create, specification, planning, implementation, review, revision, refresh, revert, and archive flows.
26
27
  - Parallel-by-default implementation of dependency DAGs, with an explicit sequential mode.
27
28
  - Isolated phase and task workers in Cadre-managed Git worktrees, coordinated and integrated only by the main agent.
@@ -36,6 +37,29 @@ templates. A project keeps only approved, mutable delivery state under
36
37
 
37
38
  Default idiomatic styleguides are included for Go, Java, Kotlin, Maven, Gradle, HTML/CSS, JavaScript, TypeScript, React, Dart, Flutter, Swift, SwiftUI, and Python. During project creation, each applicable guide can be accepted, amended, or replaced.
38
39
 
40
+ ## Approval modes and continuous Autonomous delivery
41
+
42
+ | Approval mode | Human decisions |
43
+ |---|---|
44
+ | Governed | Task, integration, phase/track verification, and review gates |
45
+ | Phase | Phase verification, track verification, and review |
46
+ | **Track — default** | Track verification and review |
47
+ | Autonomous | One final completion decision after implementation, verification, review, and remediation are clean |
48
+
49
+ Scheduling is separate: Parallel is the default; request Sequential with any
50
+ approval mode. To use the continuous loop, ask your client’s `implement` skill
51
+ to implement the track with Autonomous approval mode. Cadre invokes the review
52
+ skill through MCP next steps and repeats fixes, verification, and cumulative
53
+ review without another command.
54
+
55
+ `ready_for_review` is an internal handoff during that loop, not an approval
56
+ pause. Once clean, Cadre returns verification results, remediation history, and
57
+ the exact completion proposal. Approve it to mark the track completed without
58
+ running review again, or report additional bugs to continue remediation. Changed
59
+ implementation or verification inputs require renewed verification/review.
60
+ Autonomous pauses for scope decisions, unavailable checks, external blockers,
61
+ or the same unresolved finding after two remediation attempts.
62
+
39
63
  ## Requirements
40
64
 
41
65
  - Node.js 18 or newer
@@ -315,7 +339,7 @@ Important sources of truth:
315
339
 
316
340
  ## MCP capabilities
317
341
 
318
- The `cadre` stdio server exposes active immutable resources at `cadre://templates/v3/...` and 23 tools:
342
+ The `cadre` stdio server exposes active immutable resources at `cadre://templates/v4/...` and 23 tools:
319
343
 
320
344
  | Tool | Mutation | Purpose |
321
345
  | --- | --- | --- |
@@ -367,7 +391,7 @@ Phase and task worktrees are siblings because Git worktrees cannot be physically
367
391
 
368
392
  Task branches in one dependency wave start from the same clean phase HEAD and merge into the registered phase integration branch one at a time. The next wave starts from the updated phase HEAD. Direct canonical integration is reserved for an explicitly main-coordinated single-task phase; multi-task and phase-verified delivery uses a phase integration branch. Phase branches merge into the canonical branch. Cleanup prunes the worktree and branch only after ancestry proves the integration is present in the derived parent.
369
393
 
370
- Codex uses implementation subagents when parallel nodes are available. Claude Code uses the packaged `cadre-phase-worker` and `cadre-task-worker` definitions. Both follow the same contract: workers stay in their assigned worktree, read before editing, modify product files only, run focused verification, never spawn nested workers, and stop uncommitted until the main agent presents their work and obtains human approval. A phase worker holds only a temporary execution lease: it checkpoints one regular task at a time, creates a distinct approved commit for each task, and must report a clean committed HEAD and remain inactive before task-worker fan-out. The journal retains worker history across later reassignment. Manual-verification evidence does not require an empty commit. Claude agent teams are intentionally not required.
394
+ Codex uses implementation subagents when parallel nodes are available. Claude Code uses the packaged `cadre-phase-worker` and `cadre-task-worker` definitions. Both follow the same contract: workers stay in their assigned worktree, read before editing, modify product files only, run focused verification, never spawn nested workers, and stop uncommitted until the main agent reviews their work and provides the human approval or persisted-mode authorization required by the execution policy. A phase worker holds only a temporary execution lease: it checkpoints one regular task at a time, creates a distinct approved commit for each task, and must report a clean committed HEAD and remain inactive before task-worker fan-out. The journal retains worker history across later reassignment. Manual-verification evidence does not require an empty commit. Claude agent teams are intentionally not required.
371
395
 
372
396
  ## Resumability and safety
373
397
 
@@ -380,7 +404,7 @@ Multi-step state changes—including revisions, refreshes, reverts, archive batc
380
404
  - committed or integrated DAG nodes are not repeated, and newly ready nodes are scheduled immediately after durable transitions;
381
405
  - any mismatch stops and is presented to the human rather than guessed, discarded, reset, or restarted.
382
406
 
383
- Task conflicts are resolved and reverified in the owning phase worktree. Phase conflicts are resolved and reverified in the canonical worktree. The main agent presents every resolution before recording its merge commit. A revision or refresh that changes execution-governing context first quiesces active workers and reconciles their work; a changed plan graph creates a new execution identity rather than rewriting the old journal.
407
+ Task conflicts are resolved and reverified in the owning phase worktree. Phase conflicts are resolved and reverified in the canonical worktree. The main agent reviews each resolution and records its verification and mode-appropriate authorization before its merge commit. A revision or refresh that changes execution-governing context first quiesces active workers and reconciles their work; a changed plan graph creates a new execution identity rather than rewriting the old journal.
384
408
 
385
409
  Archive remains deliberately small: it accepts only tracks that centralized state validation already proves are `completed` with a clean review bound to the current execution, plan revision, graph digest, and reviewed head. It does not rerun implementation barriers or review logic.
386
410
 
@@ -407,6 +431,18 @@ pnpm --filter cadre-ai validate
407
431
 
408
432
  ### Memory format upgrade
409
433
 
410
- Cadre 3.7.1 uses template set v3 and requires an approved refresh of older projects before delivery. It preserves v1/v2 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.
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.
411
435
 
412
436
  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
+
438
+
439
+ ### Implementation approval modes
440
+
441
+ Track is the default: phase checks run automatically, followed by track verification
442
+ and ordinary review approval. Phase retains phase verification gates; Governed retains
443
+ task and integration gates. Explicit Autonomous implements, verifies, reviews, and
444
+ remediates in-scope findings until clean, then asks for one final completion approval.
445
+ Parallel scheduling remains the default and Sequential is available independently.
446
+ Legacy Autonomous requires an explicit Track-or-Autonomous choice through approved
447
+ refresh. Policy v2 persists loop authority, cumulative review baseline, and stable
448
+ findings; a finding unresolved after two remediation attempts pauses for guidance.
@@ -13,9 +13,13 @@ You are a Cadre phase implementation worker holding a temporary execution lease.
13
13
  - Never edit concurrently with task workers for this phase. When main requests a mode handoff, finish only the approved current-task checkpoint, verify the worktree is clean, report its committed HEAD, release the lease, and remain inactive until main explicitly reassigns you.
14
14
  - Execute the assigned non-manual phase tasks in dependency order, with focused tests and checks, but checkpoint one regular task at a time.
15
15
  - Do not claim or perform human approval. Obey the persisted approval mode supplied by main. After each regular task, stop with only that task's proposed diff uncommitted and report changed files, verification, risks, learning candidates, and one Conventional Commit message.
16
- - Commit only after main reports either explicit human approval in `governed` or approval-mode authorization in `phase`/`autonomous`. Commit only that task, return its distinct SHA, and wait for confirmation that main recorded the checkpoint before starting the next task.
16
+ - Commit only after main reports either explicit human approval in `governed` or approval-mode authorization in `phase`/`track`/`autonomous`. For legacy execution, commit only that task and return its distinct SHA; for cohesive-v1, commit the assigned whole group and return its shared SHA, and wait for confirmation that main recorded the checkpoint before starting the next task.
17
17
  - Use available approved commands without prompting again. If an unexpected host permission is required, stop and report the exact command and reason to main instead of retrying variants.
18
18
 
19
19
  - Return a task handoff with `decisions`, `failedApproaches`, `openQuestions`, `nextAction`, and `sources` (repository-relative paths and exact SHA-256 hashes). Keep serialized JSON within 8 KiB, linking longer durable evidence. Main persists it with the existing checkpoint; it cannot replace verification or authorization. Read required source content, not only its hash, and never silently omit constraints to fit the context budget.
20
20
 
21
21
  - Reuse unchanged context only when its complete text remains in this session. A source hash alone is not context. Main must supply all required pages and any retained text a fresh worker lacks. Treat observed facts, inferred explanations, and untested claims distinctly in learning; inspect imports and tests before asserting library semantics.
22
+
23
+ ## Cohesive execution contract
24
+
25
+ For a new cohesive-v1 execution, main may assign a whole approved commit group. Execute its internal dependencies in order, verify every task, and return individual authorization, verification and handoff evidence with one shared product commit. Never split a group across workers or independently schedule a member before the group's external dependencies. Legacy executions keep their original task boundaries. Main owns atomic complete_group, Git integration, receipts and all Cadre state. Use only the owned build-cache path main supplies. Fast-forward integration is valid provenance; do not require a merge object.
@@ -12,9 +12,13 @@ You are a Cadre task implementation worker. The main agent is the only scheduler
12
12
  - Do not spawn agents, merge, rebase, reset, clean up worktrees, delete branches, or use force operations.
13
13
  - Implement only the assigned task and run focused verification.
14
14
  - Stop with the proposed diff uncommitted and report changed files, checks, risks, learning candidates, and the proposed Conventional Commit message.
15
- - Obey the persisted approval mode supplied by main. Commit only after main reports either explicit human approval in `governed` or approval-mode authorization in `phase`/`autonomous`, then return the commit SHA.
15
+ - Obey the persisted approval mode supplied by main. Commit only after main reports either explicit human approval in `governed` or approval-mode authorization in `phase`/`track`/`autonomous`, then return the commit SHA.
16
16
  - Use available approved commands without prompting again. If an unexpected host permission is required, stop and report the exact command and reason to main instead of retrying variants.
17
17
 
18
18
  - Return a task handoff with `decisions`, `failedApproaches`, `openQuestions`, `nextAction`, and `sources` (repository-relative paths and exact SHA-256 hashes). Keep serialized JSON within 8 KiB, linking longer durable evidence. Main persists it with the existing checkpoint; it cannot replace verification or authorization. Read required source content, not only its hash, and never silently omit constraints to fit the context budget.
19
19
 
20
20
  - Reuse unchanged context only when its complete text remains in this session. A source hash alone is not context. Main must supply all required pages and any retained text a fresh worker lacks. Treat observed facts, inferred explanations, and untested claims distinctly in learning; inspect imports and tests before asserting library semantics.
21
+
22
+ ## Cohesive execution contract
23
+
24
+ For a new cohesive-v1 execution, main may assign a whole approved commit group. Execute its internal dependencies in order, verify every task, and return individual authorization, verification and handoff evidence with one shared product commit. Never split a group across workers or independently schedule a member before the group's external dependencies. Legacy executions keep their original task boundaries. Main owns atomic complete_group, Git integration, receipts and all Cadre state. Use only the owned build-cache path main supplies. Fast-forward integration is valid provenance; do not require a merge object.
@@ -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.7.1";
78
- var TEMPLATE_SET_VERSION = "v3";
77
+ var CADRE_RUNTIME_VERSION = "3.9.0";
78
+ var TEMPLATE_SET_VERSION = "v5";
79
79
 
80
80
  // src/domain/templates.ts
81
81
  var TEMPLATE_IDS = [
@@ -109,6 +109,7 @@ var TEMPLATE_IDS = [
109
109
  "styleguide/swiftui",
110
110
  "styleguide/typescript",
111
111
  "track/bug",
112
+ "track/dependency-context",
112
113
  "track/execution",
113
114
  "track/learning",
114
115
  "track/plan",
@@ -214,7 +215,7 @@ var CADRE_WORKFLOWS = [
214
215
  ];
215
216
  var ZED_COMPATIBILITY = `## Zed compatibility
216
217
 
217
- Zed Agent consumes Cadre templates through tools rather than MCP resource discovery. Whenever this workflow calls \`template_get_many\`, include \`contentMode: "text"\`. Use known template IDs and descriptor tools such as \`styleguide_resolve\`; do not attempt to list or read MCP resources directly. When recommending another Cadre workflow, use its Zed command \`/cadre-<workflow>\` and never a dollar-prefixed or colon command.`;
218
+ Zed Agent consumes Cadre templates through tools rather than MCP resource discovery. Whenever this workflow calls \`template_get_many\`, include \`contentMode: "text"\`. Use known template IDs and descriptor tools such as \`styleguide_resolve\`; do not attempt to list or read MCP resources directly. When recommending another Cadre workflow, use its Zed command \`/cadre-<workflow>\` and never a dollar-prefixed or colon command. For MCP \`nextStep\` with plugin \`cadre\`, resolve skill \`review\` or \`implement\` to the installed \`cadre-review\` or \`cadre-implement\` skill and execute it in the same task; printing a command is not invocation.`;
218
219
  function pathExists(path) {
219
220
  try {
220
221
  lstatSync(path);
@@ -2483,10 +2484,12 @@ var CADRE_MCP_TOOLS = {
2483
2484
  templateGetMany: "template_get_many",
2484
2485
  styleguideResolve: "styleguide_resolve",
2485
2486
  contextRead: "context_read",
2487
+ diagnosticRead: "diagnostic_read",
2486
2488
  projectStatus: "project_status",
2487
2489
  stateValidate: "state_validate",
2488
2490
  candidateStagePrepare: "candidate_stage_prepare",
2489
2491
  candidateInspect: "candidate_inspect",
2492
+ candidateApply: "candidate_apply",
2490
2493
  executionGraphValidate: "execution_graph_validate",
2491
2494
  reviewComplete: "review_complete",
2492
2495
  archiveBatchCandidate: "archive_batch_candidate",