一键导入
sf-pair-plan
Use when a user asks to create a structured implementation plan with milestones, stories, and reviewer approval using pi-subagents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when a user asks to create a structured implementation plan with milestones, stories, and reviewer approval using pi-subagents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when a plan folder created by sf-pair-plan must be executed milestone-by-milestone in a worktree, with a per-milestone TDD→review→commit→tracker loop, then finalized so the branch is preserved for a PR.
Execute a single task end-to-end with plan review, implementation review, verification, and one persistent task-plan artifact.
| name | sf-pair-plan |
| description | Use when a user asks to create a structured implementation plan with milestones, stories, and reviewer approval using pi-subagents. |
Create a multi-milestone implementation plan with iterative reviewer approval.
brainstorming, writing-plans (install via pi install git:github.com/obra/superpowers)Explore the codebase and existing patterns. Use Agent({ subagent_type: "general-purpose" }) to understand the project structure.
If an explorer model was configured (via prompt, config, or env), use it:
Agent({ subagent_type: "explorer", model: "<explorer_model>" })
If no explorer model is configured, omit the model parameter to inherit the current session model. Do NOT use the default Explore agent (it uses Haiku).
Ask questions one at a time using AskUserQuestion until the scope is clear. Confirm constraints, success criteria, dependencies, and what is out of scope.
The tool has already resolved the reviewer model. Verify the reviewer agent definition exists globally:
test -f ~/.pi/agent/agents/reviewer.md
If it doesn't exist, run the sf_pair_plan tool again (it writes the agent files on first use). The reviewer model MUST be passed at dispatch time.
Load brainstorming skill. Present 2-3 approaches and recommend one. Use AskUserQuestion to get the user's approval on the chosen approach before proceeding. Do NOT move to Phase 5 until the user confirms the design.
Load writing-plans skill. Break the work into milestones and bite-sized stories (2-5 min each). Story IDs use S-101, S-102 style.
Each story must be detailed enough for a less intelligent model to follow to the letter.
Write the complete plan to /tmp/pair-plan-{REVIEW_ID}.md where REVIEW_ID is a random UUID.
Agent({
subagent_type: "reviewer",
model: "<reviewer_model>",
prompt: "Review the implementation plan at /tmp/pair-plan-{REVIEW_ID}.md. Return exactly the required ## Summary, ## Findings (P0-P3), and ## Verdict structure.",
description: "Review plan round N"
})
Scan the response for VERDICT: APPROVED (case-insensitive, line must start with VERDICT:).
CRITICAL: The plan is NOT complete until ALL files are created in ai_plan/. Do NOT stop or ask the user how to proceed.
Once the plan is approved by the reviewer, you MUST:
Check .gitignore: Run grep -qx '/ai_plan/' .gitignore || echo '/ai_plan/' >> .gitignore
Create the plan folder: mkdir -p ai_plan/YYYY-MM-DD-<slug>/ (use today's date and a descriptive slug)
Read the templates: Read the 3 templates from the templates/ directory (relative to this skill: ../../templates/). Note: task-plan.md is for the task skill only — ignore it here.
Write ALL 5 files (use the same slug throughout):
ai_plan/YYYY-MM-DD-<slug>/original-plan.md — the raw approved plan from the reviewai_plan/YYYY-MM-DD-<slug>/final-transcript.md — conversation log of the planning sessionai_plan/YYYY-MM-DD-<slug>/milestone-plan.md — filled from milestone-plan.md templateai_plan/YYYY-MM-DD-<slug>/story-tracker.md — filled from story-tracker.md templateai_plan/YYYY-MM-DD-<slug>/continuation-runbook.md — filled from continuation-runbook.md templateVerify all files exist:
ls -la ai_plan/YYYY-MM-DD-<slug>/
If any file is missing, create it immediately.
Present the plan folder to the user: Show the file list and confirm the plan is ready for implementation.
DO NOT:
If TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID are configured, send a completion summary via the Telegram notifier helper.