@sabaiway/agent-workflow-engine 4.2.0 → 4.4.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/CHANGELOG.md CHANGED
@@ -4,6 +4,37 @@ All notable changes to the methodology engine. Versions are this **package's** n
4
4
  they are distinct from the **deployment-lineage** stamp written into a project's `docs/ai/`
5
5
  (which tracks the shared `agent-workflow` lineage, head `3.0.0`).
6
6
 
7
+ ## 4.4.0 — the plan cap counts rows, the readers sweep opens self-review, the consult order and the round render are canon (AD-125)
8
+
9
+ `references/planning.md`: the cap is 100 lines AND ≤25 ledger rows, 200 UTF-8 bytes per row counted
10
+ without the path and anchor fields (the 8000-byte cap is deleted); an extension phase rides only
11
+ before Cleanup; the two checker commands (`plan-shape-cli.mjs --check` before the first review,
12
+ `--verify` at Cleanup) are named at the point of use. `references/procedures.md`: `plan-authoring`
13
+ carries `Slots: author, fold, review`; step 3 opens with the readers sweep (one literal search per
14
+ changed key, symbol, receipt field or canon sentence — every reader becomes a row, a non-goal or a
15
+ pinned "unchanged"); step 5 of BOTH activities carries the consult-before-fold order (ASK the review
16
+ member that raised the finding, WAIT, READ, fold only as accepted or corrected; a self-review finding
17
+ folds directly); plan-authoring's step 5 additionally names the round render as the source of the
18
+ per-round emission's verdict half — the crossover stop is a computed signal, the origin tally the
19
+ orchestrator's judgment. The canon tests
20
+ pin every sentence (spec `plan-review-loop` S13, S18); the procedures-to-planning size pin is a 1.2
21
+ ratio, declared.
22
+
23
+ ## 4.3.0 — the fifth recipe, the third activity, and a carrier that is never the one who commits (AD-124)
24
+
25
+ `references/orchestration.md` admits the CARRIER wherever it said backend: the orchestrator, a bridge
26
+ backend, or a full-tool frontier subagent dispatched from the placed executor vehicle; §2 lists
27
+ **Subagent** as the fifth recipe (a bounded, file-disjoint slice; degrades to Solo when the vehicle is
28
+ missing or unusable); §5 states the honest limit (a Claude Code lane — readiness is the vehicle FILE,
29
+ never the host; it spends no bridge quota but the host model's); §6 now reads "no recipe lets a
30
+ carrier commit or perform a git write … the orchestrator alone stages and commits".
31
+ `references/procedures.md`: `Slots: author, review` (the author carrier drafts from the orchestrator's
32
+ brief), the Subagent branch beside Delegated, and a new `## routine` activity (`Slots: carrier,
33
+ parallel`; a read-only slice rides a placed read-only vehicle, a write-capable one the executor; a
34
+ read-only chore has no commit boundary). Both injected pointer fragments name the fifth recipe and the
35
+ third activity; the prior texts are appended to the kit's known-prior stores, so a deployed slot
36
+ refreshes on the next reconcile.
37
+
7
38
  ## 4.2.0 — a zero governing-spec citation names the adoption state it relies on (AD-123)
8
39
 
9
40
  `references/agent-rules-lens.md`'s **Spec-first** bullet, `references/planning.md`'s *Goal and boundary*
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  methodology *text* — the capped plan shape (goal and boundary, module ledger, verification), the plan-file lifecycle
5
5
  (`docs/plans/*.md`, ephemeral, never committed), the `queue.md` series index, the mandatory
6
6
  final **Phase: Cleanup**, the **orchestration-recipe** vocabulary (Solo / Reviewed / Council /
7
- Delegated), the bounded slot fragments the family kit injects into a deployed project's
7
+ Delegated / Subagent), the bounded slot fragments the family kit injects into a deployed project's
8
8
  `AGENTS.md`, and the canonical agent-rules lens block the kit renders into a deployed
9
9
  `docs/ai/agent_rules.md`.
10
10
 
