subagent-task-execution
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSubagent Task Execution
Subagent 任务执行
Overview
概述
This skill is used to execute a set of tasks (typically from a task breakdown or plan). It focuses on high-quality execution by dispatching specialized subagents for each task, ensuring each task is performed correctly and verified before moving to the next.
本skill用于执行一组任务(通常来自任务分解或计划)。它专注于高质量执行,为每个任务调度专业的subagent,确保在进入下一个任务前,每个任务都被正确执行并通过验证。
Core Principle
核心原则
One Task, One Subagent, Multi-Stage Review.
By isolating each task and applying a structured review process, we ensure high quality and prevent context pollution.
一任务、一Subagent、多阶段评审。
通过隔离每个任务并应用结构化评审流程,我们确保高质量输出并避免上下文污染。
The Process
执行流程
-
Preparation:
- Read the entire plan or task breakdown.
- Extract all tasks with their full context.
- Create a structured todo list using the tool.
TodoWrite
-
Per-Task Execution Loop:
- Skill Discovery: Before starting a task, identify which specialized skill(s) are needed for its execution (e.g., ,
coding, or any project-specific skills).brainstorming - Dispatch Implementer: Dispatch a subagent to perform the task. Provide the subagent with the full task description, any identified skills, and the necessary context.
- Interactive Clarification: If the subagent has questions, answer them clearly before they proceed with implementation.
- Task Implementation: The subagent performs the task, following the identified best practices and skills.
- Verification & Review:
- Spec Compliance Review: A separate subagent verifies that the result exactly matches the task requirements (no more, no less).
- Quality Review: A final review stage to ensure the output meets the highest standards of the domain (e.g., code quality, documentation clarity, etc.).
- Completion: Mark the task as completed in the todo list.
- Skill Discovery: Before starting a task, identify which specialized skill(s) are needed for its execution (e.g.,
-
Finalization:
- Once all tasks are complete, perform a final holistic review of the entire body of work to ensure consistency and overall quality.
-
准备阶段:
- 通读整个计划或任务分解文档。
- 提取所有任务及其完整上下文。
- 使用工具创建结构化待办事项列表。
TodoWrite
-
单任务执行循环:
- 技能发现: 在开始任务前,确定执行该任务所需的专业skill(例如、
coding或任何项目特定技能)。brainstorming - 调度执行者: 调度一个subagent来执行任务。向subagent提供完整的任务描述、已识别的技能及必要上下文。
- 交互式澄清: 如果subagent有疑问,在其开始实施前清晰解答。
- 任务实施: subagent按照已确定的最佳实践和技能执行任务。
- 验证与评审:
- 合规性评审: 由独立的subagent验证结果是否完全符合任务要求(不多不少)。
- 质量评审: 最终评审阶段,确保输出符合该领域的最高标准(例如代码质量、文档清晰度等)。
- 完成标记: 在待办事项列表中标记该任务为已完成。
- 技能发现: 在开始任务前,确定执行该任务所需的专业skill(例如
-
收尾阶段:
- 所有任务完成后,对整个工作成果进行最终整体评审,确保一致性和整体质量。
Key Principles
关键原则
- Discovery First: Always look for and apply the most relevant skills for the specific task at hand.
- Isolation: Each task should be treated as a distinct unit of work.
- Review Loops: Never move to the next task if the current one has open issues from either the spec or quality reviews.
- Subagent Specialization: Use subagents as specialized workers, providing them with all the context they need upfront.
- 先发现技能: 始终为特定任务寻找并应用最相关的技能。
- 任务隔离: 每个任务应被视为独立的工作单元。
- 评审闭环: 如果当前任务在合规性或质量评审中存在未解决问题,绝不推进到下一个任务。
- Subagent专业化: 将subagent视为专业工作者,提前为其提供所需的全部上下文。
Red Flags
注意事项(红牌警示)
- Skipping the skill discovery phase.
- Combining multiple tasks into a single subagent invocation.
- Proceeding with a task while reviews are still pending or failing.
- Ignoring subagent questions or providing vague answers.
- Failing to update the todo list as progress is made.
- 跳过技能发现阶段。
- 将多个任务合并为单次subagent调用。
- 在评审未完成或不通过的情况下推进任务。
- 忽略subagent的问题或提供模糊的回答。
- 未随进度更新待办事项列表。