cadre-ai 3.8.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +53 -0
- package/README.md +2 -1
- package/agents/cadre-phase-worker.md +5 -1
- package/agents/cadre-task-worker.md +4 -0
- package/dist/cadre-cli.mjs +5 -2
- package/dist/cadre-mcp.mjs +1910 -1104
- package/package.json +1 -1
- package/skills/archive/SKILL.md +18 -4
- package/skills/create/SKILL.md +15 -3
- package/skills/implement/SKILL.md +18 -4
- package/skills/implement/references/parallel-workers.md +4 -0
- package/skills/implement/references/resume-recovery.md +4 -0
- package/skills/refresh/SKILL.md +17 -5
- package/skills/revert/SKILL.md +20 -2
- package/skills/review/SKILL.md +15 -3
- package/skills/revise/SKILL.md +18 -5
- package/skills/status/SKILL.md +4 -0
- package/skills/track/SKILL.md +19 -9
- package/skills/wisp/SKILL.md +4 -0
- package/templates/v5/init/archive/.gitkeep +1 -0
- package/templates/v5/init/gitignore.template +9 -0
- package/templates/v5/init/guidelines.md +25 -0
- package/templates/v5/init/operations/.gitkeep +1 -0
- package/templates/v5/init/patterns/index.md +8 -0
- package/templates/v5/init/product.md +30 -0
- package/templates/v5/init/project.json +27 -0
- package/templates/v5/init/refreshes/.gitkeep +1 -0
- package/templates/v5/init/styleguides/general.md +14 -0
- package/templates/v5/init/styleguides/language.md +21 -0
- package/templates/v5/init/tech-stack.md +21 -0
- package/templates/v5/init/tracks/.gitkeep +1 -0
- package/templates/v5/init/tracks.md +6 -0
- package/templates/v5/init/wisps/.gitkeep +1 -0
- package/templates/v5/init/workflow.md +103 -0
- package/templates/v5/project/archive-operation.json +19 -0
- package/templates/v5/project/pattern.md +20 -0
- package/templates/v5/project/refresh-operation.json +18 -0
- package/templates/v5/project/refresh.md +21 -0
- package/templates/v5/styleguides/dart.md +27 -0
- package/templates/v5/styleguides/flutter.md +27 -0
- package/templates/v5/styleguides/go.md +29 -0
- package/templates/v5/styleguides/gradle.md +28 -0
- package/templates/v5/styleguides/html-css.md +39 -0
- package/templates/v5/styleguides/index.md +27 -0
- package/templates/v5/styleguides/java.md +27 -0
- package/templates/v5/styleguides/javascript.md +27 -0
- package/templates/v5/styleguides/kotlin.md +26 -0
- package/templates/v5/styleguides/maven.md +28 -0
- package/templates/v5/styleguides/python.md +27 -0
- package/templates/v5/styleguides/react.md +28 -0
- package/templates/v5/styleguides/swift.md +27 -0
- package/templates/v5/styleguides/swiftui.md +27 -0
- package/templates/v5/styleguides/typescript.md +26 -0
- package/templates/v5/track/bug.md +14 -0
- package/templates/v5/track/dependency-context.json +9 -0
- package/templates/v5/track/execution.json +21 -0
- package/templates/v5/track/learning.md +45 -0
- package/templates/v5/track/plan.md +42 -0
- package/templates/v5/track/revert-operation.json +17 -0
- package/templates/v5/track/revise-operation.json +18 -0
- package/templates/v5/track/revision.md +36 -0
- package/templates/v5/track/spec.md +38 -0
- package/templates/v5/track/state.json +19 -0
package/package.json
CHANGED
package/skills/archive/SKILL.md
CHANGED
|
@@ -5,13 +5,27 @@ description: Archive one or more completed Cadre tracks in one approved, resumab
|
|
|
5
5
|
|
|
6
6
|
# Cadre Archive
|
|
7
7
|
|
|
8
|
+
## Cohesive commits and retained context
|
|
9
|
+
|
|
10
|
+
For v5/schema-2 state, each approved operation produces one immutable receipt under `.cadre/receipts/` and a temporary recovery journal under `.cadre/stage/operations/`. Apply returns `receipt` (or the receipt fields directly): `operationId`, `receiptHash`, `trailers`, and `status: commit_pending`. Include the promoted files and receipt in one agent-created Git commit with both exact returned trailers. Commit execution stays with the agent. Use `candidate_apply` with `request: {mode: "reconcile", projectRoot, operationId}` after committing; reconciliation verifies a unique reachable commit and committed artifacts and changes temporary state only. Never add a follow-up record-SHA commit. An operation reference is `op:<operationId>`, not a Git revision to pass directly to shell Git. Resolve it through receipt reconciliation before Git range commands.
|
|
11
|
+
|
|
12
|
+
Before any dependent delivery, resolve `commit_pending`. On interruption, inspect the persisted recovery journal and original approval; use `candidate_apply` with `request: {mode: "resume", projectRoot, operationId, approvalDigest}` to finish the already-approved promotion. Reconcile an existing commit before creating another. Any drift or ambiguous/forged receipt blocks continuation. Never replace an approved recovery journal or fabricate its approval.
|
|
13
|
+
|
|
14
|
+
Use the scheduler and validation in mutation results. Do not immediately request the same status again. For `context_read`, retain `retainedContextToken` only after a complete successful read. Pass it on later reads only while that text remains in context, with the same token across continuation pages. Clear it after compaction, context loss, expiration, or a fresh task. Keep `knownSources` only for compatibility. Default pages are 48 KiB, maximum 64 KiB. Section identity/content hashes allow reuse despite unrelated file changes; source freshness is checked independently. Required project instructions, full current spec/plan, applicable constraints, and repository instructions remain authoritative. Consume every page and require `contextReady`. An explicit full-source dependency fallback must be read completely and reassessed; do not silently omit guidance.
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
Legacy SHA records and immutable v1–v4 templates remain evidence. Migrate through one approved refresh at a quiescent boundary before creating a v5 execution. Retain each existing execution's original contract and preserve approvals, completed nodes, findings, journals, and archived learning. The v5 commit instructions here replace legacy follow-up provenance commits described below.
|
|
19
|
+
|
|
8
20
|
Archive one or more `completed` tracks in a single batch. Read `.cadre/workflow.md`, every artifact and recorded commit for every selected track, the complete pattern catalog, active-track status summaries, and relevant implementation files. Use catalog applicability, provenance, and supersession summaries to identify affected patterns and active tracks, then read their full pattern/spec/plan/seed artifacts before proposing changes. If metadata is missing, incomplete, or ambiguous, read the full catalog bodies and active specs/plans/seeds. Never exclude guidance by keyword alone.
|
|
9
21
|
|
|
10
22
|
At every required selection or approval boundary, show a concise batch 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 archive proposal digest. 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.
|
|
11
23
|
|
|
12
24
|
Call `project_status` first with `view: "project"` and use its embedded structured validation; do not repeat `state_validate` at command entry. Stop when `valid` is false or the Cadre MCP is unavailable; do not start or advance an archive batch.
|
|
13
25
|
|
|
14
|
-
Build one bounded archive inventory after selection. Read every selected artifact exactly once, summarize execution journals structurally in one pass, and verify recorded commit reachability in one Git pass. Do not precede reads with line counts, rediscover the same paths, or restart full reads after truncation; continue from the first unread line. Reuse unchanged workflow/product/styleguide context already loaded in the same flow. Fetch known pattern templates directly with one `template_get_many` call and use descriptor tools when an ID must be resolved; do not discover MCP resources. The declared mutation surface is adaptive `archive_batch_candidate` followed by
|
|
26
|
+
Build one bounded archive inventory after selection. Read every selected artifact exactly once, summarize execution journals structurally in one pass, and verify recorded commit reachability in one Git pass. Do not precede reads with line counts, rediscover the same paths, or restart full reads after truncation; continue from the first unread line. Reuse unchanged workflow/product/styleguide context already loaded in the same flow. Fetch known pattern templates directly with one `template_get_many` call and use descriptor tools when an ID must be resolved; do not discover MCP resources. The declared mutation surface is adaptive `archive_batch_candidate` followed by receipt reconciliation for v5 (legacy batches retain `archive_batch_record`); do not inspect the installed runtime or tool catalog for alternatives.
|
|
27
|
+
|
|
28
|
+
The approved batch includes the generated index. With no pattern or seed updates, use `expectedFiles: []` and `updates: []`. Active dependency-context source paths are rebased under this same approval; changed inherited guidance requires a staged `active_dependency_context` descriptor and reassessment.
|
|
15
29
|
|
|
16
30
|
Expected human decision count is one for the complete batch. Ask again only when its selection, content, or consequences change.
|
|
17
31
|
|
|
@@ -22,8 +36,8 @@ Expected human decision count is one for the complete batch. Ask again only when
|
|
|
22
36
|
5. Keep catalog summaries and applicability/provenance/supersession information complete. Compute relevant Pattern Seed section changes in `learning.md` for every non-completed, non-archived track using the final proposed pattern set. Never seed by keyword alone; explain semantic relevance.
|
|
23
37
|
6. Call `candidate_stage_prepare` for `archive-<proposal-id>` with `expectedFiles` equal to every proposed pattern, pattern-index, and active-track seed path, then write exactly that set. Call `archive_batch_candidate` with `request: { mode: "prepare", projectRoot, candidateId, selectedTracks?, updates }`; `updates` contains the required body-free descriptors. Present the resulting proposal once.
|
|
24
38
|
7. After approval, call only `request: { mode: "apply", proposalToken }` on `archive_batch_candidate`; it re-reads staged files and rejects drift. Never make the two calls consecutively without the human decision between them. Commit all approved moves and derived changes together, keep the matching candidate stage through that checkpoint, and never stage it.
|
|
25
|
-
8.
|
|
26
|
-
9.
|
|
39
|
+
8. For v5, include the returned receipt and exact trailers in that one archive commit, then reconcile using `candidate_apply`. Do not call archive_batch_record or create a second archive commit. Legacy SHA batches finish their original archive_batch_record contract.
|
|
40
|
+
9. Reuse the apply validation. Verify the receipt, one archive commit, and clean worktree; do not reread all completed histories.
|
|
27
41
|
|
|
28
42
|
If interrupted, reuse the same approved apply token; the journal and approved hashes converge remaining moves/writes without another approval. Provenance recording is idempotent and never duplicates track/project history. Never redistill or start a second batch while one is active.
|
|
29
43
|
|
|
@@ -31,7 +45,7 @@ Do not delete learning, review cycles, revisions, bug reports, or commit provena
|
|
|
31
45
|
|
|
32
46
|
## Memory contract
|
|
33
47
|
|
|
34
|
-
Preserve phase history and existing handoffs. For active v3/v4 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
48
|
+
Preserve phase history and existing handoffs. For active v3/v4/v5 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
35
49
|
|
|
36
50
|
## Evidence quality and proposal identity
|
|
37
51
|
|
package/skills/create/SKILL.md
CHANGED
|
@@ -5,6 +5,18 @@ description: Initialize or resume Cadre in a greenfield or brownfield repository
|
|
|
5
5
|
|
|
6
6
|
# Cadre Create
|
|
7
7
|
|
|
8
|
+
## Cohesive commits and retained context
|
|
9
|
+
|
|
10
|
+
For v5/schema-2 state, each approved operation produces one immutable receipt under `.cadre/receipts/` and a temporary recovery journal under `.cadre/stage/operations/`. Apply returns `receipt` (or the receipt fields directly): `operationId`, `receiptHash`, `trailers`, and `status: commit_pending`. Include the promoted files and receipt in one agent-created Git commit with both exact returned trailers. Commit execution stays with the agent. Use `candidate_apply` with `request: {mode: "reconcile", projectRoot, operationId}` after committing; reconciliation verifies a unique reachable commit and committed artifacts and changes temporary state only. Never add a follow-up record-SHA commit. An operation reference is `op:<operationId>`, not a Git revision to pass directly to shell Git. Resolve it through receipt reconciliation before Git range commands.
|
|
11
|
+
|
|
12
|
+
Before any dependent delivery, resolve `commit_pending`. On interruption, inspect the persisted recovery journal and original approval; use `candidate_apply` with `request: {mode: "resume", projectRoot, operationId, approvalDigest}` to finish the already-approved promotion. Reconcile an existing commit before creating another. Any drift or ambiguous/forged receipt blocks continuation. Never replace an approved recovery journal or fabricate its approval.
|
|
13
|
+
|
|
14
|
+
Use the scheduler and validation in mutation results. Do not immediately request the same status again. For `context_read`, retain `retainedContextToken` only after a complete successful read. Pass it on later reads only while that text remains in context, with the same token across continuation pages. Clear it after compaction, context loss, expiration, or a fresh task. Keep `knownSources` only for compatibility. Default pages are 48 KiB, maximum 64 KiB. Section identity/content hashes allow reuse despite unrelated file changes; source freshness is checked independently. Required project instructions, full current spec/plan, applicable constraints, and repository instructions remain authoritative. Consume every page and require `contextReady`. An explicit full-source dependency fallback must be read completely and reassessed; do not silently omit guidance.
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
Legacy SHA records and immutable v1–v4 templates remain evidence. Migrate through one approved refresh at a quiescent boundary before creating a v5 execution. Retain each existing execution's original contract and preserve approvals, completed nodes, findings, journals, and archived learning. The v5 commit instructions here replace legacy follow-up provenance commits described below.
|
|
19
|
+
|
|
8
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.
|
|
9
21
|
|
|
10
22
|
At every required clarification or approval boundary, show a concise 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 current proposal digest. 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.
|
|
@@ -19,9 +31,9 @@ At every required clarification or approval boundary, show a concise summary or
|
|
|
19
31
|
6. Identify the proposed `workflow.md` by template ID, template-set version, content hash, and a concise summary of its material rules and consequences. Do not print the complete unchanged bundled workflow unless the human asks. If changes are requested, show a focused diff and summarize the resulting behavior; show the complete revised workflow only on request. Do not create a standalone workflow approval.
|
|
20
32
|
7. Call `styleguide_resolve` with the proposed technologies. Always include the general guide and resolve the applicable language, framework, markup, and build-tool guides as one set. Preserve evidenced brownfield conventions. Ask only when a material convention choice cannot be resolved from the request and repository; do not ask the human to accept each default guide or the final set separately.
|
|
21
33
|
8. Expected human decision count is one. Call `candidate_stage_prepare` for candidate `create` with `expectedFiles` equal to `product.md`, `guidelines.md`, `tech-stack.md`, and only requested `workflow.md` or `styleguides/*.md` overrides; this prunes removed files and enforces `/stage/`. Write them beneath `.cadre/stage/create` (for example `.cadre/stage/create/product.md`). Never write `.cadre/init/*` or canonical artifacts before apply, and do not pass artifact bodies through MCP. Call `project_init_candidate` with `request: { mode: "prepare", projectRoot, projectName, context, gitDisposition, baseCommit, approvedAt, stagedFiles, styleguideIds }`. After explicit confirmation, call only `request: { mode: "apply", proposalToken }`. Never make those two calls consecutively without the human decision, and do not add later approval prompts.
|
|
22
|
-
9. If Git disposition is `initialize`, run `git init` only at the approved root
|
|
23
|
-
10.
|
|
24
|
-
11.
|
|
34
|
+
9. If Git disposition is `initialize`, run `git init` only at the approved root and verify its top level. The approved recovery journal remains durable if initialization fails. Existing Git roots are never reinitialized.
|
|
35
|
+
10. For v5, apply has already written completed state using its stable operation reference. A pre-commit status may report only `commit_pending`; any other structural or artifact error blocks the commit. Commit `cadre(create): initialize project harness` once with the returned receipt trailers. Reconcile it and remove only the matching candidate stage. Do not call a separate Git-initialization checkpoint or make a provenance commit.
|
|
36
|
+
11. Legacy interrupted setup follows its original contract through `setup_record_git_initialized` and `setup_record_commit`; migrate with refresh afterward.
|
|
25
37
|
|
|
26
38
|
## Resume protocol
|
|
27
39
|
|
|
@@ -5,6 +5,18 @@ description: Execute or resume an approved Cadre plan as a dependency DAG, using
|
|
|
5
5
|
|
|
6
6
|
# Cadre Implement
|
|
7
7
|
|
|
8
|
+
## Cohesive commits and retained context
|
|
9
|
+
|
|
10
|
+
For v5/schema-2 state, each approved operation produces one immutable receipt under `.cadre/receipts/` and a temporary recovery journal under `.cadre/stage/operations/`. Apply returns `receipt` (or the receipt fields directly): `operationId`, `receiptHash`, `trailers`, and `status: commit_pending`. Include the promoted files and receipt in one agent-created Git commit with both exact returned trailers. Commit execution stays with the agent. Use `candidate_apply` with `request: {mode: "reconcile", projectRoot, operationId}` after committing; reconciliation verifies a unique reachable commit and committed artifacts and changes temporary state only. Never add a follow-up record-SHA commit. An operation reference is `op:<operationId>`, not a Git revision to pass directly to shell Git. Resolve it through receipt reconciliation before Git range commands.
|
|
11
|
+
|
|
12
|
+
Before any dependent delivery, resolve `commit_pending`. On interruption, inspect the persisted recovery journal and original approval; use `candidate_apply` with `request: {mode: "resume", projectRoot, operationId, approvalDigest}` to finish the already-approved promotion. Reconcile an existing commit before creating another. Any drift or ambiguous/forged receipt blocks continuation. Never replace an approved recovery journal or fabricate its approval.
|
|
13
|
+
|
|
14
|
+
Use the scheduler and validation in mutation results. Do not immediately request the same status again. For `context_read`, retain `retainedContextToken` only after a complete successful read. Pass it on later reads only while that text remains in context, with the same token across continuation pages. Clear it after compaction, context loss, expiration, or a fresh task. Keep `knownSources` only for compatibility. Default pages are 48 KiB, maximum 64 KiB. Section identity/content hashes allow reuse despite unrelated file changes; source freshness is checked independently. Required project instructions, full current spec/plan, applicable constraints, and repository instructions remain authoritative. Consume every page and require `contextReady`. An explicit full-source dependency fallback must be read completely and reassessed; do not silently omit guidance.
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
Legacy SHA records and immutable v1–v4 templates remain evidence. Migrate through one approved refresh at a quiescent boundary before creating a v5 execution. Retain each existing execution's original contract and preserve approvals, completed nodes, findings, journals, and archived learning. The v5 commit instructions here replace legacy follow-up provenance commits described below.
|
|
19
|
+
|
|
8
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.
|
|
9
21
|
|
|
10
22
|
At a clarification or manual-verification boundary, inspect host policy before `workflow_elicit`. Under approval policy `never`, including Codex Full Access, skip the form and ask the same short question once in chat. Otherwise use a concise form bound to execution ID, node ID, and verified commit. Treat only `approved` as approval. On `fallback_required`, or an immediate policy-driven `declined`, ask once in chat; policy rejection is not a human decline. Never request secrets or retry the form.
|
|
@@ -36,7 +48,7 @@ Use the scheduler returned by the preflight or latest mutation receipt. Plan ord
|
|
|
36
48
|
- Execute one ready task directly in main when delegation adds no value. Follow returned `eventGuidance`: `record_commit` requires commit, verification, and authorization; `record_verification` requires those same fields; `record_integration` requires commit and verification; `block` requires a blocker. A running-phase `complete` also requires commit, verification, and authorization.
|
|
37
49
|
- Delegate only independent or cohesive work. Read `references/parallel-workers.md` before doing so.
|
|
38
50
|
- Include a `handoff` with task `record_commit` and `block`: `decisions`, `failedApproaches`, `openQuestions`, `nextAction`, and `sources` containing repository-relative `path` and exact `sha256`. Keep its serialized JSON within 8 KiB; reference longer durable evidence instead of truncating it. Main records it with the existing checkpoint, without another call or approval. A handoff records observations and never authorizes work.
|
|
39
|
-
- Never checkpoint evidence before it exists. Each
|
|
51
|
+
- Never checkpoint evidence before it exists. Each approved commit group has one cohesive product commit; legacy executions retain distinct task commits. `record_commit` includes focused verification and authorization evidence.
|
|
40
52
|
- A `.cadre/**`-only bookkeeping commit does not invalidate product verification while product files, tests, inputs, and verification policy remain unchanged.
|
|
41
53
|
|
|
42
54
|
For a delegated node, the normal lifecycle is four MCP calls:
|
|
@@ -51,7 +63,7 @@ Do not add standalone `start`, `record_integration`, or `complete` calls around
|
|
|
51
63
|
## Verification, learning, and finish
|
|
52
64
|
|
|
53
65
|
- A phase barrier depends on all sibling tasks. Prepare evidence against the phase head. In `governed` and `phase`, present it once and record human approval; in `track` and `autonomous`, record persisted-mode authorization.
|
|
54
|
-
- After the barrier, integrate the phase
|
|
66
|
+
- After the barrier, integrate the phase and persist dependency-aware learning and task provenance on disk. Complete a direct-main phase in one `complete` checkpoint with verified product/integration HEAD. Do not create phase-record or final-verification commits. Start dependents only after cleanup/completion.
|
|
55
67
|
- The final `Track-level User Manual Verification` runs in main against fully integrated canonical HEAD and requires explicit human approval in Governed, Phase, and Track. Autonomous records actual verification and persisted-mode authorization, never a fabricated human approval; unavailable human-only checks block the loop.
|
|
56
68
|
- When every node is complete, learning/provenance is recorded, worktrees are gone, and final verification is authorized under the applicable mode, run full relevant checks and call `execution_finish`. It converges interrupted final writes using the persisted completion identity. Commit only its completed journal, plan markers, `ready_for_review` state, and `tracks.md` as `cadre(implement): complete <track-id>`; never let review absorb this bookkeeping.
|
|
57
69
|
|
|
@@ -71,6 +83,8 @@ Satisfy `prerequisite` before handoff: `implementation_bookkeeping_commit` means
|
|
|
71
83
|
|
|
72
84
|
## Direct-main checkpoint order
|
|
73
85
|
|
|
74
|
-
Start the ready phase
|
|
86
|
+
Start the ready phase once. For a commit group, follow `readyGroups` and execute internal dependencies in order, retaining verification, authorization and handoff for every task. Make one product commit for the cohesive change; then call `execution_checkpoint` with `event: "complete_group"`, the shared `commit`, and `tasks: [{nodeId, verification, authorization, handoff}, ...]` containing every member exactly once. The transition is atomic. Independent groups may use isolated worker worktrees; integrate their product commit before atomic completion.
|
|
87
|
+
|
|
88
|
+
For an ungrouped/legacy 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.
|
|
75
89
|
|
|
76
|
-
|
|
90
|
+
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.
|
|
@@ -9,3 +9,7 @@ Every worker prompt includes its absolute worktree, track/execution/node IDs, ap
|
|
|
9
9
|
Workers must not merge, rebase, reset, clean up, force Git operations, or switch to other plan work. A phase worker must stop at a clean handoff while task workers for that phase are active.
|
|
10
10
|
|
|
11
11
|
Supply workers a bounded context handoff with required source paths/hashes and exact relevant learning, not the parent's entire conversation. Workers must read required sources if they do not already have their current content. Their result includes the typed task handoff (`decisions`, `failedApproaches`, `openQuestions`, `nextAction`, `sources`) within 8 KiB; main persists it with the existing task checkpoint. Never silently trim required constraints to fit a prompt.
|
|
12
|
+
|
|
13
|
+
## Cohesive execution contract
|
|
14
|
+
|
|
15
|
+
For a new cohesive-v1 execution, main may assign a whole approved commit group. Execute its internal dependencies in order, verify every task, and return individual authorization, verification and handoff evidence with one shared product commit. Never split a group across workers or independently schedule a member before the group's external dependencies. Legacy executions keep their original task boundaries. Main owns atomic complete_group, Git integration, receipts and all Cadre state. Use only the owned build-cache path main supplies. Fast-forward integration is valid provenance; do not require a merge object.
|
|
@@ -12,3 +12,7 @@ Never reset, discard, reconstruct, force-delete, or silently restart. Use standa
|
|
|
12
12
|
Read the persisted handoff for the current node and declared dependencies through `context_read` or focused `execution_status`. Preserve decisions, failed approaches, open questions, and next action. Missing handoffs mean "not recorded"; never infer them as historical facts. Reconcile source fingerprints, plan identity, journal evidence, and Git before using a handoff. Changed sources require reinspection, and observations never replace authorization. Recovery reaches only the last persisted checkpoint; a crash before recording may leave work that still needs investigation.
|
|
13
13
|
|
|
14
14
|
For policy-v2 Autonomous, follow focused `project_status.nextStep` to the installed implement or review skill and resume its durable checkpoint. Legacy Autonomous requires an explicit Track-or-Autonomous migration through refresh before new work; preserve verification, findings, and execution history.
|
|
15
|
+
|
|
16
|
+
## Cohesive execution contract
|
|
17
|
+
|
|
18
|
+
For a new cohesive-v1 execution, main may assign a whole approved commit group. Execute its internal dependencies in order, verify every task, and return individual authorization, verification and handoff evidence with one shared product commit. Never split a group across workers or independently schedule a member before the group's external dependencies. Legacy executions keep their original task boundaries. Main owns atomic complete_group, Git integration, receipts and all Cadre state. Use only the owned build-cache path main supplies. Fast-forward integration is valid provenance; do not require a merge object.
|
package/skills/refresh/SKILL.md
CHANGED
|
@@ -5,6 +5,18 @@ description: Refresh Cadre product, guidelines, workflow, styleguides, and tech-
|
|
|
5
5
|
|
|
6
6
|
# Cadre Refresh
|
|
7
7
|
|
|
8
|
+
## Cohesive commits and retained context
|
|
9
|
+
|
|
10
|
+
For v5/schema-2 state, each approved operation produces one immutable receipt under `.cadre/receipts/` and a temporary recovery journal under `.cadre/stage/operations/`. Apply returns `receipt` (or the receipt fields directly): `operationId`, `receiptHash`, `trailers`, and `status: commit_pending`. Include the promoted files and receipt in one agent-created Git commit with both exact returned trailers. Commit execution stays with the agent. Use `candidate_apply` with `request: {mode: "reconcile", projectRoot, operationId}` after committing; reconciliation verifies a unique reachable commit and committed artifacts and changes temporary state only. Never add a follow-up record-SHA commit. An operation reference is `op:<operationId>`, not a Git revision to pass directly to shell Git. Resolve it through receipt reconciliation before Git range commands.
|
|
11
|
+
|
|
12
|
+
Before any dependent delivery, resolve `commit_pending`. On interruption, inspect the persisted recovery journal and original approval; use `candidate_apply` with `request: {mode: "resume", projectRoot, operationId, approvalDigest}` to finish the already-approved promotion. Reconcile an existing commit before creating another. Any drift or ambiguous/forged receipt blocks continuation. Never replace an approved recovery journal or fabricate its approval.
|
|
13
|
+
|
|
14
|
+
Use the scheduler and validation in mutation results. Do not immediately request the same status again. For `context_read`, retain `retainedContextToken` only after a complete successful read. Pass it on later reads only while that text remains in context, with the same token across continuation pages. Clear it after compaction, context loss, expiration, or a fresh task. Keep `knownSources` only for compatibility. Default pages are 48 KiB, maximum 64 KiB. Section identity/content hashes allow reuse despite unrelated file changes; source freshness is checked independently. Required project instructions, full current spec/plan, applicable constraints, and repository instructions remain authoritative. Consume every page and require `contextReady`. An explicit full-source dependency fallback must be read completely and reassessed; do not silently omit guidance.
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
Legacy SHA records and immutable v1–v4 templates remain evidence. Migrate through one approved refresh at a quiescent boundary before creating a v5 execution. Retain each existing execution's original contract and preserve approvals, completed nodes, findings, journals, and archived learning. The v5 commit instructions here replace legacy follow-up provenance commits described below.
|
|
19
|
+
|
|
8
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.
|
|
9
21
|
|
|
10
22
|
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.
|
|
@@ -15,17 +27,17 @@ Call `project_status` first with `view: "project"` and use its embedded structur
|
|
|
15
27
|
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.
|
|
16
28
|
3. Before changing execution-governing context, inspect all active implementation journals and workers. 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.
|
|
17
29
|
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.
|
|
18
|
-
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 legacy projects.
|
|
19
|
-
6.
|
|
20
|
-
7.
|
|
30
|
+
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 legacy projects. For legacy recovery only, 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.
|
|
31
|
+
6. For v5 or migration to v5, 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.
|
|
32
|
+
7. Use `candidate_apply` prepare with `workflow: "refresh"` and the full exact manifest instead of a separate inspection/promotion sequence. Present the targetRuntimeVersion and targetTemplateSetVersion, semantic diffs and migration 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 and stable provenance; no record-refresh commit is needed.
|
|
21
33
|
|
|
22
34
|
## Memory contract
|
|
23
35
|
|
|
24
|
-
Preserve phase history and existing handoffs. For active v3/v4 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
36
|
+
Preserve phase history and existing handoffs. For active v3/v4/v5 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
25
37
|
|
|
26
38
|
When `upgradeRequired` is true, delivery mutations remain blocked until the approved refresh records the status-provided runtime/template targets. Upgrade active seed metadata and workflow instructions in the same staged, digest-bound envelope; keep legacy terminal history unchanged and do not fabricate old handoffs. Reach a quiescent worker boundary first. Blocking a node, verifying cleanup of already integrated work, inspecting/staging candidates, and rendering the validated derived index remain available for recovery. Do not perform new implementation or integrations to bypass the upgrade. Publish target versions only after the approved context files have been promoted, then run full validation. On interruption, continue the existing refresh journal rather than requesting a second approval for unchanged consequences.
|
|
27
39
|
|
|
28
|
-
##
|
|
40
|
+
## Legacy SHA refresh bookkeeping contract (not the v5 path)
|
|
29
41
|
|
|
30
42
|
Stage `project.json` with the target versions but preserve its existing `lastRefresh` and history until the artifact commit exists. Do not stage a new `lastRefresh` with a null commit. The pending operation belongs in `operations/refresh-<id>.json`; `project_status` with full detail and the operations directory identify it during recovery. Promote version metadata last, record every promoted file including `project.json` in artifactProgress, and verify all approved hashes before committing.
|
|
31
43
|
|
package/skills/revert/SKILL.md
CHANGED
|
@@ -5,6 +5,18 @@ description: Prepare and execute a human-approved Git-aware revert of a Cadre ta
|
|
|
5
5
|
|
|
6
6
|
# Cadre Revert
|
|
7
7
|
|
|
8
|
+
## Cohesive commits and retained context
|
|
9
|
+
|
|
10
|
+
For v5/schema-2 state, each approved operation produces one immutable receipt under `.cadre/receipts/` and a temporary recovery journal under `.cadre/stage/operations/`. Apply returns `receipt` (or the receipt fields directly): `operationId`, `receiptHash`, `trailers`, and `status: commit_pending`. Include the promoted files and receipt in one agent-created Git commit with both exact returned trailers. Commit execution stays with the agent. Use `candidate_apply` with `request: {mode: "reconcile", projectRoot, operationId}` after committing; reconciliation verifies a unique reachable commit and committed artifacts and changes temporary state only. Never add a follow-up record-SHA commit. An operation reference is `op:<operationId>`, not a Git revision to pass directly to shell Git. Resolve it through receipt reconciliation before Git range commands.
|
|
11
|
+
|
|
12
|
+
Before any dependent delivery, resolve `commit_pending`. On interruption, inspect the persisted recovery journal and original approval; use `candidate_apply` with `request: {mode: "resume", projectRoot, operationId, approvalDigest}` to finish the already-approved promotion. Reconcile an existing commit before creating another. Any drift or ambiguous/forged receipt blocks continuation. Never replace an approved recovery journal or fabricate its approval.
|
|
13
|
+
|
|
14
|
+
Use the scheduler and validation in mutation results. Do not immediately request the same status again. For `context_read`, retain `retainedContextToken` only after a complete successful read. Pass it on later reads only while that text remains in context, with the same token across continuation pages. Clear it after compaction, context loss, expiration, or a fresh task. Keep `knownSources` only for compatibility. Default pages are 48 KiB, maximum 64 KiB. Section identity/content hashes allow reuse despite unrelated file changes; source freshness is checked independently. Required project instructions, full current spec/plan, applicable constraints, and repository instructions remain authoritative. Consume every page and require `contextReady`. An explicit full-source dependency fallback must be read completely and reassessed; do not silently omit guidance.
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
Legacy SHA records and immutable v1–v4 templates remain evidence. Migrate through one approved refresh at a quiescent boundary before creating a v5 execution. Retain each existing execution's original contract and preserve approvals, completed nodes, findings, journals, and archived learning. The v5 commit instructions here replace legacy follow-up provenance commits described below.
|
|
19
|
+
|
|
8
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.
|
|
9
21
|
|
|
10
22
|
At every required clarification or approval boundary, show a concise 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 revert 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.
|
|
@@ -23,9 +35,15 @@ Expected human decision count is one on the clean path. The exact revert proposa
|
|
|
23
35
|
|
|
24
36
|
If exact commit provenance is missing or commits mix unrelated work, stop with a precise manual recovery plan.
|
|
25
37
|
|
|
38
|
+
## v5 group reversal and reconciliation
|
|
39
|
+
|
|
40
|
+
A task sharing a product commit cannot be reverted alone. Enumerate every task using that SHA, present the whole group and downstream effects, and obtain explicit approval for all of it. Include a staged reversal record with `sharedCommit` and exact `affectedTaskIds`, reset every affected task as approved, and retain the exact original journal snapshot. Candidate validation rejects silent sibling reversal.
|
|
41
|
+
|
|
42
|
+
After the authorized additive Git reversal commits, use `candidate_apply` prepare/apply with `workflow: "revert"` for the approved reconciliation manifest. Include the actual reversal receipt, original journal snapshot, restored execution bindings, plan, learning and dependency context. This replaces direct promotion and steps 6–7's two-commit bookkeeping on v5. Make one reconciliation commit with the immutable operation receipt and exact trailers; reconcile it without filling a self-referential SHA or making a record-revert commit. Never repeat recorded reversal commits on recovery.
|
|
43
|
+
|
|
26
44
|
## Memory contract
|
|
27
45
|
|
|
28
|
-
Preserve phase history and existing handoffs. For active v3/v4 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
46
|
+
Preserve phase history and existing handoffs. For active v3/v4/v5 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
29
47
|
|
|
30
48
|
## Preparation safety and execution binding
|
|
31
49
|
|
|
@@ -37,7 +55,7 @@ Candidate paths never include a leading `.cadre/`: use `state.json`, `plan.md`,
|
|
|
37
55
|
|
|
38
56
|
Stage the final post-reconciliation state, retaining the original implement operation, rather than a temporary revert operation containing unknown approval fields. After approval, materialize the temporary revert journal from the template with the actual digest/time before Git mutation, retaining the execution binding in lastExecution. The final staged state restores implement ownership. Do not put unresolved approval placeholders or a self-referential digest into approved candidate bytes.
|
|
39
57
|
|
|
40
|
-
##
|
|
58
|
+
## Legacy SHA durable revert receipt
|
|
41
59
|
|
|
42
60
|
When resetting node evidence, stage the exact original execution journal as `reverts/revert-<id>-execution-before.json` before changing the proposed journal. Include it in the same inspected manifest and approval. This preserves original verification, authorization, commit pointers and handoffs; keeping only the old commit SHA is insufficient. Preserve all other nodes and derived dependencies. Set the proposed journal checkpoint to `reverted:<target-id>` so status does not claim the reset task remains completed.
|
|
43
61
|
|
package/skills/review/SKILL.md
CHANGED
|
@@ -5,6 +5,18 @@ description: Review a Cadre track that is ready for review, present evidence-bac
|
|
|
5
5
|
|
|
6
6
|
# Cadre Review
|
|
7
7
|
|
|
8
|
+
## Cohesive commits and retained context
|
|
9
|
+
|
|
10
|
+
For v5/schema-2 state, each approved operation produces one immutable receipt under `.cadre/receipts/` and a temporary recovery journal under `.cadre/stage/operations/`. Apply returns `receipt` (or the receipt fields directly): `operationId`, `receiptHash`, `trailers`, and `status: commit_pending`. Include the promoted files and receipt in one agent-created Git commit with both exact returned trailers. Commit execution stays with the agent. Use `candidate_apply` with `request: {mode: "reconcile", projectRoot, operationId}` after committing; reconciliation verifies a unique reachable commit and committed artifacts and changes temporary state only. Never add a follow-up record-SHA commit. An operation reference is `op:<operationId>`, not a Git revision to pass directly to shell Git. Resolve it through receipt reconciliation before Git range commands.
|
|
11
|
+
|
|
12
|
+
Before any dependent delivery, resolve `commit_pending`. On interruption, inspect the persisted recovery journal and original approval; use `candidate_apply` with `request: {mode: "resume", projectRoot, operationId, approvalDigest}` to finish the already-approved promotion. Reconcile an existing commit before creating another. Any drift or ambiguous/forged receipt blocks continuation. Never replace an approved recovery journal or fabricate its approval.
|
|
13
|
+
|
|
14
|
+
Use the scheduler and validation in mutation results. Do not immediately request the same status again. For `context_read`, retain `retainedContextToken` only after a complete successful read. Pass it on later reads only while that text remains in context, with the same token across continuation pages. Clear it after compaction, context loss, expiration, or a fresh task. Keep `knownSources` only for compatibility. Default pages are 48 KiB, maximum 64 KiB. Section identity/content hashes allow reuse despite unrelated file changes; source freshness is checked independently. Required project instructions, full current spec/plan, applicable constraints, and repository instructions remain authoritative. Consume every page and require `contextReady`. An explicit full-source dependency fallback must be read completely and reassessed; do not silently omit guidance.
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
Legacy SHA records and immutable v1–v4 templates remain evidence. Migrate through one approved refresh at a quiescent boundary before creating a v5 execution. Retain each existing execution's original contract and preserve approvals, completed nodes, findings, journals, and archived learning. The v5 commit instructions here replace legacy follow-up provenance commits described below.
|
|
19
|
+
|
|
8
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.
|
|
9
21
|
|
|
10
22
|
At every required clarification or approval boundary, show a concise finding/evidence summary and 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 current proposal digest or reviewed execution/HEAD. 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.
|
|
@@ -30,7 +42,7 @@ Expected human decision count is one per review cycle outside policy-v2 Autonomo
|
|
|
30
42
|
- Inspection validates that target status without changing canonical state. Keep the canonical track `ready_for_review` and its completed execution unchanged until human approval or the exact Autonomous remediation authorization is journaled. If a staged state is included, its status must agree with `targetStatus`; an active execution still requires reconciliation at a safe boundary.
|
|
31
43
|
- If the human changes the finding subset or remediation, rebuild and validate the exact proposal and request approval once for that changed proposal. Do not reuse approval for superseded content.
|
|
32
44
|
- If no findings exist, prepare the clean completion proposal in step 5 before presenting its exact transition for approval.
|
|
33
|
-
4. For approved changes,
|
|
45
|
+
4. For v5 approved changes, include the findings, proposed final state, appended plan, reassessed learning and dependency context in `candidate_apply` prepare with `workflow: "review"`. Preserve completed execution and finding evidence. Under valid Autonomous authority bind the exact candidate to that authority; other modes require the human decision. Apply only the unchanged approved token. Commit `cadre(review): request changes for <track-id>` once with receipt trailers and reconcile before the next execution. For legacy recovery, retain the original candidate_inspect planValidations and SHA journal contract.
|
|
34
46
|
5. For a clean review, call `review_complete` with `request: { mode: "prepare", projectRoot, trackId, approval, acceptedRisks? }`. The server derives the cumulative range for Autonomous and the completed execution range for other modes. Present its exact proposal and evidence, then ask once for explicit approval. After approval, call only `request: { mode: "apply", proposalToken }`. A retry converges a matching cycle/index without duplicating history. Commit `cadre(review): complete <track-id>`.
|
|
35
47
|
|
|
36
48
|
Repeat review → implement → review until a human approves a clean review. Autonomous continues the loop in this task without asking permission for in-scope remediation. Other approval modes retain their existing gates. Only this command may mark a track completed.
|
|
@@ -43,7 +55,7 @@ Satisfy `prerequisite` before handoff: `implementation_bookkeeping_commit` means
|
|
|
43
55
|
|
|
44
56
|
## Memory contract
|
|
45
57
|
|
|
46
|
-
Preserve phase history and existing handoffs. For active v3/v4 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
58
|
+
Preserve phase history and existing handoffs. For active v3/v4/v5 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
47
59
|
|
|
48
60
|
The legacy 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.
|
|
49
61
|
|
|
@@ -101,6 +113,6 @@ Checkpoints are `implementing`, `reviewing`, `remediating`, `awaiting_approval`,
|
|
|
101
113
|
|
|
102
114
|
## Clean result and approval
|
|
103
115
|
|
|
104
|
-
When no unresolved findings remain, persist checkpoint `awaiting_approval`, findings, and `reviewedExecutionId`/`reviewedHead`,
|
|
116
|
+
When no unresolved findings remain, persist checkpoint `awaiting_approval`, findings, and `reviewedExecutionId`/`reviewedHead`, and retain that evidence durably on disk without a clean-evidence-only commit. The track remains `ready_for_review`. Call `review_complete` prepare with review evidence, present verification results, remediation history, and its exact completion proposal, and ask once for explicit human approval. Apply only that unchanged token after approval; only the review runtime marks the loop and track completed. Autonomous does not use `acceptedRisks` to waive findings.
|
|
105
117
|
|
|
106
118
|
Resume `awaiting_approval` by checking the recorded execution/HEAD and product content, preparing a fresh token if needed, and requesting the still-missing final approval. A prior unresolved question is not approval. Changed product or verification inputs require renewed verification/review and a new clean checkpoint; ordinary Cadre bookkeeping alone does not. A request for changes returns to review under the existing scope; cancellation stops with state intact.
|
package/skills/revise/SKILL.md
CHANGED
|
@@ -5,6 +5,18 @@ description: Route a requested track change according to lifecycle state, revise
|
|
|
5
5
|
|
|
6
6
|
# Cadre Revise
|
|
7
7
|
|
|
8
|
+
## Cohesive commits and retained context
|
|
9
|
+
|
|
10
|
+
For v5/schema-2 state, each approved operation produces one immutable receipt under `.cadre/receipts/` and a temporary recovery journal under `.cadre/stage/operations/`. Apply returns `receipt` (or the receipt fields directly): `operationId`, `receiptHash`, `trailers`, and `status: commit_pending`. Include the promoted files and receipt in one agent-created Git commit with both exact returned trailers. Commit execution stays with the agent. Use `candidate_apply` with `request: {mode: "reconcile", projectRoot, operationId}` after committing; reconciliation verifies a unique reachable commit and committed artifacts and changes temporary state only. Never add a follow-up record-SHA commit. An operation reference is `op:<operationId>`, not a Git revision to pass directly to shell Git. Resolve it through receipt reconciliation before Git range commands.
|
|
11
|
+
|
|
12
|
+
Before any dependent delivery, resolve `commit_pending`. On interruption, inspect the persisted recovery journal and original approval; use `candidate_apply` with `request: {mode: "resume", projectRoot, operationId, approvalDigest}` to finish the already-approved promotion. Reconcile an existing commit before creating another. Any drift or ambiguous/forged receipt blocks continuation. Never replace an approved recovery journal or fabricate its approval.
|
|
13
|
+
|
|
14
|
+
Use the scheduler and validation in mutation results. Do not immediately request the same status again. For `context_read`, retain `retainedContextToken` only after a complete successful read. Pass it on later reads only while that text remains in context, with the same token across continuation pages. Clear it after compaction, context loss, expiration, or a fresh task. Keep `knownSources` only for compatibility. Default pages are 48 KiB, maximum 64 KiB. Section identity/content hashes allow reuse despite unrelated file changes; source freshness is checked independently. Required project instructions, full current spec/plan, applicable constraints, and repository instructions remain authoritative. Consume every page and require `contextReady`. An explicit full-source dependency fallback must be read completely and reassessed; do not silently omit guidance.
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
Legacy SHA records and immutable v1–v4 templates remain evidence. Migrate through one approved refresh at a quiescent boundary before creating a v5 execution. Retain each existing execution's original contract and preserve approvals, completed nodes, findings, journals, and archived learning. The v5 commit instructions here replace legacy follow-up provenance commits described below.
|
|
19
|
+
|
|
8
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.
|
|
9
21
|
|
|
10
22
|
At every required clarification or approval boundary, show a concise 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 revision 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.
|
|
@@ -22,6 +34,8 @@ Call `project_status` first with `view: "implementation"` and `trackId` for acti
|
|
|
22
34
|
|
|
23
35
|
## Semantic revision procedure
|
|
24
36
|
|
|
37
|
+
Apply the exact approved candidate and reconcile its receipt without another prompt. Changed scope or content requires renewed approval.
|
|
38
|
+
|
|
25
39
|
Expected human decision count is one when the requested change and partial-work disposition can be presented together. A separate preliminary decision is justified only when active work cannot be made safe or fully assessed without first choosing whether to complete, preserve, or revert it.
|
|
26
40
|
|
|
27
41
|
1. Reconcile `state.json.operation`, any execution journal, managed worktrees, workers, the working tree, and recent commits before drafting. Resume a matching `revise` operation from its first incomplete artifact. Observe a safe quiescent boundary before changing an active execution graph; do not stop workers, integrate work, or clean worktrees before the authorization envelope permits the exact disposition. Finish or reconcile any other recorded operation first; never replace it.
|
|
@@ -32,14 +46,13 @@ Expected human decision count is one when the requested change and partial-work
|
|
|
32
46
|
6. Increment revisions exactly once and restore derived manual-verification barriers. A changed plan uses a new execution ID. Do not pass plan Markdown through MCP, validate the stale canonical plan, or create a temporary project copy.
|
|
33
47
|
When appending work after completed track verification, preserve that historical phase's exact title, task IDs, checks, and commit markers and append a new final `Track-level User Manual Verification`. Historical verification depends only on its preceding phases. Candidate inspection uses the intended resulting status for a revision of `ready_for_review`; no pre-approval canonical status change is needed. A staged state must agree with its plan's `targetStatus`, and active execution bindings must still match the reconciled graph.
|
|
34
48
|
7. Call `candidate_inspect` once for every staged revision and cascading artifact. Supply one `planValidations` entry for every staged root or nested `plan.md`, using its exact candidate-relative path and intended resulting track status; omit the list only when the candidate contains no plans. Present every plan result, the target revision, manifest, partial-work disposition, dependent changes, lifecycle transitions, commits, and bookkeeping together, bound to its digest. Partial approval requires a fresh inspection.
|
|
35
|
-
8.
|
|
36
|
-
9.
|
|
37
|
-
10. Call `state_validate` and commit `cadre(revise): update <track-id>`. Reconcile interruption using the workflow journal rules. Record the commit in every revision entry, clear each completed operation, and use a follow-up `cadre(revise): record <track-id>` commit when bookkeeping cannot be part of the artifact commit. These unchanged deterministic consequences remain inside the revision authorization envelope.
|
|
49
|
+
8. Include proposed final states, reassessed dependency-context artifacts, and every cascading change in `candidate_apply` prepare with `workflow: "revise"`. This replaces direct promotion and the separate candidate inspection on the v5 path; `planValidations` remains the legacy inspection interface. Preserve original execution bindings and historical evidence.
|
|
50
|
+
9. Obtain one approval for its exact manifest/digest, then apply the proposal token. Commit `cadre(revise): update <track-id>` with the operation receipt trailers and reconcile. The runtime sets changed spec/plan references before commit and updates the index atomically. Do not write a follow-up record commit or fill the operation's SHA into tracked files.
|
|
38
51
|
|
|
39
52
|
## Memory contract
|
|
40
53
|
|
|
41
|
-
Preserve phase history and existing handoffs. For active v3/v4 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
54
|
+
Preserve phase history and existing handoffs. For active v3/v4/v5 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
42
55
|
|
|
43
56
|
## Revision provenance
|
|
44
57
|
|
|
45
|
-
Use `revisions/revision-<id>.md` (including the `revision-` prefix) and include the same path in the approved manifest and operation. Before clearing the revision operation, set `state.commits.spec` and `state.commits.plan` to the revision artifact commit for every spec/plan changed by that commit. Confirm the committed plan has the proposed revisions and graph; a reachable SHA alone is insufficient.
|
|
58
|
+
Use `revisions/revision-<id>.md` (including the `revision-` prefix) and include the same path in the approved manifest and operation. Before clearing the revision operation, set `state.commits.spec` and `state.commits.plan` to the revision artifact commit for every spec/plan changed by that commit. Confirm the committed plan has the proposed revisions and graph; a reachable SHA alone is insufficient. For v5, 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.
|
package/skills/status/SKILL.md
CHANGED
|
@@ -22,3 +22,7 @@ Present:
|
|
|
22
22
|
- staged proposal manifests, malformed stages, and canonical candidates awaiting safe cleanup.
|
|
23
23
|
|
|
24
24
|
Read any file before quoting or interpreting it. Do not mutate files, run commits, or silently normalize state.
|
|
25
|
+
|
|
26
|
+
## Bounded reporting
|
|
27
|
+
|
|
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.
|
package/skills/track/SKILL.md
CHANGED
|
@@ -5,6 +5,18 @@ description: Create or resume a Cadre feature or bug track, including a function
|
|
|
5
5
|
|
|
6
6
|
# Cadre Track
|
|
7
7
|
|
|
8
|
+
## Cohesive commits and retained context
|
|
9
|
+
|
|
10
|
+
For v5/schema-2 state, each approved operation produces one immutable receipt under `.cadre/receipts/` and a temporary recovery journal under `.cadre/stage/operations/`. Apply returns `receipt` (or the receipt fields directly): `operationId`, `receiptHash`, `trailers`, and `status: commit_pending`. Include the promoted files and receipt in one agent-created Git commit with both exact returned trailers. Commit execution stays with the agent. Use `candidate_apply` with `request: {mode: "reconcile", projectRoot, operationId}` after committing; reconciliation verifies a unique reachable commit and committed artifacts and changes temporary state only. Never add a follow-up record-SHA commit. An operation reference is `op:<operationId>`, not a Git revision to pass directly to shell Git. Resolve it through receipt reconciliation before Git range commands.
|
|
11
|
+
|
|
12
|
+
Before any dependent delivery, resolve `commit_pending`. On interruption, inspect the persisted recovery journal and original approval; use `candidate_apply` with `request: {mode: "resume", projectRoot, operationId, approvalDigest}` to finish the already-approved promotion. Reconcile an existing commit before creating another. Any drift or ambiguous/forged receipt blocks continuation. Never replace an approved recovery journal or fabricate its approval.
|
|
13
|
+
|
|
14
|
+
Use the scheduler and validation in mutation results. Do not immediately request the same status again. For `context_read`, retain `retainedContextToken` only after a complete successful read. Pass it on later reads only while that text remains in context, with the same token across continuation pages. Clear it after compaction, context loss, expiration, or a fresh task. Keep `knownSources` only for compatibility. Default pages are 48 KiB, maximum 64 KiB. Section identity/content hashes allow reuse despite unrelated file changes; source freshness is checked independently. Required project instructions, full current spec/plan, applicable constraints, and repository instructions remain authoritative. Consume every page and require `contextReady`. An explicit full-source dependency fallback must be read completely and reassessed; do not silently omit guidance.
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
Legacy SHA records and immutable v1–v4 templates remain evidence. Migrate through one approved refresh at a quiescent boundary before creating a v5 execution. Retain each existing execution's original contract and preserve approvals, completed nodes, findings, journals, and archived learning. The v5 commit instructions here replace legacy follow-up provenance commits described below.
|
|
19
|
+
|
|
8
20
|
Create only `feature` or `bug` tracks. Resume an existing drafting track instead of replacing it.
|
|
9
21
|
|
|
10
22
|
At every required clarification or approval boundary, show a concise 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 current proposal digest. 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.
|
|
@@ -19,21 +31,19 @@ Call `project_status` first with `view: "project"` for a new track or `view: "tr
|
|
|
19
31
|
|
|
20
32
|
1. Normalize a stable track ID. Look for its state at the status-derived active or archive location. If track state exists, reconcile its operation journal, working tree, and recent commits first. If only `track-<track-id>` candidate state exists, retain its exact files and resume the pre-approval proposal instead of treating it as a track or restarting it. Otherwise determine title, type, goal, scope, dependencies, risks, and unknowns with the human.
|
|
21
33
|
2. Apply the workflow clarification gate before drafting. Ask targeted questions whenever repository evidence and the request do not clearly establish a material choice such as feature versus bug, in/out of scope behavior, affected users/interfaces/data, compatibility or rollout expectations, acceptance measures, dependency tracks, or whether existing behavior must be preserved. Do not silently choose an interpretation.
|
|
22
|
-
3. Call `template_get_many` once for `track/spec`, `track/state`, `track/plan`, and `track/
|
|
34
|
+
3. Call `template_get_many` once for `track/spec`, `track/state`, `track/plan`, `track/learning`, and `track/dependency-context`. Call `candidate_stage_prepare` for `track-<track-id>` with exact `expectedFiles: ["spec.md", "plan.md", "learning.md", "state.json", "dependency-context.json"]`, then write those files beneath the returned stage.
|
|
23
35
|
4. Draft an acyclic phase/task graph from that proposed specification. Every regular phase explicitly declares phase dependencies and every regular task explicitly declares same-phase task dependencies. Do not repeat derived barriers: each phase's final `User Manual Verification` depends on every sibling task, while the final `Track-level User Manual Verification` phase contains only its manual task and depends on every preceding phase. Include tests, formatting, documentation, and Definition of Done work explicitly. Do not pass plan Markdown through MCP, write it into canonical `.cadre/`, or create a temporary project copy for validation.
|
|
24
36
|
5. Build the marked `Pattern Seed` section at the top of `learning.md` from patterns relevant to the proposed spec and plan. Root phases read the seed; other phases read learning from their declared dependency phases. Cite pattern file paths and explain relevance. Do not invent patterns.
|
|
25
|
-
6.
|
|
26
|
-
7.
|
|
37
|
+
6. Draft final `state.json` alongside spec, plan and learning. Assign closely related tasks within one phase a ` - Commit group: <slug>`; preserve each task's dependency, verification and handoff requirements. Group dependencies must be acyclic after collapsing internal edges; independent groups may run in parallel.
|
|
38
|
+
7. Author `dependency-context.json` from every transitive dependency's spec and learning. Record spec/plan revisions, direct dependency IDs, the dependency-graph fingerprint, exact source SHA-256s, and stable constraint IDs with source-linked text. Every source needs an explicit applicability assessment, including no applicable constraints when justified. This curated context is part of the same human approval; never silently summarize away uncertain requirements. An empty dependency set uses the supplied template.
|
|
39
|
+
8. Call `candidate_apply` with `request: {mode: "prepare", projectRoot, candidateId: "track-<track-id>", workflow: "track", files: ["spec.md", "plan.md", "learning.md", "state.json", "dependency-context.json"]}`. It validates graphs, state and memory and generates the final state/index. Present the complete proposed content, manifest, commit groups, dependency coverage, and one combined commit. After approval, call `request: {mode: "apply", proposalToken}`. Commit `cadre(track): plan <track-id>` once with receipt trailers, then reconcile. No direct canonical promotion, separate specification commit, index call, or record-plan commit is needed.
|
|
27
40
|
|
|
28
|
-
For
|
|
41
|
+
For legacy candidates, `candidate_inspect` with exact `planValidations` remains available for diagnostics and the original recovery contract. New tracks use the combined v5 operation.
|
|
29
42
|
|
|
30
|
-
|
|
31
|
-
- Journal plus clean tree and matching expected HEAD: record that commit; do not repeat it.
|
|
32
|
-
- Recorded SHA plus dirty bookkeeping: finish the state-record commit.
|
|
33
|
-
- Any mismatch: present it and stop rather than regenerating approved spec, plan, or learning.
|
|
43
|
+
Expected human decision count is one for a clear new track; do not create a specification-only approval prompt.
|
|
34
44
|
|
|
35
45
|
The plan is the execution source of truth. Dependency changes or a modified approved spec require the Cadre revise workflow.
|
|
36
46
|
|
|
37
47
|
## Memory contract
|
|
38
48
|
|
|
39
|
-
Preserve phase history and existing handoffs. For active v3/v4 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
|
49
|
+
Preserve phase history and existing handoffs. For active v3/v4/v5 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. Archive apply performs this check in the runtime. Completed and archived learning remains historical evidence, not a claim that old hashes describe current patterns.
|
package/skills/wisp/SKILL.md
CHANGED
|
@@ -16,3 +16,7 @@ When the exploration needs a material clarification and the Cadre MCP is availab
|
|
|
16
16
|
5. If the result should become product work, recommend the Cadre track workflow; 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
|
+
|
|
20
|
+
## Bounded reporting
|
|
21
|
+
|
|
22
|
+
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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|