cadre-ai 3.8.0 → 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 (65) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +53 -0
  4. package/README.md +2 -1
  5. package/agents/cadre-phase-worker.md +5 -1
  6. package/agents/cadre-task-worker.md +4 -0
  7. package/dist/cadre-cli.mjs +5 -2
  8. package/dist/cadre-mcp.mjs +1910 -1104
  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 +18 -4
  13. package/skills/implement/references/parallel-workers.md +4 -0
  14. package/skills/implement/references/resume-recovery.md +4 -0
  15. package/skills/refresh/SKILL.md +17 -5
  16. package/skills/revert/SKILL.md +20 -2
  17. package/skills/review/SKILL.md +15 -3
  18. package/skills/revise/SKILL.md +18 -5
  19. package/skills/status/SKILL.md +4 -0
  20. package/skills/track/SKILL.md +19 -9
  21. package/skills/wisp/SKILL.md +4 -0
  22. package/templates/v5/init/archive/.gitkeep +1 -0
  23. package/templates/v5/init/gitignore.template +9 -0
  24. package/templates/v5/init/guidelines.md +25 -0
  25. package/templates/v5/init/operations/.gitkeep +1 -0
  26. package/templates/v5/init/patterns/index.md +8 -0
  27. package/templates/v5/init/product.md +30 -0
  28. package/templates/v5/init/project.json +27 -0
  29. package/templates/v5/init/refreshes/.gitkeep +1 -0
  30. package/templates/v5/init/styleguides/general.md +14 -0
  31. package/templates/v5/init/styleguides/language.md +21 -0
  32. package/templates/v5/init/tech-stack.md +21 -0
  33. package/templates/v5/init/tracks/.gitkeep +1 -0
  34. package/templates/v5/init/tracks.md +6 -0
  35. package/templates/v5/init/wisps/.gitkeep +1 -0
  36. package/templates/v5/init/workflow.md +103 -0
  37. package/templates/v5/project/archive-operation.json +19 -0
  38. package/templates/v5/project/pattern.md +20 -0
  39. package/templates/v5/project/refresh-operation.json +18 -0
  40. package/templates/v5/project/refresh.md +21 -0
  41. package/templates/v5/styleguides/dart.md +27 -0
  42. package/templates/v5/styleguides/flutter.md +27 -0
  43. package/templates/v5/styleguides/go.md +29 -0
  44. package/templates/v5/styleguides/gradle.md +28 -0
  45. package/templates/v5/styleguides/html-css.md +39 -0
  46. package/templates/v5/styleguides/index.md +27 -0
  47. package/templates/v5/styleguides/java.md +27 -0
  48. package/templates/v5/styleguides/javascript.md +27 -0
  49. package/templates/v5/styleguides/kotlin.md +26 -0
  50. package/templates/v5/styleguides/maven.md +28 -0
  51. package/templates/v5/styleguides/python.md +27 -0
  52. package/templates/v5/styleguides/react.md +28 -0
  53. package/templates/v5/styleguides/swift.md +27 -0
  54. package/templates/v5/styleguides/swiftui.md +27 -0
  55. package/templates/v5/styleguides/typescript.md +26 -0
  56. package/templates/v5/track/bug.md +14 -0
  57. package/templates/v5/track/dependency-context.json +9 -0
  58. package/templates/v5/track/execution.json +21 -0
  59. package/templates/v5/track/learning.md +45 -0
  60. package/templates/v5/track/plan.md +42 -0
  61. package/templates/v5/track/revert-operation.json +17 -0
  62. package/templates/v5/track/revise-operation.json +18 -0
  63. package/templates/v5/track/revision.md +36 -0
  64. package/templates/v5/track/spec.md +38 -0
  65. package/templates/v5/track/state.json +19 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cadre",
3
- "version": "3.8.0",
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.8.0",
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,5 +1,58 @@
1
1
  # Changelog
2
2
 
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
+
3
56
  ## [3.8.0] - 2026-09-08
4
57
 
5
58
  - Make Track the default approval mode, retaining Governed and Phase with independent Parallel/Sequential scheduling.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Cadre
2
2
 
3
- **Cadre 3.8.0** makes **Track** the default approval mode and adds continuous **Autonomous** implementation, verification, review, and remediation until clean. Parallel remains the scheduling default; Sequential works with every approval mode. The author makes the final completion decision. Template set **v4** preserves v1–v3; existing projects require an approved refresh, and legacy Autonomous executions require an explicit Track-or-Autonomous migration choice.
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,6 +18,7 @@ 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.
@@ -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`/`track`/`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.
@@ -18,3 +18,7 @@ You are a Cadre task implementation worker. The main agent is the only scheduler
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.8.0";
78
- var TEMPLATE_SET_VERSION = "v4";
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",
@@ -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",