Model Routing
How MeowKit assigns a model tier to each task: Trivial, Standard or Complex, and the rules that force a higher tier.
The orchestrator classifies every task by complexity before work begins and prints the result: Task complexity: [TRIVIAL|STANDARD|COMPLEX] → using [model tier]. mk:scale-routing emits provider-neutral complexity, workflow and execution-tier signals. The active provider adapter maps them to models. The table below is the Claude Code adapter (.claude/skills/agent-detector/references/model-selection-rules.md).
This page covers the session model for a task. Which model each subagent runs on is a separate fixed assignment, covered in Agent models.
Routing table
| Task | Tier | Claude Code model | Examples |
|---|---|---|---|
| Quick edits | TRIVIAL | Haiku | Rename, typo, format, version bump, config change |
| Feature implementation | STANDARD | Sonnet | Feature under 5 files, bug fix, tests, API endpoint, UI component |
| Complex architecture | COMPLEX | Opus | System design, multi-module refactor, auth, payments, database schema |
| Code review | COMPLEX | Opus | Structural audit, security review, architecture review |
| Research and analysis | STANDARD or COMPLEX | Sonnet or Opus | Technical research, dependency analysis, profiling |
Escalation rules
- Security work is always COMPLEX. This covers authentication and authorization, payment processing, credential handling, security audits and vulnerability fixes, and schema changes with CASCADE. It also covers data-loss migrations, external provider behavior changes, and removing or weakening validation.
- Risk flags escalate. A Phase 0 risk flag of
AUTH,AUTHZ,DATA_MODEL,AUDIT_SECorEXT_SYSTEMforces COMPLEX even when no domain keyword matched. - A task never moves down a tier. Once assigned, a task keeps its tier for the session, because a downgrade mid-task loses reasoning context.
- A high-complexity domain overrides everything. When
mk:scale-routingmatches a domain withlevel=high, the tier is COMPLEX whatever else the classification said.
Domain matching
Before manual classification, mk:scale-routing matches keywords in the task against .claude/skills/scale-routing/data/domain-complexity.csv. Each row has a domain, its signal keywords, a level (low, medium or high), a workflow and suggested searches.
| Domain | Signals | Level | Workflow |
|---|---|---|---|
| fintech | banking, payment, trading, finance, money, investment | high | enhanced |
| healthcare | medical, diagnostic, clinical, patient, hospital, health | high | enhanced |
| government | government, civic, public, admin, regulation | high | enhanced |
| e_commerce | shopping, cart, checkout, payment, products, store | medium | standard |
| internal_tools | admin, dashboard, internal, backoffice, cms | low | standard |
| docs | documentation, readme, changelog, wiki, guide | low | one-shot |
The file has more rows than these. You can add rows for your own project's domains. A domain verdict cannot be lowered mid-task.
Density for autobuild
For /mk:autobuild the model also decides how much scaffolding runs. See Adaptive density.
See also
- Agent models for the model each agent runs on
- Adaptive density for scaffolding by model
- Orchestrator agent
Agent-Skill Architecture
How MeowKit agents load skills across the workflow phases: project context, phase ownership, step-file skills and the cross-cutting skills.
Agent Models
Which model each MeowKit agent runs on in Claude Code, Codex and Cursor, how the tiers map between runtimes, and how to change a pin.