agentleFS
DariuszDuszaDariuszDusza/agentic-workflow-foundry/.agents/skills/agent-coordination/SKILL.md

agent-coordination

Skill1 starsChanged 26 days agoApache-2.0View on GitHub

Use when more than one agent works at once, meaning dispatching subagents, running an orchestration playbook, working while other sessions share the checkout, claiming or handing over a work item, or consolidating several agents' reports. Keeps agents out of each other's trees, every dispatch at a declared tier and effort, and every report honest about what nobody did.

16 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Agent coordination

Required context

  1. .agents/workflows/README.md: the orchestration contract every playbook follows.
  2. .agents/rules/orchestration-authoring.md: when writing or changing a playbook.
  3. .agents/rules/worktree-basing-and-gates.md: where each agent's tree comes from.
  4. .agents/guardrails/change-delivery.md and work/README.md: claims, stages and hand-offs.
  5. .agents/policy/model-selection.md: tiers, effort, and what each dispatch surface carries.
  6. .agents/policy/provider-routes.yml: which data class may go to which provider tier.

The rules that bite

  • Many agents at once is a saved playbook, not an improvisation. Use one from .agents/workflows/. An ad hoc fan-out has no coverage report, so nobody can tell what it skipped.
  • One worktree per writing agent, cut from an explicit base with make worktree. Never switch a branch in the shared main checkout: it moves HEAD for every session using it (docs/decisions/0003-one-worktree-per-change.md). Read-only reviewers may share one review worktree.
  • Claim before you work. An item moves to work/04-doing/ before the first edit, and one slug lives in one stage. Two sessions building the same item produce two branches and one wasted.
  • Pass paths and refs explicitly. Give each agent its worktree path, base ref and item path in the dispatch. An agent told to "use the worktree from before" will guess.
  • Every dispatch names its tier and effort, from the item's keys or the agent's declaration. Some surfaces carry only the tier: then the agent's own file sets the effort. Every agent reports what it was asked for and what it ran at; a silent downgrade is a faithful-reporting failure (docs/decisions/0007-per-item-model-and-effort.md).
  • Serial where state is shared. Merges run one at a time, because each moves the trunk the next one is verified against. Parallelise reads, not writes to the same ref.
  • Reviewers are read-only and findings are verified. Parallel reviewers return findings; each finding goes to finding-skeptic before anything is posted, and one consolidated comment is kept updated rather than one per agent.
  • A silent agent is not a clean result. An agent that died, timed out or returned nothing is reported by name as unread. A changed file that matched no reviewer is reported as unrouted. A run that read nothing must never read as a run that found nothing (docs/decisions/0006-faithful-reporting.md).
  • Keep nesting shallow. A playbook run by another playbook should not dispatch a third level; many runtimes refuse it, and the failure reads as an empty result. Inline the shared step.
  • Unattended agents do not ask questions. Nobody is there to answer, so the pass stalls. They stop with a status (waiting, blocked, stopped) and a reason instead.
  • Respect data routes. Content sent to a subagent on a hosted provider tier obeys .agents/policy/provider-routes.yml, like any other prompt.
  • Hand-offs are written down. A session that stops mid-item leaves the item's journey saying where it stopped, what is pushed and what is not, so the next session does not redo or undo it.

Verify

tools/check-work-items.sh     # one slug, one stage; claimed items carry their keys
tools/check-model-declarations.sh
git worktree list             # no stale worktree still holding a merged branch
make verify

Reviewer: guidance-consistency-reviewer for playbook changes; the playbook's own coverage report for a run.

Escalate when

  • Two in-flight items overlap and their owners have not agreed an order.
  • An agent's report and the tree disagree (it says pushed, the remote says not).
  • A playbook would need to exceed an approval in .agents/policy/approval-matrix.yml, for example to merge an item whose gate is operator.
  • Confidential data would be sent to a provider tier the route file does not allow.

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.