cadre-ai 3.3.0 → 3.4.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 (63) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +45 -2
  4. package/README.md +19 -21
  5. package/dist/cadre-cli.mjs +2 -2
  6. package/dist/cadre-mcp.mjs +1142 -705
  7. package/package.json +1 -1
  8. package/skills/archive/SKILL.md +6 -6
  9. package/skills/create/SKILL.md +5 -4
  10. package/skills/implement/SKILL.md +34 -83
  11. package/skills/implement/references/conflict-handling.md +5 -0
  12. package/skills/implement/references/governed-mode.md +7 -0
  13. package/skills/implement/references/parallel-workers.md +9 -0
  14. package/skills/implement/references/resume-recovery.md +10 -0
  15. package/skills/refresh/SKILL.md +4 -4
  16. package/skills/revert/SKILL.md +6 -6
  17. package/skills/review/SKILL.md +7 -7
  18. package/skills/revise/SKILL.md +6 -6
  19. package/skills/status/SKILL.md +1 -1
  20. package/skills/track/SKILL.md +5 -5
  21. package/templates/v2/init/archive/.gitkeep +1 -0
  22. package/templates/v2/init/gitignore.template +8 -0
  23. package/templates/v2/init/guidelines.md +25 -0
  24. package/templates/v2/init/operations/.gitkeep +1 -0
  25. package/templates/v2/init/patterns/index.md +6 -0
  26. package/templates/v2/init/product.md +30 -0
  27. package/templates/v2/init/project.json +27 -0
  28. package/templates/v2/init/refreshes/.gitkeep +1 -0
  29. package/templates/v2/init/styleguides/general.md +14 -0
  30. package/templates/v2/init/styleguides/language.md +21 -0
  31. package/templates/v2/init/tech-stack.md +21 -0
  32. package/templates/v2/init/tracks/.gitkeep +1 -0
  33. package/templates/v2/init/tracks.md +6 -0
  34. package/templates/v2/init/wisps/.gitkeep +1 -0
  35. package/templates/v2/init/workflow.md +72 -0
  36. package/templates/v2/project/archive-operation.json +19 -0
  37. package/templates/v2/project/pattern.md +20 -0
  38. package/templates/v2/project/refresh-operation.json +18 -0
  39. package/templates/v2/project/refresh.md +21 -0
  40. package/templates/v2/styleguides/dart.md +27 -0
  41. package/templates/v2/styleguides/flutter.md +27 -0
  42. package/templates/v2/styleguides/go.md +29 -0
  43. package/templates/v2/styleguides/gradle.md +28 -0
  44. package/templates/v2/styleguides/html-css.md +39 -0
  45. package/templates/v2/styleguides/index.md +27 -0
  46. package/templates/v2/styleguides/java.md +27 -0
  47. package/templates/v2/styleguides/javascript.md +27 -0
  48. package/templates/v2/styleguides/kotlin.md +26 -0
  49. package/templates/v2/styleguides/maven.md +28 -0
  50. package/templates/v2/styleguides/python.md +27 -0
  51. package/templates/v2/styleguides/react.md +28 -0
  52. package/templates/v2/styleguides/swift.md +27 -0
  53. package/templates/v2/styleguides/swiftui.md +27 -0
  54. package/templates/v2/styleguides/typescript.md +26 -0
  55. package/templates/v2/track/bug.md +14 -0
  56. package/templates/v2/track/execution.json +19 -0
  57. package/templates/v2/track/learning.md +39 -0
  58. package/templates/v2/track/plan.md +39 -0
  59. package/templates/v2/track/revert-operation.json +17 -0
  60. package/templates/v2/track/revise-operation.json +18 -0
  61. package/templates/v2/track/revision.md +36 -0
  62. package/templates/v2/track/spec.md +38 -0
  63. package/templates/v2/track/state.json +31 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cadre",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "A human-governed, Git-aware product delivery harness for Codex and Claude Code.",
