agentleFS
aw-praw-pr/autometta-public/skills/agent-orchestrator/SKILL.md

agent-orchestrator

Skill0 starsChanged 6 months agoMITView on GitHub

Decomposes an explicitly-requested multi-agent engineering task, routes each sub-task to the right capability tier, and runs sub-agents in parallel to minimise token cost without dropping quality. Trigger ONLY when the user explicitly asks for orchestration - phrases like "orchestrate this", "multi-agent", "agent orchestration", "decompose and route", "tiered agents", "spin up agents". Do NOT trigger on ordinary multi-step tasks; single-session work is the default and orchestration is opt-in.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. mikeshoes/skills★ 1same name
    2. 2867203296/hermes-agent★ 0same name
    3. mholtzscher/skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 14 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you start decomposing and the plan collapses to <=2 trivial sub-tasks, abandon orchestration and just do the work.

    line 15
  2. Distinctive:

    Write the decomposition as a numbered list before spawning any sub-agents.

    line 31
  3. Distinctive:

    If the harness supports isolated execution, use it for any parallel batch that writes files (Cursor worktrees, Codex sandboxes).

    line 97
  4. Distinctive:

    If the harness has no isolation primitive, enforce disjoint file sets - no two parallel sub-agents may write the same file.

    line 98
  5. Very specific:

    Background commands: every run_in_background Bash call MUST set timeout.

    line 121
  6. Distinctive:

    If a background tool's output file is still 0 bytes past the kill threshold, treat as hung.

    line 125
  7. Distinctive:

    After sub-agents return, you (orchestrator, main session) integrate.

    line 139
  8. Distinctive:

    Run the test suite or build yourself.

    line 141
  9. Distinctive:

    Read the diff of every changed file, not just the summary.

    line 142
  10. Distinctive:

    Check public interfaces and types remain consistent across sub-task boundaries.

    line 143
  11. Distinctive:

    Keep the orchestrator context lean.

    line 152
  12. Distinctive:

    Prefer one parallel batch of T3 agents over sequential single-model calls for mechanical work.

    line 155
  13. Distinctive:

    If a harness lacks parallel-spawn, fall back to sequential phased execution with the same briefs - quality is preserved.

    line 169
  14. Distinctive:

    All acceptance criteria from every sub-task brief satisfied - verified by the orchestrator, not reported by the sub-agent.

    line 176
  15. Distinctive:

    No public interface changed without explicit user approval.

    line 177

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

When NOT to orchestrate

Orchestration has fixed overhead (decomposition, briefing, integration, extra token spend across sub-agent contexts). Skip it and work in the main session when:

  • The task touches a single file or is a localised fix.
  • The work is inherently sequential with no parallelisable branches.
  • Total estimated sub-agents would be 1-2 (the orchestration tax exceeds the gain).
  • The user did not explicitly ask for orchestration (see trigger rule above).

If you start decomposing and the plan collapses to <=2 trivial sub-tasks, abandon orchestration and just do the work.


Role

You are the orchestrator. Plan, delegate, integrate, review. You do not implement details yourself unless the task is genuinely irreducible. Keep your own context lean: delegate exploration and file-dumping to sub-agents and absorb only their conclusions.

This skill is harness-agnostic. Decomposition, tiering, briefing, and integration logic are identical across Claude Code, Codex CLI, Cursor, and Gemini CLI. Only the dispatch mechanism differs - see the Delegation adapter below.


Step 1 - Decompose the task

Break the user's request into discrete sub-tasks. For each: what must be produced, inputs required, dependencies, and tier.

Write the decomposition as a numbered list before spawning any sub-agents. Show it to the user if the plan is non-trivial or spawns more than ~4 sub-agents.


Step 2 - Assign capability tiers

Tiers are defined by capability and cost, not by a specific model name.

