agentleFS
krzysztofsurdykrzysztofsurdy/code-virtuoso/skills/tools/dispatching-agent-teams/SKILL.md

dispatching-agent-teams

Skill22 starsChanged 9 months agoMITView on GitHub

Spawn and coordinate a pre-composed agent team from a team definition file. Reads team files from teams/, resolves agents and skills, picks the best spawning mode (peer or sequential), and runs the workflow. Use when the user asks to run a team, dispatch a development team, start a feature delivery, or coordinate multiple agents for a multi-phase task.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read a team definition file, resolve its agents and skills, and execute the coordination protocol.

    line 10
  2. Distinctive:

    If the user provided a team name as argument, search project teams first, then the library.

    line 35
  3. Distinctive:

    If no argument, scan both locations and present a selection menu showing which are library teams vs project teams.

    line 36
  4. Very specific:

    Read the team file's YAML frontmatter: name, lead, agents, skills, workflow.

    line 37
  5. Very specific:

    Verify every agent in the agents list exists as an installed agent definition.

    line 38
  6. Very specific:

    Verify every skill in the skills list exists as an installed skill.

    line 39
  7. Distinctive:

    If any agent or skill is missing, report what is missing and stop.

    line 40
  8. Distinctive:

    Read the team file's "Entry Criteria" section.

    line 50
  9. Distinctive:

    Check each criterion against the current state (e.g., "ticket exists", "CI is green", "stakeholder available").

    line 51
  10. Distinctive:

    If a criterion cannot be verified automatically, ask the user to confirm it.

    line 52
  11. Distinctive:

    Do not proceed until all entry criteria are met or explicitly waived by the user.

    line 53
  12. Distinctive:

    Check what the current platform supports:

    line 61
  13. Distinctive:

    Create a team with the lead agent as coordinator.

    line 81
  14. Distinctive:

    Add all other agents as teammates.

    line 82
  15. Distinctive:

    Create shared tasks matching the workflow phases from the team file.

    line 83
  16. Distinctive:

    Read the team file's "Exit Criteria" section.

    line 106
  17. Distinctive:

    Check each criterion against the current state.

    line 107
  18. Distinctive:

    If any exit criterion fails, report what remains and ask the user how to proceed.

    line 109
  19. Distinctive:

    Before claiming the team run is complete:

    line 128

≈ “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

Dispatching Agent Teams

Read a team definition file, resolve its agents and skills, and execute the coordination protocol. The team file is the recipe - this skill is the cook.

Core Principles

PrincipleMeaning
Team file is the contractFollow the workflow, entry/exit criteria, and coordination rules defined in the team file. Do not improvise the process.
Detect capabilities firstCheck what spawning mode the platform supports before dispatching. Peer mode if available, sequential fallback otherwise.
Skills before agentsPreload the team's bundled skills before spawning any agent. Agents need their reference material from the start.
Respect coordination rulesIf the team file says "Architect must approve before implementation starts", enforce it. Do not skip gates.
Fail early, not lateIf a required agent is not installed, stop before dispatching. Do not discover missing agents mid-workflow.

Workflow

Phase 1: Resolve the Team

Teams are discovered from two locations in this order:

  1. Project teams - teams/{name}.md at the user's project root (user-authored teams)
  2. Library teams - bundled with the agent-teams skill at skills/tools/agent-teams/teams/{name}.md (or wherever the agent-teams skill is installed)

Resolution:

  1. If the user provided a team name as argument, search project teams first, then the library. Project teams override library teams when names collide.
  2. If no argument, scan both locations and present a selection menu showing which are library teams vs project teams.
  3. Read the team file's YAML frontmatter: name, lead, agents, skills, workflow.
  4. Verify every agent in the agents list exists as an installed agent definition.
  5. Verify every skill in the skills list exists as an installed skill.
  6. If any agent or skill is missing, report what is missing and stop. Do not proceed with a partial team.

Team Library

The agent-teams skill catalogs the available pre-composed teams (development-team, review-squad, war-room) with their purpose and use cases. To browse what is available before dispatching, consult that skill first.

To author your own team, see spec/team-spec.md and place the file at the project root's teams/{name}.md.

Phase 2: Verify Entry Criteria

  1. Read the team file's "Entry Criteria" section.
  2. Check each criterion against the current state (e.g., "ticket exists", "CI is green", "stakeholder available").
  3. If a criterion cannot be verified automatically, ask the user to confirm it.
  4. Do not proceed until all entry criteria are met or explicitly waived by the user.

