@sabaiway/agent-workflow-engine 1.12.0 → 1.13.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,27 @@ 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 `1.3.0`).
6
6
 
7
+ ## 1.13.0 — The agent-rules lens gets its ONE canonical home here (slot-render, AD-041)
8
+
9
+ A **feature** release (canon content + its guard; installer unchanged; deployment-lineage head
10
+ stays `1.3.0` — no migration). The planning/review/process-fidelity lens block that used to be
11
+ hand-mirrored across the family's `agent_rules.md` templates now lives HERE, once:
12
+
13
+ - **`references/agent-rules-lens.md`** — the canonical lens block (number-neutral `### 2.x.`
14
+ heading). Its intro now carries the provenance clause (rendered from the canon; refreshed on
15
+ upgrade; a custom edit is preserved verbatim, but flagged). The family kit renders this into a
16
+ deployed `docs/ai/agent_rules.md` region and refreshes it on bootstrap/upgrade.
17
+ - **`references/agent-rules-lens-priors.md`** — the **append-only store** of every lens body a
18
+ previous release shipped (all 4 historical vintages harvested from the template git history,
19
+ including the outgoing pre-1.13.0 body). The frozen delimiter format is documented in-file.
20
+ A future canon wording change edits the fragment AND appends the outgoing body — both files
21
+ in THIS package, so it ships as an **engine-only release** (the AD-041 measurement clause).
22
+ - **`test/lens-fragment.test.mjs`** — canon-presence guard: the 22 discipline tokens (the single
23
+ token list going forward), heading shape, path-neutrality, priors shape + the computed
24
+ pre-1.13.0 membership, injected non-vacuity; CRLF-tolerant reads.
25
+ - `SKILL.md` / `README.md` payload lists name the two new files (slot-fragment counts went
26
+ count-free). Tarball 12 → 14 files, pinned by `package-content.test.mjs`.
27
+
7
28
  ## 1.12.0 — Plans carry a home for review-settled decisions (§7 optional `## Decisions (locked)`)
8
29
 
9
30
  A **feature** release (canon text + its tests; installer unchanged; deployment-lineage head stays
package/README.md CHANGED
@@ -4,8 +4,9 @@
4
4
  methodology *text* — the Plan → Phase → Step vocabulary, 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), and the two bounded slot fragments the family kit injects into a deployed project's
8
- `AGENTS.md`.
7
+ Delegated), the bounded slot fragments the family kit injects into a deployed project's
8
+ `AGENTS.md`, and the canonical agent-rules lens block the kit renders into a deployed
9
+ `docs/ai/agent_rules.md`.
9
10
 
10
11
  This is the **methodology engine** of the `agent-workflow` family — the canonical source the
11
12
  rest of the family builds on. It is **content**, not a runtime: it reads nothing, writes
@@ -53,11 +54,19 @@ the canonical methodology reference on disk:
53
54
  - [`references/procedures.md`](references/procedures.md) — the canonical **activity-procedures** canon:
54
55
  the named activities (`plan-authoring`, `plan-execution`) as ordered steps with typed recipe slots,
55
56
  read live and rendered by the read-only `/agent-workflow-kit procedures <activity>`.
57
+ - [`references/agent-rules-lens.md`](references/agent-rules-lens.md) — the canonical **agent-rules
58
+ lens** block (the planning/review/process-fidelity invariants) the kit renders into a deployed
59
+ `docs/ai/agent_rules.md` region and refreshes on upgrade — a canon wording change ships as an
60
+ engine-only release.
61
+ - [`references/agent-rules-lens-priors.md`](references/agent-rules-lens-priors.md) — the
62
+ **append-only store** of previously-shipped lens bodies; the kit refreshes a deployed region only
63
+ when it matches a known body (a customized region is preserved verbatim).
56
64
 
57
65
  ## What this package ships
58
66
 
