@sabaiway/agent-workflow-engine 1.15.0 → 1.16.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,26 @@ 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 `2.0.0`).
6
6
 
7
+ ## 1.16.0 — Prompt-economy canon: the cost lanes learn autonomy-preserving dispatch (REC-UX-REWORK D7, AD-053)
8
+
9
+ A **feature** release (ships with kit 1.46.0 / memory 2.2.0). The cost-lanes canon
10
+ (`references/orchestration.md` §5) gains the **prompt-economy clause**: (a) read-only fan-out
11
+ (research / sweeps / extraction) runs ONLY on restricted-tool vehicles — a full-tool subagent for
12
+ read-only work is a forbidden lane downgrade (an invisible prompt-flood plus blast radius, not just
13
+ tokens), and a subagent is never instructed to shell out for facts obtainable read-only; (b) the
14
+ orchestrator's own shell form is ONE plain pipeline per call (a `;`/`&&` chain or env-prefixed
15
+ invocation never matches a prefix allow rule); (c) a fan-out LAUNCHER that gates per call yields to
16
+ the agent-spawn lane — **capability-gated**: without restricted-tool vehicles (a host offering only
17
+ full-tool agents included), read-only research stays in the orchestrator's own context, never a
18
+ vehicle mandate a host cannot satisfy.
19
+ The quality/speed guard rides in canon (the clause narrows TOOLS for read-only work only —
20
+ judgment, code, synthesis stay at the frontier lane) with the honest limit stated (no deterministic
21
+ gate classifies a dispatch — enforcement is canon at the point of use + placed vehicles + the retro
22
+ loop). The `agent-rules-lens.md` cost-lanes line carries the same clause (the outgoing body is
23
+ appended to the append-only prior store, so unmodified in-the-wild deployments converge on first
24
+ touch); one distinctive token per invariant is drift-guarded on all three surfaces (canon · the kit
25
+ advisor render · the lens).
26
+
7
27
  ## 1.15.0 — Canon autonomy prose + the sandbox cost-lane (AD-044 Plan 4)
8
28
 
9
29
  A **feature** release (ships with kit 1.45.0 / memory 2.1.0). This publish delivers the Plan-3
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.15.0'
6
+ version: '1.16.0'
7
7
  ---
8
8
 
9
9
  # agent-workflow-engine
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.15.0",
6
+ "version": "1.16.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.15.0",
3
+ "version": "1.16.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",
@@ -77,3 +77,19 @@ Apply these when authoring a plan, reviewing, folding a finding, or editing code
77
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
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
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.
80
+
81
+ <!-- prior: 2026-07-12 (AD-053) → pre-prompt-economy outgoing — the fragment as of the D7 clause landing (provenance intro + cost lanes, no prompt-economy) -->
82
+ ### 2.x. Planning, review & process-fidelity invariants
83
+ 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.)
84
+ - **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.
85
+ - **Right altitude.** Pin intent + invariants + acceptance criteria (named tests); leave fine code-mechanics to Execute, where prose cannot diverge from reality.
86
+ - **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.
87
+ - **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.
88
+ - **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.
89
+ - **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.
90
+ - **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**.
91
+ - **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.
92
+ - **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.
93
+ - **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.
94
+ - **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.
95
+ - **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.
@@ -11,4 +11,4 @@ Apply these when authoring a plan, reviewing, folding a finding, or editing code
11
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
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
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.
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. **Prompt economy:** read-only fan-out (research/sweeps/extraction) runs ONLY on restricted-tool vehicles — a full-tool subagent for read-only work is a forbidden lane downgrade (invisible prompt-flood + blast radius), and a subagent is never told to shell out for facts obtainable read-only; the orchestrator's own shell form is ONE plain pipeline per call (a `;`/`&&` chain or env-prefixed invocation never matches a prefix allow rule); a fan-out launcher that gates per call yields to the agent-spawn lane — capability-gated: without restricted-tool vehicles (generic full-tool spawning does not count), read-only research stays in the orchestrator's own context, never a vehicle mandate a host cannot satisfy. Judgment, code, synthesis stay at the frontier lane (a task that genuinely runs/writes keeps a full-tool subagent); honest limit: no deterministic gate classifies a dispatch — canon at the point of use + placed vehicles + the retro loop.
@@ -131,6 +131,24 @@ approval asks (commit / push / publish — cost tiering never touches approval g
131
131
  **Asymmetric pairing** is the default composition: the cheap lane drafts, a deterministic tool or
132
132
  the frontier verifies and signs — never the reverse.
133
133
 
134
+ **Prompt economy (autonomy-preserving dispatch).** Under a zero-prompt autonomy bar the lanes also
135
+ bound the TOOLS a dispatch may carry: **(a)** read-only fan-out — research, sweeps, extraction —
136
+ runs ONLY on **restricted-tool vehicles** (read-only tools, no shell); handing a full-tool
137
+ subagent to read-only work is a **forbidden lane downgrade** — an invisible prompt-flood plus
138
+ blast radius, not just tokens — and a subagent is never instructed to run a shell command for
139
+ facts obtainable read-only. **(b)** The orchestrator's own shell form: ONE plain pipeline per call
140
+ — a `;`/`&&` chain or an env-prefixed invocation never matches a prefix allow rule, so each such
141
+ call is a prompt. **(c)** A fan-out LAUNCHER tool may itself gate per call — under a
142
+ zero-prompt bar prefer the agent-spawn lane with placed vehicles. This clause is
143
+ **capability-gated** (route by what the host HAS): on a harness with restricted-tool subagent
144
+ vehicles, use them; WITHOUT restricted-tool vehicles — whether or not generic full-tool spawning
145
+ exists — read-only research stays in the orchestrator's own context —
146
+ never a vehicle mandate a host cannot satisfy. The clause narrows
147
+ TOOLS for read-only work only — judgment, code, and synthesis stay at the frontier lane, and a
148
+ task that genuinely needs to run or write keeps a full-tool subagent. **Honest limit:**
149
+ no deterministic gate classifies a dispatch — enforcement is this canon at the point of use,
150
+ the placed vehicles, and the retro loop.
151
+
134
152
  **Sandbox lanes.** Under an OS sandbox the lanes split once more by **surface class**: the L0
135
153
  surfaces are **sandbox-safe** (gate/ledger/state/fold checks, git reads, plain no-network tests);
136
154
  the bridge wrappers are **genuinely unsandboxed** (they need network); npm-cache-touching commands