Skip to content

Model Routing

luiseiman edited this page Apr 5, 2026 · 3 revisions

Model Routing

dotforge provides explicit model selection criteria in template/rules/model-routing.md. Every bootstrapped project gets this rule.

Selection criteria

Model Use for
haiku File search, grepping, running tests, repetitive transforms, short factual questions
sonnet Feature implementation, bug fixing (known root cause), code review, debugging, documentation
opus Architecture decisions with real tradeoffs, security audits, ambiguous high-stakes tasks, production operations

Agent assignments

Agent Model Reason
researcher haiku Exploration — speed over depth
test-runner sonnet Writes tests — needs reasoning quality, not just execution
implementer sonnet Standard implementation work
code-reviewer sonnet Focused review of single concern
session-reviewer sonnet Pattern analysis, not architecture
architect opus Tradeoffs with lasting consequences
security-auditor opus Missing a vulnerability has production consequences

Escalation rule

Start with sonnet. Escalate to opus when:

  • 2+ valid approaches exist with real consequences for choosing wrong
  • Task touches security, data integrity, or production systems
  • After 2 attempts the approach is still unclear

Agent Frontmatter Fields

Model routing in agent definitions uses these frontmatter fields:

Field Values Description
model haiku, sonnet, opus Model override
effort normal, high, max Reasoning budget (architect=high, security-auditor=max)
context fork Execute skill in isolated subagent for post-compaction safety
allowed-tools Tool list Use allowed-tools: — not tools: (wrong key silently ignored)

MCP operations

Operation Model
Read (SELECT, list, get) haiku
Write with known intent sonnet
Migration, schema change, production operation opus

Clone this wiki locally