cadre-ai 3.0.2 → 3.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.
@@ -12,9 +12,17 @@ Before editing an existing file, read the current file and its directly relevant
12
12
 
13
13
  ### Human governance
14
14
 
15
- Treat every artifact and state transition as a proposal until the human reviews and explicitly approves it. Present exact content or a focused diff, consequences, unknowns, and verification evidence. Approval for one artifact or transition does not imply approval for later ones. Persist an approved checkpoint before pausing a multi-stage flow so another session can resume it.
15
+ Treat semantic content, scope, and consequences as proposals until the human reviews and explicitly approves them. One approval creates an authorization envelope over the complete exact proposal and all unchanged deterministic consequences named in it, including operation journals, generated indexes, validation, commits, lifecycle transitions, and provenance recording. Those mechanics do not become separate human decisions. Persist the authorization and checkpoint before pausing a multi-stage flow so another session can resume it.
16
16
 
17
- Combine related decisions into one approval when their complete exact artifacts, state transitions, consequences, and verification are available together. In particular, do not split finding disposition from an already-prepared remediation proposal, reject-all risk acceptance from clean-review completion, or a uniquely determined archive selection from its full batch proposal. A combined response must unambiguously approve every included consequence. Any changed content, selection, digest, or newly discovered consequence requires a corrected proposal and new approval.
17
+ Present exact content or focused diffs, consequences, unknowns, and verification evidence once at the decision boundary. Combine related decisions whenever their complete artifacts and consequences are available together. In particular, do not split create configuration from initialization, a clear track specification from its validated plan, finding disposition from prepared remediation, project refresh from its exact cascading track changes, revert intent from deterministic reconciliation, reject-all risk acceptance from clean-review completion, or a uniquely determined archive selection from its full batch proposal. A response must unambiguously approve every included semantic consequence. Require a corrected proposal and new approval only when content, scope, selection, digest-bound semantics, verification exceptions, or newly discovered consequences materially change.
18
+
19
+ An `implement` invocation authorizes execution using its persisted `approvalMode`: `governed`, `phase`, or `autonomous`. This is scoped authorization for work already bounded by the approved specification and plan, not permission to guess through material ambiguity, expand scope, waive required checks, perform destructive or remote actions, or conceal conflicts and exceptions. `phase` is the default unless the human explicitly requests another approval mode. Starting a `phase` or `autonomous` execution from that invocation does not require a separate approval prompt.
20
+
21
+ ### Human interaction forms
22
+
23
+ For a required clarification or human decision, first show only the concise context, focused diff, consequences, and evidence needed to decide. Inspect the active host policy before calling the read-only `workflow_elicit` MCP tool. 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` so Codex and Claude can render the same client-native form. Use `clarification` with at most three flat questions. Use `approval` only after the exact proposal or verification evidence is ready, and bind it to the current preview digest or an immutable checkpoint containing the relevant track, execution/node, and commit. An `approved` result is explicit human approval of that binding; `changes_requested`, `declined`, and `cancelled` are not approval.
24
+
25
+ If the client does not advertise form elicitation or rejects the request with `fallback_required`, ask the same short question once in chat and do not retry the form. If `workflow_elicit` was mistakenly called while the task explicitly reports policy `never` and immediately returns `declined`, treat that response as policy rejection and use the same chat fallback; do not report it as a human decline. Never use form elicitation for passwords, API keys, access tokens, payment credentials, or other secrets. Do not print a complete unchanged workflow or other large default artifact merely to create context for a form; identify it by path/version/hash and summarize it unless the human asks for the full content.
18
26
 
19
27
  ### Clarification gate
20
28
 
@@ -24,15 +32,15 @@ Inspect available files, history, state, and approved artifacts before asking. I
24
32
 
25
33
  `track`, `revise`, and `refresh` must apply this gate before drafting and again whenever later analysis reveals a new material ambiguity.
26
34
 
27
- ### Create-time workflow and styleguide acceptance
35
+ ### Create-time configuration envelope
28
36
 
29
- During `create`, present this default workflow as its own approval item and ask whether it is acceptable or should be changed. Do not infer workflow acceptance from approval of product, stack, or other setup artifacts. Apply requested changes, present the revised workflow, and obtain explicit acceptance before writing it.
37
+ During `create`, identify the default workflow by template ID, version, hash, and a concise summary. Include it with product context, Git disposition, styleguides, generated state, and initialization consequences in one final approval envelope. Do not create separate workflow, styleguide-selection, manifest, Git-initialization, validation, or commit approvals. Ask before the final proposal only when a material workflow or convention choice is unresolved; a clarification answer is input to the final proposal, not an additional approval stage.
30
38
 
31
- Always propose `styleguides/general.md`. Match the approved tech stack against the bundled default catalog, then propose the applicable language, framework, and build-tool guides. For each guide, let the human choose the bundled default, an amended default, or a user-provided replacement. Framework/tool guides supplement their language guide: HTML/CSS underpins browser UI; TypeScript supplements JavaScript; React for the web supplements HTML/CSS plus JavaScript or TypeScript; Flutter supplements Dart; SwiftUI supplements Swift; Maven or Gradle supplements Java/Kotlin. Copy only the approved set. In brownfield projects, existing enforced conventions take precedence unless the human explicitly approves replacing them.
39
+ Always propose `styleguides/general.md`. Match the proposed tech stack against the bundled default catalog, then propose the applicable language, framework, and build-tool guides as one set. Let the human request an amended default or a user-provided replacement without asking them to accept every guide separately. Framework/tool guides supplement their language guide: HTML/CSS underpins browser UI; TypeScript supplements JavaScript; React for the web supplements HTML/CSS plus JavaScript or TypeScript; Flutter supplements Dart; SwiftUI supplements Swift; Maven or Gradle supplements Java/Kotlin. In brownfield projects, existing enforced conventions take precedence unless the final envelope explicitly replaces them.
32
40
 
33
41
  ### Interruption-safe operations
34
42
 
35
- At command entry, call `project_status` once and use its embedded structured validation. Reserve a separate `state_validate` call for final mutation gates or focused diagnostics; do not perform redundant full-project validation scans. Derived-state warnings such as a stale generated `tracks.md` are resumable drift, not canonical corruption. Present and repair them through the approved MCP render gate before a final commit.
43
+ At command entry, call `project_status` once and use its embedded structured validation. Reserve a separate `state_validate` call for final mutation gates or focused diagnostics; do not perform redundant full-project validation scans. Derived-state warnings such as a stale generated `tracks.md` are resumable drift, not canonical corruption. Report and repair them through the MCP render gate within the owning authorization envelope before a final commit.
36
44
 
37
45
  Within one command flow, inventory required context once and reuse content whose Git path/hash is unchanged. Continue truncated reads from the first unread line instead of restarting them. Do not run line-count or repeated path-discovery passes before known reads. Consecutive reviews reread the current lifecycle artifacts and changed implementation range while reusing unchanged project guidance. Archive reads selected evidence and provenance in one bounded pass. Fetch known immutable template IDs directly with `template_get_many`; do not call the catalog merely to rediscover them.
38
46
 
@@ -45,13 +53,13 @@ On every command entry, reconcile an existing journal before starting new work:
45
53
  3. If the artifact SHA is recorded and only the approved state bookkeeping is dirty, finish its `cadre(...): record ...` commit.
46
54
  4. If files, journal, approval record, Git status, or HEAD disagree, stop and present the mismatch. Never reset, discard, reconstruct from guesses, or restart the flow.
47
55
 
48
- Advance the checkpoint after each durable artifact write. Once the artifact commit is identified, append it to history, clear the operation, advance the lifecycle checkpoint, and commit the state record. This protocol makes interruption before a commit, after a commit, or before its follow-up state commit resumable.
56
+ Advance the checkpoint after each durable artifact write. Once an artifact commit is identified, append it to history and advance the lifecycle checkpoint. Preserve or transition the same operation journal while later stages remain inside one authorization envelope, as with combined track specification and planning; clear it only after every authorized stage and provenance record is complete. This protocol makes interruption before a commit, between commits, after a commit, or before follow-up bookkeeping resumable.
49
57
 
50
58
  During `create`, detect an existing worktree with `git rev-parse --show-toplevel` and never initialize a nested repository. If no worktree exists, record the approved project root and `initialize` disposition through the MCP initialization preview/apply gate before running `git init` there. Verify the resulting root and record that checkpoint before the setup commit. Resume a pending initialization from the journal; stop if the observed repository conflicts with the recorded disposition or root.
51
59
 
52
- For deterministic MCP mutations, call the read-only preview immediately before apply, show the exact proposal to the human, and pass its digest unchanged. A changed digest requires a new proposal and approval. The MCP never grants approval or replaces required repository inspection. Its Git surface is limited to constrained, digest-gated Cadre worktree creation, integration, and safe cleanup; it accepts no arbitrary command, path, force deletion, or automatic conflict resolution.
60
+ For deterministic MCP mutations, call the read-only preview immediately before apply and pass its digest unchanged. Show the exact proposal to the human whenever the owning workflow and persisted approval mode require a human decision. In `phase` or `autonomous` implementation, execution start plus deterministic worktree, clean integration, cleanup, journal, index, and bookkeeping mutations already covered by the implementation invocation do not create new approval prompts. A changed digest that changes content or consequences requires a corrected proposal at the next applicable approval barrier; a stale digest caused only by an internal ordering error must be refreshed before presentation rather than forcing duplicate approval. The MCP never grants approval or replaces required repository inspection. Its Git surface is limited to constrained, digest-gated Cadre worktree creation, integration, and safe cleanup; it accepts no arbitrary command, path, force deletion, or automatic conflict resolution.
53
61
 
54
- Resuming an already-approved operation is the narrow exception to another human approval: the operation journal must contain the same approval/content digest and the newly previewed final artifacts must be identical to the approved proposal, with only recorded checkpoint progress changed. Any content, selection, consequence, or approval-digest mismatch requires a corrected proposal and new approval.
62
+ Resuming a recorded authorization envelope never requires another human approval when the operation journal has the same approval/content digest and the newly previewed artifacts are identical to the approved proposal, with only checkpoint progress changed. Any content, selection, semantic consequence, or approval-digest mismatch requires a corrected proposal and new approval.
55
63
 
56
64
  When a command skill explicitly instructs direct writes for approved Cadre artifacts and no corresponding MCP mutation tool is declared, those direct writes are intentional. Do not search the global tool list for an undeclared operation. Journal the change first, use the available MCP validation and derived-render gates, and stop if the resulting state does not match the approved proposal.
57
65
 
@@ -95,11 +103,19 @@ Legal track statuses are `drafting-spec`, `drafting-plan`, `planned`, `in_progre
95
103
 