59
67
  `SKILL.md` (the canon overview + ownership rule), `references/` (the full methodology + the
60
- orchestration + activity-procedures references + the two bounded slot fragments), `capability.json`
68
+ orchestration + activity-procedures references + the bounded slot fragments + the agent-rules lens
69
+ fragment and its prior store), `capability.json`
61
70
  (the family manifest), and this installer. It ships **no** family-wide tooling (the schema/validator/injection live in the
62
71
  composition root) and mutates nothing — preserving "knows nobody".
63
72
 
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: agent-workflow-engine
3
3
  description: Canonical home of the agent-workflow planning methodology — the Plan→Phase→Step→Substep vocabulary, plan lifecycle, queue.md series index, mandatory Cleanup phase, 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.
4
4
  disable-model-invocation: true
5
5
  metadata:
6
- version: '1.12.0'
6
+ version: '1.13.0'
7
7
  ---
8
8
 
9
9
  # agent-workflow-engine
@@ -39,6 +39,14 @@ slot fill is needed but the engine is absent, the kit's reconcile **fails loudly
39
39
  slots** that bind to the orchestration recipes, composing with `planning.md` without restating it. It
40
40
  stays generic (no project-specific stages baked in). The kit reads it live and renders the steps +
41
41
  the resolved effective recipe per slot via the read-only `/agent-workflow-kit procedures <activity>`.
42
+ - [`references/agent-rules-lens.md`](references/agent-rules-lens.md) — the canonical **agent-rules
43
+ lens** block (the planning/review/process-fidelity invariants). The kit renders it into a deployed
44
+ `docs/ai/agent_rules.md` `### 2.x.` region (heading-anchored, no markers) and refreshes that region
45
+ on bootstrap/upgrade — a canon wording change edits this file (plus the prior store below) and ships
46
+ as an engine-only release.
47
+ - [`references/agent-rules-lens-priors.md`](references/agent-rules-lens-priors.md) — the **append-only
48
+ store** of every lens body a previous release shipped. The kit refreshes a deployed region only when
49
+ its body matches the fragment or one of these entries; a customized region is preserved verbatim.
42
50
 
43
51
  ## Ownership rule (the engine knows nobody)