@@ -52,8 +52,9 @@ the canonical methodology reference on disk:
52
52
  methodology fragment the composition root injects into a deployed `AGENTS.md` (a short summary +
53
53
  pointer, kept under the entry point's line cap).
54
54
  - [`references/orchestration.md`](references/orchestration.md) — the canonical **orchestration-recipe**
55
- reference: the four recipes (Solo / Reviewed / Council / Delegated) over the bridges' role
56
- vocabulary, the when/why, the graceful-degradation lattice, and the quota/health guard.
55
+ reference: the five recipes (Solo / Reviewed / Council / Delegated / Subagent) over the bridges'
56
+ role vocabulary and the executor vehicle's `carry` role, the when/why, the graceful-degradation
57
+ lattice, and the quota/health guard.
57
58
  - [`references/orchestration-slot.md`](references/orchestration-slot.md) — the **bounded** one-line
58
59
  orchestration fragment the composition root injects into a deployed `AGENTS.md`, routing to the
59
60
  in-project recipes surface.
@@ -62,7 +63,7 @@ the canonical methodology reference on disk:
62
63
  for `docs/ai/autonomy.json` (read at session start; the canonical default floor when absent; STOP
63
64
  on malformed), routing to the in-project `set-autonomy` / `autonomy-doctor` surfaces.
64
65
  - [`references/procedures.md`](references/procedures.md) — the canonical **activity-procedures** canon:
65
- the named activities (`plan-authoring`, `plan-execution`) as ordered steps with typed recipe slots,
66
+ the named activities (`plan-authoring`, `plan-execution`, `routine`) as ordered steps with typed recipe slots,
66
67
  read live and rendered by the read-only `/agent-workflow-kit procedures <activity>`.
67
68
  - [`references/agent-rules-lens.md`](references/agent-rules-lens.md) — the canonical **agent-rules
68
69
  lens** block (the planning/review/process-fidelity invariants) the kit renders into a deployed
package/SKILL.md CHANGED
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: agent-workflow-engine
3
- description: Canonical home of the agent-workflow planning methodology — the capped plan shape (goal and boundary, module ledger, verification), plan lifecycle, queue.md series index, mandatory Cleanup phase, the feature-spec canon (the durable per-feature contract layer with its frozen schema and Out-of-scope discipline), the bounded methodology slot fragment, the orchestration-recipe vocabulary (Solo / Reviewed / Council / Delegated), and the activity-procedures canon (plan-authoring / plan-execution, with typed recipe slots). A published, installable npm package (available:true) that *provides* the methodology text; it mutates nothing. The composition root (agent-workflow-kit) reads this canon LIVE from the installed engine and injects the bounded slots from it — one source of truth, no bundled mirror; `npx @sabaiway/agent-workflow-kit@latest init` installs the engine.
3
+ description: Canonical home of the agent-workflow planning methodology — the capped plan shape (goal and boundary, module ledger, verification), plan lifecycle, queue.md series index, mandatory Cleanup phase, the feature-spec canon (the durable per-feature contract layer with its frozen schema and Out-of-scope discipline), the bounded methodology slot fragment, the orchestration-recipe vocabulary (Solo / Reviewed / Council / Delegated / Subagent), and the activity-procedures canon (plan-authoring / plan-execution / routine, with typed recipe slots). A published, installable npm package (available:true) that *provides* the methodology text; it mutates nothing. The composition root (agent-workflow-kit) reads this canon LIVE from the installed engine and injects the bounded slots from it — one source of truth, no bundled mirror; `npx @sabaiway/agent-workflow-kit@latest init` installs the engine.
4
4
  disable-model-invocation: true
5
5
  metadata:
6
- version: '4.2.0'
6
+ version: '4.4.0'
7
7
  ---
8
8
 
9
9
  # agent-workflow-engine
@@ -34,13 +34,13 @@ slot fill is needed but the engine is absent, the kit's reconcile **fails loudly
34
34
  `<!-- workflow:methodology:start -->` / `<!-- workflow:methodology:end -->` markers. A short
35
35
  summary + pointer, not the full reference, so the entry point stays under its line cap.
36
36
  - [`references/orchestration.md`](references/orchestration.md) — the canonical **orchestration-recipe**
37
- reference: the four recipes (Solo / Reviewed / Council / Delegated) defined over the bridges' role
38
- vocabulary, the when/why decision guidance, the graceful-degradation lattice, and the quota/health
39
- guard. The kit owns the executable dispatch and surfaces it as `/agent-workflow-kit recipes`.
37
+ reference: the five recipes (Solo / Reviewed / Council / Delegated / Subagent) defined over the
38
+ bridges' role vocabulary and the executor vehicle's `carry` role, the when/why decision guidance,
39
+ the graceful-degradation lattice, and the quota/health guard. The kit owns the executable dispatch and surfaces it as `/agent-workflow-kit recipes`.
40
40
  - [`references/orchestration-slot.md`](references/orchestration-slot.md) — the **bounded** one-line
41
41
  orchestration fragment the composition root injects into a deployed `AGENTS.md`, between the
42
42
  `<!-- workflow:orchestration:start -->` / `<!-- workflow:orchestration:end -->` markers. It names the
43
- four recipes and routes to `/agent-workflow-kit recipes`, never to this engine-internal reference.
43
+ five recipes and routes to `/agent-workflow-kit recipes`, never to this engine-internal reference.
44
44
  - [`references/autonomy-slot.md`](references/autonomy-slot.md) — the **bounded** one-line autonomy
45
45
  fragment the composition root injects into a deployed `AGENTS.md`, between the
46
46
  `<!-- workflow:autonomy:start -->` / `<!-- workflow:autonomy:end -->` markers. It carries the
@@ -50,7 +50,7 @@ slot fill is needed but the engine is absent, the kit's reconcile **fails loudly
50
50
  sandbox + the orchestrator). It routes to the kit's `set-autonomy` / `autonomy-doctor` surfaces,
