agentleFS
ShiningPlagueShiningPlague/shiningplague-studio/skills/dispatching-parallel-agents/SKILL.md

dispatching-parallel-agents

Skill0 starsChanged 4 months agoMITView on GitHub

Use when fanning out work to multiple subagents at once — 2 or more independent tasks with no shared files or state that could run concurrently

190 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 19 projects that use this

  • kntismSkill

    condition-based-waiting

    Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses

    Also in 3 projects that use this

  • xfstudioSkill

    context-driven-development

    Use this skill when working with Conductor's context-driven

    Also in 3 projects that use this

  • EvezArtSkill

    analytics-dashboard

    User behavior tracking and analytics dashboards

    Also in 3 projects that use this

  • +3 more from Leodorareluctant259

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 180 edited versions we read keep these.

  • 7

    Distinctive

    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:

    ALL of these must hold:

    line 16
  2. Distinctive:

    If any condition fails: run the tasks sequentially, or re-slice until it holds.

    line 23
  3. Distinctive:

    Every agent prompt should carry these five parts (order matters — scope before task):

    line 45
  4. Distinctive:

    If you cannot fill OWNED FILES with a list that is disjoint from every other agent's list, the slicing is wrong — stop and re-partition …

    line 55
  5. Distinctive:

    After ALL agents return, the dispatcher MUST verify the merged result before claiming completion:

    line 59
  6. Distinctive:

    Reconcile skips: Every "skipped" item in a return contract gets a decision: re-dispatch, do inline, or accept and record.

    line 63
  7. Distinctive:

    Verify the merge yourself.

    line 74

“Common” is measured: kept by at least 6 in 10 of the 180 edited versions of this file we could read. “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 Parallel Agents

Overview

Parallel dispatch trades coordination overhead for wall-clock speed. It is only safe when the tasks are genuinely independent — the moment two agents can touch the same file or one needs the other's output, parallelism turns into corruption or rework.

Core principle: slice by ownership, brief for isolation, verify the merge yourself.

When to fan out

ALL of these must hold:

  • 2+ tasks that are each substantial enough to justify a dispatch.
  • Disjoint file sets — every file is owned by exactly one agent. No exceptions, not even "one appends, one edits elsewhere in the file."
  • No ordering dependency — no task consumes another task's output.
  • No shared mutable state — no common registry/index/manifest that multiple agents would update.

If any condition fails: run the tasks sequentially, or re-slice until it holds.

How to slice the work

  1. Partition by file ownership first, topic second. List every file each task will write. If two lists intersect, merge those tasks into one agent or move the shared file to a single owner.
  2. Write explicit per-agent instructions. Each agent starts cold — no conversation memory. The prompt must carry: absolute file paths, the exact scope (what to change AND what not to touch), relevant conventions, and what to do when an instructed target is missing (skip and record, don't improvise).
  3. Define a structured return contract. Tell each agent exactly what to report: files created, files changed, items skipped with reasons, and what verification it ran. Vague returns make the merge unverifiable.
  4. Reserve shared files for yourself. Any index, registry, or summary doc that aggregates the agents' work is updated by the dispatcher AFTER all agents return — never by the agents.

Anti-patterns

Anti-patternWhy it fails
Two agents editing one fileMid-edit collisions; last-write-wins silently destroys one agent's work
Vague prompts ("clean up the docs")Each agent invents its own scope; results overlap, contradict, or miss the point
Fire-and-forgetAgent reports are claims, not evidence — unverified fan-out ships unverified work
Hidden couplingBoth tasks "independently" bump the same manifest/index — a shared file you forgot to list
Fan-out for tiny tasksDispatch overhead exceeds the work; do trivial items inline
Re-briefing by reference ("as discussed above")Subagents can't see the conversation; every prompt must be self-contained

Dispatch brief shape

Every agent prompt should carry these five parts (order matters — scope before task):

CONTEXT: <one paragraph: what the repo/area is, why this work is happening>
OWNED FILES: <absolute paths this agent may create/edit — and nothing else>
TASK: <numbered, concrete steps; exact target content where it is load-bearing>
CONSTRAINTS: <conventions to follow, files/dirs that are off-limits, skip protocol>
RETURN: <the exact report shape: created / changed / skipped+reason / verification run>

If you cannot fill OWNED FILES with a list that is disjoint from every other agent's list, the slicing is wrong — stop and re-partition before dispatching.

The verify-after-parallel rule

After ALL agents return, the dispatcher MUST verify the merged result before claiming completion:

  1. Read the seams. Open each changed file at the boundaries where agents' outputs meet (cross-references, links, names one agent introduced that another consumes).
  2. Run the project's checks (consistency/lint/build/headless harness — whatever the repo provides) over the combined state, not per-agent.
  3. Reconcile skips. Every "skipped" item in a return contract gets a decision: re-dispatch, do inline, or accept and record.
  4. Only then report done — citing the verification output, not the agents' self-reports.

An agent saying "done and verified" is input to your verification, never a substitute for it.

Quick reference

  • Independent? → fan out. Shared file or ordering? → sequential.
  • One file, one owner. Shared aggregates belong to the dispatcher.
  • Cold-start prompts: absolute paths + scope + conventions + skip protocol.
  • Return contract: created / changed / skipped-with-reason / verification-run.
  • Verify the merge yourself; self-reports are claims.

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.