cadre-ai 3.5.0 → 3.5.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cadre",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
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.5.0",
3
+ "version": "3.5.1",
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,57 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.5.1] - 2026-08-27
4
+
5
+ Cadre 3.5.1 is a workflow-recovery hotfix for candidate validation, staged
6
+ track resumption, and interrupted multi-file operations. Codex and Claude Code
7
+ remain stable integrations; native Zed Agent support remains beta.
8
+
9
+ ### Fixed
10
+
11
+ - Replaced the faulty single-plan candidate contract with exact
12
+ `planValidations` for every staged root or nested `plan.md`. Candidate
13
+ digests now bind normalized plan paths and intended target statuses.
14
+ - Made `project_status` distinguish canonical, candidate-only, shadowed,
15
+ malformed, and unknown track state. Focused status now returns complete
16
+ validation errors plus track/dependency-specific `focusedErrors`.
17
+ - Added exact `expectedFiles` pruning for candidate stages so clarification or
18
+ scope contraction cannot leave stale proposal files behind.
19
+ - Made project initialization, execution finish, clean review, archive apply,
20
+ and archive provenance recording converge safely after interruption without
21
+ duplicate cycles or history.
22
+ - Derived clean-review ranges from the completed execution base through its
23
+ recorded HEAD, including the first implementation commit.
24
+ - Corrected lifecycle routing across all ten workflows, including staged-track
25
+ recovery, immutable terminal tracks, final implementation bookkeeping, and
26
+ Wisp output outside uninitialized repositories.
27
+ - Removed client-specific cross-workflow command references from canonical
28
+ guidance and kept generated Zed adapters on text template mode with
29
+ `/cadre-*` recommendations.
30
+
31
+ ### MCP Contract Corrections
32
+
33
+ - `candidate_inspect` removes the retired singular `targetStatus` input and
34
+ `plan` result in favor of `planValidations` and sorted `plans`.
35
+ - `project_init_candidate`, `review_complete`, `archive_batch_candidate`, and
36
+ `integration` now publish strict `request` prepare/apply unions that reject
37
+ mixed-mode calls at schema validation.
38
+ - `execution_checkpoint` now publishes a strict `scope` plus event-specific
39
+ `action` contract with explicit evidence requirements.
40
+ - `review_complete` no longer accepts `commitRangeStart`.
41
+ - The surface remains 22 tools and the generated catalog remains below the
42
+ 18 KiB budget.
43
+
44
+ ### Compatibility And Upgrade
45
+
46
+ - Existing approved operation journals remain readable and resumable.
47
+ - Unapproved 3.5.0 candidate stages must be re-inspected under the corrected
48
+ validation contract before approval or promotion.
49
+ - Existing 3.5.0 projects remain readable and use the normal approved refresh
50
+ workflow to record runtime 3.5.1 before further mutation. Template set v2 is
51
+ unchanged.
52
+ - Reinstall all selected clients and start fresh client sessions so the
53
+ corrected schemas and workflow guidance replace cached 3.5.0 definitions.
54
+
3
55
  ## [3.5.0] - 2026-08-27
4
56
 
5
57
  Cadre 3.5.0 adds beta support for the native Zed Agent while keeping the
package/README.md CHANGED
@@ -170,8 +170,9 @@ Cadre will:
170
170
  1. Inspect the repository and Git state.
171
171
  2. Classify it as greenfield or brownfield, asking when the evidence is unclear.
172
172
  3. Propose product, engineering, tech-stack, workflow, and applicable styleguide artifacts.
173
- 4. Ask for separate approval of the default or amended workflow and styleguides.
174
- 5. Preview the exact `.cadre` file set before applying it.
173
+ 4. Present the default or amended workflow, styleguides, and exact `.cadre`
174
+ file set in one final initialization approval envelope.
175
+ 5. Apply only that digest-bound proposal.
175
176
  6. Initialize Git when the approved project root is not already in a worktree.
176
177
  7. Validate and commit the approved setup with resumable checkpoints.
177
178
 
@@ -183,7 +184,7 @@ Claude Code: /cadre:track Fix duplicate invoice creation as a bug
183
184
  Zed Agent: /cadre-track Add passwordless login as a feature
184
185
  ```
185
186
 
186
- Cadre proposes and separately approves:
187
+ Cadre proposes and approves together:
187
188
 
188
189
  - `spec.md`, containing functional requirements, non-functional requirements, acceptance criteria, dependencies, additional information, and dependent-track impact;
189
190
  - `plan.md`, defining an acyclic phase/task dependency graph with derived manual-verification barriers;
@@ -318,18 +319,18 @@ The `cadre` stdio server exposes active immutable resources at `cadre://template
318
319
  | --- | --- | --- |
319
320
  | `template_get_many` | No | Read an ordered template bundle in one call; immutable catalog contents are cached for the server lifetime. |
320
321
  | `styleguide_resolve` | No | Resolve default styleguide descriptors and hashes for an approved technology list. |
321
- | `project_status` | No | Return scoped project, track, or implementation status. |
322
+ | `project_status` | No | Return complete validation plus scoped canonical, staged, shadowed, or implementation status. |
322
323
  | `state_validate` | No | Validate project, track, plan, learning, dependency, review, and archive invariants. |