51
51
  never to any engine-internal reference.
52
52
  - [`references/procedures.md`](references/procedures.md) — the canonical **activity-procedures** canon:
53
- the ordered steps of the named activities (`plan-authoring`, `plan-execution`) with **typed recipe
53
+ the ordered steps of the named activities (`plan-authoring`, `plan-execution`, `routine`) with **typed recipe
54
54
  slots** that bind to the orchestration recipes, composing with `planning.md` without restating it. It
55
55
  stays generic (no project-specific stages baked in). The kit reads it live and renders the steps +
56
56
  the resolved effective recipe per slot via the read-only `/agent-workflow-kit procedures <activity>`.
package/capability.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "schema": 1,
4
4
  "name": "agent-workflow-engine",
5
5
  "kind": "methodology-engine",
6
- "version": "4.2.0",
6
+ "version": "4.4.0",
7
7
  "available": true,
8
8
  "provides": ["plan"],
9
9
  "roles": {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sabaiway/agent-workflow-engine",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "Canonical home of the agent-workflow planning methodology — the capped plan shape (goal and boundary, module ledger, verification), plan lifecycle, queue.md series index, and mandatory Cleanup phase, consumed by the kit (composition root). The methodology engine of the agent-workflow family.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -1 +1 @@
1
- > **Workflow methodology** — plan → execute → review. Plans are ephemeral `docs/plans/*.md` (gitignored, **never committed**); every Plan ends with a mandatory **Phase: Cleanup**; series order lives in `docs/plans/queue.md`. The plan shape, its caps and lifecycle live in the project's **planning skill** (it overrides the generic `writing-plans`); summary in `docs/ai/agent_rules.md` §5. Named activities (plan-authoring, plan-execution) have procedures — see `/agent-workflow-kit procedures <activity>` for the steps + resolved recipe. **Communication:** user-facing messages deliver the artifact inline (paste the prompt / diff / command — never "see §X" as a substitute), lead with the result, show exactly what was asked, and never read as mockery (a large artifact: a real summary inline + a link).
1
+ > **Workflow methodology** — plan → execute → review. Plans are ephemeral `docs/plans/*.md` (gitignored, **never committed**); every Plan ends with a mandatory **Phase: Cleanup**; series order lives in `docs/plans/queue.md`. The plan shape, its caps and lifecycle live in the project's **planning skill** (it overrides the generic `writing-plans`); summary in `docs/ai/agent_rules.md` §5. Named activities (plan-authoring, plan-execution, routine) have procedures — see `/agent-workflow-kit procedures <activity>` for the steps + resolved recipe. **Communication:** user-facing messages deliver the artifact inline (paste the prompt / diff / command — never "see §X" as a substitute), lead with the result, show exactly what was asked, and never read as mockery (a large artifact: a real summary inline + a link).
@@ -1 +1 @@
1
- > **Orchestration recipes** — compose plan → execute → review with a named recipe: **Solo** (no backend), **Reviewed** (one backend reviews), **Council** (both review, you synthesize), **Delegated** (a backend executes a bounded sub-task); the orchestrator always commits, a backend is never autonomous. Pick + plan one for this environment with `/agent-workflow-kit recipes` (read-only); the deployed how/why lives in your `docs/ai/` workflow docs. At the start of a planning/execution session, read your standing recipe preference in `docs/ai/orchestration.json` — set it in plain language with `/agent-workflow-kit set-recipe` (previews first; hand-edit stays supported).
1
+ > **Orchestration recipes** — compose plan → execute → review with a named recipe: **Solo** (no backend), **Reviewed** (one backend reviews), **Council** (both review, you synthesize), **Delegated** (a backend executes a bounded sub-task), **Subagent** (a full-tool frontier subagent carries a bounded slice); the orchestrator always commits, a carrier is never autonomous. Pick + plan one for this environment with `/agent-workflow-kit recipes` (read-only); the deployed how/why lives in your `docs/ai/` workflow docs. At the start of a planning/execution session, read your standing recipe preference in `docs/ai/orchestration.json` — set it in plain language with `/agent-workflow-kit set-recipe` (previews first; hand-edit stays supported).
@@ -1,9 +1,10 @@
1
1
  # Orchestration Recipes
2
2
 
3
- Canonical, on-demand reference for **how an orchestrating agent composes the optional
4
- execution-backends** (the family's subscription-CLI bridges) into the `plan → execute → review`
3
+ Canonical, on-demand reference for **how an orchestrating agent composes the carriers of a step** —
4
+ itself, the optional execution-backends (the family's subscription-CLI bridges) and a full-tool
5
+ frontier subagent — into the `plan → execute → review`
5
6
  flow. This is the *narrative* source of truth — the **vocabulary** (what each recipe is), the
6
- **when/why** (which to reach for), the **graceful-degradation lattice** (what happens when a backend
7
+ **when/why** (which to reach for), the **graceful-degradation lattice** (what happens when a carrier
7
8
  is unavailable), and the **quota/health guard**. The kit (`agent-workflow-kit`) owns the *executable*
8
9
  dispatch (`tools/recipes.mjs` — `planRecipe` / `recommendRecipe`) and surfaces it read-only as
9
10
  `/agent-workflow-kit recipes`; the two representations are kept in lockstep by a recipe-name parity
@@ -13,9 +14,12 @@ guard. For the plan lifecycle this composes with, see [`planning.md`](planning.m
13
14
 
14
15
  ## 1. The role vocabulary recipes are built over
15
16
 
16
- A recipe is an **orchestration pattern**, not a runnable script. The **orchestrator** (the main
17
- agent) always owns the decisions, the edits it accepts, verification, and the **single commit** a
18
- backend is **advisory or delegated, never autonomous, and never commits**.
17
+ A recipe is an **orchestration pattern**, not a runnable script. It names **who carries a step**
18
+ the **orchestrator** itself (Solo), a **bridge backend** (Reviewed / Council / Delegated), or a
19
+ **full-tool frontier subagent** dispatched from the placed executor vehicle (Subagent). The
20
+ orchestrator (the main agent) always owns the decisions, the edits it accepts, verification, and the
21
+ **single commit** — every other carrier is **advisory or delegated, never autonomous, and never
22
+ commits**.
19
23
 
20
24
  Each backend declares what it can do in its `capability.json` `provides` / `roles`:
21
25
 
@@ -27,14 +31,26 @@ Each backend declares what it can do in its `capability.json` `provides` / `role
27
31
 
28
32
  Both are **subscription** backends with a **finite quota** — spend deliberately.
29
33
 
30
- ## 2. The four recipes
34
+ The third carrier is neither: the **executor vehicle** — a full-tool frontier subagent the
35
+ orchestrator dispatches from the placed `.claude/agents/executor.md`. It declares no
36
+ `capability.json` and spends no bridge quota (it runs on the host's own model and consumes that
37
+ model's quota and cost); it carries the `carry` role only — never
38
+ `review`, never `probe` — and its availability is the vehicle FILE, not a detector (§4, §5).
31
39
 
32
- | Recipe (id) | Pattern | Roles needed | Backends that satisfy it |
40
+ ## 2. The five recipes
41
+
42
+ | Recipe (id) | Pattern | Roles needed | Carriers that satisfy it |
33
43
  |-------------|---------|--------------|--------------------------|
34
44
  | **Solo** (`solo`) | The orchestrator plans, executes, and self-reviews. No backend. | none | — (always available; the floor) |
35
45
  | **Reviewed** (`reviewed`) | The orchestrator executes; **one** backend reviews the result (advisory). | ≥1 backend providing `review` | `codex` and/or `agy` |
36
46
  | **Council** (`council`) | **Both** backends review independently; the orchestrator synthesizes the two opinions. | ≥2 backends providing `review` | `codex` **and** `agy` |
37
47
  | **Delegated** (`delegated`) | The orchestrator hands a **bounded** execution sub-task to a backend, then reviews the returned diff and commits. | ≥1 backend providing `execute` | `codex` only |
48
+ | **Subagent** (`subagent`) | The orchestrator hands a **bounded, file-disjoint** slice — of execution, of plan/contract authoring, or of routine work — to a **full-tool frontier subagent**, then verifies the returned slice by running its suites. A routine slice is classified first: a read-only one rides a placed read-only vehicle (or is carried Solo with a stated reason when that vehicle is absent); a write-capable one rides the executor. | the `carry` role | the placed executor vehicle |
49
+
50
+ The orchestrator keeps the folds, the gates, the release documents, the asks and the **one commit**
51
+ whatever the recipe resolves to. A subagent is **never a review backend**, **never a bridge
52
+ substitute**, and is **never told to commit**; it **degrades to Solo** when the executor vehicle is
53
+ missing or unusable.
38
54
 
39
55
  ## 3. When / why to reach for each (the decision vocabulary)
40
56
 
@@ -51,6 +67,12 @@ Both are **subscription** backends with a **finite quota** — spend deliberatel
51
67
  - **Delegated** — when a bounded, well-specified sub-task can be handed off (parallelism, or to keep
52
68
  the orchestrator's own context focused). Only `codex` provides `execute`. The orchestrator still
53
69
  reviews the returned diff and owns the commit — delegation never bypasses the review or the gate.
70
+ - **Subagent** — when the work is **bounded and file-disjoint** and the orchestrator's own context is
71
+ the scarce resource: execution slices, a plan or a contract drafted from a brief the orchestrator
72
+ writes, or routine chores (gate triage, sweeps, doc regeneration, fixture builds). It spends no
73
+ bridge quota; it runs on the host's own model and consumes that model's quota and cost. The orchestrator still writes the brief, verifies every returned slice by running
74
+ its suites itself, and owns the commit — a subagent never stands in for the bridge a `review`
75
+ recipe names.
54
76
 
55
77
  ## 4. Graceful degradation (never silent)
56
78
 
@@ -61,6 +83,12 @@ Availability is **pure file-presence**: a backend is dispatchable **iff its dete
61
83
  the wrapper is not on `PATH`). This is a claim about **set-up state only** — never about whether a
62
84
  backend's *service* is actually responsive.
63
85
 
86
+ The subagent carrier makes the same kind of claim from a different file: its availability is the
87
+ **executor vehicle** at `.claude/agents/executor.md` — `placed` or `customized` is dispatchable,
88
+ `unusable` or `missing` is not, and the state is the human reason (the writer's apply command
89
+ places a missing vehicle; a customized file is kept; an unusable path must be fixed or removed
90
+ first, then placed). Never a claim about the host that would run it (§5).
91
+
64
92
  When a recipe's roles can't be satisfied, it **degrades to a weaker recipe with a stated reason** —
65
93
  always reported, never silently dropped:
66
94
 
@@ -68,6 +96,7 @@ always reported, never silently dropped:
68
96
  neither is `ready` → Solo.
69
97
  - **Delegated → Solo.** No backend provides `execute` and is `ready` → Solo, with the reason.
70
98
  - **Reviewed → Solo.** No backend provides `review` and is `ready` → Solo, with the reason.
99
+ - **Subagent → Solo.** The executor vehicle is `missing` or `unusable` → Solo, with the reason.
71
100
 
72
101
  **Recipe fidelity — the converse: every ready backend, every round.** Degradation is the *only*
73
102
  licence to run fewer backends than the recipe names. When the resolved recipe is `council` and BOTH
@@ -152,6 +181,11 @@ task that genuinely needs to run or write keeps a full-tool subagent. **Honest l
152
181
  no deterministic gate classifies a dispatch — enforcement is this canon at the point of use,
153
182
  the placed vehicles, and the retro loop.
154
183
 
184
+ **The Subagent carrier is a Claude Code lane**, exactly like the placed vehicles above: its
185
+ readiness is the vehicle FILE, never the host. On a host that cannot dispatch the vehicle, the
186
+ rendered dispatch form is an **instruction the orchestrator follows by hand** and reports as such —
187
+ never reported as a subagent dispatch.
188
+
155
189
  **Sandbox lanes.** Under an OS sandbox the lanes split once more by **surface class**: the L0
156
190
  surfaces are **sandbox-safe** (gate/state/coverage checks, git reads, plain no-network tests);
157
191
  the bridge wrappers are **genuinely unsandboxed** (they need network); npm-cache-touching commands
@@ -184,10 +218,13 @@ stays read-only.
184
218
 
185
219
  ## 6. The orchestrator always commits
186
220
 
187
- No recipe makes a backend write to the repo or create a commit. The kit's `recipes` surface is
221
+ No recipe lets a carrier commit or perform a git write: a review backend reads and returns findings;
222
+ a delegated backend edits inside its own sandbox and returns a diff the orchestrator reviews; a
223
+ subagent edits only the files its brief names — and the orchestrator alone stages and commits. The kit's `recipes` surface is
188
224
  **read-only** — it lists the recipes, plans one for the current environment, and recommends a
189
225
  default; it **never executes** a recipe and **never runs a subscription CLI**. The orchestrator
190
- executes the chosen recipe through the bridge skills, accepts or rejects every edit, runs the
226
+ executes the chosen recipe through the bridge skills or the executor vehicle, accepts or rejects
227
+ every returned edit, runs the
191
228
  verification gate, and makes the **one** commit — exactly as the plan lifecycle (`planning.md`)
192
229
  requires.
193
230
 
@@ -8,8 +8,9 @@ plan tells it which files to open, what each one may become, and how the result
8
8
 
9
9
  ## Shape
10
10
 
11
- The whole file is capped at **100 lines and 8000 bytes** both, because a line cap alone is paid off
12
- with longer lines. The headings are LITERAL, copied bare: tooling extracts sections by exact match.
11
+ The whole file is capped at **100 lines and at most 25 ledger rows**. Before its first review and
12
+ after every authoring fold, run `node <kit>/tools/plan-shape-cli.mjs --check <plan>`. The headings are
13
+ LITERAL, copied bare: tooling extracts sections by exact match.
13
14
 
14
15
  ```
15
16
  # Plan: <title>
@@ -20,6 +21,9 @@ with longer lines. The headings are LITERAL, copied bare: tooling extracts secti
20
21
  ## Next steps
21
22
  ```
22
23
 
24
+ A project-declared `## Phase: <name>` may ride between Verification and Cleanup; it is bounded by
25
+ the whole-file line cap and may not reuse the Cleanup name.
26
+
23
27
  A plan that does not fit is not under-described. Either the TASK is too big — split it along
24
28
  independently verifiable boundaries, never by document size — or it is a SWEEP (below).
25
29
 
@@ -34,7 +38,8 @@ independently verifiable boundaries, never by document size — or it is a SWEEP
34
38
 
35
39
  ## Module ledger
36
40
 
37
- One row per path, 200 bytes per row, six fields:
41
+ One row per path, six fields. A row is capped at **200 UTF-8 bytes counted without its path and
42
+ anchor**: id, verb, responsibility and budget after trimming, including their three ` | ` separators.
38
43
 
39
44
  ```
40
45
  <check-id> | create|modify|delete | <path> | <responsibility, one sentence> | <max lines | n/a> | <anchor>
@@ -71,9 +76,9 @@ the sweep, and breaks the intermediate states.
71
76
  ## Verification
72
77
 
73
78
  Exact existing commands plus the acceptance check for the goal. The ledger is validated by ONE
74
- command over its `check-id`s — existence and budget for create/modify, absence for delete, the count
75
- for a sweep, and the total line. Per-row assertions in prose are the repetition this section exists
76
- to avoid.
79
+ command: `node <kit>/tools/plan-shape-cli.mjs --verify <plan>` — existence and budget for
80
+ create/modify, absence for delete, the count for a sweep, and the total line. Per-row assertions in
81
+ prose are the repetition this section exists to avoid.
77
82
 
78
83
  **The acceptance criteria ARE the `- ` bullets.** Every top-level `- ` bullet in this section is one
79
84
  acceptance criterion, and they are the whole list — nothing outside a bullet is one. That makes the
@@ -2,15 +2,16 @@
2
2
 
3
3
  The ordered steps of each named activity, with **typed recipe slots** bound to the
4
4
  [orchestration recipes](orchestration.md). It composes with — never restates —
5
- [`planning.md`](planning.md), naming that canon's sections by *heading*. The kit reads this file
6
- LIVE and parses ONLY each section's `Slots:` line, never the steps.
5
+ [`planning.md`](planning.md), naming its sections by *heading*. The kit reads this file
6
+ live and parses only each section's `Slots:` line.
7
7
 
8
8
  A **recipe slot**: `review` accepts `solo | reviewed | council`; `execute` accepts
9
- `solo | delegated`. The per-project default lives in `docs/ai/orchestration.json`, resolved against
10
- backend readiness by the kit.
9
+ `solo | delegated | subagent`; a carrier slot (`author`, `fold`, `carrier`) accepts `solo | subagent`;
10
+ `parallel` is a switch (`on | off`), not a recipe. The per-project default lives in
11
+ `docs/ai/orchestration.json`.
11
12
 
12
- **When an activity has a commit boundary, the orchestrator owns that commit; a backend is advisory
13
- or delegated, never autonomous, and never commits** (`orchestration.md` §6). `plan-authoring` ends
13
+ **When an activity has a commit boundary, the orchestrator owns that commit; every other carrier is
14
+ advisory or delegated, never autonomous, and never commits** (`orchestration.md` §6). `plan-authoring` ends
14
15
  at **approval** with no commit (plans are ephemeral, never committed); `plan-execution` commits per
15
16
  ledger row.
16
17
 
@@ -29,36 +30,53 @@ inline plus the link.
29
30
 
30
31
  ## plan-authoring
31
32
 
32
- Slots: review
33
+ Slots: author, fold, review
33
34
 
34
35
  1. **Research** — the exact files, contracts and constraints touched.
35
36
  2. **Draft** — write to the shape [`planning.md`](planning.md) fixes; its *Module ledger* decides
36
37
  the layout and every budget before any file exists — a size gate is only the backstop. Name the
37
38
  governing spec(s) in *Goal and boundary* ([`specs.md`](specs.md)); a new feature's draft spec is
38
39
  a `create` row and a revision of a governed contract a `modify` row, both written here so they
39
- exist AT review.
40
- 3. **Self-review** apply *What gets cut*; fold by code (read and cite the `file:line`); update
41
- `queue.md` for a series, to the shape *The queue* fixes.
40
+ exist AT review. The resolved `author` carrier drafts — Solo: the orchestrator writes it;
41
+ Subagent: the orchestrator writes a BRIEF (goal, governing specs, ledger
42
+ constraints, files) and the subagent drafts the plan and any `create` / `modify`
43
+ spec row from it, and the orchestrator reviews the draft as its own before step 3.
44
+ 3. **Self-review** — run the **readers sweep before the first review**: for every config key,
45
+ registry entry, exported constant, receipt field or canon sentence the plan changes, use one
46
+ literal repository search to list its readers (validators, renders, seeds, docs and the tests
47
+ that pin the text). Every reader becomes a ledger row, a stated non-goal, or unchanged with
48
+ the test or fixture that proves it. Then apply *What gets cut*; fold by code
49
+ (read and cite the `file:line`); update `queue.md` for a series, to the shape *The queue* fixes.
42
50
  4. **review {recipe}** — Solo (self-review only) / Reviewed (one backend) / Council (both; you
43
51
  synthesize), as the resolved `review` recipe selects.
44
- 5. **Fold + loop** — fold every finding and re-review; CLEAN is **0 blockers + 0 majors** from every
45
- backend the recipe names folding convergence. Fold a code-touching finding **test-as-spec**,
46
- with **no code-mechanics** in the plan: only **checked syntax** its Verification runs; un-run,
52
+ 5. **Fold + loop** — before folding a finding raised by a **review member**, **ASK** that member whether the
53
+ proposed fold solves it without a new problem; **WAIT**, **READ**, then hand the accepted or
54
+ corrected fold to the resolved `fold` carrier. Self-review findings, or findings with no review
55
+ member, are folded directly. Forms: `agy-review --continue --decided @f` for agy, a
56
+ fresh `codex-review plan <consult-brief>` for
57
+ codex, or a fresh re-dispatch of the same lens vehicle for a lens member; write the finding and
58
+ fold before the tree changes. Solo: orchestrator edits. Subagent: the round's findings with their
59
+ dispositions are the slice; it edits the plan or contract and returns; orchestrator runs the
60
+ self-consistency read.
61
+ Fold and re-review every finding; CLEAN is **0 blockers + 0 majors** from each named backend;
62
+ folding ≠ convergence. Fold code findings **test-as-spec**, with **no code-mechanics** in the
63
+ plan: only **checked syntax** its Verification runs; un-run,
47
64
  **logic-bearing** syntax never enters prose (*Un-run syntax never ships in prose*). Council runs
48
65
  every named backend **every round** (recipe fidelity, `orchestration.md` §4). Cap architecture
49
66
  review at **≤2 rounds**; **backend divergence** (one ships, one keeps revising mechanics) IS the
50
- **crossover** — resolve the surviving major at altitude, never by exhausting the strictest
51
- backend; a **self-consistency** read precedes each re-review; an all-mechanics or prose-only
52
- artifact takes a thin plan + **diff-review** (*The plan must read cold*). Each round MUST emit
53
- **{round N · finding-origin tally · per-backend verdict}**. At the cap, classify each surviving
54
- blocker or major: **fixable-bug** (fold ONCE as a red→green test, re-review) /
67
+ **crossover** — resolve the major at altitude, not by exhausting that backend.
68
+ A **self-consistency** read precedes each re-review; all-mechanics or prose-only takes a thin plan
69
+ + **diff-review** (*The plan must read cold*). Each round MUST emit
70
+ **{round N · finding-origin tally · per-backend verdict}**: READ its verdict half from the round
71
+ render (`review-rounds`, the kit's table over the review receipts); append the orchestrator's finding-origin tally
72
+ judgment. At the cap, classify surviving blockers/majors: **fixable-bug** (fold ONCE as a red→green test, re-review) /
55
73
  **inherent-layer-residual** (raise to an acceptance criterion) / **escalate**.
56
74
  6. **Present for approval** — never execute here: a harness "approved — start coding" prompt
57
75
  (**ExitPlanMode**) authorizes the PLAN only; `plan-execution` is a deliberate transition once
58
76
  the plan and its cold-start prompt exist.
59
77
 
60
78
  **Definition of Done:** a plan in `docs/plans/` ending with **Phase: Cleanup** **and** a cold-start
61
- execution prompt to begin the next session — both produced without the user asking.
79
+ execution prompt to begin the next session — both without the user asking.
62
80
 
63
81
  ## plan-execution
64
82
 
@@ -67,23 +85,36 @@ Slots: execute, review
67
85
  Each ledger row is one logical commit.
68
86
 
69
87
  1. **Resolve the recipe per row** — `execute` and `review` from `docs/ai/orchestration.json` +
70
- readiness (`--override <slot>=<recipe>` per run).
88
+ readiness (`--override <slot>=<value>` per run).
71
89
  2. **If `execute` resolved to Delegated, dispatch execution FIRST** — the backend returns a diff
72
- (codex-exec) *before* you integrate; otherwise implement directly.
90
+ (codex-exec) *before* you integrate. **If `execute` resolved to Subagent**, split the ledger into
91
+ file-disjoint slices, exact wording where wording is a red line, dispatch each slice to
92
+ the executor vehicle in the background, and verify
93
+ every returned slice by running its suites yourself before step 3. Otherwise implement directly.
73
94
  3. **Implement / integrate** — your own edits or the reviewed delegated diff; a spec row lands its
74
95
  approved draft or revision WITH the code ([`specs.md`](specs.md)).
75
96
  4. **Self-review** — the change against its [`planning.md`](planning.md) ledger row and the plan's
76
97
  Verification, under the project's reuse and clean-code rules; fold by code (cite the
77
98
  `file:line`); **characterize-first**: pin uncovered code's behaviour in a green test before
78
99
  editing it; fold each finding test-as-spec (red→green); atomic, reversible edits.
79
- 5. **review {recipe}** — the **heavy review at the diff** (*The plan must read cold*): real code and
80
- the full suite. The plan-authoring loop applies unchanged every named backend every round,
81
- **0 blockers + 0 majors**, the **{round N · finding-origin tally · per-backend verdict}**
82
- emission, **fixable-bug / inherent-layer-residual / escalate** at the cap. Its instruments:
100
+ 5. **review {recipe}** — the **heavy review at the diff** (*The plan must read cold*): real code +
101
+ full suite. Authoring loop applies unchanged: every named backend every round; a finding raised
102
+ by a **review member**: **ASK**, **WAIT**, **READ**, fold only as accepted or corrected; a
103
+ self-review finding is folded directly (forms: its step 5). CLEAN:
104
+ **0 blockers + 0 majors**; the **{round N · finding-origin tally · per-backend verdict}**
105
+ emission; **fixable-bug / inherent-layer-residual / escalate** at the cap. Its instruments:
83
106
  `core-evidence red-proof` declares each bugfix red BEFORE the fix; `core-evidence
84
107
  degrade` records an unavailable backend; reviews run on the STAGED tree; `run-gates --final`
85
108
  mints the ONE receipt `commit-guard --check` gates the commit against.
86
109
 
110
+ On an **ARMED flow**, a **bridge-raised** finding uses this order: the round is open; dispatch
111
+ its consult with a nonce; WAIT and READ; accept or correct the fold; run
112
+ `flow-writer consult-attestation <planId> --backend <id> --nonce <n> --proposed-fix-digest
113
+ <the-sha256-of-the-fold-text>`; then edit. The attestation records the manifest and fold digest,
114
+ never the run or answer. A **lens-raised** finding instead re-dispatches the lens without a nonce
115
+ (WAIT and READ, edit as accepted or corrected); it mints no manifest and no attestation; only its
116
+ per-round participation rides `internal-attestation`.
117
+
87
118
  **Finding scope** — every finding NAMES the invariant its fix enforces, BEFORE the edit, every
88
119
  round. Already an acceptance criterion (*Verification*'s `- ` bullets) → **fold here**. It would
89
120
  have to be ADDED → the **narrow fix** for the found site ships now (red first) and ONLY the
@@ -93,8 +124,24 @@ Each ledger row is one logical commit.
93
124
  finding counts only if it changes a WRITE/REMOVE decision or is a false statement in shipped
94
125
  text; a repeat finding in one subarea routes to SUBTRACTION, not a fourth patch.
95
126
  6. **Gates** — the project's verification gate to green.
96
- 7. **Commit boundary** — the orchestrator makes the single commit; a backend never commits; the
127
+ 7. **Commit boundary** — the orchestrator makes the single commit; every other carrier never commits; the
97
128
  commit-approval policy lives in the project's own rules.
98
129
  8. **After the last row** — the project-declared release or extra stages (the `workflow:methodology`
99
130
  slot; this canon bakes in none) and then `## Phase: Cleanup` (*Cleanup, and the plan's own
100
131
  life*) run as rows of their own, each through steps 1–7.
132
+
133
+ ## routine
134
+
135
+ Slots: carrier, parallel
136
+
137
+ 1. **Name the chore and its slices** — gate triage, sweeps, regeneration, fixture builds; never
138
+ the changelog; each slice bounded and file-disjoint.
139
+ 2. **Resolve the recipe** — `carrier` and `parallel` from `docs/ai/orchestration.json` + readiness
140
+ (`--override <slot>=<value>` per run).
141
+ 3. **Carry it** — Solo: the orchestrator does it. Subagent classifies each slice: read-only (a
142
+ sweep, gate triage) rides its placed read-only vehicle, or is carried Solo with a stated reason
143
+ when that vehicle is absent; write-capable (a regeneration, a fixture build) rides the executor.
144
+ Dispatch in the background, concurrently when `parallel` is on.
145
+ 4. **Verify** — every returned slice, by running its suites yourself.
146
+ 5. **The commit boundary is unchanged** — when an accepted slice changed the tree, the orchestrator
147
+ alone commits; a read-only chore has no commit boundary; a carrier never commits.