Build contract bridging Routing Methodology v1.2 → the ainfera-ai/routing flagship (AIN-188). The methodology is the theory; this page is the buildable cut — what v0 ships, the cold-start data it needs, and the v0→v1→v2 phasing.

Spec: Routing Methodology v1.2 · Repo: github.com/ainfera-ai/routing · Locked 2026-05-22

A · Gap — repo today vs. what v0 needs

The flagship repo currently ships a customer-facing demo, not the routing brain.

In repo now Missing — v0 builds it
README + quickstart (scripts/ainfera-e2e.sh) q_prior scoring + seed table
STRATEGY.md positioning Constrained objective (M_allowed veto → argmax)
routing-policy editor (PR #49) §16 outcome capture (write-only)
E2E demo (routed inference + signed audit) Exact-match cache · provider fallback · drain-proof budgets · deterministic replay

v0 turns the demo shell into a real router.

A2 · Architecture (LOCKED 2026-05-22)

Brain in routing, runtime in api.

Clean line: routing = brain (decide) · api = body (dispatch + capture) · Spark = gym (train/replay).

A2 · Where the brain lives (LOCKED 2026-05-22)

Two repos, clean split:

The decision function is identical in production, replay, and training — one engine, one source of truth.

B · v0 scope

Ships in v0 (no learning):