agentleFS
creedantscreedants/pstack-t3/skills/swarm/SKILL.md

swarm

Skill3 starsChanged 57 days agoMITView on GitHub

Fan out N parallel workers, drain them, and return one report. Use for /swarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration.

44 other projects use a version of this, 18 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the pstack-t3 runtime before spawning workers, choosing models, scheduling, or isolating work.

    line 8
  2. Distinctive:

    When a worker must start from a non-default branch, name that branch in the brief as the worktree's base.

    line 42
  3. Distinctive:

    If a worker drops out, proceed with N-1 and note it.

    line 46
  4. Distinctive:

    Keep a compact result table, one-line evidenced issues, and explicit gaps or dropouts.

    line 52

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

Swarm

Read the pstack-t3 runtime before spawning workers, choosing models, scheduling, or isolating work. It maps those steps onto T3's orchestrator tools.

Fan out N parallel child tasks. They may cover separate slices, race the same brief, or mix both. The parent waits, aggregates, and returns one report.

Start

Open a todolist with one entry per phase before launching anything.

  1. Frame
  2. Fan out
  3. Aggregate
  4. Report

Phase A: Frame

  1. State the done predicate and the artifact or report the swarm must return.
  2. Choose the shape. Partition into slices, race N workers on identical briefs, or mix both. For a race or mixed shape, declare first pass, rank all, or best-of before spawning.
  3. Set N from the user or derive it from the shape. N is total workers, not a concurrency limit.
  4. Pick the worker model from the swarm workers role. Call orchestrator_capabilities. Paste that tool result into this quoted heredoc. If the catalog result is large, save it to a temporary file with the host's file tool and pass that path to --catalog.
python3 <pstack-runtime>/scripts/roles.py show --cwd "$PWD" --catalog - --parent "<inheritedProviderInstanceId>/<inheritedModel>" --role "swarm workers" <<'JSON'
<the orchestrator_capabilities JSON>
JSON

The quoted heredoc sends the JSON unchanged. The command does not write the catalog into the repository, and parallel children do not share a file. It resolves the swarm workers role per the runtime's Roles section. Every worker uses that seat. An inherit seat means omit target so the workers run on the parent model. If delegate_task rejects the target, apply the runtime's fallback and say which seat changed and why. For a model race, name each arm's target up front from orchestrator_capabilities, and report whether the arms' models actually differed.

  1. Give each worker its own writable output when it writes. A worker that writes to the repo while another writer may overlap gets its own git worktree per the runtime's Isolation section. When workers verify or measure commits, each brief names the exact SHAs. A measurement brief also names the method (sample count, what one sample is, order). The worker records both in its result.

Phase B: Fan out

Spawn all N workers in one message, one delegate_task call per worker, with mode: "async", role general (or review, research, or test when the slice is only that), the step 4 target (omitted for inherit), and a stable clientRequestId such as swarm-<slug>-<n>. Retain every returned taskId in the todolist. Workers are local child tasks, so they can reach files, browsers, and auth on this machine.

When a worker must start from a non-default branch, name that branch in the brief as the worktree's base. Uncommitted changes do not reach a new worktree, so commit or push first.

Every brief stands alone. Include the goal, scope, exact slice or race arm, how to verify, and what to report. A worker that only reads gets a read-only brief that says "do not edit files, commit, or push." Reports use PASS, ISSUES, or BLOCKED with evidence. A worker that can prove a defect reports ISSUES and lists every issue it can prove, not only the first.

If a worker drops out, proceed with N-1 and note it.

Phase C: Aggregate

End the turn and let each completion notification wake you, or call task_status with a retained taskId when a result gates the next step. Read the terminal results. Drop a result that does not record the SHAs and method its brief names, and respawn that worker once as a fresh child. After a second miss, record a gap. A gap does not count as a pass. For coverage, every required slice needs a result. For a race, apply the selection rule declared up front. Use first pass, rank all, or best-of. Do not paste raw worker dumps.

Keep a compact result table, one-line evidenced issues, and explicit gaps or dropouts. Remove worker worktrees after integrating them.

Phase D: Report

Return one consolidated in-chat report with the table, issue one-liners, gaps or dropouts, any seat that fell back, and the race rule when used.

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.