af-orchestrate

A command that coordinates several coding agents, such as a researcher, planner, builder, and reviewers, according to a team configuration.

In plain words
What is it for?
Use it to research a task, create and review an implementation plan, build the change in increments, and check the resulting code.
Why use it?
It keeps multi-agent work organised and passes research findings and plans between agents without requiring agents to call one another.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/chankov/agent-fleet/af-orchestrate
Clone the repo
git clone --depth 1 https://github.com/chankov/agent-fleet
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,535 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00034 $0.01535
Opus 5 $0.00017 $0.00767
Sonnet 5 $0.00007 $0.00307
Haiku 4.5 $0.00003 $0.00153

Measured 3d ago against content hash bbbd4f2cd8db, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

af-orchestrate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

95% identical to orchestrate — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.versions/0.0.1/.opencode/commands/af-orchestrate.md · 113 lines

How it starts

The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the orchestrator. The primary agent drives a team of installed mode: subagent agents to deliver the task in $ARGUMENTS. Subagents cannot nest — all dispatching is yours.

Roles

Role What it does
researcher Always-available read-only recon. Cites file:line. Never edits.
planner Writes a plan doc only; ends with PLAN_FILE: <path> or pauses on NEEDS_RESEARCH:.
builder Implements in small increments; may pause on NEEDS_RESEARCH:.
plan-reviewer / code-reviewer Read-only; their whole result is findings (no handoff marker).

Step 0 — Resolve the team

  1. Read .opencode/orchestrate-teams.yaml (a map of team-name → ordered persona list).
  2. Resolve team + task from $ARGUMENTS:
    • Treat the first token as a team name only when it is a bare single word that exactly matches a config key and is followed by the rest of the task. To force a team explicitly, the user writes /af-orchestrate team=<name> <task>. Otherwise the team is the first key (default) and all of $ARGUMENTS is the task.
    • Fallbacks: if the config is absent / empty / fails to parse, fall back to the built-in planner + builder default and say which fallback fired (don't proceed silently). If a named team is requested but not found, list the available team keys and ask rather than guessing.
  3. Validate personas: each persona in the resolved team must exist in .opencode/agent/. Skip-with-warning any that don't. If every persona is missing, fall back to the built-in default.
  4. List the resolved team back to the user before dispatching.

researcher / deep-researcher are always available even when not listed in the team.

Step 1 — The team is a roster, not a fixed pipeline

The persona list is the set of specialists you may route to; you decide the order at runtime from the task state (the listed order is only a sensible starting default). So:

Read the full file on GitHub · 113 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 113 lines · 34 tokens per session scan A bbbd4f2cd8db

Subscribe to this mod's changes

af-orchestrate is a command published in the GitHub repository chankov/agent-fleet (10 stars, last pushed 7d ago), licensed MIT. It adds 34 tokens to every session and 1,535 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to orchestrate, differing in 12 lines, and is treated as a copy.