323
- | `candidate_stage_prepare` | Atomic | Create/resume `.cadre/stage/<id>` and enforce its Git ignore rule. |
324
- | `candidate_inspect` | No | Return one exact manifest and optional staged-plan graph validation. |
324
+ | `candidate_stage_prepare` | Atomic | Create/resume a stage and optionally prune files outside its exact `expectedFiles` set. |
325
+ | `candidate_inspect` | No | Return one exact manifest and validate every staged root or nested plan against its declared target status. |
325
326
  | `execution_graph_validate` | No | Parse and validate phase/task dependencies, cycles, and derived manual-verification barriers. |
326
- | `review_complete` | Adaptive | Return `approval_required` for a clean-review decision, then apply the unchanged token after approval. |
327
+ | `review_complete` | Adaptive | Derive the full execution-base review range, then prepare/apply an idempotent clean completion. |
327
328
  | `archive_batch_candidate` | Adaptive | Read staged pattern/seed files, return the complete batch for approval, then apply its unchanged token. |
328
329
  | `archive_batch_record` | Atomic | Record the resulting archive commit in track, project, and batch provenance without a second decision. |
329
330
  | `execution_start` | Atomic | Create the authorized execution journal and enter `in_progress` in one call. |
330
- | `execution_checkpoint` | Atomic | Expand and apply one semantic event as a complete legal, evidence-gated transition sequence. |
331
+ | `execution_checkpoint` | Atomic | Apply one strict `scope` + event-specific `action` with required evidence. |
331
332
  | `execution_status` | No | Return a compact ready/active/blocked scheduler view, with optional focused node detail. |
332
- | `execution_finish` | Atomic | Require completed nodes, current plan evidence, and removed worktrees before writing `ready_for_review`. |
333
+ | `execution_finish` | Atomic | Convergently write completed execution, plan markers, `ready_for_review` state, and index. |
333
334
  | `worktree_create` | Atomic | Create/reconcile a worktree and record node start. |
334
335
  | `integration` | Adaptive | Merge and record integration; require a second call only in governed mode. |
335
336
  | `worktree_cleanup` | Atomic | Remove a verified integrated worktree and record completion. |
@@ -338,7 +339,15 @@ The `cadre` stdio server exposes active immutable resources at `cadre://template
338
339
  | `setup_record_commit` | Yes | Record the already-created setup commit SHA and complete setup state. |
339
340
  | `tracks_render` | Atomic | Validate and write deterministic `tracks.md` from current track state. |
340
341
 
341
- 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.
342
+ The four adaptive tools use a strict `request` union: prepare accepts only its
343
+ declared fields, while apply accepts only an unchanged `proposalToken`. The MCP
344
+ server cannot approve its own proposals or run arbitrary shell commands. Its
345
+ Git surface is limited to derived Cadre worktree creation, non-squash
346
+ integration, status, and verified cleanup. It never force-deletes a branch,
347
+ resolves a conflict, edits product files, or commits on behalf of a worker.
348
+ Multi-file state operations use atomic individual writes and converge from
349
+ matching partial state; mismatched bytes, hashes, journals, or Git HEAD remain
350
+ hard failures.
342
351
 
343
352
  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.
344
353
 
@@ -74,7 +74,7 @@ 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.5.0";
77
+ var CADRE_RUNTIME_VERSION = "3.5.1";
78
78
  var TEMPLATE_SET_VERSION = "v2";
79
79
 
80
80
  // src/domain/templates.ts
@@ -193,6 +193,7 @@ import {
193
193
  mkdirSync,
194
194
  readFileSync as readFileSync2,
195
195
  readlinkSync,
196
+ rmSync,
196
197
  symlinkSync,
197
198
  unlinkSync,
198
199
  writeFileSync
@@ -213,7 +214,7 @@ var CADRE_WORKFLOWS = [
213
214
  ];
214
215
  var ZED_COMPATIBILITY = `## Zed compatibility
215
216
 
216
- 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.`;
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.`;
217
218
  function pathExists(path) {
218
219
  try {
219
220
  lstatSync(path);
@@ -239,6 +240,8 @@ function createZedSkillAdapters(pluginRoot) {
239
240
  const source = join3(pluginRoot, "skills", workflow);
240
241
  const target = join3(adapterRoot, `cadre-${workflow}`);
241
242
  cpSync(source, target, { recursive: true });
243
+ const codexMetadata = join3(target, "agents");
244
+ if (existsSync2(codexMetadata)) rmSync(codexMetadata, { recursive: true });
242
245
  const skillPath = join3(target, "SKILL.md");
243
246
  const body = readFileSync2(skillPath, "utf8");
244
247
  const expectedName = `name: ${workflow}`;
@@ -2973,7 +2976,7 @@ function runInstall(args) {
2973
2976
  }
2974
2977
 
2975
2978
  // scripts/uninstall.ts
2976
- import { existsSync as existsSync6, readFileSync as readFileSync6, readdirSync as readdirSync2, rmSync } from "node:fs";
2979
+ import { existsSync as existsSync6, readFileSync as readFileSync6, readdirSync as readdirSync2, rmSync as rmSync2 } from "node:fs";
2977
2980
  import { basename as basename3, dirname as dirname6, join as join6, resolve as resolve6 } from "node:path";
2978
2981
  var marketplaceName2 = "cadre";
2979
2982
  var pluginId2 = "cadre@cadre";
@@ -3055,7 +3058,7 @@ function removeOwnedMarketplaces(root) {
3055
3058
  }
3056
3059
  for (const candidate of candidates) {
3057
3060
  if (!ownedMarketplace(candidate)) continue;
3058
- rmSync(candidate, { recursive: true, force: true });
3061
+ rmSync2(candidate, { recursive: true, force: true });
3059
3062
  removed.push(candidate);
3060
3063
  }
3061
3064
  return removed;