cadre-ai 3.5.1 → 3.7.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.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +62 -0
- package/README.md +12 -2
- package/agents/cadre-phase-worker.md +4 -0
- package/agents/cadre-task-worker.md +4 -0
- package/dist/cadre-cli.mjs +5 -4
- package/dist/cadre-mcp.mjs +26901 -25468
- package/package.json +1 -1
- package/skills/archive/SKILL.md +12 -2
- package/skills/implement/SKILL.md +9 -2
- package/skills/implement/references/parallel-workers.md +2 -0
- package/skills/implement/references/resume-recovery.md +2 -0
- package/skills/refresh/SKILL.md +13 -1
- package/skills/revert/SKILL.md +22 -2
- package/skills/review/SKILL.md +6 -0
- package/skills/revise/SKILL.md +8 -0
- package/skills/status/SKILL.md +3 -1
- package/skills/track/SKILL.md +4 -0
- package/templates/v3/init/archive/.gitkeep +1 -0
- package/templates/v3/init/gitignore.template +8 -0
- package/templates/v3/init/guidelines.md +25 -0
- package/templates/v3/init/operations/.gitkeep +1 -0
- package/templates/v3/init/patterns/index.md +8 -0
- package/templates/v3/init/product.md +30 -0
- package/templates/v3/init/project.json +27 -0
- package/templates/v3/init/refreshes/.gitkeep +1 -0
- package/templates/v3/init/styleguides/general.md +14 -0
- package/templates/v3/init/styleguides/language.md +21 -0
- package/templates/v3/init/tech-stack.md +21 -0
- package/templates/v3/init/tracks/.gitkeep +1 -0
- package/templates/v3/init/tracks.md +6 -0
- package/templates/v3/init/wisps/.gitkeep +1 -0
- package/templates/v3/init/workflow.md +82 -0
- package/templates/v3/project/archive-operation.json +19 -0
- package/templates/v3/project/pattern.md +20 -0
- package/templates/v3/project/refresh-operation.json +18 -0
- package/templates/v3/project/refresh.md +21 -0
- package/templates/v3/styleguides/dart.md +27 -0
- package/templates/v3/styleguides/flutter.md +27 -0
- package/templates/v3/styleguides/go.md +29 -0
- package/templates/v3/styleguides/gradle.md +28 -0
- package/templates/v3/styleguides/html-css.md +39 -0
- package/templates/v3/styleguides/index.md +27 -0
- package/templates/v3/styleguides/java.md +27 -0
- package/templates/v3/styleguides/javascript.md +27 -0
- package/templates/v3/styleguides/kotlin.md +26 -0
- package/templates/v3/styleguides/maven.md +28 -0
- package/templates/v3/styleguides/python.md +27 -0
- package/templates/v3/styleguides/react.md +28 -0
- package/templates/v3/styleguides/swift.md +27 -0
- package/templates/v3/styleguides/swiftui.md +27 -0
- package/templates/v3/styleguides/typescript.md +26 -0
- package/templates/v3/track/bug.md +14 -0
- package/templates/v3/track/execution.json +19 -0
- package/templates/v3/track/learning.md +45 -0
- package/templates/v3/track/plan.md +39 -0
- package/templates/v3/track/revert-operation.json +17 -0
- package/templates/v3/track/revise-operation.json +18 -0
- package/templates/v3/track/revision.md +36 -0
- package/templates/v3/track/spec.md +38 -0
- package/templates/v3/track/state.json +31 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,67 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## [3.7.0] - 2026-09-06
|
|
6
|
+
|
|
7
|
+
### Memory, context, and recovery
|
|
8
|
+
|
|
9
|
+
- Introduce immutable template v3, preserving v1/v2 and requiring approved refresh before legacy delivery.
|
|
10
|
+
- Persist bounded task handoffs with existing execution checkpoints, without additional approval or mutation calls.
|
|
11
|
+
- Validate seed metadata/revisions/pattern fingerprints; distinguish stale active guidance from historical evidence and bind staged memory inputs to approval digests.
|
|
12
|
+
- Add read-only `context_read` with required-context selection, conservative fallback, source hashes, and drift-sensitive 16 KiB pagination.
|
|
13
|
+
- Default status to summaries with explicit full detail and paged/filtered track listings; retain project-wide validation and counts.
|
|
14
|
+
- Reuse reads/parses within validation and batch Git provenance resolution. Add correctness, compatibility, recovery, and byte-cost fixtures, including small-project overhead.
|
|
15
|
+
- Expand the measured catalog ceiling to 80 KiB for the additional typed context and handoff interfaces; byte counts are not billed token counts.
|
|
16
|
+
|
|
17
|
+
- Select one MCP result representation from the initialized client identity:
|
|
18
|
+
structured JSON for recognized Codex and Claude Code 2.0.21+ clients, compact
|
|
19
|
+
JSON text for Zed and unknown clients. Remove redundant summaries and JSON
|
|
20
|
+
copies, preserve template bodies once, and advertise output schemas only to
|
|
21
|
+
structured clients while retaining server-side validation for both formats.
|
|
22
|
+
|
|
23
|
+
### Audit corrections
|
|
24
|
+
|
|
25
|
+
- Recognize Markdown pattern links and fenced learning examples; expand ambiguous sections and reject incomplete memory metadata.
|
|
26
|
+
- Add session-retained source inventories with explicit reuse and `contextReady`; changed sources must be reread.
|
|
27
|
+
- Reject invalid staged revision paths, stale revert seeds, and disconnected execution bindings before approval. Verify recorded plan revision/graph at its commit.
|
|
28
|
+
- Read archived execution journals, expose complete project/implementation detail, and preserve historical refresh/archive hashes against their artifact commits.
|
|
29
|
+
- Separate clean-review proposal evidence from the digest-bound confirmation recorded by apply. Return visible JSON-text errors in every client.
|
|
30
|
+
- Clarify direct-main checkpoints, revision provenance, refresh recovery ordering, fact-checked learning, and read-only revert preparation that preserves dirty work.
|
|
31
|
+
- Require an exact original execution snapshot before staged reverts reset evidence; retain a durable digest-bound revert receipt, history entry, and reconciliation commit provenance.
|
|
32
|
+
- Make receipt persistence and readback an explicit prerequisite to restoring implement ownership; record a null reconciliation SHA first so interruption cannot erase the revert approval while bookkeeping is unfinished.
|
|
33
|
+
|
|
34
|
+
Validated with 79 automated tests, package and documentation checks, native Claude/Codex audits, and native Zed installation, discovery, MCP, staged-revert, and fresh-session recovery tests. Native Zed support remains beta.
|
|
35
|
+
|
|
36
|
+
## [3.6.0] - 2026-09-02
|
|
37
|
+
|
|
38
|
+
### MCP Result Contract
|
|
39
|
+
|
|
40
|
+
- Added output schemas for all 22 MCP tools. The schemas advertise every
|
|
41
|
+
stable agent-facing top-level field while the server enforces the exact
|
|
42
|
+
success and structured-error variants.
|
|
43
|
+
- Made the final text block of every tool response a compact JSON mirror of
|
|
44
|
+
`structuredContent`. This applies to successes, elicitation outcomes,
|
|
45
|
+
template descriptors, and structured errors, so agents can recover every
|
|
46
|
+
decision and follow-up field even when a client does not expose structured
|
|
47
|
+
results directly.
|
|
48
|
+
- Kept template and candidate bodies out of mirrored descriptor data. Their
|
|
49
|
+
existing text or embedded-resource blocks remain unchanged and appear before
|
|
50
|
+
the final JSON mirror.
|
|
51
|
+
- Tightened adaptive response variants: `proposalToken` is required only when
|
|
52
|
+
`commandStatus` is `approval_required` and is absent after application.
|
|
53
|
+
- Raised the validated serialized MCP tool-catalog ceiling from 18 KiB to
|
|
54
|
+
64 KiB to accommodate the complete output schemas while retaining Node 18
|
|
55
|
+
compatibility.
|
|
56
|
+
- Made Zed installation safely refresh a changed Node executable path when the
|
|
57
|
+
existing `context_servers.cadre` entry still targets the exact managed Cadre
|
|
58
|
+
MCP file. Entries targeting any other MCP file remain protected conflicts.
|
|
59
|
+
|
|
60
|
+
This is an additive transport contract change. It does not change canonical
|
|
61
|
+
artifact formats, template set v2, tool names, or the prepare/apply token
|
|
62
|
+
lifecycle. Existing 3.5.1 projects remain readable and use the normal approved
|
|
63
|
+
refresh workflow to record runtime 3.6.0 before further mutation.
|
|
64
|
+
|
|
3
65
|
## [3.5.1] - 2026-08-27
|
|
4
66
|
|
|
5
67
|
Cadre 3.5.1 is a workflow-recovery hotfix for candidate validation, staged
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Cadre
|
|
2
2
|
|
|
3
|
+
**Cadre 3.7.0** adds durable task handoffs, freshness-checked learning, selective context with session reuse, and compact status. New projects use template set **v3**; existing projects remain readable and require one approved refresh before delivery. Published v1/v2 templates remain available.
|
|
4
|
+
|
|
3
5
|
Cadre is a human-governed, Git-aware delivery harness for Codex, Claude Code,
|
|
4
6
|
and Zed Agent. Codex and Claude Code support is stable; native Zed Agent support
|
|
5
7
|
is beta. Cadre turns project context into resumable feature and bug tracks,
|
|
@@ -25,7 +27,7 @@ templates. A project keeps only approved, mutable delivery state under
|
|
|
25
27
|
- Isolated phase and task workers in Cadre-managed Git worktrees, coordinated and integrated only by the main agent.
|
|
26
28
|
- Feature and bug tracks with functional requirements, non-functional requirements, acceptance criteria, dependencies, phased tasks, and manual-verification gates.
|
|
27
29
|
- Dependency enforcement before implementation and cascading-impact analysis after specification, workflow, stack, styleguide, or pattern changes.
|
|
28
|
-
- Incremental learning in each track's `learning.md`;
|
|
30
|
+
- Incremental learning in each track's `learning.md`; each phase reads its declared dependency learning and applicable constraints before work starts.
|
|
29
31
|
- Review → remediation → implementation cycles until the human accepts a clean review.
|
|
30
32
|
- Single-track or multi-track archival with consolidated pattern distillation and relevant reseeding of active tracks.
|
|
31
33
|
- Git-aware task, phase, setup, review, revision, refresh, revert, and archive provenance using Conventional Commits.
|
|
@@ -313,12 +315,13 @@ Important sources of truth:
|
|
|
313
315
|
|
|
314
316
|
## MCP capabilities
|
|
315
317
|
|
|
316
|
-
The `cadre` stdio server exposes active immutable resources at `cadre://templates/
|
|
318
|
+
The `cadre` stdio server exposes active immutable resources at `cadre://templates/v3/...` and 23 tools:
|
|
317
319
|
|
|
318
320
|
| Tool | Mutation | Purpose |
|
|
319
321
|
| --- | --- | --- |
|
|
320
322
|
| `template_get_many` | No | Read an ordered template bundle in one call; immutable catalog contents are cached for the server lifetime. |
|
|
321
323
|
| `styleguide_resolve` | No | Resolve default styleguide descriptors and hashes for an approved technology list. |
|
|
324
|
+
| `context_read` | No | Read required track/node context with source hashes, freshness findings, and complete continuation pages. |
|
|
322
325
|
| `project_status` | No | Return complete validation plus scoped canonical, staged, shadowed, or implementation status. |
|
|
323
326
|
| `state_validate` | No | Validate project, track, plan, learning, dependency, review, and archive invariants. |
|
|
324
327
|
| `candidate_stage_prepare` | Atomic | Create/resume a stage and optionally prune files outside its exact `expectedFiles` set. |
|
|
@@ -341,6 +344,7 @@ The `cadre` stdio server exposes active immutable resources at `cadre://template
|
|
|
341
344
|
|
|
342
345
|
The four adaptive tools use a strict `request` union: prepare accepts only its
|
|
343
346
|
declared fields, while apply accepts only an unchanged `proposalToken`. The MCP
|
|
347
|
+
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
|
|
344
348
|
server cannot approve its own proposals or run arbitrary shell commands. Its
|
|
345
349
|
Git surface is limited to derived Cadre worktree creation, non-squash
|
|
346
350
|
integration, status, and verified cleanup. It never force-deletes a branch,
|
|
@@ -400,3 +404,9 @@ pnpm --filter cadre-ai check
|
|
|
400
404
|
pnpm --filter cadre-ai test
|
|
401
405
|
pnpm --filter cadre-ai validate
|
|
402
406
|
```
|
|
407
|
+
|
|
408
|
+
### Memory format upgrade
|
|
409
|
+
|
|
410
|
+
Cadre 3.7.0 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.
|
|
411
|
+
|
|
412
|
+
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.
|
|
@@ -15,3 +15,7 @@ You are a Cadre phase implementation worker holding a temporary execution lease.
|
|
|
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
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.
|
|
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
|
+
|
|
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
|
+
|
|
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.
|
|
@@ -14,3 +14,7 @@ You are a Cadre task implementation worker. The main agent is the only scheduler
|
|
|
14
14
|
- Stop with the proposed diff uncommitted and report changed files, checks, risks, learning candidates, and the proposed Conventional Commit message.
|
|
15
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.
|
|
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
|
+
|
|
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
|
+
|
|
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.
|
package/dist/cadre-cli.mjs
CHANGED
|
@@ -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.
|
|
78
|
-
var TEMPLATE_SET_VERSION = "
|
|
77
|
+
var CADRE_RUNTIME_VERSION = "3.7.0";
|
|
78
|
+
var TEMPLATE_SET_VERSION = "v3";
|
|
79
79
|
|
|
80
80
|
// src/domain/templates.ts
|
|
81
81
|
var TEMPLATE_IDS = [
|
|
@@ -2482,6 +2482,7 @@ var CADRE_MCP_TOOLS = {
|
|
|
2482
2482
|
workflowElicit: "workflow_elicit",
|
|
2483
2483
|
templateGetMany: "template_get_many",
|
|
2484
2484
|
styleguideResolve: "styleguide_resolve",
|
|
2485
|
+
contextRead: "context_read",
|
|
2485
2486
|
projectStatus: "project_status",
|
|
2486
2487
|
stateValidate: "state_validate",
|
|
2487
2488
|
candidateStagePrepare: "candidate_stage_prepare",
|
|
@@ -2700,7 +2701,7 @@ function configureZedCadre(settingsPath, nodePath, mcpPath, autoApproveMcp) {
|
|
|
2700
2701
|
const { existing, root } = parseJsoncSettings(settingsPath);
|
|
2701
2702
|
const contextServers = assertRecordField(root, "context_servers", settingsPath);
|
|
2702
2703
|
const currentServer = contextServers.cadre;
|
|
2703
|
-
if (currentServer !== void 0 && !
|
|
2704
|
+
if (currentServer !== void 0 && !zedServerTargetsMcp(currentServer, mcpPath)) {
|
|
2704
2705
|
throw new Error(
|
|
2705
2706
|
`${settingsPath}: context_servers.cadre is not the Cadre-managed server; remove or rename it before installation`
|
|
2706
2707
|
);
|
|
@@ -2724,7 +2725,7 @@ function configureZedCadre(settingsPath, nodePath, mcpPath, autoApproveMcp) {
|
|
|
2724
2725
|
}
|
|
2725
2726
|
}
|
|
2726
2727
|
const formattingOptions = { insertSpaces: true, tabSize: 2, eol: "\n" };
|
|
2727
|
-
const serverChanged = currentServer === void 0;
|
|
2728
|
+
const serverChanged = currentServer === void 0 || !zedServerMatches(currentServer, nodePath, mcpPath);
|
|
2728
2729
|
let proposed = existing;
|
|
2729
2730
|
if (serverChanged) {
|
|
2730
2731
|
proposed = applyEdits(proposed, modify(
|