swarm
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSwarm
Swarm
Fan out N parallel cloud workers. They may cover separate slices, race the same brief, or mix both. The parent waits, aggregates, and returns one report.
调度N个并行云工作者。它们可以处理不同的任务切片、针对同一任务进行竞速,或两者混合使用。父进程会等待所有工作者完成,汇总结果后返回一份报告。
Start
启动步骤
Open a todolist with one entry per phase before launching anything.
- Frame
- Fan out
- Aggregate
- Report
在启动任何操作前,先创建一个待办事项列表,每个阶段对应一项条目:
- 框架定义
- 调度分发
- 结果汇总
- 生成报告
Phase A: Frame
阶段A:框架定义
- State the done predicate and the artifact or report the swarm must return.
- Choose the shape. Partition into slices, race N workers on identical briefs, or mix both. For a race or mixed shape, declare ,
first pass, orrank allbefore spawning.best-of - Set N from the user or derive it from the shape. N is total workers, not the cloud concurrency limit.
- Pick the worker model from in
swarm workerswhen present. Otherwise use~/.cursor/rules/pstack-models.mdc. For a model race, name each arm's model up front.grok-4.6-fast-xhigh - Give each worker its own writable output when it writes. Use a worktree, branch, or .
/tmp/swarm-<slug>/worker-<n>/
- 明确完成判定条件,以及Swarm必须返回的产物或报告内容。
- 选择任务模式:将任务划分为多个切片、让N个工作者针对相同任务竞速,或混合两种模式。如果是竞速或混合模式,在启动工作者前需声明采用“首次通过”“全部排名”或“最优选择”规则。
- 根据用户输入或任务模式确定N的值。N是工作者的总数,而非云并发限制。
- 若存在文件,从其中的
~/.cursor/rules/pstack-models.mdc中选择工作者模型。否则使用swarm workers。如果是模型竞速,需提前指定每个分支使用的模型。grok-4.6-fast-xhigh - 为每个工作者分配独立的可写输出路径,可使用工作树、分支或路径。
/tmp/swarm-<slug>/worker-<n>/
Phase B: Fan out
阶段B:调度分发
Spawn all N workers in one message with , , , and the configured model. Use only when the worker needs access to something on the user's computer.
subagent_type: generalPurposeenvironment: "cloud"run_in_background: trueenvironment: "local"When a worker must start from a non-default pushed branch, pass .
cloud_base_branchEvery brief stands alone. Include the goal, scope, exact slice or race arm, how to verify, and what to report. Reports use , , or with evidence.
PASSISSUESBLOCKEDIf a worker drops out, proceed with N-1 and note it.
通过一条消息启动所有N个工作者,配置参数包括、、以及选定的模型。仅当工作者需要访问用户电脑上的内容时,才使用。
subagent_type: generalPurposeenvironment: "cloud"run_in_background: trueenvironment: "local"若工作者需要从非默认的已推送分支启动,需传入参数。
cloud_base_branch每个任务指令需独立完整,包含目标、范围、具体的任务切片或竞速分支、验证方式以及报告要求。报告需使用、或状态,并附上相关证据。
PASSISSUESBLOCKED如果某个工作者退出,继续使用剩余的N-1个工作者,并记录该情况。
Phase C: Aggregate
阶段C:结果汇总
Read the terminal results. 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.
读取最终结果。对于覆盖测试模式,每个必填切片都需要有结果。对于竞速模式,应用之前声明的选择规则:首次通过、全部排名或最优选择。请勿直接粘贴工作者的原始输出。
整理出简洁的结果表格、单行的问题说明(附证据),以及明确的空白项或工作者退出记录。
Phase D: Report
阶段D:生成报告
Return one consolidated in-chat report with the table, issue one-liners, gaps or dropouts, and the race rule when used.
返回一份整合后的聊天内报告,包含结果表格、单行问题说明、空白项或退出记录,以及所使用的竞速规则(若适用)。",