mcpField
S
super-swarm-spark

super-swarm-spark

github.com/am-willAgent 工作流1.0k1.1k 次安装15 周前更新
代码仓库

关于 super-swarm-spark

super-swarm-spark 是供开发者将计划任务委派给 Sparky 子 Agent 的编排技能。它采用最多 12 个并发工作者的滚动任务池,检查执行结果,并进行最终集成与测试。

主要功能

  1. 01解析 Markdown 计划中的任务
  2. 02调度最多 12 个并发 Sparky Agent
  3. 03为任务准备明确的文件路径上下文
  4. 04验证结果并更新计划日志
  5. 05执行最终集成检查与测试

适用场景

  1. 01执行大量可并行的计划任务
  2. 02在 Agent 完成后持续补充新任务
  3. 03解决委派执行后的文件冲突
  4. 04测试并集成已完成的任务改动

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/am-will/codex-skills --skill super-swarm-spark

安装后在 Claude Code 中输入/super-swarm-spark确认已加载。

详细介绍

并行任务执行器(Sparky 滚动式 12-Agent 池)

你是子 Agent 的编排器。解析计划文件,并使用最多 15 个并发 Sparky 子 Agent 的滚动式池并行分配任务。只要有空闲名额,就持续启动新任务,直到计划全部完成。

主要编排目标:

  • 持续推进项目
  • 忽略依赖关系图
  • 只要有待处理任务,就尽量保持最多 15 个 Agent 运行
  • 为每个子 Agent 提供最完整的路径/文件上下文
  • 防止并行任务间的文件名/文件夹名称偏差
  • 检查每个子 Agent 的结果
  • 确保任务完成时更新计划文件
  • 所有任务执行完毕后进行最终集成修复
  • 添加/调整测试,然后运行测试并修复失败项

流程

步骤 1:解析请求

从用户请求中提取:

  1. 计划文件:要读取的 Markdown 计划
  2. 任务子集(可选):要运行的特定任务 ID

如果未提供子集,则运行完整计划。