TierCapabilityThinkingUse when
T0 - Orchestrator (main session)Top reasoning model, in main sessionHighIntegration, architecture decisions, final review. Stay in main session; never spawn a T0 orchestrator sub-agent.
T0 - Fable (dispatched advisor/worker)Frontier-above-Opus model (Claude Fable 5), dispatchedHighOpt-in per card only: a whole-Fable worker/verifier, or the advisor decision point of a Fable-as-advisor verifier. Distinct from the orchestrator's own T0 session above; this is the dispatched, cost-logged T0 that scripts/rates.sh and docs/cost-log.md price.
T1 - Hard ReasoningTop reasoning model, focused sub-agentHighNovel algorithm; security/correctness review; sparse or contradictory docs; high failure cost.
T2 - Specified ImplementationMid-tier modelMediumWell-scoped features with clear acceptance criteria; refactors with existing test coverage.
T3 - Mechanical / GlueMid- or low-tier modelLowBoilerplate, generated types, repetitive test scaffolding, spec-driven config, migrations with a known transformation.
T4 - Retrieval / ExplorationCheapest available / read-only explore agentNoneListing files, grepping symbols, reading docs, summarising existing code without modifying it.

Per-harness tier mapping (adapter)

TierClaude CodeCodex CLICursorGemini CLI
T0/T1Opus, high thinkingtop reasoning model, worker or custom roletop model, agent windowGemini Pro subagent
T2/T3Sonnetmid model rolemid modelGemini Pro/Flash
T4Haiku / Explore agentexplorer role (sandbox read-only by design - perfect T4 fit)subagent, read-onlycodebase-investigation built-in

Model identities per tier (Anthropic <-> OpenAI <-> Google)

Concrete model names attached to the tiers above for paired or comparative work. Match tiers across families. Pairing T1-Anthropic against T2-OpenAI confounds the signal you are trying to read. Resolve a tier to a concrete model with agent-whoami --model <id> or scripts/models.sh in the Autometta checkout; the table below names tiers, and the registry names releases.

TierAnthropicOpenAIGoogle
T0 - Frontier-above-Opus (dispatched, opt-in)Claude Fable (current)nonenone
T0/T1 - FrontierClaude Opus (current)GPT Sol (current)Gemini Pro (current)
T2/T3 - WorkhorseClaude Sonnet (current)GPT Terra (current)Gemini Pro / Flash
T4 - LightClaude Haiku (current)GPT Luna (current)Gemini Flash

When dispatching paired multi-family work (comparative reviews, A/B benchmarks, independence-checking lanes), the tier governs which row of the table you pull from on each side. Solo execution can pick a tier-appropriate model from any single family - only paired or comparative work has to lock the row.

Heuristics

  • Failure cost high (broken contract, corrupt data, manual rollback)? -> T1.
  • Specification completeness - fully specified by tests/types/docs? -> T2/T3. Ambiguous? -> T1.
  • Synthesis vs retrieval - original reasoning vs reading and reporting? Retrieval is always T4.
  • Reversibility - easily reverted -> T2/T3; hard to undo (schema migration, published artefact) -> T1.

Step 3 - Write sub-agent briefs

Each brief is self-contained: Objective (one sentence), Inputs (paths/symbols/prior outputs), Constraints (style, interface, perf budget), Acceptance criteria (concrete, checkable), Out of scope.

Token economy: paste small excerpts directly into briefs. For large inputs, instruct the sub-agent to read the named file in its own context. Never re-explore from the main session; if exploration is needed, run a T4 sub-agent first and pass distilled output downward.


Step 4 - Parallelise where possible

Group sub-tasks with no shared dependency into one batch and spawn in parallel.

Batch A (parallel): T4 retrieval - gather all facts needed.
Batch B (parallel): T2/T3 implementation - each has full briefs from Batch A.
Batch C (sequential): T1 integration review - runs after B completes.

Parallel-write isolation (mandatory):

  • If the harness supports isolated execution, use it for any parallel batch that writes files (Cursor worktrees, Codex sandboxes).
  • If the harness has no isolation primitive, enforce disjoint file sets - no two parallel sub-agents may write the same file. Never parallelise writes to one file.

Budget guard: estimate count before spawning. If it exceeds ~6, or any T1 batch has >3 agents, surface the plan and per-batch count and confirm.


Step 4a - Timeout discipline (mandatory)

A sub-agent that hangs silently is the worst failure mode: the orchestrator waits, the user waits, and no signal tells anyone the work has stopped. Every dispatched call carries an explicit wall-clock budget.

Per-tier wall-clock budgets (kill threshold = 1.5x budget):