96
104
  `implement` defaults to parallel mode unless the human explicitly requests sequential execution. Persist the requested and effective mode in the execution journal. Parallel mode is permission to schedule ready work concurrently, not a requirement to create workers: when fewer than two safe executable nodes are ready, execute in the main agent without worker overhead. Bound workers by the minimum of ready nodes, host capacity, and the approved workflow maximum of 3.
97
105
 
106
+ Persist one independent implementation approval mode:
107
+
108
+ - `governed`: require human approval for every regular task diff and commit, conflict resolution, manual-verification barrier, and material integration transition.
109
+ - `phase` (default): execute regular task work, commits, integrations, conflict resolution within approved scope, worktree lifecycle, generated state, and bookkeeping autonomously; pause exactly once at each phase's final `User Manual Verification` task.
110
+ - `autonomous`: execute regular work and phase-level verification autonomously; pause only at `Track-level User Manual Verification`.
111
+
112
+ All modes stop for a material ambiguity, scope or compatibility decision, failed required check needing an exception, unsafe or mismatched state, destructive action, remote publication, or other authority not granted by the approved spec, plan, and execution. Such a stop is a clarification or blocker, not a routine approval gate. Track-level manual verification always requires the human.
113
+
98
114
  The main agent is the only scheduler and operational owner of every phase integration worktree. Workers never spawn workers, mutate `.cadre/**`, merge, resolve integration conflicts, delete worktrees, or record human approval. Treat the track as a hierarchical DAG: phase dependencies determine active phases, task dependencies determine ready tasks inside each running phase, and main allocates the global worker bound across all ready work. Different phases may run different modes concurrently. Inside one phase, use direct main execution for one ready task, a temporary phase-worker lease for a tightly coupled sequential chain when delegation is justified, or task-worker fan-out for two or more independent ready tasks.
