llm-orchestrator 1.4.0 → 1.6.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/.claude-plugin/plugin.json +1 -1
- package/README.md +237 -45
- package/SKILL.md +30 -2
- package/adapters/agents.mjs +8 -5
- package/adapters/codex/index.mjs +0 -2
- package/adapters/commands.mjs +21 -1
- package/adapters/hooks.mjs +18 -6
- package/agents/advisor.md +53 -0
- package/agents/code-reviewer.md +1 -0
- package/agents/frontend-fixer.md +2 -1
- package/agents/frontend-specialist.md +2 -1
- package/agents/orchestrator.md +1 -1
- package/bin/budget.mjs +94 -0
- package/bin/cli-options.mjs +31 -10
- package/bin/discover-models.mjs +428 -13
- package/bin/doctor.mjs +54 -26
- package/bin/gate.mjs +1 -1
- package/bin/install.mjs +15 -8
- package/bin/llm-orchestrator.mjs +14 -3
- package/bin/model-thinking-report.mjs +1 -0
- package/bin/route.mjs +57 -18
- package/bin/strategy.mjs +234 -0
- package/bin/uninstall.mjs +3 -1
- package/commands/task.md +21 -1
- package/hooks/hooks.json +11 -0
- package/lib/adapter-renderer.mjs +131 -10
- package/lib/budget.mjs +269 -0
- package/lib/capability-resolver.mjs +59 -5
- package/lib/dispatch-contract.mjs +87 -24
- package/lib/file-lock.mjs +121 -0
- package/lib/first-run.mjs +53 -10
- package/lib/flow-gate.mjs +377 -71
- package/lib/installation.mjs +313 -75
- package/lib/learning.mjs +233 -0
- package/lib/project-discovery.mjs +4 -0
- package/lib/project-root.mjs +52 -0
- package/lib/router.mjs +473 -65
- package/lib/strategy-store.mjs +481 -0
- package/models/example-model-inventory.json +21 -10
- package/models/model-thinking-data.json +134 -2
- package/models/model-thinking-matrix.md +32 -0
- package/models/top-models.json +794 -44
- package/package.json +1 -1
- package/policies/capabilities.md +64 -10
- package/policies/dispatch.md +6 -1
- package/policies/learning.md +336 -0
- package/policies/routing.md +240 -63
- package/protocol.md +21 -0
- package/registries/agent-roles.json +43 -4
- package/registries/capabilities.json +2 -1
- package/registries/core-profile.json +29 -0
- package/registries/learning.json +219 -0
- package/registries/preferred-tools.json +85 -2
- package/registries/routing-matrix.json +61 -37
- package/registries/task-mappings.json +52 -6
- package/schemas/capability-contract.schema.json +1 -0
- package/schemas/flow-ledger.schema.json +8 -2
- package/schemas/installation-manifest.schema.json +56 -5
- package/schemas/learning.schema.json +139 -0
- package/schemas/routing-matrix.schema.json +23 -3
- package/schemas/top-models.schema.json +32 -6
- package/workflows/bug-fix.md +12 -0
- package/workflows/config.md +8 -0
- package/workflows/deploy.md +8 -0
- package/workflows/feature.md +17 -1
- package/workflows/incident.md +8 -0
- package/workflows/investigation.md +12 -0
- package/workflows/refactor.md +12 -0
- package/workflows/research.md +8 -0
- package/workflows/review.md +12 -0
package/policies/routing.md
CHANGED
|
@@ -31,9 +31,13 @@ copied verbatim from `models/model-thinking-data.json`.
|
|
|
31
31
|
node bin/route.mjs --task BUG_FIX --phase fix --area refund --risk critical --harness codex
|
|
32
32
|
node bin/route.mjs --task FEATURE --flow --complexity COMPLEX --provider openai --json
|
|
33
33
|
node bin/route.mjs --task FEATURE --phase implementation --include-candidates --cheapest-thinking
|
|
34
|
-
node bin/route.mjs --
|
|
34
|
+
node bin/route.mjs --task FEATURE --phase implementation --harness kilo --inventory inventory.json
|
|
35
|
+
node bin/route.mjs --list # task types, phases, roles, risk-floor areas, providers, every registry model
|
|
35
36
|
```
|
|
36
37
|
|
|
38
|
+
`--provider` accepts any provider the registry carries a model for (`route.mjs --list` prints them);
|
|
39
|
+
the list is read from `models/top-models.json`, not hard-coded.
|
|
40
|
+
|
|
37
41
|
`classify` resolves in this order: default routing → agent default → task-flow phase → complexity →
|
|
38
42
|
risk floor (upward only) → context rules → caps. Risk raises the **review** floor, never the
|
|
39
43
|
implementation tier — "route by risk, not by LOC" is mechanised, not merely advised. `rankModels`
|
|
@@ -70,33 +74,161 @@ explicitly in "Risk floors" below, so registry and prose carry the same 21 areas
|
|
|
70
74
|
On OpenCode and Kilo, resolve the actual `provider/model` identifier and variant from the runtime;
|
|
71
75
|
the incumbents below are role mappings, not guarantees of availability.
|
|
72
76
|
|
|
77
|
+
### What `models discover` can read
|
|
78
|
+
|
|
79
|
+
`llm-orchestrator models discover --harness <h>` has three read-only sources. None of them calls a
|
|
80
|
+
model.
|
|
81
|
+
|
|
82
|
+
| Source | Reads | Status it can give |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| `--input <snapshot.json>` | an active-session snapshot you supply | whatever the snapshot states: `exposed`, `configured` or `verified` |
|
|
85
|
+
| `--native` | the harness CLI's own listing (OpenCode only) | none — a bare public catalog proves nothing |
|
|
86
|
+
| `--config` | the model and provider ids named in the harness configuration | `configured` only |
|
|
87
|
+
|
|
88
|
+
`--config` reads, per harness: Claude Code `~/.claude/settings.json` (`model`, `availableModels` and
|
|
89
|
+
the model-id environment keys, by name); Codex `~/.codex/config.toml` (`model`, `model_provider`, top
|
|
90
|
+
level and `[profiles.*]`) and `~/.codex/models_cache.json` (each model's id and the efforts it lists);
|
|
91
|
+
OpenCode `~/.config/opencode/opencode.json[c]` and Kilo `~/.config/kilo/kilo.json[c]` / `~/.kilo`
|
|
92
|
+
(default models, per-agent model pins, each provider's model list). `--home <dir>` reads under
|
|
93
|
+
another directory instead of the user home. Every id it finds is `configured` with its source file
|
|
94
|
+
recorded, and the inventory status is `unknown`: **a configuration entry does not prove dispatch
|
|
95
|
+
works.** It never opens an auth file and never reads a credential, header or environment value other
|
|
96
|
+
than the model ids named above. The router seats only `exposed` or `verified` models, so a
|
|
97
|
+
config-discovered inventory is a list of what to confirm in the session, not something to route on.
|
|
98
|
+
|
|
99
|
+
### Matching an inventory id to a registry model
|
|
100
|
+
|
|
101
|
+
Harnesses and gateways spell the same model many ways. `lib/router.mjs` (`normalizeModelId`,
|
|
102
|
+
`resolveInventoryModel`) reduces an id by rule, never by resemblance:
|
|
103
|
+
|
|
104
|
+
1. a `[1m]` context-window marker is dropped;
|
|
105
|
+
2. `gateway/vendor/model` keeps the last path segment (`openrouter/anthropic/claude-opus-5-5`);
|
|
106
|
+
3. a `:free`, `-free` or `-contributor-free` suffix is dropped and recorded as a free variant;
|
|
107
|
+
4. a Vertex `@YYYYMMDD`, a Bedrock `-v1:N` and a dated `-YYYYMMDD` suffix are dropped — the date
|
|
108
|
+
only when it is a calendar date (2020–2039, month 01–12, day 01–31), never any eight digits;
|
|
109
|
+
5. Bedrock `region.vendor.` prefixes are dropped (`us.anthropic.claude-sonnet-5-v1:0`);
|
|
110
|
+
6. dots and dashes are the same character (`muse-spark-1.3` ≡ `muse-spark-1-3`).
|
|
111
|
+
|
|
112
|
+
The result must equal the normalised `key`, a per-harness `api_ids` value, the `canonical_api_id` or
|
|
113
|
+
an explicit `aliases` entry of **exactly one** registry model, and any vendor segment that names a
|
|
114
|
+
registry provider must be that model's provider. Anything else — `opus`, `gpt-6-sol-mini`,
|
|
115
|
+
`claude-sonnet-5-v2:0`, `openai/claude-sonnet-5`, an alias two models share — stays unmatched. A
|
|
116
|
+
wrong match would send real work to the wrong model, so unmatched is the safe failure.
|
|
117
|
+
|
|
118
|
+
- A matched row carries the **inventory's own id** as `api_id` and as `model_effective`: that is the
|
|
119
|
+
string the harness can dispatch. The registry id stays available as `registry_api_id`.
|
|
120
|
+
- When several inventory ids name one model, an exposed or verified id beats a configured one, the
|
|
121
|
+
provider's own id beats a gateway variant and that beats a free variant, then the stronger
|
|
122
|
+
availability wins. A free variant that is the only id is used and labelled — its quota and
|
|
123
|
+
retention terms may differ from the paid model's.
|
|
124
|
+
- An id whose vendor segments do not name the model's own provider (`ollama/kimi-k3`,
|
|
125
|
+
`us.claude-opus-5`) is a **gateway variant** (`variant: "gateway"`): what answers there is not
|
|
126
|
+
known to be the model the registry measured. `openrouter/anthropic/claude-opus-5-5` names the
|
|
127
|
+
provider and is not one.
|
|
128
|
+
- A free or gateway variant is routable on noncritical lanes only. It is never eligible for a
|
|
129
|
+
T4/T5 pair, an independent-review seat or a review row (`excluded_reason: "free variant: not
|
|
130
|
+
admitted for critical review"` / `"gateway variant: …"`).
|
|
131
|
+
- An inventory id that matches nothing is returned in the ranking as `admission: "unrated"` with
|
|
132
|
+
`excluded_reason: "unrated: not in the model registry"`, in its own block in `explain()`. It is
|
|
133
|
+
never seated, on any pair. A registry model that holds no tier (Grok 4.7, the Gemini 4 models) is
|
|
134
|
+
reported the same way when an inventory exposes it.
|
|
135
|
+
- Effort is resolved per model from its own registry `thinking.levels` on the scale `none < low <
|
|
136
|
+
medium < high < xhigh < max < ultra`. Only a model on the Codex ladder inherits the Codex ceiling
|
|
137
|
+
(T4 = `high` plus a second reviewer). When the inventory lists efforts for a model, that list is
|
|
138
|
+
evidence and a missing effort excludes the model; when it lists none, the effort is
|
|
139
|
+
unknown-but-allowed and the selection reason says so. `none` is the T0 end of `W T0–T1`: the seat
|
|
140
|
+
defaults to `low`, and runs at `none` when the inventory lists `none` and not `low` for a model
|
|
141
|
+
whose registry efforts include it (GPT-6 Luna). A model's own `thinking.tier_effort` names the
|
|
142
|
+
effort where its resolution row differs from the generic mapping (Luna `xhigh` at W T3, Astra
|
|
143
|
+
`xhigh` at F T4, GPT-6 Sol one notch down on S).
|
|
144
|
+
|
|
145
|
+
### The inventory ladder
|
|
146
|
+
|
|
147
|
+
The matrix hard-codes two ladders, Claude and Codex. Any other harness or provider — OpenCode, Kilo,
|
|
148
|
+
`--provider google` — takes its seats from the **inventory ladder**
|
|
149
|
+
(`registries/routing-matrix.json` → `inventory_ladder`, `inventoryLadder()` in `lib/router.mjs`):
|
|
150
|
+
for the pair's tier, the inventory-exposed registry models eligible there (an incumbent's tier seat
|
|
151
|
+
or a candidate's `tier_bands` placement), cheapest measured `$/task` first, then token price index,
|
|
152
|
+
under every admission rule and cap above. The first admitted model holds the seat, and
|
|
153
|
+
`model_requested` is that seat — never a default to the Claude row.
|
|
154
|
+
|
|
155
|
+
- Nothing eligible ⇒ `blocked: "no eligible model"`. Never a quieter tier, never a borrowed ladder.
|
|
156
|
+
- No hard-coded ladder **and no inventory** ⇒ blocked as well: a registry entry is not evidence that
|
|
157
|
+
this runtime can dispatch anything. `route --flow` says so per phase — `blocked: "no ladder for
|
|
158
|
+
this harness: pass --inventory (see models discover)"` — and exits 2; `--provider openai` or
|
|
159
|
+
`--provider anthropic` selects a ladder explicitly.
|
|
160
|
+
- Candidates, free variants and gateway variants still never take a T4/T5 pair, an
|
|
161
|
+
independent-review seat or a risk-floor review row.
|
|
162
|
+
- A flow phase gated by `risk_floor_review`, `independent_review` or `independent_challenge` is a
|
|
163
|
+
review seat, in `estimateFlow` and in `buildShardRouting` alike.
|
|
164
|
+
- A pair whose resolution row is empty for a ladder (W T3 on Claude) seats no model of that ladder:
|
|
165
|
+
the row says escalate to S, and the router follows the row.
|
|
166
|
+
|
|
73
167
|
## Tiers and provider models
|
|
74
168
|
|
|
75
169
|
| Tier | Role | Claude incumbent | Codex incumbent |
|
|
76
170
|
| --- | --- | --- | --- |
|
|
77
|
-
| **W** worker | local, mechanical, repetitive, well-defined: code search, classification, extraction, small edits, boilerplate, simple tests, consistency checks, scoped transforms | Haiku 4.5 (`claude-haiku-4-5`) | `gpt-6-luna`, falling back to `gpt-5.6-luna` |
|
|
78
|
-
| **S** standard | default software-engineering model: normal implementation, frontend/backend, moderate debugging, tests, reasonable multi-file refactors, codebase analysis, tool use | Sonnet 5 (`claude-sonnet-5`) | `gpt-6-sol` one notch down, falling back to `gpt-5.6-terra` |
|
|
79
|
-
| **X** senior | hard debugging, architecture, concurrency, migrations, security, auth, payments, billing, backwards compatibility, critical code review, many invariants | Opus 5.5 (`claude-opus-5-5`), falling back to Opus 5 (`claude-opus-5`) | `gpt-6-sol`, falling back to `gpt-5.6-sol` |
|
|
80
|
-
| **F** frontier | exceptional escalation: very ambiguous, long-horizon, cross-system, major architecture, very large codebase, planning under heavy constraints, or when X fails to produce a solid solution | Fable 5 (`claude-fable-5`) — default F. Fable 5.1 (`claude-fable-5-1`) is a hard-capped exception: **≤2% of all dispatches**, explicit request or documented F-T4 failure on
|
|
171
|
+
| **W** worker | local, mechanical, repetitive, well-defined: code search, classification, extraction, small edits, boilerplate, simple tests, consistency checks, scoped transforms | Haiku 5.5 (`claude-haiku-5-5`), falling back to Haiku 4.5 (`claude-haiku-4-5`) | `gpt-6-luna`, falling back to `gpt-5.6-luna` |
|
|
172
|
+
| **S** standard | default software-engineering model: normal implementation, frontend/backend, moderate debugging, tests, reasonable multi-file refactors, codebase analysis, tool use | Sonnet 5.5 (`claude-sonnet-5-5`), falling back to Sonnet 5 (`claude-sonnet-5`) | `gpt-6-sol` one notch down, falling back to `gpt-6.1-terra`, then `gpt-5.6-terra` |
|
|
173
|
+
| **X** senior | hard debugging, architecture, concurrency, migrations, security, auth, payments, billing, backwards compatibility, critical code review, many invariants | Opus 5.5 (`claude-opus-5-5`), falling back to Opus 5 (`claude-opus-5`) | `gpt-6.2-sol`, falling back to `gpt-6-sol`, then `gpt-5.6-sol` |
|
|
174
|
+
| **F** frontier | exceptional escalation: very ambiguous, long-horizon, cross-system, major architecture, very large codebase, planning under heavy constraints, or when X fails to produce a solid solution | Fable 5.2 (`claude-fable-5-2`) — default F, falling back to Fable 5 (`claude-fable-5`). Fable 5.1 (`claude-fable-5-1`) is a hard-capped exception: **≤2% of all dispatches**, explicit request or documented F-T4 failure on the default F only | GPT-6.2 Astra (`gpt-6.2-astra`), falling back to GPT-6 Astra (`gpt-6-astra`) — a real single-agent frontier tier, no decomposition workaround needed |
|
|
81
175
|
|
|
82
176
|
Escalation order within a provider: **W → S → X → F**.
|
|
83
177
|
|
|
84
|
-
|
|
178
|
+
List prices, USD in/out per MTok. Each registry model records the date its price was read
|
|
179
|
+
(`price_as_of`) and the page it was read from (`price_source`); rows marked † were read on
|
|
180
|
+
2026-12-01, the rest in September 2026.
|
|
85
181
|
|
|
86
182
|
| Tier | Claude model | Claude $ in/out | Codex model | Codex $ in/out |
|
|
87
183
|
| --- | --- | --- | --- | --- |
|
|
88
|
-
| W | Haiku 4.5 (200K ctx)
|
|
89
|
-
| S | Sonnet 5 (1M ctx) | $2 / $10 | `gpt-6-sol` one effort notch down (T1/T2 `low`, T3 `medium`);
|
|
90
|
-
| X | Opus 5.5 (1M ctx); fallback Opus 5 $5 / $25 | $4 / $20 | `gpt-6-sol` (1.05M ctx);
|
|
91
|
-
| F | Fable 5 (1M ctx)
|
|
184
|
+
| W | Haiku 5.5 † (1M ctx); fallback Haiku 4.5 (200K ctx, 64K out) $1 / $5 | $0.10 / $0.50 up to a 100K-token prompt, $0.50 / $2.50 above it | `gpt-6-luna` (1.05M ctx); fallback `gpt-5.6-luna` $0.20 / $1.20 | $0.10 / $0.50 |
|
|
185
|
+
| S | Sonnet 5.5 † (1M ctx); fallback Sonnet 5 $2 / $10 | $2 / $10 | `gpt-6-sol` one effort notch down (T1/T2 `low`, T3 `medium`); fallbacks `gpt-6.1-terra` † $1 / $5, `gpt-5.6-terra` $2 / $12 | $2 / $10 |
|
|
186
|
+
| X | Opus 5.5 (1M ctx); fallback Opus 5 $5 / $25 | $4 / $20 | `gpt-6.2-sol` † (1.05M ctx); fallbacks `gpt-6-sol` $2 / $10, `gpt-5.6-sol` $4 / $20 | $2 / $10 |
|
|
187
|
+
| F | Fable 5.2 † (1M ctx); fallback Fable 5 $10 / $50 | $8 / $40 | `gpt-6.2-astra` † (1.05M ctx); fallback `gpt-6-astra` $10 / $50 — **the cheapest *measured* F per completed task of any model here** | $8 / $40 |
|
|
92
188
|
| F+ (≤2%) | Fable 5.1 (1M ctx) | $10 / $50 list — **effective cost significantly higher** (always-on thinking, longer turns, more output tokens per task) | — (Astra covers F) | — |
|
|
93
189
|
|
|
190
|
+
**The benchmark is one major version behind, and the new seats are not measured.** `measured`
|
|
191
|
+
values and `tier_bands` are pinned to Artificial Analysis v4.3.2; Artificial Analysis now publishes
|
|
192
|
+
v5.0.2. Three v5.0.2 `max` points were read and deliberately not imported — three points cannot
|
|
193
|
+
re-pull the curves, and mixing versions in one dataset would corrupt the frontier. So every model
|
|
194
|
+
added after the snapshot (Haiku 5.5, Sonnet 5.5, Fable 5.2, GPT-6.1 Terra, GPT-6.1 Sol, GPT-6.2 Sol,
|
|
195
|
+
GPT-6.2 Astra, the Gemini 4 models) carries **no score and no `$/task`**. It is placed by list price
|
|
196
|
+
and provider succession, never by score, and a dispatch on it records `est_usd_per_task: null` — so a
|
|
197
|
+
flow that runs on the new seats has a partial cost estimate until the dataset is re-pulled.
|
|
198
|
+
|
|
199
|
+
Succession rule (`supersedes`, one successor per seat-holder): a new model takes its family's seat
|
|
200
|
+
only when its input and output list prices are published and at or below the model it succeeds, at
|
|
201
|
+
the base rate and at the highest long-context band either publishes. A cache-read price is compared
|
|
202
|
+
when both publish one, and blocks succession when the successor's is higher; when one side has none
|
|
203
|
+
it is not compared, and the ranking says so. The older model stays routable as the fallback.
|
|
204
|
+
|
|
205
|
+
**List price is not evidence of quality.** A successor the benchmark has not scored takes the
|
|
206
|
+
**non-critical** seat only. On a T4/T5 pair, an independent-review seat or a review row the measured
|
|
207
|
+
predecessor keeps the seat and the successor is listed as the alternative, with the reason
|
|
208
|
+
`unmeasured: not seated for critical review`; every measured model ranks ahead of every unmeasured
|
|
209
|
+
one there. It is seated on such a seat only when the inventory exposes nothing measured, and the
|
|
210
|
+
row says so. Decided case by case:
|
|
211
|
+
|
|
212
|
+
| New model | Succeeds | List price | Decision |
|
|
213
|
+
| --- | --- | --- | --- |
|
|
214
|
+
| Haiku 5.5 | Haiku 4.5 (Claude W) | $0.10/$0.50, or $0.50/$2.50 above 100K, vs $1/$5 | non-critical seat — at or below at every prompt size; cache read not compared. Unmeasured: a review seat keeps Haiku 4.5 |
|
|
215
|
+
| Sonnet 5.5 | Sonnet 5 (Claude S) | $2/$10, cache read $0.10 vs $2/$10, $0.20 | non-critical seat. Unmeasured: a review or independent-review S seat keeps Sonnet 5 |
|
|
216
|
+
| Fable 5.2 | Fable 5 (Claude F) | $8/$40, cache read $0.20 vs $10/$50, $1.00 | non-critical F T3 seat only. Unmeasured: F T4, F T5 and any review or independent-review F seat keep Fable 5 |
|
|
217
|
+
| GPT-6.2 Sol | GPT-6 Sol (Codex X) | $2/$10 vs $2/$10 | non-critical X T2/X T3 seat only — X T4, its independent second reviewer and every review X seat keep GPT-6 Sol (unmeasured successor). The Codex S seat stays GPT-6 Sol one notch down, a measured score match an unmeasured model cannot inherit; cache read not compared |
|
|
218
|
+
| GPT-6.2 Astra | GPT-6 Astra (Codex F) | $8/$40 vs $10/$50 | non-critical F T3 seat only. Unmeasured: F T4, F T5 and any review or independent-review F seat keep GPT-6 Astra; cache read not compared |
|
|
219
|
+
| GPT-6.1 Terra | GPT-5.6 Terra (Codex S fallback) | $1/$5 vs $2/$12 | takes Terra's place as the S fallback, not the S seat; cache read not compared |
|
|
220
|
+
| GPT-6.1 Sol | — | $2/$10 | no seat change: priced like GPT-6 Sol but not a current flagship, so it is a rated, routable registry entry that supersedes nothing |
|
|
221
|
+
|
|
94
222
|
Claude notes: Fable 5.1 shares Fable 5's list price but costs significantly more per completed task
|
|
95
|
-
— judge it on cost per task, not per token. **When F is needed, use
|
|
96
|
-
|
|
97
|
-
10%-of-input cache-read rate
|
|
98
|
-
|
|
99
|
-
|
|
223
|
+
— judge it on cost per task, not per token. **When F is needed, use the default F (Fable 5.2, or
|
|
224
|
+
Fable 5 where 5.2 is not exposed or the seat is a critical one); Fable 5.1 is capped at ≤2% of dispatches.** Fable 5.1 cache reads
|
|
225
|
+
bill at $0.25/MTok; Fable 5 uses the standard 10%-of-input cache-read rate; Fable 5.2 cache reads
|
|
226
|
+
bill at $0.20/MTok and Sonnet 5.5 at $0.10/MTok. Anthropic cache writes bill at 1.25x input for the
|
|
227
|
+
5-minute cache and 2x for the 1-hour cache. Haiku 5.5 takes `effort` (five levels, API default
|
|
228
|
+
`medium`), unlike Haiku 4.5's budget-only control; Sonnet 5.5 and Fable 5.2 default to `high`.
|
|
229
|
+
Opus 5.5 is at or below Opus 5 on every per-token price (input $4 vs $5,
|
|
230
|
+
output $20 vs $25, cache read $0.20 vs $0.50, cache write $5 vs $6.25), and is measured at every
|
|
231
|
+
effort; the router ranks it ahead of Opus 5 by `supersedes` price
|
|
100
232
|
succession — never by an estimated $/task — and keeps Opus 5 as the fallback when 5.5 is not exposed
|
|
101
233
|
or refuses. Opus 5.5's API default effort is `medium`, one below Opus 5, so X always sets effort
|
|
102
234
|
explicitly. Fast mode (`speed: "fast"`) reprices Opus 5.5 to $8 / $40 and Opus 5 to $10 / $50 —
|
|
@@ -104,7 +236,12 @@ never a replacement for an F dispatch, off by default.
|
|
|
104
236
|
Legacy fallbacks: Opus 4.8 / 4.7 / 4.6 $5 / $25, Sonnet 4.6 $3 / $15 (more expensive than Sonnet 5 —
|
|
105
237
|
never pick it for cost).
|
|
106
238
|
|
|
107
|
-
Codex notes:
|
|
239
|
+
Codex notes: the current flagships are GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Terra and GPT-6 Luna, all
|
|
240
|
+
with a 1,050,000-token window and 128K max output; their cache-read price and long-context repricing
|
|
241
|
+
were not read, so both stay null in the registry — assume the >272K repricing below may apply. The
|
|
242
|
+
OpenAI models page also lists effort `none` for `gpt-6-luna` and `gpt-6.1-terra`; no thinking level
|
|
243
|
+
maps to it, so it is never routed by default.
|
|
244
|
+
All three gpt-5.6 models have a 1,050,000-token window and 128K max output.
|
|
108
245
|
**Long-context surcharge: a request whose input exceeds 272K tokens bills the *entire request* at 2x
|
|
109
246
|
input and 1.5x output** — Luna $0.40/$1.80, Terra $4/$18, Sol $8/$30. Cached reads are 10% of input;
|
|
110
247
|
cache *writes* bill at 1.25x uncached input. Legacy `gpt-5.5` ($5/$30) and `gpt-5.4` ($2.50/$15) are
|
|
@@ -135,7 +272,7 @@ enormously between models at the same effort:
|
|
|
135
272
|
|
|
136
273
|
**Which numbers bind.** The two tables in this section are an earlier reading and they do **not**
|
|
137
274
|
match the machine-readable dataset: `models/model-thinking-data.json` (Artificial Analysis v4.3.2,
|
|
138
|
-
observed 2026-09-
|
|
275
|
+
observed 2026-09-23) records Luna `xhigh` at 35 @ $0.09 rather than 42 @ $0.06, Astra `high` at 51 @
|
|
139
276
|
$1.73 rather than 53 @ $1.41, Opus 5 `medium` at 45 @ $2.19 rather than 50 @ $1.36, and Fable 5.1
|
|
140
277
|
`max` at 53 @ $7.63 rather than 57 @ $6.12. **Where prose and dataset disagree, the dataset wins** —
|
|
141
278
|
it is what the router reads and what `bin/model-thinking-report.mjs` renders. Two of the frontier
|
|
@@ -198,13 +335,18 @@ bottom. Both readings matter: list price governs a long-context single call, $/t
|
|
|
198
335
|
|
|
199
336
|
## Context as a routing axis
|
|
200
337
|
|
|
201
|
-
Context windows are not uniform
|
|
202
|
-
|
|
203
|
-
|
|
338
|
+
Context windows and repricing bands are not uniform, and the router reads both from the seated
|
|
339
|
+
model's own registry entry (`context_window`, `long_context_surcharge.threshold_input_tokens`),
|
|
340
|
+
never from a constant: the Claude models carry 1M context (128K max output), and the W seat, Haiku
|
|
341
|
+
5.5, reprices 5x above a 100K-token prompt; its fallback Haiku 4.5 is capped at 200K. On Codex all
|
|
342
|
+
models take ~1.05M, but input beyond 272K bills at the premium rate.
|
|
204
343
|
|
|
205
344
|
- **Context can force escalation independent of difficulty.** A mechanical task over a >150K-token
|
|
206
|
-
working set is not a W dispatch
|
|
207
|
-
shard the input so each W dispatch stays well under the
|
|
345
|
+
working set is not a W dispatch — W work is sharded, and on a 200K worker it would truncate or
|
|
346
|
+
thrash. Route it S T0–T1, or shard the input so each W dispatch stays well under the cap. The
|
|
347
|
+
selection reason names the seated W model and its real window.
|
|
348
|
+
- **The worker's own repricing threshold raises the cost bump.** A W dispatch on Haiku 5.5 over a
|
|
349
|
+
100K-token prompt is flagged `long_context_cost_bump`: it stays on W, at five times the price.
|
|
208
350
|
- **Don't pay for context you don't ship.** A small, well-scoped task does not justify a 1M model
|
|
209
351
|
"just in case". Give subagents trimmed inputs.
|
|
210
352
|
- **>150K conversations**: prefer chunking/sharding for W work; for long-horizon single-agent runs,
|
|
@@ -214,8 +356,8 @@ premium rate.
|
|
|
214
356
|
- **The >272K pricing cliff**: input past 272K reprices the **whole request** — one token over the
|
|
215
357
|
line raises the cost of everything before it. Shard below 272K whenever the task allows; at that
|
|
216
358
|
size, recheck the provider choice, and treat any >272K dispatch as a tier bump in the cost ledger.
|
|
217
|
-
Where a model's long-context repricing is not documented, assume it may apply
|
|
218
|
-
known-flat-priced option.
|
|
359
|
+
Where a model's long-context repricing is not documented, assume it may apply — off the Claude
|
|
360
|
+
ladder the router flags it at 272K — and prefer the known-flat-priced option.
|
|
219
361
|
|
|
220
362
|
Thinking tokens bill as **output** — high thinking is real cost. **F is NOT the default for every
|
|
221
363
|
hard task**: on pure hard coding, X is within noise of frontier at a fraction of the price. F earns
|
|
@@ -268,10 +410,11 @@ sensitive material there.
|
|
|
268
410
|
|
|
269
411
|
| Model | Tier (band) | Economical start | Raise thinking / switch condition |
|
|
270
412
|
| --- | --- | --- | --- |
|
|
271
|
-
| Grok 4.7 | — (unrated) | `high` is the cheapest measured configuration | Evaluate low/medium locally; `xhigh` gives the same displayed score at greater cost. Price long prompts separately |
|
|
272
|
-
| Grok 4.6 | S (44) | `medium` — the cheapest measured effort that reaches the S band | `low` (35) falls below the band; `xhigh` shows no gain over `high`; prefer 4.7 when justified by evidence, not by version number |
|
|
273
|
-
| Muse Spark 1.3 | X (48) | `xhigh` is the lower-cost of the two measured points | `max` buys ~3 displayed points for ~17% more; use only when those capabilities matter |
|
|
274
|
-
| Gemini 3.8 Flash | S (41) | `medium` when the task fits | `high` buys 1 displayed point for ~33% more. Multimodal/latency needs may justify it. `low` has a score but no published cost |
|
|
413
|
+
| Grok 4.7 | — (unrated) | `high` is the cheapest measured configuration | Evaluate low/medium locally; `xhigh` gives the same displayed score at greater cost. 500K context, cached input $0.50/MTok. Price long prompts separately |
|
|
414
|
+
| Grok 4.6 | S (44) | `medium` — the cheapest measured effort that reaches the S band | `low` (35) falls below the band; `xhigh` shows no gain over `high`; prefer 4.7 when justified by evidence, not by version number. 500K context, cached input $0.50/MTok |
|
|
415
|
+
| Muse Spark 1.3 (Meta) — **deprecated**, successor Muse Wonder | X (48) | `xhigh` is the lower-cost of the two measured points | `max` buys ~3 displayed points for ~17% more; use only when those capabilities matter. Prefer another X-band candidate for new work: Muse Wonder is not in the registry because its data is unverified |
|
|
416
|
+
| Gemini 3.8 Flash | S (41) | `medium` when the task fits | `high` buys 1 displayed point for ~33% more. Multimodal/latency needs may justify it. `low` has a score but no published cost. $0.75/$3.75 until 2027-01-01, then $1.50/$7.50 |
|
|
417
|
+
| Gemini 4 Carbon ($4/$20 from 2026-12-01), Gemini 4 Neon ($3/$15), Gemini 4 Hydrogen ($1.50/$7.50) | — (unrated) | none: no measurement, no verified thinking control | Priced registry entries only. They hold no tier and are never seated; measure locally before proposing a band placement |
|
|
275
418
|
| MiMo V2.6 Pro (X, 46), GLM 5.3 Flash (S, 42), Qwen3.8 Max (X, 45), MiniMax M3 (W, 29), Step 5 (unpromoted) | from the single `default` point | verified provider default; no multi-effort curve established | Do not send invented effort enums. Measure supported variants locally first |
|
|
276
419
|
| GLM 5.3 (X, 45), Kimi K3 (S, 44), DeepSeek V4.1 Flash (S, 39) | from the single `max` point | only `max` has a complete measured score/cost pair | GLM 5.3 only `max` measured — that is not evidence to default to `max`. Confirm controls; evaluate lower settings on noncritical checkable work first |
|
|
277
420
|
|
|
@@ -283,10 +426,13 @@ enum, and it never silently drops to a shallower one.
|
|
|
283
426
|
|
|
284
427
|
### Candidate alternatives and admission
|
|
285
428
|
|
|
286
|
-
The
|
|
287
|
-
carries
|
|
288
|
-
|
|
289
|
-
|
|
429
|
+
The measured alternatives above are **in the matrix**, not in a footnote: `models/top-models.json`
|
|
430
|
+
carries 33 entries — 19 seated on a provider ladder (the seat-holders, the models they succeeded,
|
|
431
|
+
which stay routable as fallbacks, and GPT-6.1 Sol), ten measured candidates (`admission:
|
|
432
|
+
"candidate"`) and four available-but-unrated models that hold no tier (Grok 4.7 and the three
|
|
433
|
+
Gemini 4 models). A candidate's `tier` is not a ladder seat; it is a placement from `tier_bands`,
|
|
434
|
+
read off the best measured Artificial Analysis v4.3.2 score — the bands stay on that version until
|
|
435
|
+
the whole dataset is re-pulled:
|
|
290
436
|
|
|
291
437
|
| Band | Score | Candidates placed there |
|
|
292
438
|
| --- | --- | --- |
|
|
@@ -317,7 +463,13 @@ Admission rules, enforced in `lib/router.mjs`, not merely advised:
|
|
|
317
463
|
where it does not. Each row carries `thinking_cost_index` (100 = Sol `medium` at $0.50/task) and
|
|
318
464
|
the `marginal_thinking` step into that effort (`delta_score`, `cost_multiplier`) — the price of
|
|
319
465
|
one more notch of thinking, so depth can be bought or refused on evidence.
|
|
320
|
-
5.
|
|
466
|
+
5. A **free or gateway variant** of an inventory id follows rule 2 as well: noncritical lanes only.
|
|
467
|
+
6. An **unmeasured successor** is never promoted into a seat rule 2 closes: the measured
|
|
468
|
+
predecessor keeps it, and the successor is listed behind every measured model as the alternative.
|
|
469
|
+
7. The reason trace covers **both seats**: `selection_reason` carries the review seat's model, its
|
|
470
|
+
cap, variant and unmeasured notes, and what the review seat refused — not only the
|
|
471
|
+
implementation seat's.
|
|
472
|
+
8. `--cheapest-thinking` (`cheapestThinkingFor(pair, { maxScoreLoss })`) answers the thinking-cost
|
|
321
473
|
question directly: the lowest-cost (model, effort) within `maxScoreLoss` (default 2) displayed
|
|
322
474
|
points of the incumbent config for that pair. On `W T3` that is Luna `xhigh`; on `S T3` it is
|
|
323
475
|
Terra `high`, and GLM 5.3 Flash `default` only when candidates are included.
|
|
@@ -335,21 +487,28 @@ this row.
|
|
|
335
487
|
|
|
336
488
|
| Pair | Claude | Claude $ in/out | Codex | Codex $ in/out |
|
|
337
489
|
| --- | --- | --- | --- | --- |
|
|
338
|
-
| W T0–T1 | Haiku, thinking off | $
|
|
339
|
-
| W T2 | Haiku, small budget | $
|
|
340
|
-
| W T3 | — (escalate to S; no headroom) | — | Luna `xhigh` (default) / `max` | $0.
|
|
341
|
-
| S T1 | Sonnet `low` | $2 / $10 |
|
|
342
|
-
| S T2 | Sonnet `medium` | $2 / $10 |
|
|
343
|
-
| S T3 | Sonnet `high` | $2 / $10 |
|
|
344
|
-
| X T2 | Opus `medium` | $
|
|
345
|
-
| X T3 | Opus `high` | $
|
|
346
|
-
| X T4 | Opus `xhigh` | $
|
|
347
|
-
| F T3 | Fable 5 `high` | $10 / $50 | Astra `high` | $10 / $50
|
|
348
|
-
| F T4 | Fable 5 `xhigh` | $10 / $50 | Astra `xhigh` | $10 / $50
|
|
349
|
-
| F T5 | Fable 5 `max` (essentially never); Fable 5.1 only under the ≤2% cap | $10 / $50 | Astra `max` (essentially never) | $10 / $50
|
|
490
|
+
| W T0–T1 | Haiku 5.5 `low` (fallback Haiku 4.5, thinking off) | $0.10 / $0.50 | GPT-6 Luna `low` | $0.10 / $0.50 |
|
|
491
|
+
| W T2 | Haiku 5.5 `medium` (fallback Haiku 4.5, small budget) | $0.10 / $0.50 | GPT-6 Luna `medium` | $0.10 / $0.50 |
|
|
492
|
+
| W T3 | — (escalate to S; no headroom) | — | GPT-6 Luna `xhigh` (default) / `max` | $0.10 / $0.50 (~$0.04 / $0.07 per task) |
|
|
493
|
+
| S T1 | Sonnet 5.5 `low` | $2 / $10 | GPT-6 Sol `low` | $2 / $10 |
|
|
494
|
+
| S T2 | Sonnet 5.5 `medium` | $2 / $10 | GPT-6 Sol `low` | $2 / $10 |
|
|
495
|
+
| S T3 | Sonnet 5.5 `high` | $2 / $10 | GPT-6 Sol `medium` | $2 / $10 |
|
|
496
|
+
| X T2 | Opus 5.5 `medium` | $4 / $20 | GPT-6.2 Sol `medium` | $2 / $10 |
|
|
497
|
+
| X T3 | Opus 5.5 `high` | $4 / $20 | GPT-6.2 Sol `high` | $2 / $10 |
|
|
498
|
+
| X T4 | Opus 5.5 `xhigh` | $4 / $20 | GPT-6 Sol `high` + independent GPT-6 Sol `high` reviewer (alternative: GPT-6.2 Sol, unmeasured) | 2x ($2 / $10) |
|
|
499
|
+
| F T3 | Fable 5.2 `high`; Fable 5 `high` on a review or independent-review seat | $8 / $40; $10 / $50 | GPT-6.2 Astra `high`; GPT-6 Astra `high` on a review or independent-review seat | $8 / $40; $10 / $50 |
|
|
500
|
+
| F T4 | Fable 5 `xhigh` (alternative: Fable 5.2, unmeasured) | $10 / $50 | GPT-6 Astra `xhigh` (alternative: GPT-6.2 Astra, unmeasured) | $10 / $50 |
|
|
501
|
+
| F T5 | Fable 5 `max` (essentially never); Fable 5.1 only under the ≤2% cap | $10 / $50 | GPT-6 Astra `max` (essentially never) | $10 / $50 |
|
|
350
502
|
|
|
351
503
|
Prices per MTok; thinking level does not change the unit price, but higher levels emit more
|
|
352
|
-
(billed-as-output) thinking tokens — same rate, more tokens.
|
|
504
|
+
(billed-as-output) thinking tokens — same rate, more tokens. These cells are the seat-holders in
|
|
505
|
+
`registries/routing-matrix.json` → `resolution`; where a matrix further down still says "Sonnet",
|
|
506
|
+
"Opus", "Fable", "Terra", "Sol" or "Astra", read it as the current seat of that tier on that ladder.
|
|
507
|
+
Haiku 5.5, Sonnet 5.5, Fable 5.2, GPT-6.2 Sol and GPT-6.2 Astra have no measured `$/task` yet, so
|
|
508
|
+
they hold non-critical seats only: every T4/T5 row above, and every review or independent-review
|
|
509
|
+
seat on any row (`critical_seat` in the registry — Sonnet 5 on S, Haiku 4.5 on W, GPT-6 Sol on X
|
|
510
|
+
T2/T3), stays on the measured model. A harness with neither ladder uses the inventory ladder instead
|
|
511
|
+
("Discovery before dispatch").
|
|
353
512
|
|
|
354
513
|
## Default routing
|
|
355
514
|
|
|
@@ -365,8 +524,8 @@ Prices per MTok; thinking level does not change the unit price, but higher level
|
|
|
365
524
|
## Escalation ladder
|
|
366
525
|
|
|
367
526
|
```
|
|
368
|
-
Claude: Haiku → Sonnet low → Sonnet medium → Sonnet high → Opus high → Opus xhigh → Fable 5 high → Fable 5 xhigh/max → Fable 5.1 (≤2% cap, explicit only)
|
|
369
|
-
Codex: Luna low →
|
|
527
|
+
Claude: Haiku 5.5 low → Sonnet 5.5 low → Sonnet 5.5 medium → Sonnet 5.5 high → Opus 5.5 high → Opus 5.5 xhigh → Fable 5.2 high → Fable 5 xhigh/max → Fable 5.1 (≤2% cap, explicit only)
|
|
528
|
+
Codex: GPT-6 Luna low → medium → xhigh → max → GPT-6 Sol low → GPT-6 Sol medium → GPT-6.2 Sol high → GPT-6 Sol high + independent GPT-6 Sol high reviewer → GPT-6.2 Astra high → GPT-6 Astra xhigh → max (essentially never)
|
|
370
529
|
```
|
|
371
530
|
|
|
372
531
|
Escalate incrementally — never jump from S medium to F max. Raise **thinking** first when the
|
|
@@ -385,13 +544,15 @@ setting. Never use a retry policy to lower a required implementation or review f
|
|
|
385
544
|
**Refusal loop**: a weaker subagent may explicitly refuse a task as beyond its capability →
|
|
386
545
|
re-dispatch one tier up, keeping the thinking level. Never ask it to improvise an unsafe solution.
|
|
387
546
|
|
|
388
|
-
**T4/T5 on Codex**: on the
|
|
389
|
-
*Sol high + an independent Sol high reviewer* (different agent, no shared history) — that
|
|
390
|
-
a risk-floor rule, not a capability workaround, and Astra does not replace it.
|
|
391
|
-
|
|
547
|
+
**T4/T5 on Codex**: on the Sol and Terra families there is no usable effort above `high`, so X T4 stays
|
|
548
|
+
*GPT-6 Sol high + an independent GPT-6 Sol high reviewer* (different agent, no shared history) — that
|
|
549
|
+
pairing is a risk-floor rule, not a capability workaround, and Astra does not replace it. Both seats
|
|
550
|
+
are the measured model: GPT-6.2 Sol is unmeasured and is only the alternative. T5 exists only as
|
|
551
|
+
GPT-6 Astra `max` and is essentially never correct; narrow the task instead.
|
|
392
552
|
|
|
393
|
-
**F on Codex**: dispatch Astra at `high` (default F),
|
|
394
|
-
(essentially never) — one agent, exactly like
|
|
553
|
+
**F on Codex**: dispatch GPT-6.2 Astra at `high` (default F), and the measured GPT-6 Astra at
|
|
554
|
+
`xhigh` (F T4, hardest case) or `max` (essentially never) — one agent, exactly like the Claude F
|
|
555
|
+
seat (Fable 5.2 at `high`, Fable 5 at `xhigh`/`max`). The old decomposition workaround is
|
|
395
556
|
**obsolete as an F substitute**. It survives only as what it always genuinely was: a way to make a
|
|
396
557
|
task *smaller*. If Astra `xhigh` stalls on an F T4 problem, the answer is still to narrow and
|
|
397
558
|
decompose — with Astra as synthesizer, never by forking full history into one agent.
|
|
@@ -465,6 +626,7 @@ override these upward, never downward.**
|
|
|
465
626
|
| db-migration-author, adversarial-skeptic, frontend-specialist | S T3 | Sonnet `high` | Terra `high` |
|
|
466
627
|
| db-concurrency-specialist | X T3 | Opus `high` | Sol `high` |
|
|
467
628
|
| provider-webhook-specialist | X T2 (T3 on broken signatures/idempotency) | Opus `medium`/`high` | Sol `medium`/`high` |
|
|
629
|
+
| advisor | F T3 — consulted at a decision point only, under the 10% frontier cap ([learning](learning.md)) | Fable `high` | Astra `high` |
|
|
468
630
|
| orchestrator / planning | S T3 default; X T3–T4 when complex; F only frontier | Sonnet high; Opus high/xhigh; Fable high | Terra high; Sol high for high-risk cross-system work; Astra high for frontier planning |
|
|
469
631
|
|
|
470
632
|
## Flow matrix (task segments)
|
|
@@ -553,15 +715,20 @@ numbers. Until that exists, the per-technology map is empty and honestly so.
|
|
|
553
715
|
autonomous refactors, genuinely frontier ambiguity. Default `high`; `xhigh` only for the hardest
|
|
554
716
|
case; `max` essentially never.
|
|
555
717
|
- **Which F**: provider-flexible F work goes to the cheapest measured frontier config (Astra `high`)
|
|
556
|
-
— same measured score as Fable 5 `max` at a quarter the cost per task. Choose Fable 5 instead when
|
|
718
|
+
— same measured score as Fable 5 `max` at a quarter the cost per task. Choose Fable 5.2 instead when
|
|
557
719
|
the flow is single-provider Claude, when the working set is large enough that long-context
|
|
558
720
|
repricing is a risk, or when the task touches anything the other model's unverified retention
|
|
559
721
|
terms make unwise. Choose Fable 5.1 only under its cap.
|
|
560
|
-
- **F is
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
722
|
+
- **F is capped at 10% of dispatches, counted from what the orchestrator declares.** Run
|
|
723
|
+
`llm-orchestrator budget spend` before every dispatch: it checks the cap and writes the ledger
|
|
724
|
+
line in one locked step, and refuses a frontier dispatch past 10% of the rolling window. Inside
|
|
725
|
+
that cap, at most 3% may be exploratory upgrades of small tasks. No hook sees which model a
|
|
726
|
+
harness ran, so an orchestrator that never calls the CLI is not capped; the rule binds the
|
|
727
|
+
orchestrator, and the CLI makes it checkable. See [learning](learning.md).
|
|
728
|
+
- **Spend the cap on decisions, not on whole tasks.** F is consulted as an advisor at a plan,
|
|
729
|
+
design, hypothesis or synthesis decision; the routed tier does the work. Each consult leaves a
|
|
730
|
+
strategy card, so the same class of task does not need F again.
|
|
731
|
+
- **The cap belongs to cheap F first.** The expensive frontier configs stay rare inside it.
|
|
565
732
|
- **The guardrail is $/task, not the tier label.** Cheap F invites over-escalation; what stops it is
|
|
566
733
|
the flow's mean cost per task. F for a rename is still waste, just waste that hides better.
|
|
567
734
|
- **Fable 5.1 cap**: never a default at any tier; only on explicit user request or after a
|
|
@@ -592,12 +759,15 @@ thirteen names used in [dispatch](dispatch.md), [protocol.md](../protocol.md) an
|
|
|
592
759
|
| `independent_review` | Whether a separate reviewer with no forked history is required |
|
|
593
760
|
| `selection_reason` | Why this pair and this model — never "complex task" |
|
|
594
761
|
| `inventory_revision` | Which inventory reading the choice was made against |
|
|
595
|
-
| `price_source` | Dated provenance
|
|
762
|
+
| `price_source` | Dated provenance: the benchmark snapshot behind the `$/task` figure and, when a model was chosen, the page and date its list price was read from (`…; list price <url> as of <date>`) |
|
|
596
763
|
| `est_usd_per_task` | Measured cost for the effective config, or `null` when unmeasured |
|
|
597
764
|
|
|
598
765
|
A runtime substitution that violates a floor invalidates that phase. Never silently fall back: an
|
|
599
766
|
inventory that exposes nothing eligible for the tier yields `blocked: "no eligible model"`, never a
|
|
600
767
|
quieter tier. When the inventory changes mid-flow, re-run selection for the **remaining** shards only.
|
|
768
|
+
On a harness with no hard-coded ladder, `model_requested` is the inventory-ladder seat and
|
|
769
|
+
`model_effective` is the id the inventory uses for it; `price_as_of` is the effective model's
|
|
770
|
+
`price_as_of` from the registry.
|
|
601
771
|
|
|
602
772
|
Recorded alongside the block, in `flow:{task_id}` rather than inside it: `harness`, `provider`,
|
|
603
773
|
`role`, `risk`, `reason_for_tier`, `price_as_of`, `benchmark_version`, `inventory_source`,
|
|
@@ -618,12 +788,19 @@ than S done right the first time; F for a rename is waste.
|
|
|
618
788
|
**The primary metric is mean $/task across the flow, not the tier histogram.** Tier shares are a
|
|
619
789
|
sanity check on classification. A healthy flow lands around **$0.40–0.70 mean $/task**: mostly the W
|
|
620
790
|
model for collection and mechanical work, the X model for the bulk of building and reviewing, and the
|
|
621
|
-
cheap frontier config on the genuinely hard 10
|
|
791
|
+
cheap frontier config on the genuinely hard decisions, never above 10% of dispatches. Above ~$1.00 the router is escalating work a
|
|
622
792
|
cheaper tier would have solved; below ~$0.25 mechanical models are probably being run on tasks that
|
|
623
793
|
need judgment, and the reworks are hiding in the wall-clock.
|
|
624
794
|
|
|
795
|
+
The mean is taken over the dispatches that carry a measured `$/task`, never over all of them: a flow
|
|
796
|
+
with unmeasured or blocked dispatches would otherwise read as cheaper than it is. When any dispatch
|
|
797
|
+
is unmeasured the total is reported as partial (`est_total_partial: true`, `measured_dispatches`)
|
|
798
|
+
and the band is **not** judged — the estimate carries one warning, `cost band not evaluated: N of M
|
|
799
|
+
dispatches have no measured $/task`, instead of a verdict it cannot support.
|
|
800
|
+
|
|
625
801
|
Target distribution, per provider: **W 30–40%** of dispatches, **S 40–50%**, **X 5–12%**, **F
|
|
626
|
-
10
|
|
802
|
+
at most 10%** (a cap, see [learning](learning.md)). If the cap is reached often, classification is too
|
|
803
|
+
aggressive or strategies are not being captured; 50% X is waste and strictly
|
|
627
804
|
dominated.
|
|
628
805
|
|
|
629
806
|
**Cost-effective routing, in one line:** climb the frontier, never step onto a dominated config, and
|
package/protocol.md
CHANGED
|
@@ -149,6 +149,27 @@ research tasks do not fabricate a RED test; they mark G3 `not_applicable` with t
|
|
|
149
149
|
named tooling changes the bindings, not the truth of the acceptance criteria. Independent review
|
|
150
150
|
required by a risk floor is preserved even under quota pressure.
|
|
151
151
|
|
|
152
|
+
## Advisor, strategy cards and the frontier budget
|
|
153
|
+
|
|
154
|
+
The frontier tier (F) advises at decision points and is capped at **10% of dispatches**; at most 3%
|
|
155
|
+
are exploratory upgrades, inside that cap. What a frontier model decides is kept as a strategy card,
|
|
156
|
+
so the routed tier handles the same class of task next time. The rules are in
|
|
157
|
+
[learning](policies/learning.md); the sequence is:
|
|
158
|
+
|
|
159
|
+
| When | Command | Effect |
|
|
160
|
+
|---|---|---|
|
|
161
|
+
| Building a shard whose phase is a decision phase (plan, design, hypothesis, synthesis, analysis), or any shard about to use tier F | `strategy decide` | One action: `inject`, `advisor`, `explore` or `normal`; it prints the signature and the tags |
|
|
162
|
+
| Before every dispatch | `budget spend` | Checks the cap and writes one ledger line in one locked step. Exit 2 on tier F: nothing is written, stay on the routed tier |
|
|
163
|
+
| A dispatch that already happened without a spend | `budget record` | Writes the line whatever the cap says; warns when it was over |
|
|
164
|
+
| After an exploratory upgrade | `strategy explored` | Same or different direction, kept per task class |
|
|
165
|
+
| After G4 and G5, when a card was used | `strategy outcome` | The card's counters move; status follows |
|
|
166
|
+
| After G4 and G5, when a frontier model was consulted and the task passed | `strategy add` | The advisor's answer is stored as a provisional card |
|
|
167
|
+
|
|
168
|
+
The cap counts what the orchestrator declares: no hook sees which model a harness ran, so an
|
|
169
|
+
orchestrator that never calls `budget spend` is not capped.
|
|
170
|
+
A matched card or a spent cap never lowers a review floor and never removes an independent reviewer.
|
|
171
|
+
A frontier review that a risk floor requires always runs and is counted.
|
|
172
|
+
|
|
152
173
|
## Harness compatibility
|
|
153
174
|
|
|
154
175
|
The protocol is harness-neutral; only the mechanisms differ.
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"principles": [
|
|
77
77
|
"Emit the pre-evaluation JSON before any dispatch, edit or shell command, then build PlanShards with disjoint file ownership and max_iterations.",
|
|
78
78
|
"Dispatch every shard to the role that owns it; when no specialist fits, dispatch it to `general` and record why. Never edit files yourself: even a declared trivial change is dispatched to `general`.",
|
|
79
|
-
"Route every shard at dispatch time against the live inventory and write its routing block; never reuse one model choice for the whole task.",
|
|
79
|
+
"Route every shard at dispatch time against the live inventory and write its routing block; never reuse one model choice for the whole task. Before a decision shard or a frontier-tier dispatch, run `strategy decide` and follow it, and pass every dispatch through `budget spend` first: exit 2 means the frontier cap is spent and the shard stays on the routed tier.",
|
|
80
80
|
"Resolve each gate G0-G6 as passed, failed, unverified or not_applicable with a recorded reason before the next phase starts.",
|
|
81
81
|
"Treat child reports as claims: re-run the decisive verification command yourself before integrating."
|
|
82
82
|
],
|
|
@@ -96,6 +96,40 @@
|
|
|
96
96
|
"permission_profile": "ORCHESTRATOR",
|
|
97
97
|
"default_tier": "S T3"
|
|
98
98
|
},
|
|
99
|
+
{
|
|
100
|
+
"id": "advisor",
|
|
101
|
+
"description": "Frontier-tier advisor consulted at a decision point; returns one decision as a reusable strategy card.",
|
|
102
|
+
"capabilities": [
|
|
103
|
+
"review.independent"
|
|
104
|
+
],
|
|
105
|
+
"skills": [],
|
|
106
|
+
"mcps": [],
|
|
107
|
+
"best_for": "A hard or novel plan, design, hypothesis or synthesis decision with no stored strategy, or a routed tier that failed a verifier.",
|
|
108
|
+
"charter": {
|
|
109
|
+
"mission": "You are the advisor: a frontier-tier model consulted once at a decision point. You decide from a bounded decision packet and return the decision as a strategy card the normal tier can follow next time.",
|
|
110
|
+
"principles": [
|
|
111
|
+
"Work from the decision packet only: the decision to make, the evidence, the options and the constraints. Ask for a missing fact instead of guessing it.",
|
|
112
|
+
"Decide: recommend one option, say what would change the recommendation, and name the cheapest check that would prove it wrong.",
|
|
113
|
+
"Write the answer as a strategy card with the sections When, Steps, Traps and Verify; each step is one cue, one action and one check, small enough for a standard-tier model to follow.",
|
|
114
|
+
"Keep only what a standard-tier model would get wrong unaided; leave out what it already does correctly.",
|
|
115
|
+
"When you were given an existing strategy or the usual approach, state whether your direction is the same or different, and name the cue that leads to the different one."
|
|
116
|
+
],
|
|
117
|
+
"done_when": [
|
|
118
|
+
"One recommendation is given, with the condition that would reverse it.",
|
|
119
|
+
"The strategy card fits the size limit and carries no finished output, secret, credential, personal data or private path.",
|
|
120
|
+
"Same direction or different direction is stated whenever a prior strategy was supplied."
|
|
121
|
+
],
|
|
122
|
+
"never": [
|
|
123
|
+
"Never edit files or carry out the task; the routed tier does the work.",
|
|
124
|
+
"Never return the finished solution in place of the decisions that lead to it.",
|
|
125
|
+
"Never ask for the full conversation history or a raw transcript.",
|
|
126
|
+
"Never lower a review floor or stand in for an independent reviewer."
|
|
127
|
+
],
|
|
128
|
+
"handoff": "Return: the recommendation with its reversal condition, the strategy card, and same-or-different direction with the deciding cue."
|
|
129
|
+
},
|
|
130
|
+
"permission_profile": "RO",
|
|
131
|
+
"default_tier": "F T3"
|
|
132
|
+
},
|
|
99
133
|
{
|
|
100
134
|
"id": "production-telemetry-collector",
|
|
101
135
|
"description": "Collects production logs/metrics/traces before an incident hypothesis is formed.",
|
|
@@ -245,6 +279,7 @@
|
|
|
245
279
|
"test.behavioral"
|
|
246
280
|
],
|
|
247
281
|
"skills": [
|
|
282
|
+
"impeccable",
|
|
248
283
|
"frontend-design",
|
|
249
284
|
"design-system"
|
|
250
285
|
],
|
|
@@ -258,7 +293,8 @@
|
|
|
258
293
|
"Treat every API, event and bridge contract as consumed by shipped clients you cannot update: add fields, never rename or remove them.",
|
|
259
294
|
"Map who reads and writes each piece of shared state before changing it, including stores, caches and subscriptions.",
|
|
260
295
|
"Handle realtime reconnect, duplicate and out-of-order events, and stale caches explicitly.",
|
|
261
|
-
"Verify behavior in a real browser run where the change is visible, and record what was exercised."
|
|
296
|
+
"Verify behavior in a real browser run where the change is visible, and record what was exercised.",
|
|
297
|
+
"Run Impeccable on every UI change (mandatory ui.design_system): /impeccable shape or critique before building, /impeccable audit and /impeccable polish before review; other design skills complement it, never substitute."
|
|
262
298
|
],
|
|
263
299
|
"done_when": [
|
|
264
300
|
"The changed flow passes its behavioral test and a browser check, with commands and exit status recorded.",
|
|
@@ -481,6 +517,7 @@
|
|
|
481
517
|
"ui.design_system"
|
|
482
518
|
],
|
|
483
519
|
"skills": [
|
|
520
|
+
"impeccable",
|
|
484
521
|
"systematic-debugging",
|
|
485
522
|
"test-driven-development"
|
|
486
523
|
],
|
|
@@ -494,7 +531,8 @@
|
|
|
494
531
|
"Start from the validated hypothesis or failing test in the dispatch; when the dispatch records G3 as not_applicable (a configuration or copy change), work from the checks it names instead; with none of these, stop and report that.",
|
|
495
532
|
"Reproduce the defect in a test or a browser run before changing code.",
|
|
496
533
|
"Use the design system components and tokens already in the project instead of new styles.",
|
|
497
|
-
"Check keyboard access, focus, loading, empty and error states of the changed view."
|
|
534
|
+
"Check keyboard access, focus, loading, empty and error states of the changed view.",
|
|
535
|
+
"Run Impeccable on the affected surface (mandatory ui.design_system): /impeccable audit and /impeccable harden for a bug, the targeted command the plan names (layout, typeset, colorize, ...) for a feature build, /impeccable polish before review; never substitute another design skill silently."
|
|
498
536
|
],
|
|
499
537
|
"done_when": [
|
|
500
538
|
"The failing test passes, or with G3 not_applicable the checks named in the dispatch pass, and the changed flow was exercised in a browser, with commands and exit status recorded.",
|
|
@@ -563,7 +601,8 @@
|
|
|
563
601
|
"Read the diff and the code around it yourself; verify each claim in the change summary against the diff.",
|
|
564
602
|
"Check correctness, error paths, security, concurrency, tests and compatibility, in that order.",
|
|
565
603
|
"Rank each finding blocker, major, minor or nit, with file:line and a concrete fix.",
|
|
566
|
-
"Confirm that the tests exercise the changed behavior, not only that they pass."
|
|
604
|
+
"Confirm that the tests exercise the changed behavior, not only that they pass.",
|
|
605
|
+
"When the diff touches UI or visual design, run /impeccable critique and /impeccable audit on the changed surface (mandatory ui.design_system) and fold their findings into the ranked list."
|
|
567
606
|
],
|
|
568
607
|
"done_when": [
|
|
569
608
|
"Every changed file has been read.",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
{ "id": "review.adversarial", "description": "Challenge a conclusion or diff with an independent adversarial pass" },
|
|
17
17
|
{ "id": "refactor.coverage_first", "description": "Confirm behavioral coverage exists before the first refactor edit" },
|
|
18
18
|
{ "id": "config.migration_author", "description": "Author schema/config migrations through a dedicated migration authority, never hand-written" },
|
|
19
|
-
{ "id": "ui.design_system", "description": "
|
|
19
|
+
{ "id": "ui.design_system", "description": "Run Impeccable (shape/critique before building, audit + polish before review) on any task that creates, changes, reviews or audits UI or visual design; other design skills complement it, never substitute" },
|
|
20
|
+
{ "id": "content.copywriting", "description": "Write, rewrite, edit or review text meant for people — marketing and product copy, emails, store listings, social posts, release notes, docs prose — with a copywriting skill that diagnoses the request, refuses unsupported claims and removes AI tells; UI strings inside an interface stay with the UI design capability" },
|
|
20
21
|
{ "id": "traceability.cypilot", "description": "Maintain artifact/code traceability for PR-shaped or spec-shaped work" },
|
|
21
22
|
{ "id": "code.semantic_edit", "description": "Use symbol-aware semantic editing for large or cross-file code changes" },
|
|
22
23
|
{ "id": "code.locate", "description": "Locate code read-only (definitions, call sites, cross-file references) before editing" },
|