jnmetacode avatar

Dispatching Parallel Agents

When you've got multiple independent failures after a refactor, like three test files breaking for completely different reasons, this pattern spins up separate agents to tackle each problem domain in parallel. Each agent gets a tight scope, the exact context it needs, and clear constraints so they don't step on each other. The real win is turning three sequential debugging sessions into one concurrent batch. Just make sure the failures are actually independent, because if fixing one might fix another, you're better off investigating together first. The example case shows three agents fixing abort logic, batch completion, and race conditions simultaneously with zero merge conflicts, which is the whole point.

skills.sh installs
970
GitHub stars
8.5K
last updated
Aug 21, 2026

Install

$ npx -y skills add jnmetacode/superpowers-zh --skill dispatching-parallel-agents --agent claude-code

Installs into .claude/skills of the current project.

Files

并行分派智能体

概述

你将任务委派给具有隔离上下文的专用智能体。通过精心设计它们的指令和上下文,确保它们专注并成功完成任务。它们不应继承你的会话上下文或历史记录——你要精确构造它们所需的一切。这样也能为你自己保留用于协调工作的上下文。

当你遇到多个不相关的失败(不同的测试文件、不同的子系统、不同的 bug),逐一排查会浪费时间。每个排查都是独立的,可以并行进行。

核心原则: 每个独立问题域分派一个智能体,让它们并发工作。

何时使用

digraph when_to_use {
    "存在多个失败?" [shape=diamond];
    "它们是否独立?" [shape=diamond];
    "单个智能体排查所有问题" [shape=box];
    "每个问题域一个智能体" [shape=box];
    "能否并行工作?" [shape=diamond];
    "顺序执行智能体" [shape=box];
    "并行分派" [shape=box];

    "存在多个失败?" -> "它们是否独立?" [label="是"];
    "它们是否独立?" -> "单个智能体排查所有问题" [label="否 - 有关联"];
    "它们是否独立?" -> "能否并行工作?" [label="是"];
    "能否并行工作?" -> "并行分派" [label="是"];
    "能否并行工作?" -> "顺序执行智能体" [label="否 - 有共享状态"];
}

适用场景:

  • 3 个以上测试文件因不同根因失败
  • 多个子系统独立出现故障
  • 每个问题无需其他问题的上下文即可理解
  • 排查之间无共享状态

不适用场景:

  • 失败是相关的(修复一个可能修复其他的)
  • 需要理解完整的系统状态
  • 智能体之间会互相干扰

模式

1. 识别独立的问题域

按故障分组:

  • 文件 A 测试:工具审批流程
  • 文件 B 测试:批量完成行为
  • 文件 C 测试:中止功能

每个问题域是独立的——修复工具审批不会影响中止测试。

2. 创建聚焦的智能体任务

每个智能体获得:

  • 明确范围: 一个测试文件或子系统
  • 清晰目标: 让这些测试通过
  • 约束条件: 不修改其他代码
  • 预期输出: 你发现和修复内容的总结

3. 并行分派

Sponsors

Details

Repository
github.com/jnmetacode/superpowers-zh
Category
Automation & Workflows
First seen
Jun 3, 2026

More from jnmetacode/superpowers-zh

All 20
1aradotso avatarios-marketing-capture-automationaradotso/marketing-skillsios marketing capture automation965skills.sh installs
2jwynia avatarpdf-generatorjwynia/agent-skillsCreate and manipulate PDF files programmatically. Use when the user needs to generate PDFs, fill PDF forms, extract PDF content, add watermarks/overlays, or mer921skills.sh installs
3praveenspeaks avatarcinematic-script-writerpraveenspeaks/cinematic-script-writercinematic script writer860skills.sh installs
4mindrally avatargit-workflowmindrally/skillsGit conventions and workflow guidelines using Conventional Commits, branching strategies, and best practices for version control850skills.sh installs
5aradotso avatarmarketing-selling-point-generatoraradotso/marketing-skillsmarketing selling point generator816skills.sh installs
6mblode avatarscaffold-nextjsmblode/agent-skillsScaffolds a production-ready Next.js turborepo end to end. Runs create-next-app with TypeScript 7, Tailwind CSS, React Compiler, and Cache Components, sets up s785skills.sh installs