cadre-ai 3.7.1 → 3.8.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 (62) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +13 -1
  4. package/README.md +41 -6
  5. package/agents/cadre-phase-worker.md +1 -1
  6. package/agents/cadre-task-worker.md +1 -1
  7. package/dist/cadre-cli.mjs +3 -3
  8. package/dist/cadre-mcp.mjs +1182 -875
  9. package/package.json +1 -1
  10. package/skills/archive/SKILL.md +1 -1
  11. package/skills/implement/SKILL.md +22 -10
  12. package/skills/implement/agents/openai.yaml +1 -1
  13. package/skills/implement/references/conflict-handling.md +1 -1
  14. package/skills/implement/references/resume-recovery.md +2 -0
  15. package/skills/refresh/SKILL.md +12 -1
  16. package/skills/revert/SKILL.md +1 -1
  17. package/skills/review/SKILL.md +74 -10
  18. package/skills/revise/SKILL.md +1 -1
  19. package/skills/track/SKILL.md +1 -1
  20. package/templates/v4/init/archive/.gitkeep +1 -0
  21. package/templates/v4/init/gitignore.template +8 -0
  22. package/templates/v4/init/guidelines.md +25 -0
  23. package/templates/v4/init/operations/.gitkeep +1 -0
  24. package/templates/v4/init/patterns/index.md +8 -0
  25. package/templates/v4/init/product.md +30 -0
  26. package/templates/v4/init/project.json +27 -0
  27. package/templates/v4/init/refreshes/.gitkeep +1 -0
  28. package/templates/v4/init/styleguides/general.md +14 -0
  29. package/templates/v4/init/styleguides/language.md +21 -0
  30. package/templates/v4/init/tech-stack.md +21 -0
  31. package/templates/v4/init/tracks/.gitkeep +1 -0
  32. package/templates/v4/init/tracks.md +6 -0
  33. package/templates/v4/init/wisps/.gitkeep +1 -0
  34. package/templates/v4/init/workflow.md +91 -0
  35. package/templates/v4/project/archive-operation.json +19 -0
  36. package/templates/v4/project/pattern.md +20 -0
  37. package/templates/v4/project/refresh-operation.json +18 -0
  38. package/templates/v4/project/refresh.md +21 -0
  39. package/templates/v4/styleguides/dart.md +27 -0
  40. package/templates/v4/styleguides/flutter.md +27 -0
  41. package/templates/v4/styleguides/go.md +29 -0
  42. package/templates/v4/styleguides/gradle.md +28 -0
  43. package/templates/v4/styleguides/html-css.md +39 -0
  44. package/templates/v4/styleguides/index.md +27 -0
  45. package/templates/v4/styleguides/java.md +27 -0
  46. package/templates/v4/styleguides/javascript.md +27 -0
  47. package/templates/v4/styleguides/kotlin.md +26 -0
  48. package/templates/v4/styleguides/maven.md +28 -0
  49. package/templates/v4/styleguides/python.md +27 -0
  50. package/templates/v4/styleguides/react.md +28 -0
  51. package/templates/v4/styleguides/swift.md +27 -0
  52. package/templates/v4/styleguides/swiftui.md +27 -0
  53. package/templates/v4/styleguides/typescript.md +26 -0
  54. package/templates/v4/track/bug.md +14 -0
  55. package/templates/v4/track/execution.json +20 -0
  56. package/templates/v4/track/learning.md +45 -0
  57. package/templates/v4/track/plan.md +39 -0
  58. package/templates/v4/track/revert-operation.json +17 -0
  59. package/templates/v4/track/revise-operation.json +18 -0
  60. package/templates/v4/track/revision.md +36 -0
  61. package/templates/v4/track/spec.md +38 -0
  62. package/templates/v4/track/state.json +31 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cadre",
3
- "version": "3.7.1",
3
+ "version": "3.8.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.8.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,18 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## [3.8.0] - 2026-09-08
4
+
5
+ - Make Track the default approval mode, retaining Governed and Phase with independent Parallel/Sequential scheduling.
6
+ - 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.
7
+ - 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.
8
+ - Persist originating authority, cumulative baseline, stable finding identities, and loop checkpoints. Preserve completed phases and execution history across new remediation graphs and interruption recovery.
9
+ - 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.
10
+ - 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.
11
+ - Introduce immutable template v4 while preserving v1–v3 and v3 memory requirements.
12
+ - Fix MCP startup through symlinked payload paths; accept null current-execution selection in status; reject malformed review journals before promotion.
13
+ - Clarify that authors can approve a clean completion proposal or report additional bugs; persisted Autonomous authority never substitutes for the final decision.
14
+
15
+ 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
16
 
5
17
  ## [3.7.1] - 2026-09-07
