phase-running
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePhase Running
阶段运行
You are executing a single phase of an implementation plan as an atomic background sub-agent. You work autonomously to completion and report results — you do NOT interact with the user.
你将作为一个原子化的后台子Agent,执行实施计划中的单个阶段。你会自主完成任务并汇报结果——不要与用户交互。
Execution Model
执行模型
This skill is designed to run inside a background (sub-agent), NOT in the main session. The implementing skill (or user) spawns it via the Agent tool with .
Agentrun_in_background: trueThe phase agent receives:
- Plan path: Full path to the plan file
- Phase number: Which phase to execute
- Relevant context: Any additional context from the caller
此技能旨在运行于后台(子Agent)内部,而非主会话中。实施技能(或用户)通过Agent工具,设置来启动它。
Agentrun_in_background: true阶段Agent会接收以下信息:
- 计划路径:计划文件的完整路径
- 阶段编号:需要执行的阶段序号
- 相关上下文:调用方提供的任何额外上下文
When to Use
使用场景
This skill activates when:
- The implementing skill spawns a phase agent (default execution mode)
- User invokes command for manual phase execution
/run-phase - Another skill references
desplega:phase-running
在以下情况激活此技能:
- 实施技能启动阶段Agent(默认执行模式)
- 用户调用命令手动执行阶段
/run-phase - 其他技能引用
desplega:phase-running
Autonomy
自主性
Phase agents always run as Autopilot within the sub-agent. The calling context (implementing skill or user) controls the outer autonomy and handles human checkpoints.
CRITICAL: Phase agents do NOT use AskUserQuestion. If something is ambiguous, report status with details. The caller handles all user interaction.
blocked阶段Agent始终在子Agent中以Autopilot模式运行。调用上下文(实施技能或用户)控制外部自主性,并处理人工检查点。
重要提示:阶段Agent不得使用AskUserQuestion。若遇到模糊情况,需汇报状态并附上详情。所有用户交互由调用方处理。
blockedProcess Steps
流程步骤
Step 1: Load Context
步骤1:加载上下文
- Read the full plan file
- Extract the specific phase to execute (by phase number)
- Read all files mentioned in the phase's "Changes Required" section
- Understand the phase's success criteria
- 读取完整的计划文件
- 提取需要执行的特定阶段(按阶段编号)
- 读取阶段“所需变更”部分中提及的所有文件
- 理解阶段的成功标准
Step 2: Pre-flight Check
步骤2:预飞检查
Verify before executing:
| Check | Action if failed |
|---|---|
| Previous phases completed | Check that prior phases' automated verification items are checked. If not, report |
| No merge conflicts | Check target files for conflict markers. If found, report |
| Phase dependencies met | Verify files/directories from previous phases exist. If missing, report |
执行前需验证以下内容:
| 检查项 | 失败时操作 |
|---|---|
| 前期阶段已完成 | 检查前期阶段的自动化验证项是否已勾选。若未完成,汇报 |
| 无合并冲突 | 检查目标文件是否存在冲突标记。若存在,汇报 |
| 阶段依赖已满足 | 验证前期阶段的文件/目录是否存在。若缺失,汇报 |
Step 3: Execute Phase
步骤3:执行阶段
Implement all changes described in the phase:
- Follow the plan's instructions precisely
- Create/edit files as specified in "Changes Required"
- Adapt to minor mismatches (file paths moved, code slightly different) without blocking
- For significant mismatches, report with details
blocked
实施阶段描述的所有变更:
- 严格遵循计划中的指令
- 按照“所需变更”中的说明创建/编辑文件
- 适配轻微不匹配(如文件路径移动、代码略有不同),无需阻塞
- 若遇到重大不匹配,汇报并附上详情
blocked
Step 4: Run Verification
步骤4:运行验证
The phase's Success Criteria has three subsections. Handle each:
- Automated Verification (runnable commands): run each command listed, record pass/fail. If a check fails, attempt to fix and re-run once. If it still fails, include it in the report.
- Automated QA (agent-driven scenarios — browser-use, screenshot diff, CLI walkthrough): for each item, interpret the scenario and execute it yourself (use or other agent tools as needed). Record pass/fail per item.
browser-use - Manual Verification: leave unchecked. The caller handles these with the user.
- QA Spec (linked doc): if the phase has a section pointing to a QA doc path, report
### QA Spec (optional):so the caller can invokeQA Doc: <path>against it. Do not execute scenarios inline — they live in the QA doc, not the plan. If no QA Spec section exists, reportdesplega:qa.QA: n/a
阶段的成功标准包含三个子部分,分别处理:
- 自动化验证(可运行命令):执行列出的每个命令,记录通过/失败情况。若检查失败,尝试修复并重新运行一次。若仍失败,需将其纳入汇报。
- 自动化QA(Agent驱动场景——浏览器操作、截图对比、CLI流程):针对每个项,解读场景并自行执行(必要时使用或其他Agent工具)。记录每个项的通过/失败情况。
browser-use - 人工验证:保持未勾选状态。调用方会与用户共同处理这些项。
- QA规格(关联文档):若阶段包含部分,指向QA文档路径,则汇报
### QA Spec (optional):,以便调用方针对该文档调用QA Doc: <path>。请勿在线执行场景——这些场景存在于QA文档中,而非计划内。若不存在QA Spec部分,汇报desplega:qa。QA: n/a
Step 5: Update Plan
步骤5:更新计划
- Check off () Automated Verification and Automated QA items that passed
- [x] - Do NOT check off Manual Verification items — those require human confirmation
- Update the plan's and
last_updatedfrontmatter fieldslast_updated_by
- 勾选已通过的自动化验证和自动化QA项()
- [x] - 请勿勾选人工验证项——这些需要人工确认
- 更新计划的和
last_updated前置字段last_updated_by
Learning Capture
学习成果捕获
OPTIONAL SUB-SKILL: If significant learnings emerged during this phase, note them in the phase completion report for the parent session to capture via .
/learning capture可选子技能:若在此阶段获得重要学习成果,需在阶段完成报告中注明,以便父会话通过捕获。
/learning captureStep 6: Report Results
步骤6:汇报结果
The agent's return message MUST include:
If completed:
Status: completed
Phase: [N] - [Phase name]
Files changed: [list of files created/modified]
Automated Verification: [N/M passed]
- [x] [Check 1] — passed
- [x] [Check 2] — passed
Automated QA: [N/M passed]
- [x] [Scenario 1] — passed
- [x] [Scenario 2] — passed
QA Doc: <path> | n/a
Manual verification needed:
- [ ] [Manual check 1]
- [ ] [Manual check 2]If blocked:
Status: blocked
Phase: [N] - [Phase name]
Reason: [Clear description of what's blocking]
Partial progress: [What was completed before blocking]
QA status: [status at time of block]
Suggested action: [How the caller/user can unblock]If failed:
Status: failed
Phase: [N] - [Phase name]
Error: [Error details]
Partial progress: [What was completed before failure]
QA status: [status at time of failure]
Files modified: [List of files that were changed before failure]Agent的返回消息必须包含以下内容:
若完成:
Status: completed
Phase: [N] - [Phase name]
Files changed: [list of files created/modified]
Automated Verification: [N/M passed]
- [x] [Check 1] — passed
- [x] [Check 2] — passed
Automated QA: [N/M passed]
- [x] [Scenario 1] — passed
- [x] [Scenario 2] — passed
QA Doc: <path> | n/a
Manual verification needed:
- [ ] [Manual check 1]
- [ ] [Manual check 2]若阻塞:
Status: blocked
Phase: [N] - [Phase name]
Reason: [Clear description of what's blocking]
Partial progress: [What was completed before blocking]
QA status: [status at time of block]
Suggested action: [How the caller/user can unblock]若失败:
Status: failed
Phase: [N] - [Phase name]
Error: [Error details]
Partial progress: [What was completed before failure]
QA status: [status at time of failure]
Files modified: [List of files that were changed before failure]Atomicity Contract
原子性约定
Phase agents are atomic — they run to completion or stop:
- No interactive questions (no AskUserQuestion)
- No partial states left unexplained
- If blocked or failed, the report includes enough detail for the caller to decide next steps
- All file changes are documented in the report
阶段Agent是原子化的——要么运行至完成,要么停止:
- 无交互式提问(不使用AskUserQuestion)
- 不留下未解释的部分状态
- 若阻塞或失败,汇报中需包含足够细节,供调用方决定下一步操作
- 所有文件变更均需在汇报中记录
Context Handoff Pattern
上下文传递模式
| Direction | Data |
|---|---|
| Caller → Phase Agent | Plan path + phase number + autonomy mode |
| Phase Agent reads | Plan file + all source files referenced in the phase |
| Phase Agent → Caller | Status + changed files + verification results |
| Caller handles | Manual verification, cross-phase coordination, human checkpoints |
| 方向 | 数据 |
|---|---|
| 调用方 → 阶段Agent | 计划路径 + 阶段编号 + 自主模式 |
| 阶段Agent读取 | 计划文件 + 阶段中引用的所有源文件 |
| 阶段Agent → 调用方 | 状态 + 变更文件 + 验证结果 |
| 调用方处理 | 人工验证、跨阶段协调、人工检查点 |