44
52
 
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": "1.12.0",
6
+ "version": "1.13.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": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Canonical home of the agent-workflow planning methodology — the Plan→Phase→Step vocabulary, 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",
@@ -0,0 +1,79 @@
1
+ # agent-rules-lens — known-prior canonical bodies (append-only)
2
+
3
+ Every lens-block body a PREVIOUS release ever shipped in an `agent_rules.md` template. The family
4
+ composition root refreshes a deployed `### 2.x. Planning, review & process-fidelity invariants`
5
+ region to the current `references/agent-rules-lens.md` ONLY when the deployed body
6
+ normalize-matches (heading number → `2.x`, trim, CRLF→LF) one of these entries — so every
7
+ unmodified in-the-wild deployment converges on first touch, while a customized region is
8
+ preserved verbatim. A canon wording change edits `agent-rules-lens.md` AND appends the outgoing
9
+ body here — both engine files, an engine-only release.
10
+
11
+ FROZEN FORMAT (an old reader must keep parsing a newer file — append entries, never reshape):
12
+
13
+ - Everything above the first delimiter line is this header; parsers ignore it.
14
+ - A delimiter is a line that starts with `<!-- prior` and ends with `-->`; text between is a
15
+ free-form provenance label (never parsed).
16
+ - An entry body is everything after its delimiter up to the next delimiter or end of file,
17
+ with leading/trailing blank lines trimmed.
18
+ - APPEND-ONLY: new entries go at the end of the file; never edit or remove an existing entry
19
+ (a deployment seeded from any past release must keep matching forever).
20
+
21
+ <!-- prior: 2026-06-30 (AD-029) — the seven process-fidelity invariants land -->
22
+ ### 2.x. Planning, review & process-fidelity invariants
23
+ Apply these when authoring a plan, reviewing, folding a finding, or editing code — the layer read **before any code change**. (Full canon: the project's planning / workflow-methodology + orchestration canon.)
24
+ - **Fold by code, not prose.** Before folding a code-touching finding into a plan or change, read the cited `file:line` and cite it — a prose fold drifts from the code and seeds the next bug.
25
+ - **Right altitude.** Pin intent + invariants + acceptance criteria (named tests); leave fine code-mechanics to Execute, where prose cannot diverge from reality.
26
+ - **No code-mechanics in the plan.** A Step still carries its exact paths + commands (the plan-structure / self-review canon); the ceiling is on *fold-bred* detail — a review fold must not push fine code-mechanics (`cd`, an env default, a flag) into prose. A fold that needs a mechanic is the trigger to write the test instead.
27
+ - **Test-as-spec.** Fold a code-touching finding into a red→green TEST, not a prose paragraph — the gate is the only deterministic checker; a paragraph cannot self-check.
28
+ - **Characterize-first.** Before editing UNCOVERED code, pin its current behavior in a green test, then edit — any unintended change goes red. Never edit what has no checker; first give it one. Keep edits atomic/reversible; prefer SUBTRACTIVE folds.
29
+ - **Heavy review at the diff.** Plan-review settles architecture only (≤2 rounds, stop at the pre-existing→fold-induced crossover); the exhaustive per-Step review runs against real compiling code + the full suite, where a regression fails a gate immediately.
30
+ - **Convergence bar.** A review loop is CLEAN only when one round returns **0 blockers + 0 majors** from EVERY backend the recipe names (nits + a ship verdict is the stop). Folding ≠ convergence — re-review after folding.
31
+ - **Recipe fidelity.** Council runs every backend the recipe names, **every round**; silently dropping a ready backend for quota/convenience is a forbidden downgrade — an unavailable backend is a LOUD, stated degrade, never a quiet drop.
32
+ - **ExitPlanMode ≠ execute.** A harness "approved — start coding" prompt authorizes the PLAN only; this methodology overrides it. Continue into execution only as a DELIBERATE transition after the plan + cold-start prompt exist, never an implicit slide.
33
+
34
+ <!-- prior: 2026-07-01 (AD-031) — review-loop economics: fold-minimally, per-round emission, divergence crossover -->
35
+ ### 2.x. Planning, review & process-fidelity invariants
36
+ Apply these when authoring a plan, reviewing, folding a finding, or editing code — the layer read **before any code change**. (Full canon: the project's planning / workflow-methodology + orchestration canon.)
37
+ - **Fold by code, not prose.** Before folding a code-touching finding into a plan or change, read the cited `file:line` and cite it — a prose fold drifts from the code and seeds the next bug.
38
+ - **Right altitude.** Pin intent + invariants + acceptance criteria (named tests); leave fine code-mechanics to Execute, where prose cannot diverge from reality.
39
+ - **No code-mechanics in the plan.** A Step still carries its exact paths + commands (the plan-structure / self-review canon); the ceiling is on *fold-bred* detail — a review fold must not push fine code-mechanics (`cd`, an env default, a flag) into prose. A fold that needs a mechanic is the trigger to write the test instead.
40
+ - **Test-as-spec.** Fold a code-touching finding into a red→green TEST, not a prose paragraph — the gate is the only deterministic checker; a paragraph cannot self-check.
41
+ - **Characterize-first.** Before editing UNCOVERED code, pin its current behavior in a green test, then edit — any unintended change goes red. Never edit what has no checker; first give it one. Keep edits atomic/reversible; prefer SUBTRACTIVE folds.
42
+ - **Fold minimally — prose has no checker.** An ephemeral, gitignored plan is prose with no executable checker; fold **minimally, in ONE place** and run a **self-consistency** read across the plan before every re-review — a fold that drifts several prose spots is what turns a 2-round review into churn.
43
+ - **Heavy review at the diff.** Plan-review settles architecture only (≤2 rounds, stop at the pre-existing→fold-induced crossover); the exhaustive per-Step review runs against real compiling code + the full suite, where a regression fails a gate immediately. **Backend divergence** (one backend grounded-ships while another keeps revising mechanics) IS that crossover — resolve at altitude, don't exhaust the strictest backend; route an all-mechanics/CI or prose-only artifact to a **thin plan + diff-review**.
44
+ - **Convergence bar.** A review loop is CLEAN only when one round returns **0 blockers + 0 majors** from EVERY backend the recipe names (nits + a ship verdict is the stop). Folding ≠ convergence — re-review after folding.
45
+ - **Per-round emission.** Every review round emits **{round N · finding-origin tally · per-backend verdict}** so the crossover is a computed, visible signal, not a remembered rule.
46
+ - **Recipe fidelity.** Council runs every backend the recipe names, **every round**; silently dropping a ready backend for quota/convenience is a forbidden downgrade — an unavailable backend is a LOUD, stated degrade, never a quiet drop.
47
+ - **ExitPlanMode ≠ execute.** A harness "approved — start coding" prompt authorizes the PLAN only; this methodology overrides it. Continue into execution only as a DELIBERATE transition after the plan + cold-start prompt exist, never an implicit slide.
48
+
49
+ <!-- prior: 2026-07-02 (AD-035) — the cost-lanes bullet lands -->
50
+ ### 2.x. Planning, review & process-fidelity invariants
51
+ Apply these when authoring a plan, reviewing, folding a finding, or editing code — the layer read **before any code change**. (Full canon: the project's planning / workflow-methodology + orchestration canon.)
52
+ - **Fold by code, not prose.** Before folding a code-touching finding into a plan or change, read the cited `file:line` and cite it — a prose fold drifts from the code and seeds the next bug.
53
+ - **Right altitude.** Pin intent + invariants + acceptance criteria (named tests); leave fine code-mechanics to Execute, where prose cannot diverge from reality.
54
+ - **No code-mechanics in the plan.** A Step still carries its exact paths + commands (the plan-structure / self-review canon); the ceiling is on *fold-bred* detail — a review fold must not push fine code-mechanics (`cd`, an env default, a flag) into prose. A fold that needs a mechanic is the trigger to write the test instead.
55
+ - **Test-as-spec.** Fold a code-touching finding into a red→green TEST, not a prose paragraph — the gate is the only deterministic checker; a paragraph cannot self-check.
56
+ - **Characterize-first.** Before editing UNCOVERED code, pin its current behavior in a green test, then edit — any unintended change goes red. Never edit what has no checker; first give it one. Keep edits atomic/reversible; prefer SUBTRACTIVE folds.
57
+ - **Fold minimally — prose has no checker.** An ephemeral, gitignored plan is prose with no executable checker; fold **minimally, in ONE place** and run a **self-consistency** read across the plan before every re-review — a fold that drifts several prose spots is what turns a 2-round review into churn.
58
+ - **Heavy review at the diff.** Plan-review settles architecture only (≤2 rounds, stop at the pre-existing→fold-induced crossover); the exhaustive per-Step review runs against real compiling code + the full suite, where a regression fails a gate immediately. **Backend divergence** (one backend grounded-ships while another keeps revising mechanics) IS that crossover — resolve at altitude, don't exhaust the strictest backend; route an all-mechanics/CI or prose-only artifact to a **thin plan + diff-review**.
59
+ - **Convergence bar.** A review loop is CLEAN only when one round returns **0 blockers + 0 majors** from EVERY backend the recipe names (nits + a ship verdict is the stop). Folding ≠ convergence — re-review after folding.
60
+ - **Per-round emission.** Every review round emits **{round N · finding-origin tally · per-backend verdict}** so the crossover is a computed, visible signal, not a remembered rule.
61
+ - **Recipe fidelity.** Council runs every backend the recipe names, **every round**; silently dropping a ready backend for quota/convenience is a forbidden downgrade — an unavailable backend is a LOUD, stated degrade, never a quiet drop.
62
+ - **ExitPlanMode ≠ execute.** A harness "approved — start coding" prompt authorizes the PLAN only; this methodology overrides it. Continue into execution only as a DELIBERATE transition after the plan + cold-start prompt exist, never an implicit slide.
63
+ - **Cost lanes.** Route every step to the **cheapest adequate executor** — L0 deterministic script (the batched gate matrix over `gates.json`, the rotation `--check`s) · L1 cheap subagent (extraction/drafting only; the orchestrator verifies) · L2 subscription bridge · L3 frontier judgment. A step with **no named guardrail does not move down** a lane, and the **red lines never move down** (council review models · real code · ADR/handover/changelog-entry wording · persuasive copy · go/no-go · the approval asks). Own-error repair: salvage recorded state first (L0/L1, batched), never frontier re-derivation.
64
+
65
+ <!-- prior: 2026-07-02 (AD-036) → pre-E4 outgoing — the checked-syntax B5 sharpening -->
66
+ ### 2.x. Planning, review & process-fidelity invariants
67
+ Apply these when authoring a plan, reviewing, folding a finding, or editing code — the layer read **before any code change**. (Full canon: the project's planning / workflow-methodology + orchestration canon.)
68
+ - **Fold by code, not prose.** Before folding a code-touching finding into a plan or change, read the cited `file:line` and cite it — a prose fold drifts from the code and seeds the next bug.
69
+ - **Right altitude.** Pin intent + invariants + acceptance criteria (named tests); leave fine code-mechanics to Execute, where prose cannot diverge from reality.
70
+ - **No code-mechanics in the plan.** A Step still carries its exact paths + commands (the plan-structure / self-review canon) — checked syntax: the plan's own Verification runs them against an explicit expected outcome or gate; the only other syntax a plan may carry is a literal fixture/schema fragment a named test copies or validates. Un-run, logic-bearing syntax — control-flow, a regex, a glob, a grammar, an algorithm body, a mini-DSL — never lives in plan prose, however plausible or shell-verified it looks: a fold or draft that wants one is the trigger to write the test instead.
71
+ - **Test-as-spec.** Fold a code-touching finding into a red→green TEST, not a prose paragraph — the gate is the only deterministic checker; a paragraph cannot self-check.
72
+ - **Characterize-first.** Before editing UNCOVERED code, pin its current behavior in a green test, then edit — any unintended change goes red. Never edit what has no checker; first give it one. Keep edits atomic/reversible; prefer SUBTRACTIVE folds.
73
+ - **Fold minimally — prose has no checker.** An ephemeral, gitignored plan is prose with no executable checker; fold **minimally, in ONE place** and run a **self-consistency** read across the plan before every re-review — a fold that drifts several prose spots is what turns a 2-round review into churn.
74
+ - **Heavy review at the diff.** Plan-review settles architecture only (≤2 rounds, stop at the pre-existing→fold-induced crossover); the exhaustive per-Step review runs against real compiling code + the full suite, where a regression fails a gate immediately. **Backend divergence** (one backend grounded-ships while another keeps revising mechanics) IS that crossover — resolve at altitude, don't exhaust the strictest backend; route an all-mechanics/CI or prose-only artifact to a **thin plan + diff-review**.
75
+ - **Convergence bar.** A review loop is CLEAN only when one round returns **0 blockers + 0 majors** from EVERY backend the recipe names (nits + a ship verdict is the stop). Folding ≠ convergence — re-review after folding.
76
+ - **Per-round emission.** Every review round emits **{round N · finding-origin tally · per-backend verdict}** so the crossover is a computed, visible signal, not a remembered rule.
77
+ - **Recipe fidelity.** Council runs every backend the recipe names, **every round**; silently dropping a ready backend for quota/convenience is a forbidden downgrade — an unavailable backend is a LOUD, stated degrade, never a quiet drop.
78
+ - **ExitPlanMode ≠ execute.** A harness "approved — start coding" prompt authorizes the PLAN only; this methodology overrides it. Continue into execution only as a DELIBERATE transition after the plan + cold-start prompt exist, never an implicit slide.
79
+ - **Cost lanes.** Route every step to the **cheapest adequate executor** — L0 deterministic script (the batched gate matrix over `gates.json`, the rotation `--check`s) · L1 cheap subagent (extraction/drafting only; the orchestrator verifies) · L2 subscription bridge · L3 frontier judgment. A step with **no named guardrail does not move down** a lane, and the **red lines never move down** (council review models · real code · ADR/handover/changelog-entry wording · persuasive copy · go/no-go · the approval asks). Own-error repair: salvage recorded state first (L0/L1, batched), never frontier re-derivation.
@@ -0,0 +1,14 @@
1
+ ### 2.x. Planning, review & process-fidelity invariants
2
+ Apply these when authoring a plan, reviewing, folding a finding, or editing code — the layer read **before any code change**. (Full canon: the project's planning / workflow-methodology + orchestration canon. This section is rendered from that canon and refreshed on upgrade; a custom edit is preserved verbatim, but flagged.)
3
+ - **Fold by code, not prose.** Before folding a code-touching finding into a plan or change, read the cited `file:line` and cite it — a prose fold drifts from the code and seeds the next bug.
4
+ - **Right altitude.** Pin intent + invariants + acceptance criteria (named tests); leave fine code-mechanics to Execute, where prose cannot diverge from reality.
5
+ - **No code-mechanics in the plan.** A Step still carries its exact paths + commands (the plan-structure / self-review canon) — checked syntax: the plan's own Verification runs them against an explicit expected outcome or gate; the only other syntax a plan may carry is a literal fixture/schema fragment a named test copies or validates. Un-run, logic-bearing syntax — control-flow, a regex, a glob, a grammar, an algorithm body, a mini-DSL — never lives in plan prose, however plausible or shell-verified it looks: a fold or draft that wants one is the trigger to write the test instead.
6
+ - **Test-as-spec.** Fold a code-touching finding into a red→green TEST, not a prose paragraph — the gate is the only deterministic checker; a paragraph cannot self-check.
7
+ - **Characterize-first.** Before editing UNCOVERED code, pin its current behavior in a green test, then edit — any unintended change goes red. Never edit what has no checker; first give it one. Keep edits atomic/reversible; prefer SUBTRACTIVE folds.
8
+ - **Fold minimally — prose has no checker.** An ephemeral, gitignored plan is prose with no executable checker; fold **minimally, in ONE place** and run a **self-consistency** read across the plan before every re-review — a fold that drifts several prose spots is what turns a 2-round review into churn.
9
+ - **Heavy review at the diff.** Plan-review settles architecture only (≤2 rounds, stop at the pre-existing→fold-induced crossover); the exhaustive per-Step review runs against real compiling code + the full suite, where a regression fails a gate immediately. **Backend divergence** (one backend grounded-ships while another keeps revising mechanics) IS that crossover — resolve at altitude, don't exhaust the strictest backend; route an all-mechanics/CI or prose-only artifact to a **thin plan + diff-review**.
10
+ - **Convergence bar.** A review loop is CLEAN only when one round returns **0 blockers + 0 majors** from EVERY backend the recipe names (nits + a ship verdict is the stop). Folding ≠ convergence — re-review after folding.
11
+ - **Per-round emission.** Every review round emits **{round N · finding-origin tally · per-backend verdict}** so the crossover is a computed, visible signal, not a remembered rule.
12
+ - **Recipe fidelity.** Council runs every backend the recipe names, **every round**; silently dropping a ready backend for quota/convenience is a forbidden downgrade — an unavailable backend is a LOUD, stated degrade, never a quiet drop.
13
+ - **ExitPlanMode ≠ execute.** A harness "approved — start coding" prompt authorizes the PLAN only; this methodology overrides it. Continue into execution only as a DELIBERATE transition after the plan + cold-start prompt exist, never an implicit slide.
14
+ - **Cost lanes.** Route every step to the **cheapest adequate executor** — L0 deterministic script (the batched gate matrix over `gates.json`, the rotation `--check`s) · L1 cheap subagent (extraction/drafting only; the orchestrator verifies) · L2 subscription bridge · L3 frontier judgment. A step with **no named guardrail does not move down** a lane, and the **red lines never move down** (council review models · real code · ADR/handover/changelog-entry wording · persuasive copy · go/no-go · the approval asks). Own-error repair: salvage recorded state first (L0/L1, batched), never frontier re-derivation.