5
5
  "author": {
6
6
  "name": "Cadre contributors"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cadre",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "A human-governed, Git-aware product delivery harness for Codex and Claude Code.",
5
5
  "author": {
6
6
  "name": "Cadre contributors"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.4.0] - 2026-08-27
4
+
5
+ Cadre 3.4.0 is a breaking MCP and template-contract release. Existing v1
6
+ projects remain readable but require an explicit approved refresh before
7
+ state mutation.
8
+
9
+ ### Breaking Changes
10
+
11
+ - Adaptive commands now require exclusive `prepare` or `apply` input shapes.
12
+ - Direct clients must replace retired template, candidate, and worktree reads
13
+ with MCP resources, `candidate_inspect`, and scoped `project_status`.
14
+ - New projects use template set v2. Legacy mutation fails with
15
+ `PROJECT_REFRESH_REQUIRED` until an approved refresh updates workflow and
16
+ runtime/template versions.
17
+
18
+ ### Added
19
+
20
+ - Added bounded, Git-ignored staging under `.cadre/stage/<candidate-id>/` and
21
+ one `candidate_inspect` call for manifests plus optional plan validation.
22
+ - Added scoped project/track/implementation status views, immutable v2
23
+ templates, explicit legacy upgrade reporting, and approved v1→v2 refresh.
24
+ - Added honest adaptive schemas requiring `mode`, embedded template resources,
25
+ compact descriptors/receipts, and resumable composite worktree transitions.
26
+
27
+ ### Changed
28
+
29
+ - New initialization generates unchanged v2 workflow/styleguide defaults in
30
+ MCP and stages only authored context or explicit overrides. `.cadre/init/*`
31
+ remains invalid.
32
+ - Removed retired template and candidate tools; resources cover discovery and
33
+ individual reads. The MCP surface is 22 tools.
34
+ - Coalesced worktree start, integration, and completion bookkeeping, reducing a
35
+ delegated task to four calls (five for governed integration).
36
+ - Legacy projects remain readable but fail closed for mutation until an
37
+ explicit approved refresh upgrades runtime/template versions.
38
+
39
+ ### Compatibility And Upgrade
40
+
41
+ - Published v1 template files remain byte-for-byte unchanged.
42
+ - 3.3.0 proposal tokens must be prepared again after upgrading.
43
+ - Reinstall the CLI/native plugins and restart client sessions so the 3.4 tool
44
+ schemas and compact skills replace cached 3.3 definitions.
45
+
3
46
  ## [3.3.0] - 2026-08-09
4
47
 
5
48
  Cadre 3.3.0 makes long-running MCP delivery sessions durable across server
@@ -10,8 +53,8 @@ path/SHA-256 manifests.
10
53
 
11
54
  ### Breaking Changes
12
55
 
13
- - Changed `execution_checkpoint_preview` and `execution_checkpoint_apply` to
14
- return a changed-node transition receipt instead of the complete execution
56
+ - Changed execution checkpoint responses to return a changed-node transition
57
+ receipt instead of the complete execution
15
58
  journal. Apply retains compact `derivedStatus` scheduling arrays and focused
16
59
  guidance for changed, active, or blocked nodes.
17
60
  - Changed `execution_status` to return execution metadata, node-status counts,
package/README.md CHANGED
@@ -271,6 +271,7 @@ An initialized project has this shape:
271
271
  │ ├── bugs/
272
272
  │ └── revisions/
273
273
  ├── archive/
274
+ ├── stage/ # ignored, unapproved candidate artifacts
274
275
  ├── .worktrees/ # ignored, temporary execution worktrees
275
276
  └── wisps/ # ignored, disposable exploration output
276
277
  ```
@@ -288,38 +289,35 @@ Important sources of truth:
288
289
 
289
290
  ## MCP capabilities
290
291
 
291
- The `cadre` stdio server exposes immutable resources at `cadre://templates/v1/...` and these tools:
292
+ The `cadre` stdio server exposes active immutable resources at `cadre://templates/v2/...` and 22 tools:
292
293
 
293
294
  | Tool | Mutation | Purpose |
294
295
  | --- | --- | --- |
295
- | `template_catalog` | No | List template IDs, resource URIs, media types, and content hashes. |
296
- | `template_get` | No | Read one versioned template by logical ID. |
297
296
  | `template_get_many` | No | Read an ordered template bundle in one call; immutable catalog contents are cached for the server lifetime. |
298
- | `styleguide_resolve` | No | Resolve default styleguides for an approved technology list. |
299
- | `project_status` | No | Summarize project and track checkpoints, including resumable operations. |
297
+ | `styleguide_resolve` | No | Resolve default styleguide descriptors and hashes for an approved technology list. |
298
+ | `project_status` | No | Return scoped project, track, or implementation status. |
300
299
  | `state_validate` | No | Validate project, track, plan, learning, dependency, review, and archive invariants. |
300
+ | `candidate_stage_prepare` | Atomic | Create/resume `.cadre/stage/<id>` and enforce its Git ignore rule. |
301
+ | `candidate_inspect` | No | Return one exact manifest and optional staged-plan graph validation. |
301
302
  | `execution_graph_validate` | No | Parse and validate phase/task dependencies, cycles, and derived manual-verification barriers. |
302
- | `review_complete_preview` / `review_complete_apply` | Preview/apply | Bind a clean review and accepted risks to the current execution, then write completed state and the exact derived index together. |
303
- | `archive_batch_preview` / `archive_batch_apply` | Preview/apply | Preview and apply selected moves, lifecycle states, patterns, seeds, journal, and post-archive index as one approved batch. |
304
- | `archive_batch_record_preview` / `archive_batch_record_apply` | Preview/apply | Record the resulting archive commit in track, project, and batch provenance without a second batch decision. |
305
- | `execution_start_preview` / `execution_start_apply` | Preview/apply | Create an approved, digest-gated execution journal and enter `in_progress`. |
306
- | `execution_checkpoint_preview` / `execution_checkpoint_apply` | Preview/apply | Expand one semantic execution event into its complete legal, evidence-gated transition sequence, apply it atomically, and return a compact transition receipt. |
303
+ | `review_complete` | Adaptive | Return `approval_required` for a clean-review decision, then apply the unchanged token after approval. |
304
+ | `archive_batch_candidate` | Adaptive | Read staged pattern/seed files, return the complete batch for approval, then apply its unchanged token. |
305
+ | `archive_batch_record` | Atomic | Record the resulting archive commit in track, project, and batch provenance without a second decision. |
306
+ | `execution_start` | Atomic | Create the authorized execution journal and enter `in_progress` in one call. |
307
+ | `execution_checkpoint` | Atomic | Expand and apply one semantic event as a complete legal, evidence-gated transition sequence. |
307
308
  | `execution_status` | No | Return a compact ready/active/blocked scheduler view, with optional focused node detail. |
308
- | `execution_finish_preview` / `execution_finish_apply` | Preview/apply | Require completed nodes, current plan evidence, and removed worktrees before `ready_for_review`. |
309
- | `worktree_create_preview` / `worktree_create_apply` | Preview/apply | Create or reconcile one derived phase/task worktree and branch. |
310
- | `integration_preview` / `integration_apply` | Preview/apply | Inspect and merge a clean worker branch into its derived parent, reporting conflicts without resolving them. |
311
- | `worktree_cleanup_preview` / `worktree_cleanup_apply` | Preview/apply | Remove only a clean worker whose branch is proven integrated into its parent. |
312
- | `worktree_status` | No | Report Cadre-managed worktrees and orphaned runtime directories. |
313
- | `project_init_preview` | No | Return the complete proposed initialization path/hash manifest and digest without echoing file contents. |
314
- | `project_init_apply` | Yes | Atomically create `.cadre` only when inputs match the approved preview digest. |
309
+ | `execution_finish` | Atomic | Require completed nodes, current plan evidence, and removed worktrees before writing `ready_for_review`. |
310
+ | `worktree_create` | Atomic | Create/reconcile a worktree and record node start. |
311
+ | `integration` | Adaptive | Merge and record integration; require a second call only in governed mode. |
312
+ | `worktree_cleanup` | Atomic | Remove a verified integrated worktree and record completion. |
313
+ | `project_init_candidate` | Adaptive | Generate defaults around staged authored context and apply after approval. |
315
314
  | `setup_record_git_initialized` | Yes | Record the verified Git-initialization checkpoint. |
316
315
  | `setup_record_commit` | Yes | Record the already-created setup commit SHA and complete setup state. |
317
- | `tracks_render_preview` | No | Preview the derived `tracks.md` content and digest. |
318
- | `tracks_render_apply` | Yes | Write `tracks.md` only when current state matches the approved preview digest. |
316
+ | `tracks_render` | Atomic | Validate and write deterministic `tracks.md` from current track state. |
319
317
 
320
- The MCP server cannot approve its own proposals or run arbitrary shell commands. Its Git surface is limited to derived Cadre worktree creation, non-squash integration, status, and verified cleanup. It never force-deletes a branch, resolves a conflict, edits product files, or commits on behalf of a worker. Deterministic writes and Git mutations use preview/apply digests to reject stale proposals.
318
+ The MCP server cannot approve its own proposals or run arbitrary shell commands. Its Git surface is limited to derived Cadre worktree creation, non-squash integration, status, and verified cleanup. It never force-deletes a branch, resolves a conflict, edits product files, or commits on behalf of a worker. Already-authorized deterministic writes and Git mutations validate and apply atomically; genuine decision boundaries retain digest-bound proposal tokens and stale-state rejection.
321
319
 
322
- 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. The archive preview 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.
320
+ 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.
323
321
 
324
322
  ### Worktree layout and worker model
325
323
 
@@ -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.3.0";
78
- var TEMPLATE_SET_VERSION = "v1";
77
+ var CADRE_RUNTIME_VERSION = "3.4.0";
78
+ var TEMPLATE_SET_VERSION = "v2";
79
79
 
80
80
  // src/domain/templates.ts
81
81
  var TEMPLATE_IDS = [