agentleFS
augments-labsaugments-labs/sdlc-skills/skills/common/dispatching-parallel-agents/SKILL.md

dispatching-parallel-agents

Skill1 starsChanged 4 months agoMITView on GitHub

Splits independent work across parallel agents, each with its own exclusive writes and resources. Use when tasks can run concurrently with no dependence on another worker's output, such as separate files, services, or investigations; shared reads of frozen inputs are fine. Skip coupled writes, shared runtime state, dependent outputs, or work quicker to do inline.

136 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, workflow-runner 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.
  • 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 6 projects that use this

  • MorningStar0709Skill

    workflow-runner

    Run an agency-orchestrator style YAML workflow inside the current Trae conversation by simulating or coordinating multiple roles. Use when the user provides a `.yaml` or `.yml` workflow, asks for multi-role collaboration, says things like “用多个角色一起评审这个 PRD”“多角色协作”“先生成工作流再执行”“让产品经理、架构师、QA 一起看一下”, or wants roles such as product manager, architect, reviewer, or QA to work together. Supports layered execution, role prompting, variable interpolation, document-backed inputs, and parallel steps only when the current environment has a clear subagent mapping. Do not use for ordinary implementation plans, simple code changes, or tasks already covered by `writing-plans`, `executing-plans`, `subagent-driven-development`, or single-purpose review/debug skills.

    Also in 5 projects that use this

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 4 projects that use this

  • shibit-netSkill

    chinese-code-review

    中文 review 沟通参考——话术模板、分级标注(必须修复/建议修改/仅供参考)、国内团队常见反模式应对。仅在用户显式 /chinese-code-review 时调用,不要根据上下文自动触发。

    Also in 3 projects that use this

  • shibit-netSkill

    chinese-commit-conventions

    中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。

    Also in 3 projects that use this

  • MicrosoftSkill

    testing-anti-patterns

    Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies

    Also in 4 projects that use this

  • +1 more from shibit-net

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 129 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the independence test on every pair.

    line 22
  2. Distinctive:

    Never paste session history.

    line 38
  3. Very specific:

    Read assets/dispatch-packet-controlled.md when the plan is high-risk or uses phase queues.

    line 39
  4. Distinctive:

    Ask the user once per work item.

    line 73
  5. Very specific:

    Ask through the harness's user-input action when one exists, else print this block.

    line 88

“Common” is measured: kept by at least 6 in 10 of the 129 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

Prove the pieces are independent, hand each agent a complete packet, dispatch through a callable action that returns a receipt, and reconcile every diff yourself before anything integrates.

When to use

  • Two or more independent tasks: exclusive writes and mutable resources, with no task needing another's output. Overlapping reads of frozen inputs are safe.
  • Skip overlapping writes, shared mutable state, dependent outputs, and work that is quicker done inline. Sequence it in the current task or plan; the plan executors are for an approved plan only.

Step 1: Before fan-out

  1. Run the independence test on every pair. Group or sequence any pair that fails a line:
    • Base — same immutable revision, or an explicitly ordered dependency revision.
    • Writes — exclusive paths, including generated outputs, manifests, lockfiles, shared fixtures, tests. A truly shared file gets one later integration owner and no concurrent editor.
    • State — disjoint ports, databases, fixtures. A server or migrations → invoke using-git-worktrees for each.
    • Order — neither consumes the other's output. A dependency is a sequence.
  2. Pick each agent's tier from the table below. Write it in the packet's TIER field. Lowest tier sufficient for the remaining decisions and the cost of an error. Supply missing context before moving up a tier.
  3. Fill one assets/dispatch-packet.md per agent, every field, before its dispatch. Read references/brief-examples.md before writing the first one. Never paste session history.
    • Read assets/dispatch-packet-controlled.md when the plan is high-risk or uses phase queues; it adds the ten controlled fields.
    • Sub-dispatch stays prohibited and data bounded until those fields say otherwise.
  4. Freeze the expected packet IDs and count, the terminal deadline, and the timeout and cancel action with its owner, before the first dispatch. Deadline: the user's, else the harness's agent timeout. Neither → ask the user once, and dispatch nothing until answered.

Model selection

This section applies to each subagent, including sequential workers and reviewers; it does not require a parallel fan-out. Choose within the user's permitted models.

TierWork
smallMechanical transformations, formatting, structured extraction; rules and expected output are explicit.
mediumExecution of settled decisions that still requires judgment: specified implementation, focused review, substantive summarization.
largeResolving uncertainty: architecture, unclear requirements, unexplained failures, uncertain impact, or consequential tradeoffs.

At dispatch, map the chosen tier to an available model and set the harness's model parameter or agent configuration explicitly; naming a tier in the prompt selects nothing. If selection is unavailable, say so and use only a fallback the user's preferences permit; never claim an override was applied. Leave the user's main-session model and any model reserved for orchestration untouched.

Step 2: Dispatch

  1. Dispatch through the real callable action. Dispatched = the action returned a non-empty tool-issued ID; record each one in DISPATCH RECEIPT. A name or a prompt is not dispatch.
  2. Action unavailable, refused, or empty → write not dispatched, and name the action tried and what would make it callable. Never describe a fan-out without receipts, and never quietly do the work yourself instead. Ask the user once per work item; the answer covers only that work:

    {{work}} needs an independent agent, and {{action}} is not callable here.
    
    1. I do it myself, labelled as a self-review, not an independent one
    2. Name the reviewer or agent who will do it
    3. Keep it pending
    
    Recommendation: {{option}} — {{one sentence}}.

    Independence required (security clear, a role the calling skill's contract requires to be independent, or an audit the user asked to be independent) → omit option 1 and say why. Ask through the harness's user-input action when one exists, else print this block; end the turn; clarifying-intent owns what closes it. Record the answer as the written assignment and continue under it. A named reviewer's report counts only when it arrives from outside this session, bound to the exact identities; the recorded answer replaces the receipt. No answer keeps the work pending.

  3. Poll the exact IDs to the frozen deadline. Never poll a target that was not dispatched. Success = exactly one current result for each packet.
  4. Failure or deadline → write cancellation requested. Wait until the worker, its descendants, and its effects are quiescent. Quarantine partial output. Only then write failed, timed out, or cancelled.
  5. Reassign through a linked successor attempt that rejects every late result or mutation from its predecessor.
  6. A writer reports a shared generator, file, state, dependency, or scope outside its packet → pause the affected work, preserve the diffs, reclassify, assign one owner or a sequence, issue revised packets. "Small overlap" is overlap.

Step 3: Reconcile

  1. Inspect every returned diff yourself against its declared base, ownership set, authorized checkpoints, and raw gate evidence. Reject a scope leak, a mixed change, or missing evidence even under a green suite.
  2. Advance required scope only when every packet has an accepted success report, or a directly approved scope change or reassignment.
  3. Integrate through the named owner. Run the combined checks on the exact result.
  4. REQUIRED SUB-SKILL: invoke verification-before-completion for that combined state before anything downstream treats it as done.

Gotchas

  • Doing the work yourself when dispatch fails reads as a fallback, but the result then claims an independence it never had. Only the user's recorded answer makes a self-review legitimate, and it stays labelled as one.

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.