Summary
Implement a tiered model routing layer in Code Cannon that assigns the appropriate Claude model to each task type based on complexity, rather than defaulting all execution to Opus.
Background
Current Code Cannon sessions run virtually all task execution on claude-opus-4-7, resulting in high token cost per session. Analysis of usage data shows significant opportunity to route lower-complexity tasks to Sonnet or Haiku without sacrificing output quality.
Goals
- Reduce effective token spend per Code Cannon session by 30–50%
- Maintain Opus for tasks requiring deep reasoning or architectural judgment
- Make routing rules transparent and overridable per-ticket
Proposed Approach
Model Tiers
| Tier |
Model |
Use Cases |
| Heavy |
claude-opus-4-7 |
Architecture decisions, complex debugging, design-heavy passes, ambiguous specs |
| Standard |
claude-sonnet-4-6 |
Refactoring, test writing, most feature implementation |
| Light |
claude-haiku-4-5 |
Scaffolding, boilerplate generation, config file stubs, repetitive file creation |
Routing Mechanism
- Add a
model field to the ticket schema (optional, defaults to standard)
- Define a routing config in
AGENTS.md or a dedicated model-routing.yml that maps task tags or phase types to tiers
- Allow per-ticket override via explicit
model: heavy|standard|light declaration
- Log model used per ticket in session summary for tuning feedback
Acceptance Criteria
Notes
- Preserve cache efficiency: stable system prompts and CLAUDE.md content should remain at context top regardless of model tier
- Revisit tier assignments after first 3–5 sessions with real data
Summary
Implement a tiered model routing layer in Code Cannon that assigns the appropriate Claude model to each task type based on complexity, rather than defaulting all execution to Opus.
Background
Current Code Cannon sessions run virtually all task execution on
claude-opus-4-7, resulting in high token cost per session. Analysis of usage data shows significant opportunity to route lower-complexity tasks to Sonnet or Haiku without sacrificing output quality.Goals
Proposed Approach
Model Tiers
Routing Mechanism
modelfield to the ticket schema (optional, defaults tostandard)AGENTS.mdor a dedicatedmodel-routing.ymlthat maps task tags or phase types to tiersmodel: heavy|standard|lightdeclarationAcceptance Criteria
modelfieldNotes