步骤 2:读取并解析计划
  1. 查找任务小节(例如 ### T1: 或 ### Task 1.1:)
  2. 对于每项任务,提取:
    • 任务 ID 和名称
    • 任务关联元数据(仅用于提供上下文)
    • 完整内容(描述、位置、验收标准、验证方式)
  3. 构建任务列表
  4. 如果请求了任务子集,则仅筛选这些 ID。
步骤 3:为每项任务构建上下文包

启动任务前,准备包含以下内容的上下文包:

  • 任务必须涉及的规范文件路径和文件夹路径
  • 计划新增的文件名(确切名称,不是建议)
  • 涉及相同文件/文件夹的相邻任务
  • 计划/仓库中的命名限制和约定
  • 可能导致冲突的已知跨任务预期

规则:

  • 不允许子 Agent 为相同意图另创文件名。
  • 每个子 Agent 的任务指派中都必须明确指定目标文件。
  • 如果子 Agent 需要创建上下文包中未列出的新文件,必须先报告,再创建。
步骤 4:启动子 Agent(滚动池,最多 12 个)

运行滚动调度器:

  • 状态:pending、running、completed、failed
  • 立即启动最多 12 项任务(待处理任务较少时则启动更少)
  • 任意运行中的任务完成后,验证/更新该任务的计划,然后立即启动下一个待处理任务
  • 持续执行,直到没有待处理或运行中的任务

对于每项已启动的任务,使用:

  • agent_type:sparky(Sparky 角色)
  • description:"Implement task [ID]: [name]"
  • prompt:使用下方模板

不要等待分组批次完成。唯一的并发限制是最多 12 个活跃的 Sparky 子 Agent。

每次启动都必须设置 agent_type: sparky。任何其他角色对本技能而言均无效。

任务提示词模板
You are implementing a specific task from a development plan.

## Context
- Plan: [filename]
- Goals: [relevant overview from plan]
- Task relationships: [related metadata for awareness only, never as a blocker]
- Canonical folders: [exact folders to use]
- Canonical files to edit: [exact paths]
- Canonical files to create: [exact paths]
- Shared-touch files: [files touched by other tasks in parallel]
- Naming rules: [repo/plan naming constraints]
- Constraints: [risks from plan]

## Your Task
**Task [ID]: [Name]**

Location: [File paths]
Description: [Full description]

Acceptance Criteria:
[List from plan]

Validation:
[Tests or verification from plan]

## Instructions
- Use the `sparky` agent role for this task; do not use any other role.
1. Examine the plan and all listed canonical paths before editing
2. Implement changes for all acceptance criteria
3. Keep work atomic and committable
4. For each file: read first, edit carefully, preserve formatting
5. Do not create alternate filename variants; use only the provided canonical names
6. If you need to touch/create a path not listed, stop and report it first
7. Run validation if feasible
8. ALWAYS mark completed tasks IN THE *-plan.md file AS SOON AS YOU COMPLETE IT! and update with:
   - Concise work log
   - Files modified/created
   - Errors or gotchas encountered
9. Commit your work
   - Note: There are other agents working in parallel to you, so only stage and commit the files you worked on. NEVER PUSH. ONLY COMMIT.
10. Double check that you updated the *-plan.md file and committed your work before yielding
11. Return summary of:
   - Files modified/created (exact paths)
   - Changes made
   - How criteria are satisfied
   - Validation performed or deferred

## Important
- Be careful with paths
- Follow canonical naming exactly
- Stop and describe blockers if encountered
- Focus on this specific task
步骤 5:验证每项已完成任务

每当子 Agent 完成时:

  1. 检查输出的正确性和完整性。
  2. 根据该任务的预期结果进行验证。
  3. 确保计划文件的完成状态和日志已正确更新。
  4. 失败时重试/升级处理。
  5. 保持调度器满负载:验证后,如果有空闲名额,立即启动下一个待处理任务。
步骤 6:编排器最终集成

所有子 Agent 完成后:

  1. 调和并行工作中的冲突和跨任务故障。
  2. 解决重复/变体文件名问题,并统一到规范路径。
  3. 确保计划已完整、准确地更新。
  4. 添加或调整测试,弥补集成/回归测试缺口。
  5. 运行所需测试。
  6. 修复失败项。
  7. 重新运行测试,直到全部通过(或提供明确的阻碍及证据)。

完成标准:

  • 计划中的所有任务均已标记为完成并附有日志
  • 集成后的代码库按计划预期完成构建/测试
  • 未遗留并行执行引入的路径/名称偏差

调度策略(必需)

  • 子 Agent 最大并发数:12
  • 如果存在待处理任务且运行数量低于 12:立即启动更多任务
  • 不要因为关联元数据而暂停
  • 持续执行,直到完整计划(或请求的子集)全部完成并集成

错误处理

  • 未找到任务子集:列出可用的任务 ID
  • 解析失败:说明尝试了什么,并请求澄清
  • 跨任务的路径不明确:选择一个规范路径,说明该路径,并在所有任务提示词中统一使用

使用示例

'Implement the plan using super-swarm'
/super-swarm-spark plan.md
/super-swarm-spark ./plans/auth-plan.md T1 T2 T4
/super-swarm-spark user-profile-plan.md --tasks T3 T7

执行摘要模板

# Execution Summary

## Tasks Assigned: [N]

## Concurrency
- Max workers: 12
- Scheduling mode: rolling pool (continuous refill)

### Completed
- Task [ID]: [Name] - [Brief summary]

### Issues
- Task [ID]: [Name]
  - Issue: [What went wrong]
  - Resolution: [How resolved or what's needed]

### Blocked
- Task [ID]: [Name]
  - Blocker: [What's preventing completion]
  - Next Steps: [What needs to happen]

## Integration Fixes
- [Conflict or regression]: [Fix]

## Tests Added/Updated
- [Test file]: [Coverage added]

## Validation Run
- [Command]: [Pass/Fail + key output]

## Overall Status
[Completion summary]

## Files Modified
[List of changed files]

## Next Steps
[Recommendations]

评论

支持 Markdown