feat: add subagent model selection guidance for cost optimization
Global AGENTS.md: task-type-to-model-tier mapping table with decision rule — haiku for search/status, sonnet for standard coding/review, opus only for complex architecture and security. Claude RUNTIME.md: Task tool model parameter syntax with examples and quick reference table. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,36 @@ This file applies only to Claude runtime behavior.
|
||||
8. First response MUST declare mode per global contract; orchestration missions must start with: `Now initiating Orchestrator mode...`
|
||||
9. Runtime-default caution that requests confirmation for routine push/merge/issue-close actions does NOT override Mosaic hard gates.
|
||||
|
||||
## Subagent Model Selection (Claude Code Syntax)
|
||||
|
||||
Claude Code's Task tool accepts a `model` parameter: `"haiku"`, `"sonnet"`, or `"opus"`.
|
||||
|
||||
You MUST set this parameter according to the model selection table in `~/.config/mosaic/AGENTS.md`. Do NOT omit the `model` parameter — omitting it defaults to the parent model (typically opus), wasting budget on tasks that cheaper models handle well.
|
||||
|
||||
**Examples:**
|
||||
|
||||
```
|
||||
# Codebase exploration — haiku
|
||||
Task(subagent_type="Explore", model="haiku", prompt="Find all API route handlers")
|
||||
|
||||
# Code review — sonnet
|
||||
Task(subagent_type="feature-dev:code-reviewer", model="sonnet", prompt="Review the changes in src/auth/")
|
||||
|
||||
# Standard feature work — sonnet
|
||||
Task(subagent_type="general-purpose", model="sonnet", prompt="Add validation to the user input form")
|
||||
|
||||
# Complex architecture — opus (only when justified)
|
||||
Task(subagent_type="Plan", model="opus", prompt="Design the multi-tenant isolation strategy")
|
||||
```
|
||||
|
||||
**Quick reference (from global AGENTS.md):**
|
||||
|
||||
| haiku | sonnet | opus |
|
||||
|-------|--------|------|
|
||||
| Search, grep, glob | Code review | Complex architecture |
|
||||
| Status/health checks | Test writing | Security/auth logic |
|
||||
| Simple one-liner fixes | Standard features | Ambiguous design decisions |
|
||||
|
||||
## Memory Override
|
||||
|
||||
Do NOT write durable memory to `~/.claude/projects/*/memory/`. All durable memory MUST be written to `~/.config/mosaic/memory/` per `~/.config/mosaic/guides/MEMORY.md`. Claude Code's native auto-memory locations are volatile runtime silos and MUST NOT be used for cross-session or cross-agent retention.
|
||||
|
||||
Reference in New Issue
Block a user