6
18
 
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.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.
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
@@ -21,7 +21,7 @@ templates. A project keeps only approved, mutable delivery state under
21
21
  ## Capabilities
22
22
 
23
23
  - 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.
24
+ - Human approval of scope and approval policy, with explicit author approval for clean track completion.
25
25
  - Resumable create, specification, planning, implementation, review, revision, refresh, revert, and archive flows.
26
26
  - Parallel-by-default implementation of dependency DAGs, with an explicit sequential mode.
27
27
  - Isolated phase and task workers in Cadre-managed Git worktrees, coordinated and integrated only by the main agent.
@@ -36,6 +36,29 @@ templates. A project keeps only approved, mutable delivery state under
36
36
 
37
37
  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
38
 
39
+ ## Approval modes and continuous Autonomous delivery
40
+
41
+ | Approval mode | Human decisions |
42
+ |---|---|
43
+ | Governed | Task, integration, phase/track verification, and review gates |
44
+ | Phase | Phase verification, track verification, and review |
45
+ | **Track — default** | Track verification and review |
46
+ | Autonomous | One final completion decision after implementation, verification, review, and remediation are clean |
47
+
48
+ Scheduling is separate: Parallel is the default; request Sequential with any
49
+ approval mode. To use the continuous loop, ask your client’s `implement` skill
50
+ to implement the track with Autonomous approval mode. Cadre invokes the review
51
+ skill through MCP next steps and repeats fixes, verification, and cumulative
52
+ review without another command.
53
+
54
+ `ready_for_review` is an internal handoff during that loop, not an approval
55
+ pause. Once clean, Cadre returns verification results, remediation history, and
56
+ the exact completion proposal. Approve it to mark the track completed without
57
+ running review again, or report additional bugs to continue remediation. Changed
58
+ implementation or verification inputs require renewed verification/review.
59
+ Autonomous pauses for scope decisions, unavailable checks, external blockers,
60
+ or the same unresolved finding after two remediation attempts.
61
+
39
62
  ## Requirements
40
63
 
41
64
  - Node.js 18 or newer
@@ -315,7 +338,7 @@ Important sources of truth:
315
338
 
316
339
  ## MCP capabilities
317
340
 
318
- The `cadre` stdio server exposes active immutable resources at `cadre://templates/v3/...` and 23 tools:
341
+ The `cadre` stdio server exposes active immutable resources at `cadre://templates/v4/...` and 23 tools:
319
342
 
320
343
  | Tool | Mutation | Purpose |
321
344
  | --- | --- | --- |
@@ -367,7 +390,7 @@ Phase and task worktrees are siblings because Git worktrees cannot be physically
367
390
 
368
391
  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
392
 
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.
393
+ 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
394
 
372
395
  ## Resumability and safety
373
396
 
@@ -380,7 +403,7 @@ Multi-step state changes—including revisions, refreshes, reverts, archive batc
380
403
  - committed or integrated DAG nodes are not repeated, and newly ready nodes are scheduled immediately after durable transitions;
381
404
  - any mismatch stops and is presented to the human rather than guessed, discarded, reset, or restarted.
382
405
 
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.
406
+ 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
407
 
385
408
  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
409
 
@@ -407,6 +430,18 @@ pnpm --filter cadre-ai validate
407
430
 
408
431
  ### Memory format upgrade
409
432
 
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.
433
+ 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
434
 
412
435
  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.
436
+
437
+
438
+ ### Implementation approval modes
439
+
440
+ Track is the default: phase checks run automatically, followed by track verification
441
+ and ordinary review approval. Phase retains phase verification gates; Governed retains
442
+ task and integration gates. Explicit Autonomous implements, verifies, reviews, and
443
+ remediates in-scope findings until clean, then asks for one final completion approval.
444
+ Parallel scheduling remains the default and Sequential is available independently.
445
+ Legacy Autonomous requires an explicit Track-or-Autonomous choice through approved
446
+ refresh. Policy v2 persists loop authority, cumulative review baseline, and stable
447
+ findings; a finding unresolved after two remediation attempts pauses for guidance.
@@ -13,7 +13,7 @@ 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`. 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
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.
@@ -12,7 +12,7 @@ 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.
@@ -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.8.0";
78
+ var TEMPLATE_SET_VERSION = "v4";
79
79
 
80
80
  // src/domain/templates.ts
81
81
  var TEMPLATE_IDS = [
@@ -214,7 +214,7 @@ var CADRE_WORKFLOWS = [
214
214
  ];
215
215
  var ZED_COMPATIBILITY = `## Zed compatibility
216
216
 
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
+ 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
218
  function pathExists(path) {
219
219
  try {
220
220
  lstatSync(path);