agentleFS
pankaj-mahaurpankaj-mahaur/Agent-Daemon/skills/daemon/orchestrate-team/SKILL.md

orchestrate-team

Skill0 starsChanged 6 days agoMITView on GitHub

Use when a task spans 2+ domains (backend + frontend, code + tests), subtasks can run in parallel, and estimated work exceeds 30 minutes. Triggers on phrases like "deploy a team", "use multiple agents", "split this across agents", "parallelize this work", or when the user gives a large cross-cutting task.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use multi-agent when ALL of these are true:

    line 16
  2. Distinctive:

    Wait for explicit "yes" / approval before continuing.

    line 70
  3. Distinctive:

    Ask the user if the changes look good

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Orchestrate a multi-agent team

When to use

Use multi-agent when ALL of these are true:

  • Task spans 2+ domains (backend + frontend, code + tests + review)
  • Subtasks can genuinely run in parallel
  • Estimated total work exceeds ~30 minutes

Stay single-agent for: quick fixes, single-file changes, questions, small reviews.

Decision criteria

Ask yourself:

  1. Can I break this into 2+ independent subtasks? → If no, stay single-agent.
  2. Would a second agent save meaningful time? → If no, stay single-agent.
  3. Are the subtask boundaries clean (different files/dirs)? → If no, stay single-agent.

Protocol

Step 1 — Analyze the task

Break the user's request into discrete subtasks. For each, identify:

  • Domain (backend, frontend, testing, review, etc.)
  • Dependencies (what must finish first)
  • Estimated complexity (small / medium / large)

Step 2 — Select a template

Check available templates:

ad tt

Built-in templates:

  • solo-with-qa — 1 dev + 1 QA (simplest, good for most tasks)
  • full-stack-feature — lead + backend + frontend + QA (parallel frontend/backend)
  • bug-triage-team — lead + investigator + fixer + reviewer
  • code-review-team — lead + security + performance reviewers

Step 3 — MANDATORY: Ask the user for approval

STOP. Do not proceed without approval. Present the plan:

I'd like to use multi-agent orchestration for this:

Template: solo-with-qa
Roles:
  - dev: [specific task description]
  - qa: [verification task, blocked by dev]

This will spawn 1 background worker (ad's sandboxed engine) in an isolated worktree.
The agent's changes stay on a separate branch until you review and merge.

Should I proceed?

Wait for explicit "yes" / approval before continuing.

Step 4 — Create team

ad tc --template <template-name> --task "<task description>"

Note the team ID from output.

Step 5 — Spawn workers

For each non-leader role:

ad sp --team <team-id> --role <role> --task "<specific subtask>" --cwd . --verbose

Each spawned agent gets:

  • Isolated git worktree (no merge conflicts)
  • Role-specific instructions from the template
  • Automatic completion reporting to leader inbox

Role and team names may use only letters, digits, ., _ and - (max 64): they become the branch team/<team>/<agent>. Any text is fine in --task; it reaches the worker as data, never through a shell.

  • Which worker. The default is an ad worker: sandboxed, no network, approvals never asked (on Windows it needs ad sandbox setup). --engine claude runs Claude Code with --dangerously-skip-permissions (any command as the user, network included): use it only for tasks the user would run themselves, and say so in the approval request. Claude workers need claude on PATH (or AD_CLAUDE_BIN) and a Claude Code that knows --append-system-prompt-file.
  • Which account. --account <provider>/<label> (with --model) runs the worker on that account; without it, the project's or the default account.
  • When a limit runs out. Without fallback the worker's task ends in error (with a hint when the user has a fallback order). With the team's fallback on (ad team set <team> fallback on, the user's own terminal; it refuses from the agent's shell) the worker moves to the next target, or pauses when it can't move safely and the board shows the task blocked with the reason. Report either with its reason; never turn fallback on yourself.

Step 6 — Monitor

ad ts --team <team-id>

Shows kanban board. Tasks auto-unblock as dependencies complete.

Check inbox:

ad ti --team <team-id> --agent <leader-role>

Step 7 — Merge and report

Once agents complete:

  1. Review each agent's branch (git log <branch>, git diff main..<branch>)
  2. Ask the user if the changes look good
  3. Merge branches: git merge <branch>
  4. Clean up: ad td --team <team-id>

Key principles

  • Always ask before spawning — Never create teams or spawn agents silently
  • Leader = your session — You (Claude) are the team lead
  • Workers are background processes — They run in worktrees, report via inbox
  • Review before merge — Always let the user review agent output first
  • Fail gracefully — If a worker fails, report the error and offer to retry or handle manually

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.