@sabaiway/agent-workflow-engine 1.15.0 → 1.17.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 +35 -0
- package/SKILL.md +1 -1
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/agent-rules-lens-priors.md +33 -0
- package/references/agent-rules-lens.md +1 -1
- package/references/orchestration.md +27 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,41 @@ 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.17.0 — Prompt-economy canon gains a writer-batch clause + two sandbox-lane sentences (REPORT-FACTS train D5/D6, AD-054)
|
|
8
|
+
|
|
9
|
+
A **feature** release (ships with kit 1.47.0 / memory 2.3.0 / bridges 2.7.0+2.6.0). The cost-lanes
|
|
10
|
+
canon (`references/orchestration.md` §5) and the agent-rules lens gain:
|
|
11
|
+
- **Writer economy** — a stage's repeated WRITER commands batch into ONE invocation (the review-ledger
|
|
12
|
+
triad rides one batched write, other stage writers combine via one launcher per stage); never one
|
|
13
|
+
writer call at a time. Rendered on all three prompt-economy surfaces (orchestration §5, the lens
|
|
14
|
+
fragment, the kit cost-lanes advisor), the lens re-rendered into both templates, and the outgoing
|
|
15
|
+
lens body appended to the append-only prior store.
|
|
16
|
+
- **Sandbox lanes** — two sentences under the sandbox-lanes block: (i) a **pre-dispatch host-diff**
|
|
17
|
+
(before the first dispatch of each bridge, diff its manifest `networkHosts` against the live sandbox
|
|
18
|
+
allow-list — a missing host is surfaced to the maintainer, never fired into a known prompt); (ii)
|
|
19
|
+
**nested-sandbox honesty** (a backend CLI shipping its own OS sandbox cannot run nested inside a
|
|
20
|
+
harness sandbox — route it outside on the OBSERVED failure, never a preemptive blanket).
|
|
21
|
+
|
|
22
|
+
## 1.16.0 — Prompt-economy canon: the cost lanes learn autonomy-preserving dispatch (REC-UX-REWORK D7, AD-053)
|
|
23
|
+
|
|
24
|
+
A **feature** release (ships with kit 1.46.0 / memory 2.2.0). The cost-lanes canon
|
|
25
|
+
(`references/orchestration.md` §5) gains the **prompt-economy clause**: (a) read-only fan-out
|
|
26
|
+
(research / sweeps / extraction) runs ONLY on restricted-tool vehicles — a full-tool subagent for
|
|
27
|
+
read-only work is a forbidden lane downgrade (an invisible prompt-flood plus blast radius, not just
|
|
28
|
+
tokens), and a subagent is never instructed to shell out for facts obtainable read-only; (b) the
|
|
29
|
+
orchestrator's own shell form is ONE plain pipeline per call (a `;`/`&&` chain or env-prefixed
|
|
30
|
+
invocation never matches a prefix allow rule); (c) a fan-out LAUNCHER that gates per call yields to
|
|
31
|
+
the agent-spawn lane — **capability-gated**: without restricted-tool vehicles (a host offering only
|
|
32
|
+
full-tool agents included), read-only research stays in the orchestrator's own context, never a
|
|
33
|
+
vehicle mandate a host cannot satisfy.
|
|
34
|
+
The quality/speed guard rides in canon (the clause narrows TOOLS for read-only work only —
|
|
35
|
+
judgment, code, synthesis stay at the frontier lane) with the honest limit stated (no deterministic
|
|
36
|
+
gate classifies a dispatch — enforcement is canon at the point of use + placed vehicles + the retro
|
|
37
|
+
loop). The `agent-rules-lens.md` cost-lanes line carries the same clause (the outgoing body is
|
|
38
|
+
appended to the append-only prior store, so unmodified in-the-wild deployments converge on first
|
|
39
|
+
touch); one distinctive token per invariant is drift-guarded on all three surfaces (canon · the kit
|
|
40
|
+
advisor render · the lens).
|
|
41
|
+
|
|
7
42
|
## 1.15.0 — Canon autonomy prose + the sandbox cost-lane (AD-044 Plan 4)
|
|
8
43
|
|
|
9
44
|
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.
|
|
6
|
+
version: '1.17.0'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# agent-workflow-engine
|
package/capability.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sabaiway/agent-workflow-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.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,36 @@ 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.
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
<!-- prior: 2026-07-13 (AD-054) → pre-writer-economy outgoing — the fragment as of the writer-batch clause landing (provenance intro + cost lanes + prompt-economy, no writer-economy) -->
|
|
99
|
+
### 2.x. Planning, review & process-fidelity invariants
|
|
100
|
+
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.)
|
|
101
|
+
- **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.
|
|
102
|
+
- **Right altitude.** Pin intent + invariants + acceptance criteria (named tests); leave fine code-mechanics to Execute, where prose cannot diverge from reality.
|
|
103
|
+
- **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.
|
|
104
|
+
- **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.
|
|
105
|
+
- **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.
|
|
106
|
+
- **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.
|
|
107
|
+
- **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**.
|
|
108
|
+
- **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.
|
|
109
|
+
- **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.
|
|
110
|
+
- **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.
|
|
111
|
+
- **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.
|
|
112
|
+
- **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.
|
|
@@ -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. **Writer economy:** a stage's repeated WRITER commands batch into ONE invocation — the review-ledger triad rides one batched write, other stage writers combine via one launcher per stage; never one writer call at a time (each write is its own prompt).
|
|
@@ -131,13 +131,39 @@ 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. **(d)** a stage that fires repeated WRITER commands
|
|
147
|
+
batches them — the review-ledger triad (records / classifications / overrides) rides ONE batched
|
|
148
|
+
write, and the remaining stage writers combine via one launcher per stage; never
|
|
149
|
+
one writer call at a time (each write is its own prompt). The clause narrows
|
|
150
|
+
TOOLS for read-only work only — judgment, code, and synthesis stay at the frontier lane, and a
|
|
151
|
+
task that genuinely needs to run or write keeps a full-tool subagent. **Honest limit:**
|
|
152
|
+
no deterministic gate classifies a dispatch — enforcement is this canon at the point of use,
|
|
153
|
+
the placed vehicles, and the retro loop.
|
|
154
|
+
|
|
134
155
|
**Sandbox lanes.** Under an OS sandbox the lanes split once more by **surface class**: the L0
|
|
135
156
|
surfaces are **sandbox-safe** (gate/ledger/state/fold checks, git reads, plain no-network tests);
|
|
136
157
|
the bridge wrappers are **genuinely unsandboxed** (they need network); npm-cache-touching commands
|
|
137
158
|
are **COMMAND-SHAPE dependent** — first try the sandbox-safe shape (cache under `$TMPDIR`,
|
|
138
159
|
offline/notifier off) before moving anything out. Two driving rules: **move ONLY the failing
|
|
139
160
|
command out of the sandbox, never its class**, and **BATCH consecutive unsandboxed calls** — a
|
|
140
|
-
blanket unsandbox after one failure is the canonical over-reaction.
|
|
161
|
+
blanket unsandbox after one failure is the canonical over-reaction. **Pre-dispatch host-diff:**
|
|
162
|
+
before the FIRST dispatch of each bridge, diff its manifest `networkHosts` against the live
|
|
163
|
+
sandbox's allowed hosts — a missing host is surfaced to the maintainer BEFORE dispatching, never
|
|
164
|
+
fired into a known prompt. **Nested-sandbox honesty:** a backend CLI that ships its OWN OS sandbox
|
|
165
|
+
cannot run nested inside a harness sandbox — route it outside (an excluded command / a per-run
|
|
166
|
+
consented bypass) on the OBSERVED failure, never a preemptive blanket.
|
|
141
167
|
|
|
142
168
|
**Incident repair (your own error) defaults down-lane:** salvage recorded state first (journals,
|
|
143
169
|
transcripts, git), replay it deterministically (L0), hand the leftovers to L1 in one batch —
|