99
115
 
100
- A phase has one mutating execution mode at a time but may switch modes at a clean, journaled checkpoint. Before fan-out, the phase worker finishes and records the current task, verifies the phase worktree is clean, reports its HEAD, releases its lease through a `running`-to-`running` phase update with `workerId: null`, and remains inactive. Main creates each task worktree from that recorded phase HEAD and integrates approved branches one at a time. Only after every active task worker is completed and its integration/cleanup recorded may main assign a phase worker again. A phase/task worker edits product files only in its assigned absolute worktree, runs focused verification, returns a structured diff/evidence/learning summary, and waits for main-agent human approval before creating Conventional Commits.
116
+ A phase has one mutating execution mode at a time but may switch modes at a clean, journaled checkpoint. Before fan-out, the phase worker finishes and records the current task, verifies the phase worktree is clean, reports its HEAD, releases its lease through a `running`-to-`running` phase update with `workerId: null`, and remains inactive. Main creates each task worktree from that recorded phase HEAD and integrates branches one at a time. Only after every active task worker is completed and its integration/cleanup recorded may main assign a phase worker again. A phase/task worker edits product files only in its assigned absolute worktree, runs focused verification, and returns a structured diff/evidence/learning summary. In `governed` it waits for human task approval before committing; in `phase` or `autonomous` main reviews scope and evidence, then authorizes the commit under the persisted mode.
101
117
 
