execute-plan-with-subagents
Execute a written implementation plan task-by-task using pi subagents with review gates.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Execute a written implementation plan task-by-task using pi subagents with review gates.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Step-by-step teaching mode for implementation guidance. Use when the user asks Codex to teach them how to implement a change themselves, says "use instruct", "teach me step by step", "walk me through implementing", "show me incrementally", or otherwise wants guidance-first coding help instead of Codex directly editing files.
Guidance for designing, writing, reviewing, or refactoring tests in this project. Use when adding tests for features or bugs, deciding unit vs integration boundaries, choosing what to mock, improving test structure, or reducing brittle/slow/flaky tests.
Turn a rough idea into a reviewed design spec before any implementation.
Debug issues using a structured, evidence-first process.
Execute a written implementation plan in this session with checkpoints.
Verify tests, present merge options, and clean up a finished branch.
| name | execute-plan-with-subagents |
| description | Execute a written implementation plan task-by-task using pi subagents with review gates. |
| disable-model-invocation | true |
You are running the execute-plan-with-subagents skill. This is a manual workflow for executing a written plan with Pi subagents.
If the skill was invoked with arguments, treat them as the plan path. Otherwise, identify the correct plan file before proceeding.
This skill assumes the Agent, get_subagent_result, and steer_subagent tools from @tintinweb/pi-subagents are already installed and available.
This skill also expects these agent types to be available:
implementerspec-reviewercode-quality-reviewerExecute the plan task by task with isolated subagent context and two review gates after each task:
Use this when:
If tasks are tightly coupled or there is no plan, stop and redirect accordingly.
main or master without explicit user consent.Agent({ isolation: "worktree" }) for the normal per-task loop. This workflow expects task-scoped diffs in the current working tree. Use the setup-worktree skill for top-level isolation instead.If the worktree is not clean before a new task starts, stop and resolve that before continuing. Do not let unrelated or leftover changes bleed into the next task.
Each task should use this lifecycle:
This keeps prior approved work out of later task reviews while still preserving a clean HEAD between tasks.
You are the coordinator, not the implementer.
Your job is to:
Do not make subagents rediscover the plan by reading the whole file unless that is unavoidable. Give them the exact task text and scene-setting context they need.
Read the plan and extract:
Maintain an explicit checklist in the conversation with one item per plan task.
Only one task should be in_progress at a time.
For each task:
in_progress.TASK_BASE_SHA before any task work begins.Agent tool using subagent_type: "implementer".NEEDS_CONTEXT, provide the missing context and launch it again for the same task.TASK_BASE_SHA to the current worktree state.spec-reviewer subagent against that task-scoped diff.PASS, PASS_WITH_NOTES, or FAIL.PASS or PASS_WITH_NOTES, launch the code-quality-reviewer subagent against that same task-scoped diff.PASS, PASS_WITH_NOTES, or FAIL.FAIL, send the findings back to the implementer and rerun only the failed review after fixes land.PASS_WITH_NOTES, use judgment: address the notes now only if they materially improve correctness, maintainability, or user-requested process compliance.FAIL, create one clean commit for the task so the next task starts from a clean HEAD.FAIL outcomes and the task commit succeeds.The important rule is that reviewers examine only the current task diff, not cumulative branch changes.
The second important rule is that reviewers should block only on material issues. Trivial process omissions, historical evidence recovery, and ceremonial proof requests should become notes, not failures, unless they materially reduce confidence in the task.
After all tasks are complete, perform one final whole-change review before wrapping up. Use the request-code-review skill if a broader review pass is useful.
When the full implementation is complete and verified, run the finish-development-branch skill.
Expect implementers to return one of these statuses and handle them explicitly:
DONEDONE_WITH_CONCERNSNEEDS_CONTEXTBLOCKEDIf an implementer says BLOCKED, respond by doing one of the following:
Use these shapes when launching subagents.
Use the Agent tool with:
subagent_type: implementer
description: Task <N> implementation
prompt:
You are implementing Task <N> from an approved implementation plan.
Overall context:
- Goal: <goal>
- Architecture notes: <relevant context>
- Plan file: <path>
- Task base: <TASK_BASE_SHA>
Task text:
<paste the full task exactly>
Rules:
- Stay within the scope of this task.
- Follow TDD: write the failing test first, run it, then write the minimal implementation.
- Run the exact verification commands called for by the plan.
- Do not commit the task changes yourself unless the controller explicitly instructs you to do so after reviews pass.
- If something is unclear or missing, stop and return NEEDS_CONTEXT.
- If blocked, explain exactly why.
Return one of:
- DONE
- DONE_WITH_CONCERNS
- NEEDS_CONTEXT
- BLOCKED
Also include:
- files changed
- tests/verification run
- a concise summary of the current task diff
- any concerns or gaps
Use the Agent tool with:
subagent_type: spec-reviewer
description: Task <N> spec review
prompt:
Review the implementation for Task <N> against the plan task text below.
Review scope:
- Only review the diff from <TASK_BASE_SHA> to the current task state.
- Do not raise issues from earlier approved tasks unless the current task clearly regressed them.
Task text:
<paste full task>
Review data:
- changed files list
- verification output for this task
- instruct the reviewer to inspect `git diff --stat <TASK_BASE_SHA>` and `git diff <TASK_BASE_SHA>`
Review philosophy:
- Focus on substantive compliance with the task, not ceremonial process enforcement.
- Do not fail the task for trivial process omissions if the task outcome is still clear and verified.
- Prefer `PASS_WITH_NOTES` over `FAIL` for non-blocking process hygiene issues.
Return:
- PASS, PASS_WITH_NOTES, or FAIL
- specific findings with references to the task text
- clearly separate blocking issues from non-blocking notes
Use the Agent tool with:
subagent_type: code-quality-reviewer
description: Task <N> code review
prompt:
Review the implementation for Task <N> for correctness and code quality.
Review scope:
- Only review the diff from <TASK_BASE_SHA> to the current task state.
- Treat earlier approved work as baseline unless the current task changed or regressed it.
Review data:
- changed files list
- verification output for this task
- instruct the reviewer to inspect `git diff --stat <TASK_BASE_SHA>` and `git diff <TASK_BASE_SHA>`
Review philosophy:
- Focus on material correctness, regressions, test quality, and maintainability.
- Do not fail the task for nits, formatting preferences, or ceremonial process evidence.
- Prefer `PASS_WITH_NOTES` when the implementation is acceptable but there are minor or optional improvements.
Return:
- PASS, PASS_WITH_NOTES, or FAIL
- issues ordered by severity
- concise rationale
- clearly separate blocking issues from non-blocking notes
Never:
N+1 begin before task N is committed or otherwise resolvedIf multiple independent investigation tasks appear during execution, you may use background subagents for read-only exploration, but not for overlapping implementation edits.
If the written plan includes a per-task commit step, interpret that as:
Do not commit before review unless the user explicitly wants a commit-first review workflow.