agnostic-skills

tiered-delegation

tiered-delegation

Routes each unit of agent work to the cheapest model tier that can finish it, and does the routing and cost math in scripts, not in the model.

Installed together with model-routing, which picks the model for any spawn that has no pinned profile and sets the harness default.

Quick start

  1. Copy the folder (and model-routing beside it): install a skill.

  2. Run the estimator once to confirm it works:

    python3 <repo>/.claude/skills/tiered-delegation/scripts/estimate_delegation.py --tokens 20000
  3. Start a session and ask what skills it has. tiered-delegation should be listed. It triggers on multi-step work.

What's inside

Script / fileWhat it does
SKILL.mdThe rules as a skill
prompt-tiered-delegation.mdThe same rules as one paste-ready block, for harnesses without skills
references/Mini plan template, escalation format, and the rationale, script contracts and A/B benchmark behind the rules
scripts/estimate_delegation.pyPrints VERDICT: delegate|inline from payload size vs agent overhead
scripts/pick_agent.pyMaps what a unit of work does and needs to the leanest profile; extra tools register in a profiles file (--help)
scripts/tally_cost.pySums real token and cost per session, compares a delegated run to an inline one, measures each agent type's fixed context (--agent-overhead)
agents/*.mdLean subagent profiles (runner, scout, sprinter, workhorse, architect): pinned model, minimal tools, no CLAUDE.md, no spawn tool

How it works

Each prompt, the driver estimates whether delegating beats doing it inline. Below about 6k tokens of agent overhead, inline wins.

Work that fits goes to the cheapest capable tier, in one batched brief. A stuck agent returns a BLOCKED block and the question is promoted up.

The tiers
  • Architect: strongest reasoning model, read-only. Ambiguous scope, root cause, plans, final review.

  • Workhorse: solid mid model. Implementation that needs judgment about surrounding code.

  • Sprinter: small, fast model. Pure extraction and mechanical edits with the target named.

Measured: the small tier on judgment scored 1.35 vs 1.86 inline. The mid tier held at 1.91 vs 1.98.

Scripts
  • Stdlib python3 (3.9+), read-only, no network.

  • Each takes --help and --json.

  • Exit 0 is ok, 2 is bad input.

Harnesses
HarnessRules go inHow a subagent gets its tier
Claude Code<repo>/CLAUDE.md or AGENTS.mdAgent tool, model: opus | sonnet | haiku per spawn
opencode<repo>/AGENTS.mdone subagent per tier in opencode.json, each with a pinned model
Codex CLI<repo>/AGENTS.mdits subagent or model-selection feature; with none, the loop, scripts and escalation still apply
Cursor / IDE agentsan always-apply project rule, or AGENTS.mdthe tool's model picker or background-agent model
Raw API / own loopthe orchestrator's system prompta spawn tool with a model argument

Details and skill locations: INSTALL.md.

Safety and uninstall
  • The scripts are read-only and touch no network.

  • To uninstall, delete the skill folder (or its link) and the pasted block. Nothing else is written anywhere.

  • Prefer project scope over a global instructions file, which every other project shares.

Limits
  • Driver session only. A spawned subagent never uses it and never spawns another.

  • Terse briefs on trivial work can get refused as suspected prompt injection.

  • On non-Claude models, map tiers by role and A/B the small tier before trusting it past pure extraction.

Files

Part of agnostic-skills · MIT