Tiered agent orchestration
Skill hjmsano/ai-agent-skills/skills/tiered-agent-orchestration
Planner–executor procedure for handling non-trivial, multi-step requests at minimum cost: a high-performance (frontier-tier) model owns planning, model routing, and integration, while cost-efficient models execute the individual work items. Platform-agnostic — usable from any agent runtime that can delegate a prompt to a cheaper model (Claude Code, Codex CLI, Gemini CLI, agent frameworks, direct API calls). Use for tasks that genuinely split into multiple work items — investigation, code reading, development, monitoring, documentation, security review, data analysis, and similar. Do NOT use for small or single-step requests (a quick lookup, one file edit, a short answer) — fanning those out costs more, not less; handle them directly.From its SKILL.md
npx -y skills add hjmsano/ai-agent-skills --skill tiered-agent-orchestrationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.3 KB, as published. Nobody here has run it
Tiered Agent Orchestration
This skill defines a repeatable planner–executor procedure: the agent reading this skill is assumed to run on a high-performance model and acts as the orchestrator — it plans, decomposes, routes each work item to the cheapest adequate model, dispatches workers, and integrates the results. Cheap models never plan; expensive models never do mechanical work. The goal is lower total cost at equal quality, not maximum parallelism.
Model tiers
Route by capability tier, not by vendor model name. Resolve each tier to a
concrete model for your runtime via references/platform-adapters.md.
| Tier | Role in this skill | Nature of work it handles |
|---|---|---|
| Frontier | planner / orchestrator | planning, decomposition, routing, integration, and genuinely hard judgment: ambiguous architecture, subtle security reasoning, tricky correctness, high-stakes trade-offs |
| Standard | workhorse | standard coding and refactoring, analysis, synthesis, most documentation, most investigation steps |
| Economy | scout / mechanical | file/code discovery and search, text/data extraction, formatting, simple transforms, gathering references, scanning logs, boilerplate generation |
Two rules make the economics work:
- Assign each work item a tier by the nature of the work, not its importance. An important-but-mechanical item still goes to Economy.
- Frontier is the cost driver — beyond planning and integration, justify every use.
Phase 0 — Triage gate (the main cost lever)
Before doing anything else, decide whether orchestration is even worth it.
- Trivial / single-step (a fact lookup, one small edit, a short explanation): do it directly, no workers. Stop here.
- Small but mechanical (read a few files, extract data, run a known script): handle with at most one Economy worker. Stop here.
- Genuinely decomposable (multiple distinct work items, real dependencies, would benefit from parallel or specialized handling): proceed to Phase 1.
If you are unsure, prefer not fanning out. Fan-out multiplies tokens; only a decomposable task earns that cost back through model-tier savings and parallelism.
Phase 1 — Plan (frontier tier)
- Restate the goal in one or two sentences, and write explicit acceptance criteria — the checklist the final answer must satisfy.
- Estimate complexity per the rubric below.
- Decompose the request into discrete work items. For each item capture: id, objective, inputs, the tier it needs, applicable domain framework, and its dependencies (what must finish first). Treat the items as a small DAG so you know what can run in parallel vs. in sequence.
- Select a domain framework for items that map to a standard methodology.
Load
references/domain-frameworks.mdand apply the matching one rather than improvising. Industry-standard workflows reduce rework and tokens.
Complexity rubric
| Level | Looks like | Default handling |
|---|---|---|
| Trivial | one obvious step | direct, no workers (should have stopped at Phase 0) |
| Standard | a few related steps, known approach | 2–4 workers, mostly Standard/Economy tier |
| Complex | many steps, real dependencies, ambiguity | layered workers; reserve Frontier for the hard pieces |
| Research | open-ended, unknown shape | iterate: an Economy scout pass first, then plan from findings |
Phase 2 — Route and dispatch workers
Assign each work item a tier per the table above, then dispatch:
- Set the model explicitly on every delegation. Never rely on inheritance or runtime defaults — an inherited model is how a frontier orchestrator silently makes every worker frontier-priced.
- Set reasoning effort alongside the model where the runtime supports it. Effort is the second cost lever: Economy items run at low effort by default; raise effort only for synthesis across many inputs or tricky-but-scoped work. Tier picks the model, effort picks how hard it thinks — set both deliberately.
- Spawn workers in parallel where the DAG allows; sequence only true dependencies.
- Batch several tiny related items into one worker. Per-worker startup has fixed overhead, so one-worker-per-micro-task is wasteful.
- Pass each worker the minimum context it needs. Isolated, lean context is the whole point of delegation — do not forward the entire conversation.
- Tell each worker which domain framework (and, if the runtime supports skills or tools, which of them) to use for its item.
- Use the dispatch prompt template in
references/worker-prompt.mdso every worker receives the same input contract and returns the same output contract. - Keep delegation depth shallow: two levels (orchestrator → workers) is enough
for most tasks. Add a third only when an item itself clearly subdivides, and
respect your runtime's depth limit (see
references/platform-adapters.md).
Worker output contract
Require every worker to return this structure so integration is clean:
- Objective addressed — restated in one line.
- Result / artifacts — paths or content produced.
- Key findings — concise, bulleted.
- Confidence — high / medium / low.
- Assumptions made — anything it had to assume.
- Open questions / handoffs — what it could not resolve.
Worker failure handling
Judge each worker's output against its item's objective and definition of done before integrating it. When it falls short — wrong, incomplete, or making claims without evidence:
- Retry once at the same tier with a sharper prompt: name exactly what was missing or wrong, and tighten the inputs or definition of done that let it drift.
- Escalate one tier (Economy → Standard → Frontier) if the retry also fails — treat it as a mis-rated item, not an unlucky worker.
- Never silently accept a failed output, and never quietly redo the work yourself without recording it — note retries and escalations in the Phase 4 trace so the next routing decision improves.
Phase 3 — Integrate (frontier tier)
Accumulate all worker outputs, then:
- Deduplicate and reconcile — merge overlapping findings; surface and resolve conflicts. Deep conflicts are exactly what the frontier tier is for — resolve them yourself rather than re-delegating.
- Prioritize — order by impact / severity / dependency, per the acceptance criteria from Phase 1.
- Synthesize a single coherent answer to the original request.
- Verify the answer against the Phase 1 acceptance criteria before returning. Low-confidence worker output on the critical path gets a targeted re-check (a fresh Standard worker or a direct look), not blind trust.
Phase 4 — Return
Return the final answer, plus a short trace: what was decomposed, which tier handled what, and any remaining uncertainty.
Cost guardrails (quick checklist)
- Did Phase 0 actually gate trivial work out?
- Is the model set explicitly on every delegation? (no silent frontier inheritance)
- Is reasoning effort set alongside the model where the runtime supports it?
- Is Frontier used only for planning, integration, and genuinely hard judgment?
- Are tiny items batched rather than one-worker-each?
- Is each worker's context trimmed to essentials?
- Could any step run as a deterministic script instead of tokens? Prefer that.
- Is nesting ≤ 2 levels unless a deeper split is clearly justified?
Runtimes without delegation
If your runtime cannot delegate to a cheaper model at all, the procedure still
pays: run Phases 0–1 as written, then execute the work items yourself in DAG
order. The savings then come from the plan discipline (no rework), batching,
and replacing token-driven steps with scripts. See the "No delegation
support" adapter in references/platform-adapters.md.