Phase 3: Preload Skills

Load the skills listed in the team's skills frontmatter. These provide reference material that agents will need during their work (e.g., testing patterns, API design principles, verification checklists).

Phase 4: Detect Spawning Mode and Workflow Variants

Check what the current platform supports:

CapabilityDetectionMode
Platform supports agent teams with peer messaging and shared task listsTeam creation tools are availablePeer mode
Platform supports sub-agent spawning but no peer messagingAgent delegation tools are availableSequential mode
NeitherNo delegation supportInline mode - lead executes all phases in the current session

Then check the team's workflow type for special handling:

WorkflowSpecial protocol
parallelCheck Coordination Rules for per-agent context restrictions. If present, build differential briefs per agent (see spawning-protocol).
war-roomUse multi-pass rounds: position round, then challenge round, then synthesis. Agents respond with perspective only - no tool use during the debate (see spawning-protocol).
sequential, hybridStandard protocol.

Phase 5: Dispatch

Peer Mode

  1. Create a team with the lead agent as coordinator.
  2. Add all other agents as teammates.
  3. Create shared tasks matching the workflow phases from the team file.
  4. Set task dependencies based on the workflow order (e.g., "Implementation" is blocked by "Design").
  5. The lead assigns the first unblocked task. Teammates claim tasks as they unblock.
  6. Teammates message each other for clarifications as described in the coordination rules.

Sequential Mode

  1. The lead agent runs in the current session.
  2. For each workflow phase in order: a. Read the phase description from the team file (what this agent does, expected input/output). b. Spawn the phase's agent as a sub-agent with a brief containing: the phase description, the output from previous phases, and the relevant skills to consult. c. Collect the sub-agent's output. d. If the team file defines a gate between this phase and the next, verify the gate condition before proceeding.
  3. Pass each phase's output as input to the next phase.

Inline Mode

  1. Execute each workflow phase sequentially in the current session.
  2. For each phase, adopt the role described in the team file and consult the relevant skills.
  3. Produce the expected output before moving to the next phase.

Phase 6: Verify Exit Criteria

  1. Read the team file's "Exit Criteria" section.
  2. Check each criterion against the current state.
  3. Report results to the user with evidence for each criterion (pass/fail with proof).
  4. If any exit criterion fails, report what remains and ask the user how to proceed.

Handling Failures

FailureAction
Agent not installedStop before dispatching. List missing agents with install instructions.
Skill not installedStop before dispatching. List missing skills with install instructions.
Entry criterion not metAsk user to confirm or waive. Do not silently skip.
Phase produces no outputRetry the phase once. If it fails again, report to the lead/user.
Gate condition not metBlock the next phase. Report what failed the gate and what needs to change.
Agent times out or errorsReport the error. Ask user whether to retry, skip, or abort the team.

Quality Checklist

Before claiming the team run is complete:

  • All workflow phases were executed in the defined order
  • All coordination gates were enforced (no skipped approvals)
  • All exit criteria were verified with evidence
  • Outputs from each phase were captured and passed forward
  • Any failures were reported with context, not silently swallowed

Platform Notes

Platform-specific tool names and conventions for executing this skill. The instructions above stay portable; the table below maps abstract capabilities to concrete tools per platform.

PlatformConvention
Claude CodeAlways create the team with the TeamCreate tool before dispatching any work. Never spawn multiple Agent tool calls directly when a team workflow is available. After TeamCreate, dispatch tasks through the team.
Cursor(TBD) Use the platform's multi-agent coordination feature if available; otherwise fall back to sequential sub-agent dispatch.
Windsurf(TBD) Use the platform's multi-agent coordination feature if available; otherwise fall back to sequential sub-agent dispatch.
OtherUse the platform's equivalent for instantiating a multi-agent team with a shared task list. If no such mechanism exists, run in sequential mode.

Reference Files

ReferenceContents
spawning-protocolDetailed spawning steps for peer, sequential, and inline modes

Integration with Other Skills

SituationRecommended Skill
Need to discover which teams are availableusing-ecosystem
Need to create a new team definitionUse template/team-template.md and spec/team-spec.md
Need to dispatch agents without a team filedispatching-parallel-agents or subagent-driven-development
Need to verify work before closing a phaseverification-before-completion

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.