plan
Create detailed implementation plan with ordered tasks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create detailed implementation plan with ordered tasks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use when a feature plan has been verified and is ready for implementation — executes tasks with atomic commits
Use when you want to auto-run all remaining Ship steps for a feature without manual step-by-step invocation
Use when a feature has been brainstormed and needs a detailed implementation plan with tasks
Use when a brainstormed feature needs architectural decisions — presents 2-3 approaches for user to choose before planning
Use when a plan has been created and needs independent verification against codebase patterns before building
Use when beginning new feature work, adding functionality, or fixing a bug — runs intensive brainstorming to capture requirements before planning
| name | plan |
| description | Create detailed implementation plan with ordered tasks |
| when_to_use | TRIGGER when: user says "plan" or feature status is "brainstormed"/"design-complete". DO NOT TRIGGER when: no feature exists or already planned. |
| effort | high |
| allowed-tools | Read, Write, Glob, Grep, Agent, WebFetch, AskUserQuestion |
| argument-hint | [feature-name] |
!for f in .planning/features/*/CONTEXT.md; do [ -f "$f" ] && d=$(dirname "$f") && echo "$(basename "$d"): $(sed -n 's/^status: *//p' "$f")"; done 2>/dev/null; true
!for f in .planning/features/*/PLAN.md; do [ -f "$f" ] && d=$(dirname "$f") && echo "$(basename "$d") plan: $(grep -c 'status="done"' "$f" 2>/dev/null || echo 0) done, $(grep -c 'status="pending"' "$f" 2>/dev/null || echo 0) pending"; done 2>/dev/null; true
Create an implementation plan for the active feature.
.planning/features/ for feature directoriesCONTEXT.md and check the status fieldbrainstormed or planned (replanning)$ARGUMENTS is provided, use it as the feature nameLaunch 3 parallel exploration sub-agents using the Agent tool. Run all three simultaneously in a single response:
Agent 1 — Similar Features:
Explore the codebase and find features or patterns similar to this feature idea: {summary from CONTEXT.md}.
Use Glob, Read, and Grep to find analogous implementations. Report:
- File paths of similar implementations
- Patterns used (naming, structure, abstractions)
- Key function signatures and conventions
- How similar features integrate with the rest of the codebase
Be concise. Max 500 words.
Agent 2 — Architecture Map:
Map the architecture relevant to this feature: {summary from CONTEXT.md}.
Use Glob, Read, and Grep to identify:
- Module boundaries and directory structure in the relevant area
- Abstraction layers (models, services, routes, components, etc.)
- Entry points and integration patterns
- Dependencies between modules
Be concise. Max 500 words.
Agent 3 — Codebase Conventions:
Survey coding conventions in this project. Read 3-5 representative source files.
Report:
- File naming style (camelCase, kebab-case, PascalCase)
- Import patterns (relative vs alias, default vs named exports)
- Error handling conventions
- Test file locations and framework
- File extension conventions
- Any linting/formatting config (eslint, prettier, tsconfig)
Be concise. Max 500 words.
Collect the output from all three agents into an ## Exploration Findings block.
Review the Exploration Findings and CONTEXT.md together. Ask follow-up questions only if ANY of these are true:
If none apply, skip this step. If questions are warranted, use AskUserQuestion with 1-4 targeted questions informed by exploration findings.
Now create the plan. You have the full exploration findings and CONTEXT.md. Do supplementary Glob/Read calls as needed for specific details.
Extract from CONTEXT.md:
Use the pre-gathered exploration findings as your codebase understanding. Do supplementary Glob/Read calls only for specific details not covered.
If the feature involves unfamiliar technology, make up to 3 WebFetch calls.
Research when: unfamiliar library, new API integration, uncertain config format. Skip when: you're confident about the domain.
If CONTEXT.md contains a ## Chosen Architecture section, use that approach as your architectural foundation.
Document implementation decisions not already in CONTEXT.md. For each, note the rationale.
If a decision contradicts CONTEXT.md, flag it explicitly.
Write 3-12 tasks. Each task must:
Task XML format:
<task id="1" status="pending">
<name>Verb phrase describing what is built</name>
<files>exact/path/to/file.ts, another/path.ts</files>
<action>Specific implementation instructions. Include: function names, field names, schema shape, HTTP method + path, expected behavior. Be concrete enough that the builder can implement without guessing.</action>
<verify>Runnable command that proves completion. Examples:
- npm test -- --testPathPattern=auth
- node -e "require('./src/models/user')"
- grep -q "export function createUser" src/services/user.ts
</verify>
</task>
Writing for the builder: The build step follows instructions literally. Be unambiguous:
Specificity litmus test: Could a different Claude instance execute this task without asking clarifying questions? If not, add more detail.
| TOO VAGUE | SPECIFIC ENOUGH |
|---|---|
| "Add authentication" | "Add JWT auth using jose library, store in httpOnly cookie, 15min expiry. POST /api/auth/login accepts {email, password}, validates with bcrypt against User table, returns 200 + Set-Cookie on success, 401 on failure." |
| "Create the API" | "Create POST /api/projects endpoint in src/routes/projects.ts accepting {name: string, description: string}, validates name length 3-50 chars, inserts via db.projects.create(), returns 201 with project object." |
| "Handle errors" | "Wrap API calls in try/catch in src/services/api.ts. On 4xx/5xx return {error: string}. In src/components/Form.tsx show error via toast notification using existing showToast() from src/utils/toast.ts." |
Task ordering: infrastructure before logic, models before services, services before routes.
Phasing: After designing all tasks, assess whether they need phases:
<phase> groupsPhase sizing is judgment-based. General target: 3-5 tasks per phase. Group by natural boundaries: infrastructure → logic → integration → tests.
<phase id="1" name="Core data models" status="pending">
<task id="1" status="pending">...</task>
<task id="2" status="pending">...</task>
</phase>
Phase status: pending → building → done. Task IDs are globally unique across all phases.
Before writing, verify each check. Fix any issues.
Build an explicit mapping from each acceptance criterion to its implementing task(s):
Criterion: "Users can log in" → Task 3 (POST /api/auth/login)
Criterion: "Invalid credentials show error" → Task 3 (401) + Task 5 (toast)
If any criterion has no task mapping, add a task.
Every task must have all four fields filled with specifics:
name: Verb phrasefiles: Exact pathsaction: Implementation details with function signatures, field names, patternsverify: Runnable shell commandCheck that artifacts created in one task are consumed in another. A function that exists but is never imported is not done.
Every <verify> must be a runnable shell command, not prose.
No task depends on output from a later task.
3-12 tasks total. Fewer = underplanned. More = split the feature.
Each phase is self-contained — no half-finished features mid-phase.
Write .planning/features/{name}/PLAN.md:
---
feature: "{name}"
goal: "[Goal derived from CONTEXT.md]"
---
## Research Notes
[Findings, or "Domain familiar — no research needed"]
## Decisions
- [Decision]: [rationale]
## Must Deliver
- [Outcome statement mapping to acceptance criterion]
## Acceptance Coverage Map
[The mapping from Step 6.1]
---
<task id="1" status="pending">
<name>...</name>
<files>...</files>
<action>...</action>
<verify>...</verify>
</task>
[more tasks...]
## Risk Notes
- [Task N — what could go wrong and what to do]
Update the status field in CONTEXT.md frontmatter to planned.
After writing, display:
## PLAN READY
Feature: {name}
Tasks: [N] [in M phases / flat]
Must Deliver: [N items]
Research: [done / skipped]
[List each task name on its own line, grouped by phase if phased]
Next: /ship:plan-verify
<action>Implement the feature</action>.$ARGUMENTS