TierBudgetKill at
T4 retrieval / explore (read-only)120 s180 s
T3 mechanical implementation240 s360 s
T2 specified implementation360 s540 s
T1 hard reasoning / cross-family review480 s720 s

How to enforce, by dispatch channel:

  • Bash sub-process (codex exec, gemini, gh, npm test, etc.): pass an explicit timeout parameter to the Bash tool, AND wrap the command in timeout <N>s ... as belt-and-braces. Cross-harness CLIs must also use their own non-interactive flags (--sandbox read-only, --yes, --non-interactive) so they cannot block on a permission prompt.
  • Sub-agent (Task/Agent tool): include the budget in the brief as a hard constraint ("Report back within N minutes; if you cannot, surface a partial result and stop."). The harness may not enforce it, but the budget anchors the sub-agent's planning.
  • Background commands: every run_in_background Bash call MUST set timeout. Never spawn an unbounded background process.

Stall detection (no output is failure, not progress):

  • If a background tool's output file is still 0 bytes past the kill threshold, treat as hung. Kill the process, log the failure, do not silently re-spawn.
  • Empty stdout with exit code 0 from a CLI that was asked to produce a written report = failure (the CLI hit a sandbox or permission issue silently). Re-brief once with the underlying cause addressed.

Re-brief vs surface (combines with the Step 5 failure budget):

  1. First timeout -> kill, diagnose, re-brief the same tier once with the timeout cause fixed (tighter scope, different sandbox flag, smaller prompt).
  2. Second timeout -> surface to the user. Do not silently re-spawn a third attempt.

Cron-supervised enforcement: when an orchestration run is launched under the tick loop (docs/tick-loop.md), the tick and the heartbeat watchdog supervise a hard per-dispatch wall-clock budget above the per-sub-agent budgets here, and an outlier dispatch is killed. The per-sub-agent timeouts in this section are the first line of defence; the tick is the second. Routine authors should pick a wall-clock max = sum(sub-agent budgets) + 20% integration overhead.


Step 5 - Integrate

After sub-agents return, you (orchestrator, main session) integrate. Do not trust self-reports.

  • Run the test suite or build yourself.
  • Read the diff of every changed file, not just the summary.
  • Check public interfaces and types remain consistent across sub-task boundaries.
  • Confirm acceptance criteria from each brief are actually met.

Failure budget: if a sub-task output fails its acceptance criteria, re-brief the same tier agent once. If it fails a second time, surface to the user - do not silently re-spawn a third time. Re-tiering is only justified when the failure reveals the task was under-specified, not as a quiet escalation path.


Token-economy rules

  • Keep the orchestrator context lean. Delegate file-reading to T4 sub-agents; never paste entire files into the main session.
  • Small inputs: paste excerpts; large inputs: instruct the sub-agent to read in its own context.
  • Reserve T1 for genuine ambiguity or high failure cost.
  • Prefer one parallel batch of T3 agents over sequential single-model calls for mechanical work.
  • Retire sub-agent context after output is absorbed.

Delegation adapter (harness mechanics)

Decomposition and briefs are identical everywhere. Dispatch them as follows:

  • Claude Code - spawn parallel sub-agents via the Task/Agent tool; use the Explore agent for T4.
  • Codex CLI - define roles in config.toml (worker, explorer, monitor, or custom). Requires the experimental subagent opt-in flag.
  • Cursor - /multitask fans out async subagents; each runs in its own git worktree (free write isolation).
  • Gemini CLI - define subagents as markdown + YAML frontmatter in .gemini/agents; main session dispatches.

If a harness lacks parallel-spawn, fall back to sequential phased execution with the same briefs - quality is preserved; only wall-clock and parallel token spread are lost.


Definition of done

  1. For code: build passes cleanly with no new warnings. For research/docs: every deliverable produced and internally consistent.
  2. All acceptance criteria from every sub-task brief satisfied - verified by the orchestrator, not reported by the sub-agent.
  3. No public interface changed without explicit user approval.
  4. The orchestrator has read and understood the final diff in full.
  5. A commit message has been proposed to the user (not committed without explicit instruction). When multiple agents contributed, attribute primary author via --author= and any helpers via Co-Authored-By: trailers.

See REFERENCE.md (in this skill directory) for a worked example and failure-mode heuristics.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.