102
- Before creating workers, main performs a host-permission preflight from the approved plan, repository scripts, lockfiles, and likely checks. Host security permission and Cadre lifecycle approval are separate: a shell, network, listener, or filesystem prompt does not approve an artifact, commit, merge, verification result, or journal transition. Reuse already-approved commands and prefixes; centralize shared installs, registry access, image pulls, and code generation; use locked/offline worker commands where supported; and request a new permission only for one exact necessary operation with a narrow reusable prefix. Do not chain unrelated privilege levels, repeat equivalent commands, or use scaffolding modes that create nested repositories requiring destructive cleanup. A worker that encounters an unexpected permission stops and reports the exact command to main.
118
+ Before creating workers, main performs a host-permission preflight from the approved plan, repository scripts, lockfiles, and likely checks. Host security permission and Cadre lifecycle approval are separate: a shell, network, listener, or filesystem prompt does not approve an artifact, commit, merge, verification result, or journal transition. Reuse already-approved commands and prefixes; centralize shared installs, registry access, image pulls, code generation, and other shared preparation; use locked/offline worker commands where supported; and request a new permission only for one exact necessary operation with a narrow reusable prefix. Do not chain unrelated privilege levels, repeat equivalent commands, or use scaffolding modes that create nested repositories requiring destructive cleanup. Run independent read-only inspections and checks in parallel when the host supports it; keep only commands with a real data, mutation, or Git dependency sequential. A worker that encounters an unexpected permission stops and reports the exact command to main.
103
119
 
104
120
  Cadre worktrees use sibling namespaces because one worktree cannot safely contain another:
105
121
 
@@ -108,26 +124,28 @@ Cadre worktrees use sibling namespaces because one worktree cannot safely contai
108
124
  .cadre/.worktrees/<track>/<execution>/tasks/P1--t1-1
