cadre-ai 4.0.0 → 4.1.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 +13 -4
- package/.codex-plugin/plugin.json +11 -7
- package/CHANGELOG.md +54 -8
- package/LICENSE +202 -21
- package/NOTICE +13 -0
- package/README.md +93 -52
- package/dist/cadre-cli.mjs +30 -13
- package/dist/cadre-mcp.mjs +4008 -3691
- package/marketplace/claude.json +2 -1
- package/marketplace/codex.json +1 -1
- package/package.json +9 -7
- package/skills/create/SKILL.md +1 -1
- package/skills/implement/SKILL.md +5 -1
- package/skills/quick/SKILL.md +41 -0
- package/skills/quick/agents/openai.yaml +4 -0
- package/skills/refresh/SKILL.md +36 -8
- package/skills/refresh/agents/openai.yaml +2 -2
- package/skills/revert/SKILL.md +2 -2
- package/skills/review/SKILL.md +6 -2
- package/skills/revise/SKILL.md +5 -1
- package/skills/status/SKILL.md +5 -1
- package/skills/track/SKILL.md +6 -2
- package/skills/wisp/SKILL.md +3 -3
- package/templates/{v6 → v8}/init/workflow.md +24 -3
- package/templates/v8/project/refresh.md +37 -0
- package/templates/v8/quick/record.json +15 -0
- package/skills/archive/SKILL.md +0 -56
- package/skills/archive/agents/openai.yaml +0 -4
- package/templates/v6/project/archive-operation.json +0 -19
- package/templates/v6/project/refresh.md +0 -21
- /package/templates/{v6 → v8}/init/archive/.gitkeep +0 -0
- /package/templates/{v6 → v8}/init/gitignore.template +0 -0
- /package/templates/{v6 → v8}/init/guidelines.md +0 -0
- /package/templates/{v6 → v8}/init/operations/.gitkeep +0 -0
- /package/templates/{v6 → v8}/init/patterns/index.md +0 -0
- /package/templates/{v6 → v8}/init/product.md +0 -0
- /package/templates/{v6 → v8}/init/project.json +0 -0
- /package/templates/{v6 → v8}/init/refreshes/.gitkeep +0 -0
- /package/templates/{v6 → v8}/init/styleguides/general.md +0 -0
- /package/templates/{v6 → v8}/init/styleguides/language.md +0 -0
- /package/templates/{v6 → v8}/init/tech-stack.md +0 -0
- /package/templates/{v6 → v8}/init/tracks/.gitkeep +0 -0
- /package/templates/{v6 → v8}/init/tracks.md +0 -0
- /package/templates/{v6 → v8}/init/wisps/.gitkeep +0 -0
- /package/templates/{v6 → v8}/project/pattern.md +0 -0
- /package/templates/{v6 → v8}/project/refresh-operation.json +0 -0
- /package/templates/{v6 → v8}/styleguides/dart.md +0 -0
- /package/templates/{v6 → v8}/styleguides/flutter.md +0 -0
- /package/templates/{v6 → v8}/styleguides/go.md +0 -0
- /package/templates/{v6 → v8}/styleguides/gradle.md +0 -0
- /package/templates/{v6 → v8}/styleguides/html-css.md +0 -0
- /package/templates/{v6 → v8}/styleguides/index.md +0 -0
- /package/templates/{v6 → v8}/styleguides/java.md +0 -0
- /package/templates/{v6 → v8}/styleguides/javascript.md +0 -0
- /package/templates/{v6 → v8}/styleguides/kotlin.md +0 -0
- /package/templates/{v6 → v8}/styleguides/maven.md +0 -0
- /package/templates/{v6 → v8}/styleguides/python.md +0 -0
- /package/templates/{v6 → v8}/styleguides/react.md +0 -0
- /package/templates/{v6 → v8}/styleguides/swift.md +0 -0
- /package/templates/{v6 → v8}/styleguides/swiftui.md +0 -0
- /package/templates/{v6 → v8}/styleguides/typescript.md +0 -0
- /package/templates/{v6 → v8}/track/bug.md +0 -0
- /package/templates/{v6 → v8}/track/dependency-context.json +0 -0
- /package/templates/{v6 → v8}/track/execution.json +0 -0
- /package/templates/{v6 → v8}/track/learning.md +0 -0
- /package/templates/{v6 → v8}/track/plan.md +0 -0
- /package/templates/{v6 → v8}/track/revert-operation.json +0 -0
- /package/templates/{v6 → v8}/track/revise-operation.json +0 -0
- /package/templates/{v6 → v8}/track/revision.md +0 -0
- /package/templates/{v6 → v8}/track/spec.md +0 -0
- /package/templates/{v6 → v8}/track/state.json +0 -0
package/marketplace/claude.json
CHANGED
package/marketplace/codex.json
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cadre-ai",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Cross-agent, human-governed software delivery harness",
|
|
5
5
|
"author": {
|
|
6
|
-
"name": "
|
|
7
|
-
"url": "https://
|
|
6
|
+
"name": "Dhivon AI",
|
|
7
|
+
"url": "https://dhivon.ai"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://cadre
|
|
9
|
+
"homepage": "https://cadre.dhivon.ai/",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/dhivon-ai/cadre.git",
|
|
13
13
|
"directory": "harness"
|
|
14
14
|
},
|
|
15
|
-
"license": "
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"cadre",
|
|
18
18
|
"cadre-ai",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"marketplace/",
|
|
40
40
|
"README.md",
|
|
41
41
|
"skills/",
|
|
42
|
-
"templates/
|
|
42
|
+
"templates/v8/",
|
|
43
|
+
"NOTICE"
|
|
43
44
|
],
|
|
44
45
|
"scripts": {
|
|
45
46
|
"build": "node --import tsx scripts/build.ts",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"install:plugin": "pnpm build && node dist/cadre-cli.mjs install --target all",
|
|
48
49
|
"prepack": "pnpm build && node --import tsx scripts/validate.ts",
|
|
49
50
|
"test": "pnpm build && node --import tsx --test test/*.test.ts",
|
|
51
|
+
"test:maintenance-matrix": "pnpm build && node --import tsx scripts/test-maintenance-matrix.ts",
|
|
50
52
|
"validate": "pnpm build && node --import tsx scripts/validate.ts"
|
|
51
53
|
},
|
|
52
54
|
"publishConfig": {
|
package/skills/create/SKILL.md
CHANGED
|
@@ -15,7 +15,7 @@ Use the scheduler and validation in mutation results. Do not immediately request
|
|
|
15
15
|
|
|
16
16
|
Serialized errors are bounded to 8 KiB. Use `diagnostic_read` with the returned diagnostic ID only when fuller evidence is needed; paginate it. Do not dump cache path lists into conversation. Build outputs belong in the runtime-returned owned `buildCachePath`, never an arbitrary `.cadre/.build-cache` directory.
|
|
17
17
|
|
|
18
|
-
Existing 3.9.0/3.9.1/3.9.2 projects using schema-2 state and
|
|
18
|
+
Existing 3.9.0/3.9.1/3.9.2 and 4.0.0 projects using supported schema-2 state and v5–v8 templates continue without a version-only refresh. New workflow contracts still require an approved Refresh. If status reports `PROJECT_UPGRADE_REQUIRED`, stop mutations: install Cadre 3.9.0, reconcile interrupted operations and perform its approved refresh to schema-2/v5 at a quiescent boundary, then install the current Cadre version and reload the client. Preserve approvals, historical journals, SHA references and archived learning; never edit version labels to bypass this gate.
|
|
19
19
|
|
|
20
20
|
Use the Cadre MCP as the authoritative runtime and template provider. Do not copy runtime code or templates into the project. Treat every rendered artifact and state mutation as a proposal until the human approves it. If required Cadre MCP tools are unavailable, stop and report that the plugin runtime is unavailable; never reconstruct templates from memory.
|
|
21
21
|
|
|
@@ -15,7 +15,7 @@ Use the scheduler and validation in mutation results. Do not immediately request
|
|
|
15
15
|
|
|
16
16
|
Serialized errors are bounded to 8 KiB. Use `diagnostic_read` with the returned diagnostic ID only when fuller evidence is needed; paginate it. Do not dump cache path lists into conversation. Build outputs belong in the runtime-returned owned `buildCachePath`, never an arbitrary `.cadre/.build-cache` directory.
|
|
17
17
|
|
|
18
|
-
Existing 3.9.0/3.9.1/3.9.2 projects using schema-2 state and
|
|
18
|
+
Existing 3.9.0/3.9.1/3.9.2 and 4.0.0 projects using supported schema-2 state and v5–v8 templates continue without a version-only refresh. New workflow contracts still require an approved Refresh. If status reports `PROJECT_UPGRADE_REQUIRED`, stop mutations: install Cadre 3.9.0, reconcile interrupted operations and perform its approved refresh to schema-2/v5 at a quiescent boundary, then install the current Cadre version and reload the client. Preserve approvals, historical journals, SHA references and archived learning; never edit version labels to bypass this gate.
|
|
19
19
|
|
|
20
20
|
Treat approved `plan.md` as the source of truth. Implement `planned` or `in_progress` tracks; a persisted policy-v2 Autonomous loop may resume `ready_for_review` by continuing review without starting another execution. Main is the sole scheduler and `.cadre/**` owner; workers never spawn workers, edit Cadre state, integrate branches, resolve conflicts, clean worktrees, or record human approval.
|
|
21
21
|
|
|
@@ -90,3 +90,7 @@ Start the ready phase once. For a commit group, follow `readyGroups` and execute
|
|
|
90
90
|
For an ungrouped task, use start, record_commit, complete. For manual verification, call `record_verification` directly from pending after actual verification and applicable approval: never send a separate verification start. Complete the running direct-main phase with `complete`, verified HEAD, verification and authorization. Repeat for the final phase, without a phase-record commit. `execution_finish` renders all plan markers and returns the receipt for the single `cadre(implement): complete <track-id>` commit. Include learning and durable journals. No execution-start commit is needed. An explicit checkpoint commit is allowed when handing off or stopping at a blocker; explain that boundary.
|
|
91
91
|
|
|
92
92
|
Integration prefers fast-forward when valid and records provenance independently of merge objects. The coordinator's exactly bound journal/state may remain dirty; unrelated files and worker edits to protected Cadre state still block integration. Reuse returned scheduler state.
|
|
93
|
+
|
|
94
|
+
## Quick outcome context
|
|
95
|
+
|
|
96
|
+
Default context_read includes no quick history. When prior small changes may matter, use quickSearch with a focused query or affected paths (default 5 hits, maximum 10), then load only relevant quickIds. Search covers pending consolidation and archive/.quick/ history. Do not exhaust search pages automatically; nextSearchCursor is optional discovery, separate from required context pagination. Consume all pages of selected records and retain existing required track context. Quick records are historical evidence, never authority to change an approved specification or dependency graph. Track creation can use scope: "project" without a trackId. Route a new bounded change that needs no coordinated delivery or approved-scope revision to quick; do not replace an existing track's execution with quick.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quick
|
|
3
|
+
description: Implement a bounded fix, refactor, documentation change, test, or small feature without a track, then record its verified outcome in Cadre. Use when one locally verifiable outcome needs no coordinated delivery, migration, or change to approved track scope.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cadre Quick
|
|
7
|
+
|
|
8
|
+
Read `.cadre/workflow.md` first. Quick requires an initialized, healthy project that has adopted the quick contract through create or an approved refresh. `QUICK_REFRESH_REQUIRED` means propose that one-time refresh; never silently edit policy or version labels. This workflow does not apply to the Cadre harness repository itself unless testing an explicitly requested fixture.
|
|
9
|
+
|
|
10
|
+
## Scope and context
|
|
11
|
+
|
|
12
|
+
A clear request authorizes reversible product edits. Ask a short scope question before editing only when inspection reveals a material choice or wider consequence. Use impact and verification to judge size, not a line-count threshold. One bounded feature can qualify; migrations, coordinated phases, and changes to an active track's approved requirements need track or revise.
|
|
13
|
+
|
|
14
|
+
Call `project_status` with `view: "project"`. Stop on invalid state, unresolved operations, stale memory, or conflicting work. Inspect affected active-track scope and require a quiescent worker boundary; quick v1 does not run beside active Cadre workers. Status includes unconsolidated quick records and staged intent separately from tracks; inspect further quickCursor pages only when relevant, independently of track cursors. Archived records contribute to counts without listing their history.
|
|
15
|
+
|
|
16
|
+
Read `context_read` with `scope: "project"`, without trackId. Consume every page and require `contextReady`. Default context contains no quick history. Use a focused `quickSearch: {query, paths, limit}` (query or paths required, default 5 hits, maximum 10) and the pattern index to select relevant `quickIds` and `patternIds`, then start a new read with those selections. Search includes archived records; never drain its optional nextSearchCursor pages automatically. Reuse a retainedContextToken only while its source text remains available, with unchanged scope/selections across continuation pages; clear it after context loss. Quick outcomes are historical evidence, not authority overriding requirements. Read relevant code, callers, tests, and repository instructions separately.
|
|
17
|
+
|
|
18
|
+
## Implement and verify
|
|
19
|
+
|
|
20
|
+
1. Before editing, call `candidate_apply` with `request: {mode: "begin_quick", projectRoot, quickId, intent}`. Choose a stable unused ID and a short exact intent. This writes only an ignored checkpoint and returns candidateId, stagePath, and baseCommit. On interruption, resume that checkpoint and existing work; do not overwrite the baseline or retroactively adopt earlier edits.
|
|
21
|
+
2. Preserve unrelated work, including staged changes. Paths dirty at the checkpoint cannot be included in quick delivery. If work overlaps those edits, pause to resolve ownership. Do not reset, stash, or discard user work to satisfy a gate.
|
|
22
|
+
3. Implement the bounded change in the current checkout. Run proportionate verification and review the complete resulting diff. Fix findings within scope; failed or unavailable required checks block completion. If scope grows, preserve the checkpoint and diff, summarize remaining work, and route to track or revise without claiming quick completion.
|
|
23
|
+
4. Fetch `quick/record` through `template_get_many`. Render only `quick/<quickId>.json` beneath the returned stage. Keep `checkpoint.json`; do not use candidate_stage_prepare with a manifest that removes it. Match the exact checkpoint intent. Include actual acceptance, outcome, all new affected product paths, passing verification evidence, reviewed: true, and relevant context path/hash references. Leave operation null and omit product: the runtime derives both. Lessons and relatedQuickIds may be empty; never invent learning.
|
|
24
|
+
|
|
25
|
+
## One completion approval
|
|
26
|
+
|
|
27
|
+
Call `candidate_apply` with `request: {mode: "prepare", projectRoot, candidateId, workflow: "quick", files: ["quick/<quickId>.json"]}`. Present the focused product diff, verification/review evidence, completion record (including runtime-derived stateChanges), receipt manifest, and one combined local commit. Ask once for explicit approval of the unchanged proposal. An earlier scope discussion does not approve completion. Rejection leaves the candidate and product diff uncommitted; do not promote or claim completion.
|
|
28
|
+
|
|
29
|
+
At a decision boundary, inspect host policy before workflow_elicit. Under approval policy `never`, ask once in chat; otherwise use workflow_elicit and fall back to chat on fallback_required. Host tool permission is not Cadre approval. Do not repeat answered questions or approvals, and never approve your own proposal.
|
|
30
|
+
|
|
31
|
+
After approval, call `request: {mode: "apply", proposalToken}`. Changed product bytes, context, Git baseline, unrelated index entries, or verification inputs require reassessment and a fresh proposal. Do not weaken checks or erase recovery intent to bypass drift.
|
|
32
|
+
|
|
33
|
+
Create one local Conventional Commit containing exactly the approved product paths, `.cadre/quick/<quickId>.json`, and the returned immutable receipt. Include both exact receipt trailers. Stage only owned files and use a path-limited commit (for example, `git commit --only ... -- <owned paths>`) to preserve unrelated staged work. Verify the final commit includes no unrelated changes. Do not push. Then call `candidate_apply` with `request: {mode: "reconcile", projectRoot, operationId}`. Reconciliation verifies the product manifest and cleans temporary recovery state; there is no bookkeeping commit.
|
|
34
|
+
|
|
35
|
+
## Recovery and outcome
|
|
36
|
+
|
|
37
|
+
If interrupted after approval, reconcile an existing commit first. Otherwise use `request: {mode: "resume", projectRoot, operationId, approvalDigest}` with the persisted original approval. Staging owned product files for the combined commit does not invalidate approval; unmerged index entries still block recovery. Resume validates both context and product evidence; never replace the journal or repeat completed product work. Report commit_pending as unresolved provenance, not completion.
|
|
38
|
+
|
|
39
|
+
Before pausing unfinished work, add or update only checkpoint.json's optional `progress: {status: "working" | "blocked" | "escalated", summary, nextAction}`. Preserve its original identity, intent, and baseline. Status surfaces blocked/escalated intent and nextAction; these are unapproved working notes, not completion evidence. Resolve the recorded blocker before setting progress back to working and preparing completion.
|
|
40
|
+
|
|
41
|
+
Report the outcome, verification, commit, and any lesson briefly. Completed records await consolidation in `.cadre/quick/`. A later approved refresh batch records source assessments, consolidates durable guidance, and moves the unchanged records to `.cadre/archive/.quick/`. Archived records remain retrievable by ID or focused search and are omitted from routine status rows and context. Corrections use a new linked quick record or a track; quick records are not track dependency nodes and have no dedicated archive/revert lifecycle.
|
package/skills/refresh/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: refresh
|
|
3
|
-
description:
|
|
3
|
+
description: Maintain Cadre project context, consolidate learning and patterns, reseed active tracks, and archive completed work in one approved, resumable refresh. Use for refresh, completed-track archival, or project context drift.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Cadre Refresh
|
|
@@ -15,7 +15,7 @@ Use the scheduler and validation in mutation results. Do not immediately request
|
|
|
15
15
|
|
|
16
16
|
Serialized errors are bounded to 8 KiB. Use `diagnostic_read` with the returned diagnostic ID only when fuller evidence is needed; paginate it. Do not dump cache path lists into conversation. Build outputs belong in the runtime-returned owned `buildCachePath`, never an arbitrary `.cadre/.build-cache` directory.
|
|
17
17
|
|
|
18
|
-
Existing 3.9.0/3.9.1/3.9.2 projects using schema-2 state and
|
|
18
|
+
Existing 3.9.0/3.9.1/3.9.2 and 4.0.0 projects using supported schema-2 state and v5–v8 templates continue without a version-only refresh. New workflow contracts still require an approved Refresh. If status reports `PROJECT_UPGRADE_REQUIRED`, stop mutations: install Cadre 3.9.0, reconcile interrupted operations and perform its approved refresh to schema-2/v5 at a quiescent boundary, then install the current Cadre version and reload the client. Preserve approvals, historical journals, SHA references and archived learning; never edit version labels to bypass this gate.
|
|
19
19
|
|
|
20
20
|
Read `.cadre/workflow.md`, `project.json`, all project context files, the last refresh record, Git history since the recorded setup/refresh commit, completed-track outcomes, and current repository manifests/code. Read every target context file before editing it.
|
|
21
21
|
|
|
@@ -25,21 +25,21 @@ A scope refresh of an imported `drafting-plan` track follows the draft revision
|
|
|
25
25
|
|
|
26
26
|
At every required clarification or approval boundary, show a concise context/impact summary or focused diff. Inspect the active host policy before calling `workflow_elicit`: if the task context reports approval policy `never`, including Codex Full Access, skip the form and ask the same short question once in chat. Otherwise prefer `workflow_elicit`, using `clarification` for at most three questions and `approval` bound to the exact refresh proposal checkpoint. Treat only an `approved` result as approval. If it returns `fallback_required`, or immediately returns `declined` while the task explicitly reports policy `never`, ask the same short question once in chat; the latter is policy rejection, not a human decline. Never request secrets or retry the form.
|
|
27
27
|
|
|
28
|
-
Call `project_status` first with `view: "project"` and use its embedded structured validation and complete errors; do not repeat `state_validate` at command entry. Stop when `valid` is false unless every error is explicitly and safely repaired by this refresh proposal. If it reports `upgradeRequired`, follow the 3.9.0 bridge instructions above; do not attempt that migration in
|
|
28
|
+
Call `project_status` first with `view: "project"` and use its embedded structured validation and complete errors; do not repeat `state_validate` at command entry. Stop when `valid` is false unless every error is explicitly and safely repaired by this refresh proposal. If it reports `upgradeRequired`, follow the 3.9.0 bridge instructions above; do not attempt that migration in the current runtime.
|
|
29
29
|
|
|
30
|
-
1. Determine evidence sources: user input, committed repository changes, completed tracks,
|
|
30
|
+
1. Determine evidence sources: user input, committed repository changes, completed tracks, and selected quick outcomes. Follow the completed-track consolidation procedure below as part of this same refresh.
|
|
31
31
|
2. Apply the workflow clarification gate before drafting. Ask when the refresh request or evidence does not clearly establish the commit/time range, which context artifacts are in scope, whether files should describe current reality or a desired future state, how to resolve conflicts between user input and repository evidence, or whether cascading active-track updates are intended now.
|
|
32
32
|
3. Before changing execution-governing context, inspect all active implementation journals and workers. Retained worker paths and branch names are provenance after verified cleanup; confirm that registered worktrees, orphaned directories, worker paths, and worker branches are gone rather than deleting historical journal evidence. Include any required stop, preservation, or reconciliation at a safe quiescent boundary in the final refresh proposal; do not ask for a separate quiescence approval when the exact disposition can be assessed with the refresh. Draft focused diffs for product, guidelines, workflow, tech stack, general styleguide, and language/framework styleguides. Add/remove language guides only when the proposed tech stack requires it.
|
|
33
33
|
4. Assess impact on all active track specs, plans, and marked Pattern Seed sections using the same rules as the Cadre revise workflow, but include every cascading change in this refresh envelope. For each changed active scope/graph, include proposed `tracks/<id>/state.json` with the next track revision and exactly one fresh `tracks/<id>/revisions/revision-<id>.md` recording previous/new track, spec, and plan counters. Reassess learning and dependency context together. Preserve authored operation, last execution, review cycles, Autonomous authority, history, and commit references; the runtime derives supersession and renewed scope authority inside this same approved proposal. Do not stage a manually rewritten journal or clear its binding. After reconciliation, start a new execution with inherited modes. Context-only refresh preserves the complete existing Autonomous loop, including original authorization, cumulative review baseline, findings, attempt history and blockers; do not author checkpoint, finding or approval-mode changes in a context refresh. An explicit legacy policy migration may create a previously absent loop only from its verified execution and recorded migration approval. Context-only refresh preserves the current journal and counters; identical copied spec/plan files do not renew scope authority.
|
|
34
34
|
5. Expected human decision count is one. Call `template_get_many` once for `project/refresh` and `project/refresh-operation`, then `candidate_stage_prepare` for `refresh-<ts>` with `expectedFiles` equal to the complete refresh record and project/track update set. Render exactly those files. Use `targetRuntimeVersion` and `targetTemplateSetVersion` from status for an ordinary approved context refresh. When separately inspecting a staged proposal, call `candidate_inspect` with `planValidations` containing one entry for every staged root or nested `plan.md`, using its exact candidate-relative path and intended target status, or omit it for a plan-free refresh. Keep cascading changes inside this envelope instead of starting separate approval cycles.
|
|
35
35
|
6. Stage proposed project state and reassessed `dependency-context.json` for every active track along with changed context and the refresh record. Keep existing setup, approvals, findings, historical journals, completed nodes and history intact. Reach a quiescent boundary and preserve existing execution contracts; grouping applies only to new executions.
|
|
36
|
-
7. Use `candidate_apply` prepare
|
|
36
|
+
7. Use `candidate_apply` with `request: { mode: "prepare", projectRoot, candidateId, workflow: "refresh", files, selectedTracks? }` and the full exact manifest instead of a separate inspection/promotion sequence. Present the targetRuntimeVersion and targetTemplateSetVersion, semantic diffs and their consequences together. Apply its token only after approval. Commit `cadre(refresh): update project context` with receipt trailers, then reconcile. This one commit includes final version metadata, selected archive moves, the generated index and stable provenance; no record-refresh or separate archive commit is needed.
|
|
37
37
|
|
|
38
38
|
## Memory contract
|
|
39
39
|
|
|
40
|
-
Preserve phase history and existing handoffs. For active tracks, keep the marked `cadre:memory` JSON block inside Pattern Seed synchronized with the proposed spec/plan revisions and exact approved pattern hashes. Every applicable pattern requires its safe `patterns/<slug>.md` path, SHA-256, and human-readable relevance/constraints; never invent or silently omit guidance. When a staged plan changes revisions, include the reassessed learning file in `expectedFiles`. Inspect `candidate_inspect.learning` and `memoryInputs` as well as `plans`; resolve invalid or stale memory before approval. Immediately before direct promotion, re-inspect and compare the complete approved digest, including unchanged memory inputs; changed inputs require reassessment and a corrected approval.
|
|
40
|
+
Preserve phase history and existing handoffs. For active tracks, keep the marked `cadre:memory` JSON block inside Pattern Seed synchronized with the proposed spec/plan revisions and exact approved pattern hashes. Every applicable pattern requires its safe `patterns/<slug>.md` path, SHA-256, and human-readable relevance/constraints; never invent or silently omit guidance. When a staged plan changes revisions, include the reassessed learning file in `expectedFiles`. Inspect `candidate_inspect.learning` and `memoryInputs` as well as `plans`; resolve invalid or stale memory before approval. Immediately before direct promotion, re-inspect and compare the complete approved digest, including unchanged memory inputs; changed inputs require reassessment and a corrected approval. Refresh apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
41
41
|
|
|
42
|
-
For unsupported project formats, use the 3.9.0 bridge before resuming this workflow. Keep old refresh journals as evidence and recover them with that runtime;
|
|
42
|
+
For unsupported project formats, use the 3.9.0 bridge before resuming this workflow. Keep old refresh journals as evidence and recover them with that runtime; the current runtime does not perform legacy SHA bookkeeping or permit recovery mutations on unsupported formats.
|
|
43
43
|
|
|
44
44
|
## Approval policy v2 migration
|
|
45
45
|
|
|
@@ -57,6 +57,34 @@ Include all changed context, active seed metadata, policy records, journals, and
|
|
|
57
57
|
|
|
58
58
|
## Explicit blocked-review retry
|
|
59
59
|
|
|
60
|
-
Use this dedicated retry procedure instead of the general context/scope cascade steps above. Do not include the target’s plan, learning, dependency-context or execution files: the scope and consumed inputs remain unchanged. For a policy-v2/schema-2 Autonomous loop that is blocked or stalled, prepare a dedicated refresh with the current `project.json`, the unchanged `tracks/<id>/state.json`, and `refreshes/refresh-<id>.md` recording the human’s retry instructions. Include `reviewRetry: {trackId, refreshPath, reason}` in `candidate_apply` prepare. Do not alter `autonomousReview`, its checkpoint, origin, authorization time, initial baseline, findings or attempts in authored state. Approve scope/plan/execution changes separately.
|
|
60
|
+
Use this dedicated retry procedure instead of the general context/scope cascade steps above. Omit selectedTracks or supply []; nonempty selection is rejected. Do not consolidate quick outcomes or include unrelated maintenance in this retry. Do not include the target’s plan, learning, dependency-context or execution files: the scope and consumed inputs remain unchanged. For a policy-v2/schema-2 Autonomous loop that is blocked or stalled, prepare a dedicated refresh with the current `project.json`, the unchanged `tracks/<id>/state.json`, and `refreshes/refresh-<id>.md` recording the human’s retry instructions. Include `reviewRetry: {trackId, refreshPath, reason}` in `candidate_apply` prepare. Do not alter `autonomousReview`, its checkpoint, origin, authorization time, initial baseline, findings or attempts in authored state. Approve scope/plan/execution changes separately.
|
|
61
61
|
|
|
62
62
|
Present the runtime’s derived `stateChanges` and full digest before explicit approval. It appends the complete prior loop and instructions to refresh history and records `retryAuthorization` bound to this receipt, with each finding’s current attempt prefix as the baseline for two additional attempts. All old attempts remain intact; automatic remediation cannot replace this retry authority. The runtime derives `implementing`, `reviewing` or `remediating` from the retained lifecycle and removes the explicitly approved blocker. A healthy loop cannot renew its budget, stale state is rejected, and committed retries make zero changes. Commit/reconcile this refresh before following `nextStep`. Ordinary context refresh retains its existing strict authority-preservation rule.
|
|
63
|
+
|
|
64
|
+
## Quick outcome consolidation
|
|
65
|
+
|
|
66
|
+
Inspect project_status.quick for pending consolidation. Select a bounded batch of at most 20 completed records; do not drain the entire backlog into context. Read selected quickIds through context_read with scope: "project". Assess outcomes against current code and existing guidance; these are historical evidence, not authority. Merge useful findings into existing guidance or patterns, deduplicate overlap, and replace obsolete recommendations rather than accumulating summaries. Do not manufacture lessons: a no-change assessment with a reason is valid.
|
|
67
|
+
|
|
68
|
+
Record each assessed source in the fresh primary refresh record's cadre:quick-sources block as {quickId, sha256, disposition: "incorporated" | "no-change", reason}. Include applicable project guidance, patterns/index.md changes, and reassessment of affected active-track seeds and dependency context in the same proposal. The runtime derives byte-identical moves from `.cadre/quick/<id>.json` to `.cadre/archive/.quick/<id>.json`; review these moves with the guidance diff under the existing single refresh approval. Do not stage archive files manually. Commit/reconcile all promoted moves and the receipt together. Recovery resumes the same approved batch, including after a partial move.
|
|
69
|
+
|
|
70
|
+
Keep raw record contents and delivery receipts immutable. Unassessed outcomes remain in the active queue; archived history is fetched only by ID or focused search. The hidden `.quick` directory is separate from archived tracks, so a track named `quick` remains valid. Recommend another batch when needed; do not silently expand the approved set.
|
|
71
|
+
|
|
72
|
+
To enable quick on an existing v5/v6 project, include the current project/workflow template's quick contract in the approved workflow diff alongside target template metadata. Preserve custom project policy and explain any conflict before adoption. Version labels alone do not enable quick. Existing track delivery continues without this optional adoption.
|
|
73
|
+
|
|
74
|
+
## Completed-track consolidation and archival
|
|
75
|
+
|
|
76
|
+
Refresh includes one or more `completed` tracks in a single batch when available. When selection is omitted or the human says `all completed`, omit `selectedTracks`; the server selects every eligible completed track in dependency order. An explicit list preserves order and removes duplicates; `selectedTracks: []` excludes track archival. Review the resolved selection returned by prepare: it is frozen into the approval and cannot expand during apply or recovery. With no completed tracks, continue context maintenance normally. Expected human decision count is one for the complete batch, including context changes, quick consolidation, patterns, active seeds, moves and the generated index.
|
|
77
|
+
|
|
78
|
+
Read every selected track artifact and recorded commit, the complete pattern catalog, active-track status summaries, and relevant implementation files. Use applicability, provenance and supersession summaries to identify affected patterns and active tracks, then read their full pattern/spec/plan/seed artifacts. If metadata is missing or ambiguous, read the full catalog bodies and active specs/plans/seeds. Never exclude guidance by keyword alone. Build one bounded inventory, read selected artifacts once, summarize execution journals structurally, and verify recorded commit reachability in one Git pass. Continue truncated reads from the first unread line and reuse unchanged context. Fetch known pattern templates with template_get_many; use descriptor tools when an ID must be resolved. Do not inspect the installed runtime or discover alternative mutation tools.
|
|
79
|
+
|
|
80
|
+
Every selected track must have clean approved review, centralized valid state, and no pending mutation. Reject the batch without partial mutation if any selected track is ineligible. Reconcile or resume existing receipt recovery before preparing a new refresh. Reach the existing quiescent-worker boundary before changing execution-governing context.
|
|
81
|
+
|
|
82
|
+
Distill durable, evidenced learning from selected tracks and quick outcomes as one corpus against current repository evidence and existing guidance. Merge, replace, split or retire obsolete guidance while preserving provenance to contributing track/phase/task commits. Resolve overlap or conflicting lessons once. Verify observations against actual imports, source and tests; distinguish facts, hypotheses and scope decisions. Correct mistaken historical claims through new guidance without rewriting historical artifacts. Do not manufacture lessons: archive without pattern changes when justified, and record a no-change assessment and reason in the fresh refresh record.
|
|
83
|
+
|
|
84
|
+
Reassess Pattern Seeds for affected nonterminal tracks against the final proposed guidance, preserving phase history and handoffs. Stage changed context, patterns/index.md, patterns, active learning, dependency context, any approved scope revisions, project.json and the fresh refresh record in the same expectedFiles/files manifest. Do not stage selected terminal-track files, archive destinations, derived state changes or tracks.md. Prepare derives and previews the exact moves, archival status/checkpoint/history, active dependency source-path relocation, and final index; changed inherited constraints require explicitly staged reassessment. Preserve all archived learning, reviews, journals, revisions, bugs and commit provenance.
|
|
85
|
+
|
|
86
|
+
Adopt the current workflow template's `<!-- cadre:refresh-archival:v1 -->` contract in this same approved workflow diff before first archival on an older supported project. Preserve custom policy and resolve conflicts explicitly; version labels alone do not enable archival. Keep v1–v7 templates and historical receipts immutable. There is no separate archive command or new archive operation proposal.
|
|
87
|
+
|
|
88
|
+
Present the semantic diff, resolved selection, moves and derived state changes together with the digest. After approval apply only its candidate_apply token. Commit all approved moves and derived changes together with the refresh receipt and exact returned trailers, then reconcile. Interrupted promotion uses `request: {mode: "resume", projectRoot, operationId, approvalDigest}` from the original approved journal, without another approval for unchanged consequences. Committed candidate retries make zero-change replay even after candidate cleanup. Do not redistill while a pending operation exists.
|
|
89
|
+
|
|
90
|
+
Historical archive receipts remain readable and resolvable. Resume/reconcile already-approved archive journals through candidate_apply using their original operationId and approvalDigest, then commit only once. Unapplied archive proposals must be prepared again through Refresh. Legacy pre-receipt archive journals still require the documented 3.9.0 bridge; never rewrite or discard their approval.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Cadre: Refresh"
|
|
3
|
-
short_description: "Refresh
|
|
4
|
-
default_prompt: "Use $refresh to refresh project context
|
|
3
|
+
short_description: "Refresh context and archive completed work"
|
|
4
|
+
default_prompt: "Use $refresh to refresh project context, consolidate learning, and archive eligible completed tracks in one approved operation."
|
package/skills/revert/SKILL.md
CHANGED
|
@@ -15,7 +15,7 @@ Use the scheduler and validation in mutation results. Do not immediately request
|
|
|
15
15
|
|
|
16
16
|
Serialized errors are bounded to 8 KiB. Use `diagnostic_read` with the returned diagnostic ID only when fuller evidence is needed; paginate it. Do not dump cache path lists into conversation. Build outputs belong in the runtime-returned owned `buildCachePath`, never an arbitrary `.cadre/.build-cache` directory.
|
|
17
17
|
|
|
18
|
-
Existing 3.9.0/3.9.1/3.9.2 projects using schema-2 state and
|
|
18
|
+
Existing 3.9.0/3.9.1/3.9.2 and 4.0.0 projects using supported schema-2 state and v5–v8 templates continue without a version-only refresh. New workflow contracts still require an approved Refresh. If status reports `PROJECT_UPGRADE_REQUIRED`, stop mutations: install Cadre 3.9.0, reconcile interrupted operations and perform its approved refresh to schema-2/v5 at a quiescent boundary, then install the current Cadre version and reload the client. Preserve approvals, historical journals, SHA references and archived learning; never edit version labels to bypass this gate.
|
|
19
19
|
|
|
20
20
|
Load `.cadre/workflow.md`, project/track state, spec, plan, learning, review/revision history, recorded task commits, Git history, working tree, and dependent tracks. Read every affected file and relevant later diff before proposing a revert.
|
|
21
21
|
|
|
@@ -45,7 +45,7 @@ The pre-reversal authorization binds the `candidate_inspect` digest, exact autho
|
|
|
45
45
|
|
|
46
46
|
## Memory contract
|
|
47
47
|
|
|
48
|
-
Preserve phase history and existing handoffs. For active tracks, keep the marked `cadre:memory` JSON block inside Pattern Seed synchronized with the proposed spec/plan revisions and exact approved pattern hashes. Every applicable pattern requires its safe `patterns/<slug>.md` path, SHA-256, and human-readable relevance/constraints; never invent or silently omit guidance. When a staged plan changes revisions, include the reassessed learning file in `expectedFiles`. Inspect `candidate_inspect.learning` and `memoryInputs` as well as `plans`; resolve invalid or stale memory before approval. Immediately before direct promotion, re-inspect and compare the complete approved digest, including unchanged memory inputs; changed inputs require reassessment and a corrected approval.
|
|
48
|
+
Preserve phase history and existing handoffs. For active tracks, keep the marked `cadre:memory` JSON block inside Pattern Seed synchronized with the proposed spec/plan revisions and exact approved pattern hashes. Every applicable pattern requires its safe `patterns/<slug>.md` path, SHA-256, and human-readable relevance/constraints; never invent or silently omit guidance. When a staged plan changes revisions, include the reassessed learning file in `expectedFiles`. Inspect `candidate_inspect.learning` and `memoryInputs` as well as `plans`; resolve invalid or stale memory before approval. Immediately before direct promotion, re-inspect and compare the complete approved digest, including unchanged memory inputs; changed inputs require reassessment and a corrected approval. Refresh apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
49
49
|
|
|
50
50
|
## Preparation safety and execution binding
|
|
51
51
|
|
package/skills/review/SKILL.md
CHANGED
|
@@ -15,7 +15,7 @@ Use the scheduler and validation in mutation results. Do not immediately request
|
|
|
15
15
|
|
|
16
16
|
Serialized errors are bounded to 8 KiB. Use `diagnostic_read` with the returned diagnostic ID only when fuller evidence is needed; paginate it. Do not dump cache path lists into conversation. Build outputs belong in the runtime-returned owned `buildCachePath`, never an arbitrary `.cadre/.build-cache` directory.
|
|
17
17
|
|
|
18
|
-
Existing 3.9.0/3.9.1/3.9.2 projects using schema-2 state and
|
|
18
|
+
Existing 3.9.0/3.9.1/3.9.2 and 4.0.0 projects using supported schema-2 state and v5–v8 templates continue without a version-only refresh. New workflow contracts still require an approved Refresh. If status reports `PROJECT_UPGRADE_REQUIRED`, stop mutations: install Cadre 3.9.0, reconcile interrupted operations and perform its approved refresh to schema-2/v5 at a quiescent boundary, then install the current Cadre version and reload the client. Preserve approvals, historical journals, SHA references and archived learning; never edit version labels to bypass this gate.
|
|
19
19
|
|
|
20
20
|
Review a `ready_for_review` track. A persisted policy-v2 Autonomous review operation may also resume interrupted promotion from `in_progress`; finish that operation before implementation starts. Apply the Autonomous rules below under the originating persisted authorization and retain explicit human approval for clean completion. Load `.cadre/workflow.md`, all track artifacts and learning, dependency context, relevant patterns/styleguides, implementation commits, and repository tests. Read every reviewed file before judging or proposing edits.
|
|
21
21
|
|
|
@@ -55,7 +55,7 @@ Satisfy `prerequisite` before handoff: `implementation_bookkeeping_commit` means
|
|
|
55
55
|
|
|
56
56
|
## Memory contract
|
|
57
57
|
|
|
58
|
-
Preserve phase history and existing handoffs. For active tracks, keep the marked `cadre:memory` JSON block inside Pattern Seed synchronized with the proposed spec/plan revisions and exact approved pattern hashes. Every applicable pattern requires its safe `patterns/<slug>.md` path, SHA-256, and human-readable relevance/constraints; never invent or silently omit guidance. When a staged plan changes revisions, include the reassessed learning file in `expectedFiles`. Inspect `candidate_inspect.learning` and `memoryInputs` as well as `plans`; resolve invalid or stale memory before approval. Immediately before direct promotion, re-inspect and compare the complete approved digest, including unchanged memory inputs; changed inputs require reassessment and a corrected approval.
|
|
58
|
+
Preserve phase history and existing handoffs. For active tracks, keep the marked `cadre:memory` JSON block inside Pattern Seed synchronized with the proposed spec/plan revisions and exact approved pattern hashes. Every applicable pattern requires its safe `patterns/<slug>.md` path, SHA-256, and human-readable relevance/constraints; never invent or silently omit guidance. When a staged plan changes revisions, include the reassessed learning file in `expectedFiles`. Inspect `candidate_inspect.learning` and `memoryInputs` as well as `plans`; resolve invalid or stale memory before approval. Immediately before direct promotion, re-inspect and compare the complete approved digest, including unchanged memory inputs; changed inputs require reassessment and a corrected approval. Refresh apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
59
59
|
|
|
60
60
|
The input field `approval` carries prepared review evidence, not a claim of a human decision. State stores it as `reviewEvidence`. Prepare once, obtain approval of the exact digest, and apply its token unchanged. The runtime adds `approvalConfirmation` with the bound digest, confirmation time and `explicit-apply` method, separately from the evidence. Do not re-prepare merely to replace pending-approval prose. This receipt records the approved application, not an authenticated identity or a fabricated quotation from a human.
|
|
61
61
|
|
|
@@ -109,3 +109,7 @@ Resume `awaiting_approval` by checking the recorded execution/HEAD and product c
|
|
|
109
109
|
All modes preserve the complete completed plan and append remediation at exactly the next plan revision, with the specification revision unchanged. Ordinary review state retains its prior execution, scope, policy and review history and appends one `changes_requested` cycle naming that execution's ID, plan revision, graph digest and reviewed HEAD. Approval of a review does not authorize reopening completed tasks. Pending promotion retains exact original state/plan evidence for recovery after partial writes or stage loss; missing or inconsistent original evidence requires an approved repair, never recreated hashes or another delivery run.
|
|
110
110
|
|
|
111
111
|
Every approval mode checks product and verification-policy content against the reviewed HEAD before clean completion. Interrupted clean or finding-bearing review promotion performs the same check before any remaining write, using the reviewed evidence retained in its original intent, including older pending receipts. Preserve dirty changes and the pending journal if freshness fails; verify the current product and obtain an exact repair approval, or deliberately restore the approved inputs. A committed approval replays its immutable historical receipt even after later product changes.
|
|
112
|
+
|
|
113
|
+
## Quick outcome context
|
|
114
|
+
|
|
115
|
+
Default context_read includes no quick history. When prior small changes may matter, use quickSearch with a focused query or affected paths (default 5 hits, maximum 10), then load only relevant quickIds. Search covers pending consolidation and archive/.quick/ history. Do not exhaust search pages automatically; nextSearchCursor is optional discovery, separate from required context pagination. Consume all pages of selected records and retain existing required track context. Quick records are historical evidence, never authority to change an approved specification or dependency graph. Track creation can use scope: "project" without a trackId. Route a new bounded change that needs no coordinated delivery or approved-scope revision to quick; do not replace an existing track's execution with quick.
|
package/skills/revise/SKILL.md
CHANGED
|
@@ -15,7 +15,7 @@ Use the scheduler and validation in mutation results. Do not immediately request
|
|
|
15
15
|
|
|
16
16
|
Serialized errors are bounded to 8 KiB. Use `diagnostic_read` with the returned diagnostic ID only when fuller evidence is needed; paginate it. Do not dump cache path lists into conversation. Build outputs belong in the runtime-returned owned `buildCachePath`, never an arbitrary `.cadre/.build-cache` directory.
|
|
17
17
|
|
|
18
|
-
Existing 3.9.0/3.9.1/3.9.2 projects using schema-2 state and
|
|
18
|
+
Existing 3.9.0/3.9.1/3.9.2 and 4.0.0 projects using supported schema-2 state and v5–v8 templates continue without a version-only refresh. New workflow contracts still require an approved Refresh. If status reports `PROJECT_UPGRADE_REQUIRED`, stop mutations: install Cadre 3.9.0, reconcile interrupted operations and perform its approved refresh to schema-2/v5 at a quiescent boundary, then install the current Cadre version and reload the client. Preserve approvals, historical journals, SHA references and archived learning; never edit version labels to bypass this gate.
|
|
19
19
|
|
|
20
20
|
Read `.cadre/workflow.md`, the full target track, its dependencies, all tracks that depend on it, relevant repository files, and applicable patterns. Read each artifact before editing; never propose a revision from guessed contents.
|
|
21
21
|
|
|
@@ -66,3 +66,7 @@ Preserve phase history and existing handoffs. For active tracks, keep the marked
|
|
|
66
66
|
## Revision provenance
|
|
67
67
|
|
|
68
68
|
Use `revisions/revision-<id>.md` (including the `revision-` prefix), with lowercase letters, digits and hyphens in the artifact ID, such as `revisions/revision-2.md` or `revisions/revision-20261001t064657z.md`. Uppercase ISO timestamp letters and dots are not allowed in that basename. Include the same path in the approved manifest and operation. The runtime binds changed `state.commits.spec` and `state.commits.plan` to the revision operation receipt within the approved promotion. Confirm the committed plan has the proposed revisions and graph; a reachable SHA alone is insufficient. candidate_apply includes stable operation references in the original approval envelope; reconcile them without a follow-up commit. Do not start delivery with pointers to an older revision. Retain the previous execution binding and handoffs while an approved repair operation owns state.
|
|
69
|
+
|
|
70
|
+
## Quick outcome context
|
|
71
|
+
|
|
72
|
+
Default context_read includes no quick history. When prior small changes may matter, use quickSearch with a focused query or affected paths (default 5 hits, maximum 10), then load only relevant quickIds. Search covers pending consolidation and archive/.quick/ history. Do not exhaust search pages automatically; nextSearchCursor is optional discovery, separate from required context pagination. Consume all pages of selected records and retain existing required track context. Quick records are historical evidence, never authority to change an approved specification or dependency graph. Track creation can use scope: "project" without a trackId. Route a new bounded change that needs no coordinated delivery or approved-scope revision to quick; do not replace an existing track's execution with quick.
|
package/skills/status/SKILL.md
CHANGED
|
@@ -27,4 +27,8 @@ Read any file before quoting or interpreting it. Do not mutate files, run commit
|
|
|
27
27
|
|
|
28
28
|
This workflow creates no commits. Reuse retained context and the latest mutation receipt when available; status itself is read-only. Report `commit_pending` as unresolved provenance, never as completed delivery. Clear retainedContextToken after context loss. Use diagnostic_read only for explicitly needed full diagnostics; ordinary errors are capped at 8 KiB. Never migrate or normalize historical state from this workflow.
|
|
29
29
|
|
|
30
|
-
When status reports `PROJECT_UPGRADE_REQUIRED`, show its upgrade instructions: use Cadre 3.9.0 to reconcile pending operations and perform the approved schema-2/v5 refresh, then install
|
|
30
|
+
When status reports `PROJECT_UPGRADE_REQUIRED`, show its upgrade instructions: use Cadre 3.9.0 to reconcile pending operations and perform the approved schema-2/v5 refresh, then install the current Cadre version and reload the client. Compatible 3.9.0/3.9.1/3.9.2 and 4.0.0 schema-2 projects need no version-only refresh. Do not mutate metadata from status.
|
|
31
|
+
|
|
32
|
+
## Quick work
|
|
33
|
+
|
|
34
|
+
Report quick counts separately from tracks: completed, archived, commit_pending, and awaiting consolidation. Routine rows contain the unconsolidated queue and unresolved records; archived history is available by focused context_read quickSearch or quickIds. Show unfinished staged quick intent without claiming delivery. Recommend a bounded refresh/consolidation batch when unconsolidated reaches 20, without blocking new quick work or automatically approving refresh. Request quick.listing.nextCursor as quickCursor only when further queue detail is needed, independently of the track cursor; never infer track dependencies or lifecycle transitions from a quick outcome. Status remains read-only.
|
package/skills/track/SKILL.md
CHANGED
|
@@ -15,7 +15,7 @@ Use the scheduler and validation in mutation results. Do not immediately request
|
|
|
15
15
|
|
|
16
16
|
Serialized errors are bounded to 8 KiB. Use `diagnostic_read` with the returned diagnostic ID only when fuller evidence is needed; paginate it. Do not dump cache path lists into conversation. Build outputs belong in the runtime-returned owned `buildCachePath`, never an arbitrary `.cadre/.build-cache` directory.
|
|
17
17
|
|
|
18
|
-
Existing 3.9.0/3.9.1/3.9.2 projects using schema-2 state and
|
|
18
|
+
Existing 3.9.0/3.9.1/3.9.2 and 4.0.0 projects using supported schema-2 state and v5–v8 templates continue without a version-only refresh. New workflow contracts still require an approved Refresh. If status reports `PROJECT_UPGRADE_REQUIRED`, stop mutations: install Cadre 3.9.0, reconcile interrupted operations and perform its approved refresh to schema-2/v5 at a quiescent boundary, then install the current Cadre version and reload the client. Preserve approvals, historical journals, SHA references and archived learning; never edit version labels to bypass this gate.
|
|
19
19
|
|
|
20
20
|
Create only `feature` or `bug` tracks. Resume an existing drafting track instead of replacing it.
|
|
21
21
|
|
|
@@ -50,4 +50,8 @@ When resuming `drafting-plan`, compare the proposed specification against its re
|
|
|
50
50
|
|
|
51
51
|
## Memory contract
|
|
52
52
|
|
|
53
|
-
Preserve phase history and existing handoffs. For active tracks, keep the marked `cadre:memory` JSON block inside Pattern Seed synchronized with the proposed spec/plan revisions and exact approved pattern hashes. Every applicable pattern requires its safe `patterns/<slug>.md` path, SHA-256, and human-readable relevance/constraints; never invent or silently omit guidance. When a staged plan changes revisions, include the reassessed learning file in `expectedFiles`. Inspect `candidate_inspect.learning` and `memoryInputs` as well as `plans`; resolve invalid or stale memory before approval. Immediately before direct promotion, re-inspect and compare the complete approved digest, including unchanged memory inputs; changed inputs require reassessment and a corrected approval.
|
|
53
|
+
Preserve phase history and existing handoffs. For active tracks, keep the marked `cadre:memory` JSON block inside Pattern Seed synchronized with the proposed spec/plan revisions and exact approved pattern hashes. Every applicable pattern requires its safe `patterns/<slug>.md` path, SHA-256, and human-readable relevance/constraints; never invent or silently omit guidance. When a staged plan changes revisions, include the reassessed learning file in `expectedFiles`. Inspect `candidate_inspect.learning` and `memoryInputs` as well as `plans`; resolve invalid or stale memory before approval. Immediately before direct promotion, re-inspect and compare the complete approved digest, including unchanged memory inputs; changed inputs require reassessment and a corrected approval. Refresh apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
54
|
+
|
|
55
|
+
## Quick outcome context
|
|
56
|
+
|
|
57
|
+
Default context_read includes no quick history. When prior small changes may matter, use quickSearch with a focused query or affected paths (default 5 hits, maximum 10), then load only relevant quickIds. Search covers pending consolidation and archive/.quick/ history. Do not exhaust search pages automatically; nextSearchCursor is optional discovery, separate from required context pagination. Consume all pages of selected records and retain existing required track context. Quick records are historical evidence, never authority to change an approved specification or dependency graph. Track creation can use scope: "project" without a trackId. Route a new bounded change that needs no coordinated delivery or approved-scope revision to quick; do not replace an existing track's execution with quick.
|
package/skills/wisp/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wisp
|
|
3
|
-
description: Perform lightweight exploration, investigation, spikes, or questions without creating or mutating Cadre project/track state. Use for the wisp command when work is intentionally untracked;
|
|
3
|
+
description: Perform lightweight exploration, investigation, spikes, or questions without creating or mutating Cadre project/track state. Use for the wisp command when work is intentionally untracked; route durable work to quick or track before implementation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Cadre Wisp
|
|
@@ -11,9 +11,9 @@ When the exploration needs a material clarification and the Cadre MCP is availab
|
|
|
11
11
|
|
|
12
12
|
1. Define the exploration question and expected disposable output. Use `.cadre/wisps/<timestamp>-<slug>/` only when an initialized project already has a regular `.cadre/.gitignore` containing `/wisps/`. Otherwise use an OS temporary directory and never create `.cadre` for a wisp.
|
|
13
13
|
2. Inspect relevant repository files. Before editing any existing file, read it and its directly relevant context; inspect the directory before creating a file.
|
|
14
|
-
3. Prefer read-only investigation and temporary files outside the repository. Standard Wisp has zero approval prompts. Wisp files never enter Cadre state or commits.
|
|
14
|
+
3. Prefer read-only investigation and temporary files outside the repository. Standard Wisp has zero approval prompts. Wisp files never enter Cadre state or commits. Route requested persistent product changes to quick for bounded work or track for coordinated delivery; only when the human explicitly insists on an untracked persistent edit, present one exact scope approval and do not commit automatically.
|
|
15
15
|
4. Return findings, evidence, uncertainty, and a recommendation.
|
|
16
|
-
5. If the result should become product work, recommend
|
|
16
|
+
5. If the result should become product work, recommend quick for bounded work or track for coordinated delivery; do not retroactively mutate Cadre state from the wisp.
|
|
17
17
|
|
|
18
18
|
Wisp bypasses delivery tracking, not safety, repository instructions, or read-before-edit discipline.
|
|
19
19
|
|
|
@@ -57,7 +57,7 @@ drafting-spec -> drafting-plan -> planned -> in_progress -> ready_for_review
|
|
|
57
57
|
+-------------+ +-- clean review --> completed --> archived
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
- Only `review` may mark a track `completed`; only `
|
|
60
|
+
- Only `review` may mark a track `completed`; only `refresh` may mark it `archived`.
|
|
61
61
|
- Completed or archived intent changes create successor work rather than rewriting terminal history.
|
|
62
62
|
- Track dependencies are read from track state and must be completed or archived before dependent execution.
|
|
63
63
|
- Every delivery phase ends in a derived `User Manual Verification` barrier. The final phase is the track-level manual-verification barrier.
|
|
@@ -73,7 +73,7 @@ drafting-spec -> drafting-plan -> planned -> in_progress -> ready_for_review
|
|
|
73
73
|
|
|
74
74
|
## Durable memory and context
|
|
75
75
|
|
|
76
|
-
- Active Pattern Seeds contain one versioned `cadre:memory` JSON block with spec/plan revisions and safe pattern paths plus SHA-256 hashes. Reassess changed guidance within track/revise/refresh
|
|
76
|
+
- Active Pattern Seeds contain one versioned `cadre:memory` JSON block with spec/plan revisions and safe pattern paths plus SHA-256 hashes. Reassess changed guidance within track/revise/refresh authorization; do not silently refresh hashes without reviewing applicability.
|
|
77
77
|
- Preserve completed and archived learning as historical evidence. Missing old handoffs mean not recorded; never manufacture them during migration.
|
|
78
78
|
- Record bounded decisions, failed approaches, open questions, next action, and source fingerprints alongside task commit/block checkpoints. These handoffs are evidence, never approval or duplicated scheduler state.
|
|
79
79
|
- Use `context_read` for a selected node and consume all pages. It returns full approved scope/plan, applicable project instructions, dependency learning, and persisted handoffs. Read code and repository instructions separately before edits. Reuse hashes only when their source content is still available in the current session.
|
|
@@ -93,7 +93,7 @@ drafting-spec -> drafting-plan -> planned -> in_progress -> ready_for_review
|
|
|
93
93
|
## Cohesive operations and retained context
|
|
94
94
|
|
|
95
95
|
- Schema-2 CommitRef values are existing SHAs or stable `op:<operationId>` references. A completed receipt binds approval digest, base and artifact hashes. Include its exact Cadre-Operation and Cadre-Receipt trailers in the agent-created commit. Resolve unique reachable committed evidence before dependent delivery. Never trust a trailer alone.
|
|
96
|
-
- Initialization and combined track planning each use one commit. Revise, refresh, clean review
|
|
96
|
+
- Initialization and combined track planning each use one commit. Revise, refresh (including archival), and clean review each use one approved-operation commit. Implementation uses one product commit per cohesive group plus one completion commit. Revert uses approved reversal commits plus one reconciliation commit. Status and standard Wisp make no commits.
|
|
97
97
|
- Keep execution journals durable on disk; no automatic execution-start, phase-record, final-verification-phase or clean-evidence-only commits. An explicit handoff/blocker checkpoint is allowed. Reconciliation removes only ignored recovery state and never creates a follow-up provenance commit.
|
|
98
98
|
- New plans may assign commit groups within a phase. Preserve every task's verification, authorization and handoff, execute internal dependencies in order, and approve all affected siblings before reverting a shared commit. Existing executions retain their original contract.
|
|
99
99
|
- Candidate apply validates approved Cadre manifests and promotes state/indexes together. It cannot edit arbitrary product files or execute Git. Existing 3.9.x projects with schema-2 state and template v5 continue without migration. Older project formats must be migrated with Cadre 3.9.0 before using 4.0; preserve historical evidence and approvals.
|
|
@@ -101,3 +101,24 @@ drafting-spec -> drafting-plan -> planned -> in_progress -> ready_for_review
|
|
|
101
101
|
- Use 48 KiB context pages and retainedContextToken after complete retrieval; clear it after context loss. Source-section hashes permit reuse while source freshness remains independently checked. Mutations return scheduler/validation for reuse.
|
|
102
102
|
- Use composite record_verification without a separate start. Complete a direct-main phase against verified HEAD in one checkpoint. Integration may fast-forward and may retain only validated owned execution state. Build outputs use the owned ignored `.cadre/.build-cache/cadre/` subtree. Other untracked files remain errors.
|
|
103
103
|
- Ordinary errors are limited to 8 KiB; request full diagnostic pages explicitly when needed.
|
|
104
|
+
|
|
105
|
+
## Quick changes
|
|
106
|
+
|
|
107
|
+
<!-- cadre:quick:v1 -->
|
|
108
|
+
|
|
109
|
+
Quick is a separate delivery path for one bounded, locally verifiable outcome. A clear request authorizes reversible product edits; agree on scope first when material choices or wider consequences emerge. The final reviewed diff, verification evidence, and completion record require one explicit approval. Track phase barriers apply to tracks, not quick changes.
|
|
110
|
+
|
|
111
|
+
Before edits, use candidate_apply begin_quick to retain the Git baseline and pre-existing edits in ignored staging. Read relevant project instructions, guidance, quick outcomes, and affected active-track scope. Do not run quick alongside active Cadre workers. Conflicting work, migrations, coordinated delivery, or changes to approved track requirements go through track or revise; preserve unfinished work when escalating.
|
|
112
|
+
|
|
113
|
+
Quick records await consolidation at quick/<id>.json and remain immutable. They are historical evidence, never requirements or dependency authority. Status derives completion from the verified receipt commit; unfinished candidates remain under stage/. Final approval binds the product diff, context, and verification inputs. The agent creates one local commit containing product changes, the record, and its receipt; MCP verifies evidence without editing product files or executing commits. Do not include unrelated edits or push automatically.
|
|
114
|
+
|
|
115
|
+
Default project and track context excludes quick history. Focused quickSearch returns at most 10 summaries; load only relevant quickIds and never automatically exhaust search pages.
|
|
116
|
+
|
|
117
|
+
Refresh assesses at most 20 unconsolidated quick outcomes per approved batch, records exact source hashes and dispositions, and merges useful findings into existing guidance or patterns without accumulating duplicate summaries. Under the same approval, move assessed records unchanged to archive/.quick/<id>.json; no-change assessments require reasons. Preserve delivery receipts and original contents. Reassess affected active-track memory when guidance changes. Archived records remain searchable but are omitted from routine context and status rows. The hidden archive directory does not reserve the track name quick. Corrections use new linked records and additive changes. Existing v5/v6 projects keep their current workflows; quick requires an approved refresh adopting this contract and current template metadata.
|
|
118
|
+
|
|
119
|
+
## Refresh and completed-track archival
|
|
120
|
+
|
|
121
|
+
<!-- cadre:refresh-archival:v1 -->
|
|
122
|
+
Refresh owns project maintenance and completed-track archival in one digest-bound approval, receipt, and commit. By default select all eligible completed tracks in dependency order; explicit selectedTracks limits the batch and [] excludes track archival. Freeze selection at preparation. Require clean approved review, valid project state, reconciled operations, and quiescent workers. Assess track learning, repository changes, patterns and up to 20 quick outcomes together; no-change assessments are valid and must explain why. Reassess affected active-track seeds and dependency context and derive source-path relocation within the same approval. Preserve archived history byte-for-byte except status, checkpoint and appended archival provenance bound to the refresh receipt. Never manually stage archive destinations. A blocked-review retry remains focused and cannot archive tracks or consolidate quick outcomes.
|
|
123
|
+
|
|
124
|
+
Existing supported projects adopt this contract through an approved workflow diff in Refresh, preserving custom policy. Version labels alone do not authorize archival. Historical archive receipts remain readable; recover already-approved archive journals with candidate_apply resume/reconcile. Unapplied archive proposals must be prepared again through Refresh.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Refresh {{REFRESH_TS}}
|
|
2
|
+
|
|
3
|
+
- Status: proposed
|
|
4
|
+
- Previous refresh/setup commit: `{{BASE_COMMIT}}`
|
|
5
|
+
- Refresh commit: pending
|
|
6
|
+
|
|
7
|
+
## Inputs and evidence
|
|
8
|
+
|
|
9
|
+
{{INPUTS_AND_COMMIT_RANGE}}
|
|
10
|
+
|
|
11
|
+
## Proposed context changes
|
|
12
|
+
|
|
13
|
+
{{PROPOSED_CHANGES}}
|
|
14
|
+
|
|
15
|
+
## Completed tracks and consolidated learning
|
|
16
|
+
|
|
17
|
+
{{SELECTED_TRACKS_AND_ARCHIVE_MOVES}}
|
|
18
|
+
|
|
19
|
+
{{LEARNING_ASSESSMENT_AND_PATTERN_CHANGES}}
|
|
20
|
+
|
|
21
|
+
Record the resolved track selection, evidence and contributing commits, pattern consolidation, and any no-change assessment with its reason. Review derived archive state changes and moves together with context updates. Explicitly record exclusions. Preserve completed history and include active dependency-path relocation and seed reassessment in this same approval.
|
|
22
|
+
|
|
23
|
+
## Active-track impact
|
|
24
|
+
|
|
25
|
+
{{TRACK_IMPACT}}
|
|
26
|
+
|
|
27
|
+
## Approval
|
|
28
|
+
|
|
29
|
+
{{APPROVAL_RECORD}}
|
|
30
|
+
|
|
31
|
+
## Quick outcomes assessed
|
|
32
|
+
|
|
33
|
+
Assess at most 20 quick outcomes in this batch. Record each quickId, sha256, disposition (incorporated or no-change), and reason. Merge durable findings into existing guidance or patterns without duplicate summaries, and reassess affected active-track memory. This approval includes runtime-derived byte-identical moves to archive/.quick/<id>.json. Preserve historical record contents and delivery receipts; leave unassessed sources in quick/.
|
|
34
|
+
|
|
35
|
+
<!-- cadre:quick-sources:start -->
|
|
36
|
+
[]
|
|
37
|
+
<!-- cadre:quick-sources:end -->
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"quickId": "{{QUICK_ID}}",
|
|
4
|
+
"title": "{{TITLE}}",
|
|
5
|
+
"intent": "{{EXACT_CHECKPOINT_INTENT}}",
|
|
6
|
+
"outcome": "{{OUTCOME}}",
|
|
7
|
+
"acceptance": ["{{ACCEPTANCE}}"],
|
|
8
|
+
"affectedPaths": ["{{PRODUCT_PATH}}"],
|
|
9
|
+
"verification": [{"check": "{{CHECK}}", "result": "passed", "evidence": "{{ACTUAL_RESULT}}"}],
|
|
10
|
+
"reviewed": true,
|
|
11
|
+
"context": [],
|
|
12
|
+
"lessons": [],
|
|
13
|
+
"relatedQuickIds": [],
|
|
14
|
+
"operation": null
|
|
15
|
+
}
|