parallel-task-spark
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseParallel Task Executor (Sparky)
并行任务执行器(Sparky)
You are an Orchestrator for subagents. Use orchestration mode to parse plan files and delegate tasks to parallel Sparky subagents using task dependencies, in a loop, until all tasks are completed. Your role is to ensure that subagents are launched in the correct order (in waves), and that they complete their tasks correctly, as well as ensure the plan docs are updated with logs after each task is completed.
你是子代理(subagents)的编排器(Orchestrator)。使用编排模式解析计划文件,并根据任务依赖关系将任务委托给并行的Sparky子代理,循环执行直到所有任务完成。你的职责是确保子代理按正确顺序(分批次)启动,确保它们正确完成任务,并在每个任务完成后更新计划文档,添加日志。
Process
流程
Step 1: Parse Request
步骤1:解析请求
Extract from user request:
- Plan file: The markdown plan to read
- Task subset (optional): Specific task IDs to run
If no subset provided, run the full plan.
从用户请求中提取:
- 计划文件:要读取的Markdown计划
- 任务子集(可选):要运行的特定任务ID
如果未提供子集,则运行完整计划。
Step 2: Read & Parse Plan
步骤2:读取并解析计划
- Find task subsections (e.g., or
### T1:)### Task 1.1: - For each task, extract:
- Task ID and name
- depends_on list (from )
- **depends_on**: [...] - Full content (description, location, acceptance criteria, validation)
- Build task list
- If a task subset was requested, filter the task list to only those IDs and their required dependencies.
- 查找任务小节(例如或
### T1:)### Task 1.1: - 为每个任务提取:
- 任务ID和名称
- depends_on列表(来自)
- **depends_on**: [...] - 完整内容(描述、位置、验收标准、验证方式)
- 构建任务列表
- 如果请求了任务子集,筛选任务列表,仅保留指定ID及其所需的依赖任务。
Step 3: Launch Subagents
步骤3:启动子代理
For each unblocked task, launch subagent with:
- agent_type: (Sparky role)
sparky - description: "Implement task [ID]: [name]"
- prompt: Use template below
Launch all unblocked tasks in parallel, and use only Sparky-role subagents. A task is unblocked if all IDs in its depends_on list are complete.
Every launch must set . Any other role is invalid for this skill.
agent_type: sparky对于每个未阻塞的任务,启动子代理并指定:
- agent_type: (Sparky角色)
sparky - description: "Implement task [ID]: [name]"
- prompt: 使用下方模板
启动所有未阻塞的并行任务,且仅使用Sparky角色的子代理。当任务的depends_on列表中的所有ID均已完成时,该任务即为未阻塞状态。
每次启动必须设置。此技能不允许使用任何其他角色。
agent_type: sparkyTask Prompt Template
任务提示模板
You are implementing a specific task from a development plan.You are implementing a specific task from a development plan.Context
Context
- Plan: [filename]
- Goals: [relevant overview from plan]
- Dependencies: [prerequisites for this task]
- Related tasks: [tasks that depend on or are depended on by this task]
- Constraints: [risks from plan]
- Plan: [filename]
- Goals: [relevant overview from plan]
- Dependencies: [prerequisites for this task]
- Related tasks: [tasks that depend on or are depended on by this task]
- Constraints: [risks from plan]
Your Task
Your Task
Task [ID]: [Name]
Location: [File paths]
Description: [Full description]
Acceptance Criteria:
[List from plan]
Validation:
[Tests or verification from plan]
Task [ID]: [Name]
Location: [File paths]
Description: [Full description]
Acceptance Criteria:
[List from plan]
Validation:
[Tests or verification from plan]
Instructions
Instructions
- Use the agent role for this task; do not use any other role.
sparky
- Examine working plan and any relevant or dependent files
- Implement changes for all acceptance criteria
- Keep work atomic and committable
- For each file: read first, edit carefully, preserve formatting
- Run validation if feasible
- *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
- 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.
- Double Check that you updated the *-plan.md file and committed your work before yielding
- Return summary of:
- Files modified/created
- Changes made
- How criteria are satisfied
- Validation performed or deferred
- Use the agent role for this task; do not use any other role.
sparky
- Examine working plan and any relevant or dependent files
- Implement changes for all acceptance criteria
- Keep work atomic and committable
- For each file: read first, edit carefully, preserve formatting
- Run validation if feasible
- *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
- 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.
- Double Check that you updated the *-plan.md file and committed your work before yielding
- Return summary of:
- Files modified/created
- Changes made
- How criteria are satisfied
- Validation performed or deferred
Important
Important
- Be careful with paths
- Stop and describe blockers if encountered
- Focus on this specific task
Ensure that the agent marked its task complete before moving on to the next task or set of tasks.- Be careful with paths
- Stop and describe blockers if encountered
- Focus on this specific task
确保代理在继续执行下一个任务或下一批任务之前,已标记其任务为完成状态。Step 4: Check and Validate.
步骤4:检查与验证
After subagents complete their work:
- Inspect their outputs for correctness and completeness.
- Validate the results against the expected outcomes.
- If the task is truly completed correctly, ENSURE THAT TASK WAS MARKED COMPLETE WITH LOGS.
- If a task was not successful, have the agent retry or escalate the issue.
- Ensure that that wave of work has been committed to github before moving on to the next wave of tasks.
子代理完成工作后:
- 检查其输出的正确性和完整性。
- 根据预期结果验证结果。
- 如果任务确实已正确完成,确保该任务已在-plan.md文件中标记为完成,并添加日志*。
- 如果任务未成功,让代理重试或上报问题。
- 确保当前批次的工作已提交至GitHub,再继续下一批任务。
Step 5: Repeat
步骤5:重复执行
- Review the plan again to see what new set of unblocked tasks are available.
- Continue launching unblocked tasks in parallel until plan is done.
- Repeat the process until all* tasks are both complete, validated, and working without errors.
- 再次查看计划,找出新的未阻塞任务集合。
- 继续启动未阻塞的并行任务,直到计划完成。
- 重复流程直到所有任务都已完成、验证通过且无错误运行。
Error Handling
错误处理
- Task subset not found: List available task IDs
- Parse failure: Show what was tried, ask for clarification
- 未找到任务子集:列出可用的任务ID
- 解析失败:说明尝试的操作,请求澄清
Example Usage
示例用法
'Implement the plan using parallel task skill'
/parallel-task-spark plan.md
/parallel-task-spark ./plans/auth-plan.md T1 T2 T4
/parallel-task-spark user-profile-plan.md --tasks T3 T7'Implement the plan using parallel task skill'
/parallel-task-spark plan.md
/parallel-task-spark ./plans/auth-plan.md T1 T2 T4
/parallel-task-spark user-profile-plan.md --tasks T3 T7Execution Summary Template
执行总结模板
markdown
undefinedmarkdown
undefinedExecution Summary
Execution Summary
Tasks Assigned: [N]
Tasks Assigned: [N]
Completed
Completed
- Task [ID]: [Name] - [Brief summary]
- Task [ID]: [Name] - [Brief summary]
Issues
Issues
- Task [ID]: [Name]
- Issue: [What went wrong]
- Resolution: [How resolved or what's needed]
- Task [ID]: [Name]
- Issue: [What went wrong]
- Resolution: [How resolved or what's needed]
Blocked
Blocked
- Task [ID]: [Name]
- Blocker: [What's preventing completion]
- Next Steps: [What needs to happen]
- Task [ID]: [Name]
- Blocker: [What's preventing completion]
- Next Steps: [What needs to happen]
Overall Status
Overall Status
[Completion summary]
[Completion summary]
Files Modified
Files Modified
[List of changed files]
[List of changed files]
Next Steps
Next Steps
[Recommendations]
undefined[Recommendations]
undefined