@sabaiway/agent-workflow-engine 1.12.0 → 1.14.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 +40 -0
- package/README.md +12 -3
- package/SKILL.md +9 -1
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/agent-rules-lens-priors.md +79 -0
- package/references/agent-rules-lens.md +14 -0
- package/references/planning.md +2 -0
- package/references/procedures.md +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,46 @@ 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.14.0 — The review canon names its computed instrument, activity-aware (AD-046)
|
|
8
|
+
|
|
9
|
+
A **feature** release (canon content + guards; installer unchanged; deployment-lineage head stays
|
|
10
|
+
`1.3.0` — no migration). The kit's review-round ledger (AD-045 / AD-046) is now NAMED by the canon,
|
|
11
|
+
at the right activity scope:
|
|
12
|
+
|
|
13
|
+
- **`references/procedures.md`** — the plan-**execution** review step names the ledger (record ·
|
|
14
|
+
`--status` · `--check` as the loop's gate; the exit contract stays in the tool's own header —
|
|
15
|
+
point, don't restate); the review steps of BOTH activities gain the triage classification
|
|
16
|
+
vocabulary (`fixable-bug / inherent-layer-residual / escalate`; a minor never forces triage);
|
|
17
|
+
plan-**authoring** carries NO tool pointer — the ledger is plan-execution-scoped.
|
|
18
|
+
- **`references/planning.md` §9** — a new **"Computed instrument (plan-execution)"** paragraph: the
|
|
19
|
+
stop decision is READ from the ledger, never remembered; stated neutrally that the same per-round
|
|
20
|
+
tally + classification discipline governs plan-authoring review.
|
|
21
|
+
- **Drift-guards in BOTH directions** — `test/procedures-canon.test.mjs` pins the pointer INSIDE the
|
|
22
|
+
plan-execution review step (a step extractor, not a whole-section match) and its ABSENCE from
|
|
23
|
+
plan-authoring; `test/planning-canon.test.mjs` pins §9's ledger naming + the exact scope phrase.
|
|
24
|
+
Lens files untouched (the 22 discipline tokens unchanged).
|
|
25
|
+
|
|
26
|
+
## 1.13.0 — The agent-rules lens gets its ONE canonical home here (slot-render, AD-041)
|
|
27
|
+
|
|
28
|
+
A **feature** release (canon content + its guard; installer unchanged; deployment-lineage head
|
|
29
|
+
stays `1.3.0` — no migration). The planning/review/process-fidelity lens block that used to be
|
|
30
|
+
hand-mirrored across the family's `agent_rules.md` templates now lives HERE, once:
|
|
31
|
+
|
|
32
|
+
- **`references/agent-rules-lens.md`** — the canonical lens block (number-neutral `### 2.x.`
|
|
33
|
+
heading). Its intro now carries the provenance clause (rendered from the canon; refreshed on
|
|
34
|
+
upgrade; a custom edit is preserved verbatim, but flagged). The family kit renders this into a
|
|
35
|
+
deployed `docs/ai/agent_rules.md` region and refreshes it on bootstrap/upgrade.
|
|
36
|
+
- **`references/agent-rules-lens-priors.md`** — the **append-only store** of every lens body a
|
|
37
|
+
previous release shipped (all 4 historical vintages harvested from the template git history,
|
|
38
|
+
including the outgoing pre-1.13.0 body). The frozen delimiter format is documented in-file.
|
|
39
|
+
A future canon wording change edits the fragment AND appends the outgoing body — both files
|
|
40
|
+
in THIS package, so it ships as an **engine-only release** (the AD-041 measurement clause).
|
|
41
|
+
- **`test/lens-fragment.test.mjs`** — canon-presence guard: the 22 discipline tokens (the single
|
|
42
|
+
token list going forward), heading shape, path-neutrality, priors shape + the computed
|
|
43
|
+
pre-1.13.0 membership, injected non-vacuity; CRLF-tolerant reads.
|
|
44
|
+
- `SKILL.md` / `README.md` payload lists name the two new files (slot-fragment counts went
|
|
45
|
+
count-free). Tarball 12 → 14 files, pinned by `package-content.test.mjs`.
|
|
46
|
+
|
|
7
47
|
## 1.12.0 — Plans carry a home for review-settled decisions (§7 optional `## Decisions (locked)`)
|
|
8
48
|
|
|
9
49
|
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),
|
|
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
|
|
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.
|
|
6
|
+
version: '1.14.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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sabaiway/agent-workflow-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.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.
|
package/references/planning.md
CHANGED
|
@@ -132,3 +132,5 @@ These disciplines keep a plan converging instead of churning, and keep a fold or
|
|
|
132
132
|
**Convergence bar.** A review loop is CLEAN only when one round returns **0 blockers + 0 majors** from EVERY named backend the recipe runs (nits / non-blocking + a ship verdict is the stop). FOLDING a finding is NOT convergence — re-review after folding. This §9 governs the ALTITUDE at which you reach clean (fix the major, or raise it to an explicit acceptance invariant Execute must meet) — it NEVER lowers the bar to "majors folded".
|
|
133
133
|
|
|
134
134
|
**Convergence heuristic.** When a review round keeps finding code-mechanism issues on a stable architecture, STOP refining prose — either raise the spec to invariant + acceptance altitude, or hand the mechanics to Execute. Do not re-litigate code mechanics in the plan.
|
|
135
|
+
|
|
136
|
+
**Computed instrument (plan-execution).** The **review-ledger** computes the crossover-stop for the plan-execution (code) loop: each round and each triage classification — **fixable-bug** (a fold pinned by a red→green test) / **inherent-layer-residual** (raised to an acceptance criterion) / **escalate** (a maintainer decision) — is recorded, and the stop decision is READ from the ledger, never remembered; its `--check` is the loop's gate (the exit contract lives in the tool's own header — point, don't restate). The same per-round tally + classification discipline governs plan-authoring review; the ledger itself is plan-execution-scoped.
|
package/references/procedures.md
CHANGED
|
@@ -69,7 +69,10 @@ Produce a self-contained, cold-readable plan, reviewed to the configured depth b
|
|
|
69
69
|
exhausting the strictest backend. Run a **self-consistency** read before every re-review and route an
|
|
70
70
|
all-mechanics/CI or prose-only artifact to a **thin plan + diff-review** ([`planning.md`](planning.md)
|
|
71
71
|
§9). Each round MUST emit **{round N · finding-origin tally (first-draft / fold-induced / mechanics) ·
|
|
72
|
-
per-backend verdict}** so the crossover is a computed signal, not a remembered rule.
|
|
72
|
+
per-backend verdict}** so the crossover is a computed signal, not a remembered rule. At the cap,
|
|
73
|
+
classify every surviving blocking finding — **fixable-bug** (fold ONCE as a red→green test, re-review)
|
|
74
|
+
/ **inherent-layer-residual** (document + raise to an acceptance criterion) / **escalate** (the
|
|
75
|
+
maintainer decides); a minor never forces triage.
|
|
73
76
|
6. **Present for approval** — surface the finished plan to the user; do not begin execution here. A
|
|
74
77
|
harness "approved — start coding" prompt (**ExitPlanMode**) authorizes the PLAN only
|
|
75
78
|
([`planning.md`](planning.md) §6); continuing into `plan-execution` is a deliberate transition taken
|
|
@@ -106,7 +109,11 @@ Execute an approved plan Step by Step; each Step is one logical commit.
|
|
|
106
109
|
runs every named backend **every round** (recipe fidelity, [`orchestration.md`](orchestration.md) §4);
|
|
107
110
|
loop to **0 blockers + 0 majors** from every backend before the gate. Each round MUST emit
|
|
108
111
|
**{round N · finding-origin tally · per-backend verdict}**; when backends diverge, that is the
|
|
109
|
-
crossover — resolve at altitude, not by exhausting the strictest backend.
|
|
112
|
+
crossover — resolve at altitude, not by exhausting the strictest backend. Classify survivors at the
|
|
113
|
+
cap the same way (**fixable-bug / inherent-layer-residual / escalate**). This loop's computed
|
|
114
|
+
instrument is the **review-ledger**: record each round + triage, read the stop from its `--status`
|
|
115
|
+
render (it replaces the hand-composed tally), and wire `review-ledger --check` as the gate — the
|
|
116
|
+
exit contract lives in the tool's own header, never restated here.
|
|
110
117
|
6. **Gates** — run the project's verification gate (tests + checks) to green before committing.
|
|
111
118
|
7. **Commit boundary** — the orchestrator makes the single commit for the Step; a backend never
|
|
112
119
|
commits. The project's commit-approval policy (e.g. ask first) lives in the project's own rules.
|