UNPKG

@kontextmind/kxm

Version:

KXM local-first multi-agent orchestration and operator dashboard

69 lines (53 loc) • 6.01 kB
## Outcome - Three new model files, `agy-gemini-4-argon-high`, `agy-gemini-4-argon-medium`, `agy-gemini-4-argon-low`, exist under `.kxm/models/`, schema `kxm.model.v2`, harness `agy`, model `gemini-4-argon`, vendor `google`, status `admitted`, permissions matching the current agy Flash entries. Effort is carried by the pinned agy model id, not a new flag. - Writer roster in `.kxm/routes.yaml` becomes, in order, effort medium: `grok-grok-4-7`, `pi-qwen3-coder-plus-openrouter`, `agy-gemini-4-argon-high`, `agy-gemini-4-argon-medium`, `agy-gemini-3-8-flash-high`, `agy-gemini-3-8-flash-medium`. Primary unchanged. - `agy-gemini-4-argon-low` is admitted but placed on no roster only if lint allows a documented exception; otherwise it is omitted from this change (see Open questions). Default plan: do not create the `low` file. - Inventory, prices, Tracking, and routing docs move in the same change. Planner and architecture-review rosters are untouched. ## Files - `.kxm/models/agy-gemini-4-argon-high.yaml`, `.kxm/models/agy-gemini-4-argon-medium.yaml` (new). - `.kxm/models/inventory.yaml`: add both ids with harness `agy`, pinned ids `gemini-4-argon-high` / `gemini-4-argon-medium`, context `1048576`, plan requirement note (Pro/Ultra/Enterprise). - `.kxm/routes.yaml`: writer selector order as above; no other roster changes. - `.kxm/prices.yaml`: new row `id: agy-gemini-4-argon`, `provider: google`, `model: gemini-4-argon`, tiers: standard `inputPerMillion: 2`, `outputPerMillion: 10` valid through `2026-11-30`; standard-after `4` / `20` from `2026-12-01`; batch `1` / `5`. Bump the file date and recompute the sha256 pin. - Inventory-refresh code (the module behind `kxm models inventory-refresh`): guard that rows whose harness is `agy`, `grok`, or `pi` are preserved when their CLI is absent. Only if a test shows the current code drops them. - `plans/implementation-plan.md`: Tracking → Decided entry for Argon writer admission; no earlier phase enlarged. ## Tests - Roster policy test: expected writer order updated; asserts primary is `grok-grok-4-7`, planner/arch-review rosters contain only `claude-fable`, and no roster contains `openrouter/…google…`. - Workforce lint test: every admitted model file is on a roster (fails if `low` is created and unrostered). - Model schema test: new files validate as `kxm.model.v2`; vendor `google` + harness `agy` only; a model file with vendor `google` and harness `pi`/OpenRouter fails. - Prices loader test: hash-mismatch refusal still holds; new row parses with two dated standard tiers plus batch; a fixture dated after 2026-11-30 resolves to 4/20. - Inventory-refresh test: with OpenRouter/Nous fixtures and no `agy`/`grok`/`pi` binaries, the agy and grok rows survive the refresh. - Harness capability test: agy routes are one-shot (`agy -p`), never registered as `kxm agent worker`; a missing or logged-out agy yields fail-closed with no fallthrough to another vendor. - Brake test: old or alias names (e.g. a generic `gemini-4` id without `-argon`, or a `gemini` CLI entry promoted to a harness) are rejected. - `npm run verify` after `npm ci`; regenerate `dist` if any CLI module changed. ## Docs - `docs/reference/harness-routing.md`: writer rotation table; note Argon's plan requirement, effort via pinned id, no self-fallthrough. - Config reference (routes/models/prices section): new ids, the dated two-tier price row convention. - Changelog: "Admit Gemini 4 Argon (high, medium) to the developer writer roster after OpenRouter Qwen; prices row added." - `plans/implementation-plan.md` Tracking. - `AGENTS.md` is not edited: it intentionally defers admissions to Tracking. ## Risks and guards - Billing Google via OpenRouter: guard is vendor/harness pairing lint plus the roster test. Refuse any `openrouter/google/...` writer entry. - Silent fallthrough: `agy -p` exits on unavailable model; the runner must treat exit as route failure and move to the next eligible route, not retry via Pi. Refuse adding a Pi `google` provider route. - Plan gating: Argon needs a paid plan; logged-in agy on a free plan still fails. Guard: `kxm harness list` auth check remains fail-closed; record the failure as cost-unknown attempt. - Price staleness: dated tiers avoid underquoting after 2026-11-30; hash pin must be regenerated by script, never hand-edited. - Inventory refresh dropping CLI rows: covered by the preservation test. - Refuse: harness preferences overlay, long-lived agy worker, putting Argon on planner/review rosters, changing `kxm init` defaults (grok-4.6/fable), dual names or aliases. ## Sequence 1. Add the two model files and inventory rows; run model schema and lint tests. 2. `kxm routes admit` both ids; edit `.kxm/routes.yaml` writer order; update roster policy test. 3. Add prices row, bump date, regenerate sha256; update loader test fixtures. 4. Add inventory-refresh preservation test; fix code only if it fails. 5. Add fail-closed and brake tests for agy routes. 6. Update harness-routing doc, config reference, changelog, Tracking. 7. `npm ci && npm run verify`; stage `dist` if changed; commit as one logical change. ## Non-goals - No Argon on planner or architecture-review rosters (later fallback at most). - No change to writer primary or `kxm init` template. - No `agy` worker mode, no retry/fallthrough logic inside agy itself. - No new catalog feed, no OpenRouter Gemini route, no GitLab adapter work. ## Open questions - Does workforce lint allow an admitted-but-unrostered `low` file? If not, either omit `low` or add it as last writer fallback; packet does not decide. - Exact permission set for agy entries (copy from Flash or narrower)? - Does the prices schema `kxm.prices.v1` support dated tier validity ranges, or must the after-November price land as a separate dated file revision? - Which status word does the inventory use for "CLI absent on this machine" rows? - Does the `agy` CLI expose the paid-plan check for `kxm harness list`, or is it only observable via `agy -p` exit?