--- name: model-tiers description: >- Resolves which model a subagent runs on from three tiers (cheap, standard, strong). Models the harness doesn't offer can run through an orchestrator that drives other harnesses' agents, such as Orca. Use when a skill says to spawn a subagent on a tier, when choosing a model for any subagent or worker (a builder, a reviewer, a verifier), when a task needs a model from a different family, or when the user asks to set up or change model tiers. disable-model-invocation: false --- # Model tiers Skills name a tier, not a model. This skill turns a tier, or a model the user names, into a model the current harness accepts. ## Tiers - **cheap**: high-volume, narrow work. One theme of a themed review, scanning, summarising. - **standard**: routine implementation, review, and verifying done checks. - **strong**: judgment. Design, coordination, triage, the hardest changes. When the caller names no tier or model, choose a tier from these. ## Config The tiers are one list for all harnesses. If `~/.agents/model-tiers.md` exists, it is the config, and replaces the defaults entirely. Otherwise the config is [`defaults.md`](defaults.md), in this skill's directory. Each tier line names models in preference order, by family and version as a person would write them. An optional effort in parentheses applies where the harness supports it. Not every harness offers every model. Entries the harness can't run are skipped. ## Effort A tier entry's effort is the default. Lower it one step for small, fully specified work: a ready ticket (see `/ready-ticket`) whose design leaves nothing to the builder's judgement and whose change touches a few files, or is largely mechanical. Keep the default for review and verification. ## Spawning Start each subagent with a fresh context window, not a fork of this conversation. A fork may ignore the model and carries the implementer's context. If there is no way to spawn one, tell the user and stop; don't do the subagent's work inline. A model can be reachable two ways: - **Built-in**: the harness's own subagent tool. It usually offers one family, or a few close ones. - **Orchestrator**: a tool that runs fresh workers in other harnesses' CLI agents. Each has a skill that says how to check it's reachable, which models it offers, and how to start workers and collect results: - Orca: the `/orca-workers` skill, if `orca` is installed. The model decides the mechanism, not the other way round. Resolve against everything reachable, then use built-in if it offers the model, else the orchestrator that does. Never pass over a model because reaching it needs an orchestrator. Some subagents report asynchronously. Start them all, then wait until every one has reported before going on. ## Match a model name To turn a config entry or a name the user gives ("Opus", "GPT") into a model, match it against the values the subagent tool accepts: its schema, or the list in a rejection message. Also match against the models each reachable orchestrator's skill lists. - Cursor-style tools take full slugs, which encode effort: pick the slug for that model and effort. - Claude Code-style tools take an alias (`opus`, `sonnet`, …) and a separate effort parameter. - Match family and version. If that version isn't offered, take the nearest newer one in the same family. Never substitute a different family. - An entry with no match is unavailable here; skip it. ## Resolve a tier 1. Read the config once per session, as **Config** describes, and take the tier's line. 2. Once per session, find what's reachable: the built-in tool's models, and, for each installed orchestrator, the models its skill says it reaches here. 3. Drop entries that match nothing reachable. 4. For a reviewer or verifier, take the first remaining entry that passes **Reviewers differ from the implementer**. For anything else, take the first. 5. If the tool rejects a model, try the next. If the line runs out, omit the model so the subagent inherits the parent's, and say so. 6. If the tier's line is missing: ask the user once which model to use for that tier this session, and offer to add it to `~/.agents/model-tiers.md`. If you can't ask, omit the model and say so. A model the user names explicitly wins over the config. If it has no match, or the match is ambiguous, ask. When the user gives a count larger than the models they name, resolve the rest from the tier the calling skill uses. ## Reviewers differ from the implementer A reviewer or verifier of work runs on a different model from the one that wrote it, so it doesn't share the author's blind spots. - The implementer is whichever model wrote the change: this session's model if you wrote it, or the model given to the implementing subagent. If you don't know, say so. - Prefer a different model family (Claude, GPT, Gemini, …). Where only one family is reachable, built-in and through orchestrators, a different model in it. - Several reviewers doing the *same* thing each get a distinct model, all different from the implementer. Reviewers with different lenses can share a model. - If the tier's line has no qualifying model, look in higher tiers, then lower tiers. If none qualify at all, use the implementer's model. Say which in the report. - Flag a user-named model that matches the implementer. ## Set up or change tiers Changes for one environment go in `~/.agents/model-tiers.md`. If it doesn't exist yet, copy `defaults.md` there. Then ask the user how they'd like it changed, and edit it. Changes meant for every environment go in `defaults.md` instead.