One table decides which model and how much effort each kind of work gets

A lane is a kind of work with a fixed model and a fixed effort. Every agent and every skill in the engine names one lane, in one word, in its frontmatter. Nobody sets a model by hand: a script reads the table below and writes the settings Claude Code actually applies.

The table

LaneModelEffortHow it runs
scriptnone—a script — zero tokens
mechanicalhaikulowa forked skill: no conversation history, under 100K tokens
lookuphaikulowthe Explore agent
researchsonnetlowExplore with a written brief
buildsonnetmediuma build agent with a written brief
workopusmediuma department's lead agent working one stage or one work order
judgeopushighthe main loop or an opus agent
captainopusxhighthe main loop, attended
crmsonnetmediumthe lead or funnel agent against Twenty (crm-api.databayt.org); reads and hygiene that a script already does stay on the script lane
freefree—Claude Code on the free pool (kun-free.sh) — $0, own data and internal output only; never client data or secrets
webnone—a web seat (ChatGPT/DeepSeek/GLM/Gemini free quota) — text only, $0
escalatefablexhighby hand, attended only — never unattended

The table lives in .claude/engine.json under lanes. Change a row, run node .claude/scripts/compile-lanes.mjs, and everything on that lane changes with it.

The main loop plans and judges on Opus. Build work goes to sonnet build agents with a written brief, lookups to the haiku Explore agent, and CRM work to the lead or funnel agent.

Keyword and MCP routes

The router reads each prompt, matches these words and phrases (whole words, case-insensitive, longest phrase first; on a tie the higher lane wins) and adds one lane line to its route hint. An MCP call runs on whatever model makes it, so the route says who should make it. resolve.mjs --lane "<task>" prints the lane for a task; captain and escalate never come back from it, they cap at judge.

LaneModel · effortPhrases
captainopus · xhighpricing, canon, strategy, captain, hiring, fundraise, runway, what should i do next
judgeopus · highfix, bug, review, plan, architecture, deploy, ship, release, migration, run sql, production, prod, security, slack send, send message, gmail send, send email, publish, decide
crmsonnet · mediumcrm, twenty, lead, leads, pipeline, prospect, qualify, follow up, outreach, عملاء محتملين, متابعة
buildsonnet · mediumcomponent, page, form, table, wire, schema, server action, add a, build, implement, scaffold, refactor, migrate to
lookuphaiku · lowfigma, neon, list the tables, show the tables, figma read, get design context, neon describe, list tables, describe table, github read, search code, context7, library docs, ref docs, markitdown, convert to markdown, find where, where is, which file, look up

The free lane

free is the one lane that does not run on the Claude plan. A scheduled job on it goes through kun-free.sh: Claude Code with kun's config, pointed at the free token pool (OmniRoute, combo long) or straight at Nous, for $0. It exists so routine loops keep working when the Max plan is limited: the plan's park does not block a free run.

  • Who uses it. Headless jobs only, through kun-claude.sh: any job whose name matches a free entry in jobs.$lanes (today seek:google, seek:wave, seek:week, funnel:learn, kun:, test:, bench:), or whose own jobs.<job>.lane says free. No agent or skill declares it.
  • Fallback. A free run that exits non-zero, hits a 429 or rate limit, overflows the context window or comes back empty is retried once on the fallback lane (mechanical: haiku, low) through the normal Claude path. The ledger gets a row for each attempt, noted free→fallback. Fable is never a fallback.
  • The data rule. Free providers may read prompts. Own data and internal output only: client data and secrets never go on the free lane.

The web lane

web is a seat, not a model: scripts/web/web.mjs hands a text task to the free daily quota of ChatGPT, DeepSeek, GLM or Gemini, in Abdout's own signed-in Chrome, for $0. No agent or skill declares it; a pipeline calls it for a second opinion and falls back (exit 75) when every seat is capped, signed out or limited. The order, the gap between asks and the daily caps live in engine.json under web. Own data and internal output only: client data and secrets never go to a web seat.

What a lane writes

ForIt writesWhy
an agentmodel and effortapplied when the agent starts
a skill on mechanical, lookup or researchcontext: fork, model, effortthe skill runs as a separate agent with no conversation history, on the lane's model
a skill on build, judge or captaineffort onlyswitching model in the middle of a conversation throws away the prompt cache, so these stay on the session's model and hand heavy steps to an agent

Where it is enforced

  1. Frontmatter. Claude Code applies an agent's model when it starts it, and forks a skill onto its lane's model when the skill is invoked.
  2. Explore. The engine ships its own Explore agent on Haiku; the built-in one ran on the session's model.
  3. The route hint. A short prompt that opens with a fork-lane skill (dev, health, watch) is told to invoke the skill rather than do the work in the main loop.
  4. The route guard. A subagent call that names no model gets the build lane's; a call that names Fable is refused.
  5. Headless runs. A scheduled run takes its model from its job's lane and can never be Fable.
  6. The lint. lint-contracts.mjs fails on an agent or skill with no lane, or with a model or effort set by hand.

One call can still ask for more: naming a model on a single agent call overrides the lane for that call.

Who is on which lane

mechanical

Agents (7): comment, git, github, icon, semantic, sse, structure

Skills (7): convert, dev, domains, health, measure, monitor, repos

lookup

Agents (1): Explore

research

Agents (8): catalog, codebase, hogwarts, kun, learn, mkan, shifa, souq

Skills (4): costs, crawl-anthropic, economy, watch

build

Agents (26): analyze, atom, authjs, block, build, clone, cloudflare, deploy, internationalization, middleware, nextjs, optimize, package, pattern, performance, prisma, pwa, react, record, report, rust, shadcn, tailwind, template, test, typescript

Skills (62): airbnb-copy, analyze, atom, auth, blender, block, blur, build, business, calendar, carousel, catalog, check, clone, code, codebase, credentials, docs, draft, edit, facebook, fix, higgs, hogwarts, idea, image, issue, jobs, kun, learn, marketing, mcp-doctor, mkan, motion, package, pattern, performance, produce, profile, provision, pwa, quick, record, report, reverse, rnd, saas, sales, screenshot, seek, shadcn, shoot, skeleton, social, support, tasks, tech, template, test, textbook, video, wire

judge

Agents (17): adjudicate, architecture, funnel, guardian, image, marketing, media-qa, ops, orchestration, product, quality, rnd, sales, support, tech, transcribe, video

Skills (22): approve, behalf, bench, cloudflare, decide, deploy, feature, handover, incident, md, plan, premortem, pricing, proposal, publish, qa, release, schema, security, ship, spec, sync

captain

Agents (1): business

Skills (3): canon, captain, weekly

crm

Agents (1): lead

Skills (2): funnel, scrape

Checks

node .claude/scripts/compile-lanes.mjs --check   # every file matches its lane
node .claude/scripts/compile-lanes.mjs --list    # file → lane → how it runs
node .claude/scripts/lint-contracts.mjs --check  # no missing lane, no hand-set model