109
125
  ```
110
126
 
111
- Git ancestry comes from the recorded base commit, not directory nesting. All independent task workers in one dependency wave branch from the same clean phase HEAD; after their approved merges, the next wave branches from the updated phase HEAD. A task-worker branch merges without squashing into the registered phase integration worktree when one exists. Direct canonical integration is reserved for an explicitly main-coordinated single-task phase; multi-task or phase-verified delivery creates a phase integration worktree first. Tasks executed internally by a phase worker are already on that phase branch and do not get a redundant task merge. Phase branches merge without squashing, one at a time, into the canonical branch. The main agent performs every preview/apply gate and journal transition. A worker commit is recorded immediately in the execution journal; the plan task becomes complete only after canonical integration and records that reachable worker commit SHA.
127
+ Git ancestry comes from the recorded base commit, not directory nesting. All independent task workers in one dependency wave branch from the same clean phase HEAD; after their merges, the next wave branches from the updated phase HEAD. A task-worker branch merges without squashing into the registered phase integration worktree when one exists. Direct canonical integration is reserved for an explicitly main-coordinated single-task phase; multi-task or phase-verified delivery creates a phase integration worktree first. Tasks executed internally by a phase worker are already on that phase branch and do not get a redundant task merge. Phase branches merge without squashing, one at a time, into the canonical branch. The main agent performs every preview/apply gate and journal transition. Cadre tool names declared by the active skill are direct contracts: do not list the global tool catalog, rediscover schemas, or probe previews to learn legal transitions. Read `execution_status.transitionGuidance`, use a mutation result's `derivedStatus`, and pass each preview's `proposalDigest` unchanged. Worktree tools derive a task's phase from its task node ID, so omit redundant `phaseId`. A worker commit is recorded immediately in the execution journal; the plan task becomes complete only after canonical integration and records that reachable worker commit SHA.
112
128
 
113
129
  1. Load this workflow and the full current track. Validate the DAG and reconcile the execution journal, Git worktrees, branch tips, dirty files, and recent commits before scheduling.
114
130
  2. Root phases read the marked Pattern Seed. Every other phase reads learning from all declared dependency phases; parallel sibling phases do not assume each other's learning.
115
- 3. Derive ready phases and tasks from completed dependencies, combine ready tasks from every running phase into one global queue, and allocate workers by the critical path, downstream work unblocked, then plan order. When one approved decision yields multiple transitions that are already valid, use the ordered `execution_nodes_preview`/`execution_nodes_apply` batch. Never batch across a human approval, commit, verification, integration, conflict resolution, or other external evidence boundary.
131
+ 3. Derive ready phases and tasks from completed dependencies, combine ready tasks from every running phase into one global queue, and allocate workers by the critical path, downstream work unblocked, then plan order. When one approved decision yields multiple transitions that are already valid, use the ordered `execution_nodes_preview`/`execution_nodes_apply` batch. Never batch across a human approval, commit, verification, integration, conflict resolution, or other external evidence boundary whose evidence does not yet exist. Once evidence exists, batch the consecutive transitions it unlocks, including verified/authorized task progress through `committed`, post-merge `integrated` through `completed`, and cleaned phase completion plus ready-dependent starts. A preview validates a constructed transition; it is not a state-machine probe.
116
132
  4. Follow read-before-edit and keep every worker limited to its assigned node and worktree.
117
133
  5. Write/update tests and documentation required by the spec and Definition of Done.
118
- 6. Run focused checks per task, combined phase checks after task integration, and the relevant broader suite after conflict resolution, phase integration, and before track verification.
119
- 7. Present every worker diff and evidence through the main agent. A worker commits only after explicit human approval. A phase worker checkpoints one regular task at a time: it returns that task's uncommitted diff, then creates only that task's Conventional Commit after approval and waits for main to record the distinct SHA before starting the next task. Manual-verification nodes may reuse approved phase-head or merge evidence instead of creating empty commits.
120
- 8. Resolve task conflicts in the phase integration worktree and phase conflicts in the canonical worktree. Present the resolution and rerun combined verification; never let the leaf worker silently resolve integration conflicts.
121
- 9. Phase-level manual verification becomes ready only after every sibling task is integrated. Run its technical evidence in the phase worktree through the phase worker when present, otherwise through main; the human approval is always mediated and recorded by main before phase integration. A phase remains `running` until all sibling tasks and this barrier are `completed`; journal-gated integration and cleanup must not run early.
122
- 10. Track-level manual verification becomes ready only after every phase is integrated and is executed entirely by the main agent in the canonical worktree.
134
+ 6. Run focused checks per task, combined phase checks after task integration, and the relevant broader suite after conflict resolution, phase integration, and before track verification. Record command, working directory, result, and verified product HEAD/tree; reuse a passing result while product files, test inputs, and policy are unchanged. `.cadre/**`-only bookkeeping does not invalidate product verification.
135
+ 7. Main reads every worker diff and evidence. In `governed`, present each regular task for human approval before its Conventional Commit. In `phase` or `autonomous`, main may authorize an in-scope, fully verified task commit without another prompt and records the persisted mode as its approval evidence. A phase worker checkpoints one regular task at a time and waits for main to record the distinct SHA before starting the next task. Manual-verification nodes may reuse phase-head or merge evidence instead of creating empty commits.
136
+ 8. Resolve task conflicts in the phase integration worktree and phase conflicts in the canonical worktree. Read both sides and rerun combined verification. In `governed`, present the resolution for approval. In `phase` or `autonomous`, resolve an unambiguous in-scope conflict autonomously and retain it for the next verification evidence; stop for clarification if it requires a material product or scope decision. Never let the leaf worker silently resolve integration conflicts.
137
+ 9. Phase-level manual verification becomes ready only after every sibling task is integrated. Run its technical evidence in the phase worktree through the phase worker when present, otherwise through main. `governed` and `phase` require one human approval at this final phase task; `autonomous` records the verified evidence without a prompt. Afterward checkpoint, phase integration, provenance, learning, and cleanup are deterministic consequences and do not create extra approvals outside `governed`. Keep the phase node `integrated` through safe worktree cleanup, then mark it `completed` and start dependents. Cleanup may recover an already-`completed` node without reopening that terminal state. A phase remains `running` until all sibling tasks and this barrier are `completed`; integration and cleanup must not run early.
138
+ 10. Track-level manual verification becomes ready only after every phase is integrated, is executed entirely by the main agent in the canonical worktree, and requires explicit human approval in every mode.
123
139
  11. Remove a worktree with `git worktree remove` and delete its branch without force only after clean, recorded integration. Never delete dirty, conflicted, unintegrated, or mismatched work.
124
140
  12. Append dependency-aware phase learning. Do not overwrite earlier learning.
125
141
 
142
+ Product task commits remain distinct provenance boundaries. Cadre-only plan, learning, journal, and index bookkeeping is committed once per phase checkpoint and once at final ready-for-review; do not create a Git commit for each intermediate execution status or worktree metadata update. Execution finish applies the completed journal, `ready_for_review` state, and derived `tracks.md` together under one digest, so do not run a separate index-repair workflow.
143
+
126
144
  ## Definition of Done
127
145
 
128
- A task is done when its approved outcome exists, relevant tests cover success/failure/edge cases, checks pass or documented exceptions are approved, formatting and repository conventions are satisfied, docs are updated, no unrelated changes are included, artifacts were shown to the human, and commit provenance is recorded.
146
+ A task is done when its approved outcome exists, relevant tests cover success/failure/edge cases, checks pass or documented exceptions are approved, formatting and repository conventions are satisfied, docs are updated, no unrelated changes are included, its diff and evidence were reviewed at the barrier required by the persisted approval mode, and commit provenance is recorded.
129
147
 
130
- A phase is done when all tasks are integrated, phase learning is recorded, combined verification passes, and its final User Manual Verification is explicitly approved. A track is ready for review only after all execution nodes are complete, all worker branches are integrated, all worktrees are removed, the journal is finalized, and track-level manual verification is approved in main. It is completed only after an approved clean review bound to the current execution ID, plan revision, graph digest, and reviewed HEAD.
148
+ A phase is done when all tasks are integrated, phase learning is recorded, combined verification passes, and its final User Manual Verification is approved by the human in `governed` or `phase`, or authorized by verified evidence in `autonomous`. A track is ready for review only after all execution nodes are complete, all worker branches are integrated, all worktrees are removed, the journal is finalized, and track-level manual verification is approved in main. It is completed only after an approved clean review bound to the current execution ID, plan revision, graph digest, and reviewed HEAD.
131
149
 
132
150
  ## Review and remediation
133
151
 
@@ -144,11 +162,11 @@ Review acceptance criteria, non-functional requirements, diffs, callers, tests,
144
162
  - In `ready_for_review`, use `review` for defects against the approved specification. Use `revise` for a changed desired outcome, scope, requirement, or acceptance criterion; invalidate review readiness, append the necessary delivery and manual-verification work, and return to `in_progress`, or `planned` when an approved dependency is incomplete.
145
163
  - In `completed` or `archived`, keep the track immutable and propose a successor feature or bug track that references it. Do not reopen it or rewrite its clean-review history.
146
164
 
147
- A semantic revision requires an approved specification baseline and no unresolved non-revision operation. Reconcile a matching revision journal before doing new work. If active implementation or dirty work overlaps the revision, present its exact state and obtain approval to complete, preserve as superseded, or revert it before applying the revision.
165
+ A semantic revision requires an approved specification baseline and no unresolved non-revision operation. Reconcile a matching revision journal before doing new work. If active implementation or dirty work overlaps the revision, include its exact complete, preserve-as-superseded, or additive-revert disposition in the combined revision envelope whenever it can be safely assessed in advance. Ask for a preliminary disposition only when that choice is required to reach a state that can be fully analyzed.
148
166
 
149
167
  Every approved semantic revision gets `revisions/revision-<ts>.md` and a track-local `operation.action` of `revise` before artifact mutation. Increment the track revision once per approved revision; increment the specification revision only when the specification changes and the plan revision only when the plan changes. A revision must record its source and target status, base commit, affected phases/tasks, treatment of completed and partial work, review-readiness impact, and transitive dependency impact. Preserve completed-work provenance and append replacement work rather than erasing history.
150
168
 
151
- Every project refresh gets `refreshes/refresh-<ts>.md`. Assess transitive dependent tracks whenever a spec, acceptance criterion, dependency, workflow, pattern, tech-stack, or styleguide change may affect them. Present all cascading changes for approval before mutation. Preserve superseded content and completed-work provenance rather than erasing history.
169
+ Every project refresh gets `refreshes/refresh-<ts>.md`. Assess transitive dependent tracks whenever a spec, acceptance criterion, dependency, workflow, pattern, tech-stack, or styleguide change may affect them. Present project context and every exact cascading track change in one refresh authorization envelope before mutation. Preserve superseded content and completed-work provenance rather than erasing history.
152
170
 
153
171
  ## Archival and learning
154
172
 
@@ -6,6 +6,7 @@
6
6
  "checkpoint": "approved",
7
7
  "requestedMode": "{{parallel|sequential}}",
8
8
  "effectiveMode": "{{parallel|sequential}}",
9
+ "approvalMode": "{{governed|phase|autonomous}}",
9
10
  "maxWorkers": 3,
10
11
  "planRevision": 1,
11
12
  "planCommit": "{{PLAN_COMMIT}}",
@@ -16,7 +16,7 @@
16
16
  "action": "specify",
17
17
  "baseCommit": "{{BASE_COMMIT_OR_NULL}}",
18
18
  "expectedCommit": "cadre(track): specify {{TRACK_ID}}",
19
- "approvedArtifacts": ["spec.md"],
19
+ "approvedArtifacts": ["spec.md", "plan.md", "learning.md"],
20
20
  "approvedAt": "{{APPROVED_AT}}"
21
21
  },
22
22
  "lastExecution": null,