agent-routing
Which model tier and effort each delegated agent runs on — Agent tool calls, headless `claude -p` runs, workflow agents and orchestrator launches — when to escalate, and what a brief must name so the run ends cleanly. The cheapest tier that passes the gate, chosen per call, never inherited. USE WHEN delegating to a subagent, choosing a model or effort for an agent, fanning out agents, writing a workflow or orchestrator launch, an Agent call was denied for a missing model, an agent failed and you are deciding whether to escalate. NOT FOR reviewing a diff (audit-review-fanout), or API code that calls Claude (claude-api).
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- agent-routing
- owns-tools
- Agent
- description
- Which model tier and effort each delegated agent runs on — Agent tool calls, headless `claude -p` runs, workflow agents and orchestrator launches — when to escalate, and what a brief must name so the run ends cleanly. The cheapest tier that passes the gate, chosen per call, never inherited. USE WHEN delegating to a subagent, choosing a model or effort for an agent, fanning out agents, writing a workflow or orchestrator launch, an Agent call was denied for a missing model, an agent failed and you are deciding whether to escalate. NOT FOR reviewing a diff (audit-review-fanout), or API code that calls Claude (claude-api).
- architecture
- all
- inline-section
- The table
- disable-model-invocation
- true
03 SKILL.md 正文
agent-routing — the cheapest tier that passes the gate
Done looks like: every agent you start names its model and, where the table says, its
effort. It runs on the lowest row that fits the work, and moves up a row only on evidence: a
failed gate or a refusal. The quality gates never change with the tier.
Architecture: the tiers below serve every architecture in contracts/agent-architectures.tsv
(architecture: all). Each row there takes its tier from contracts/agents.tsv, which follows this table: the
build role is the haiku/high row, and a multi-file build or a failed gate moves to sonnet/medium.
The table
| Tier | Effort | Work |
|---|---|---|
haiku |
medium |
Read-only work: search and inventory, CI and log triage, status polling, privacy and secret scans, one lens of a review, drafting from facts you supply |
haiku |
high |
A scoped code change that a test or script checks: fixes with tests, debugging from a symptom plus a regression test, small features, refactors with an output-identity check, review-round fixes, doc updates, mutation runs |
sonnet |
medium |
Escalation after Haiku fails a gate or refuses; work nothing can check mechanically; multi-file or cross-repo changes; merge conflicts |
opus |
default | Coordination, design decisions, floor and guard design, security review, final verification of a batch, and anything Sonnet failed |
Fable is not a tier. Anthropic's own launch table puts it below Opus 5.5 on every row, at 2.5× the price.
Rules that are not obvious
- Always pass
model.context-rules/user/agent-model-requireddenies an Agent call without one. It exempts afork, and an agent whose definition pins a model. The pin is not a routing decision: a plugin's agent can pinopus. Passingmodeloverrides the pin, so pass it. - Haiku defaults to
mediumeffort. A code-changing Haiku agent needseffort: high, where the trial measured it.context-rules/user/agent-briefnames a missing effort. Never run an agentic task atlow: at that level Haiku stops early and reports work as done without checking it. - A Haiku refusal is a failure, not an answer. Haiku 5.5 has no server-side refusal
fallback. Re-brief the same task on
sonnetand include the refusal. - Escalate once, with the evidence. The next tier gets the same brief, plus the failed gate's output. Never retry the same tier unchanged.
- Concurrency is an operator decision: no cap on agents running at once (2026-10-13; it was 5). Test suites still run at most 3 at a time, because suites share one machine and contention, not agent count, is what slows them.
- The hook sees Agent tool calls only. Anything else sets the tier itself: a headless
claude -p(pass--modeland--effort), a workflow script'sagent(), and the orchestrator, whose table isfleet'smodels.py(overridable undermodels:infleet.yaml). - A headless brief names the exact test command. Without one, an agent runs the repository's
full suite, often in the background, and the
claude -pprocess outlives its own result. In the trial, 30 of 105 unscoped runs were still alive at the 15-minute kill after reporting. With the suite named in the prompt, 0 of 36 were. - Use aliases, never pinned ids. An alias follows its tier's current model. To see what it
means today, run
claude -p OK --model haiku --output-format jsonand read themodelUsagekey.
The evidence, and its limits
harbor#818 carries the trial: 141 script-graded runs across 10 Harbor task types, 3 of them hard.
Haiku 5.5 at high passed 30 of 30. The one Haiku miss at medium was a harness timeout, not a
wrong answer. Sonnet 5.5 and Opus 5.5 passed every task. Cost per passed task: Haiku medium
$0.019, Haiku high $0.050, Sonnet $0.19, Opus $0.39.
No task separated the tiers. That shows Haiku is enough for this kind of work. It does not show where Sonnet or Opus start to earn their price, so the Sonnet and Opus rows are judgment. Three runs per cell cannot tell 95% reliability from 100%. Untested: open-ended design, multi-repo coordination, ambiguous specs, runs over 15 minutes, and large diffs. Move a row when measurement on real work says so, and record the measurement on #818.
04 同仓库更多 Skills
systems-thinking
For a problem where the obvious fix has already failed or made things worse. The cause usually lives three or four layers below the events that keep appearing; this finds that structure, matches it against the ~10 known archetypes to get the canonical intervention, and checks second-order effects before you commit. Event-level fixes are what it exists to replace. USE WHEN systems thinking, causal loop, feedback loops, archetypes, leverage points, iceberg model, fix the system, why does this keep happening, recurring problem, second-order effects, the fix made it worse, this keeps coming back. NOT FOR incident causal chains (use root-cause-analysis).
red-team
Adversarial analysis deploying parallel expert agents to stress-test ideas, strategies, and plans — decomposes into atomic claims, attacks them, then steelmans and counter-argues, producing severity-ranked findings with remediation. USE WHEN red team, attack idea, counterarguments, critique, stress test, devil's advocate, find weaknesses, break this, poke holes, strongest objection. NOT FOR collaborative debate to find best path (use council).
first-principles
Physics-based reasoning framework (Musk methodology) that deconstructs a problem to irreducible fundamental truths, classifies every element as hard constraint, soft constraint, or assumption, then reconstructs the optimal solution from fundamentals alone. USE WHEN first principles, fundamental truths, challenge assumptions, real constraint, rebuild from scratch, start over, physics first, question everything, reasoning by analogy. NOT FOR structural feedback loops (use systems-thinking).
company-help
Explains this laptop's safety settings in plain words: why a step was stopped, asked about or is waiting for an admin, where work files belong, and how to get a website allowed. USE WHEN a step is refused or blocked, a permission question appears, a site or download fails, or someone asks what Harbor is or where to save files. NOT FOR changing a setting: nobody here can.
test-strength
Prove a load-bearing test can actually fail, and that it fails for the right reason. Break the thing it guards, watch it go red, restore — then check it stays green on a valid-but-unusual input, because red on a mutant proves discrimination, not correctness. USE WHEN a suite is written or changed, a guard is trusted, a gate reports zero, or a green result is about to be cited as evidence. NOT FOR reviewing a diff for defects (audit-review-fanout), or running a suite to see it pass (`bin/test-suite-run.sh`).
status-suggest-scan
Runs the repeated-work scan and says in plain words what a person keeps doing by hand. USE WHEN a person asks what they repeat or what Harbor could take over. NOT FOR building what it finds.