用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill plan命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | plan |
| description | >- Use when this capability is needed. |
These rules are absolute. No exceptions. No workarounds.
You do NOT create feature directories, feature READMEs, or update the feature index. EVER.
If the user names a feature that does not exist under docs/features/, STOP and tell them: "The feature '{name}' doesn't exist in the catalog. Please run /feature to create it first, then come back to /plan."
Feature creation belongs to /feature. Not you. Not ever.
Plans go here and ONLY here:
docs/features/{feature}/stories/{YYYY-MM-DD}_{story-name}/plan.md
CORRECT:
docs/features/auth/stories/2026-02-21_add-oauth2/plan.md
WRONG — all of these are WRONG:
docs/features/auth/plan.md
docs/features/auth/stories/plan.md
docs/plans/auth-add-oauth2.md
Format detection: If the user points you at an existing directory under iterations/, use the old monolithic format (backward compatibility). If creating new work, always use stories/.
Each document layer has a done gate. Do not write the file until the gate criteria are met through the interactive process.
docs/features/ exists? If no → STOP, tell user to run /feature/featuredocs/features/{feature}/stories/{YYYY-MM-DD}_{story-name}/?This skill enforces a planning-first discipline for software development. Before any code is written, you walk the developer through an interactive 7-phase discovery process that produces four altitude-layered documents:
| Document | Question | Phase(s) | Mutable? |
|---|---|---|---|
brief.md | WHY are we doing this? | Phase 1 | Immutable after approval |
prd.md | WHAT are we building? | Phases 2 + 6 | Immutable after approval |
design.md | HOW will we build it? | Phases 3-5 | Immutable after approval |
plan.md | WHEN and in what ORDER? | Phase 7 | Immutable after approval |
Each document exists at a different altitude and answers a different question. This separation lets you revisit the business case independently of the technical design, or update scope without re-reading implementation details.
When this skill is invoked:
templates/brief-template.md — business case with RICE scoringtemplates/prd-template.md — product requirements with INVEST checklisttemplates/design-template.md — technical design with assumption mappingtemplates/plan-template.md — implementation roadmaptemplates/questions.md — question bank organized by phase with layer annotationsexamples/example-plan.md — a completed plan showing the expected quality bardocs/features/index.md and list the available features/plan auth add-oauth2), infer feature and story name/research story), use itdocs/features/{feature}/stories/{YYYY-MM-DD}_{story-name}//research story)The skill supports targeted invocations for individual document layers:
/plan # Full 7-phase walk-through → all 4 documents
/plan brief # Phase 1 only → brief.md
/plan prd # Phases 2 + 6 → prd.md
/plan design # Phases 3-5 → design.md
/plan steps # Phase 7 → plan.md
/plan tickets # Create GitHub sub-issues from existing plan.md
/plan review # Reconcile docs vs GitHub ticket state
| Subcommand | Requires | Enforcement |
|---|---|---|
brief | Nothing | Always allowed |
prd | brief.md exists | Advisory warning if missing, proceed anyway |
design | prd.md exists | Advisory warning if missing, proceed anyway |
steps | design.md exists | Hard block — can't create roadmap without knowing the files |
tickets | plan.md exists | Hard block — can't create tickets without steps |
review | plan.md with ticket refs | Advisory — reports what it can find |
Why advisory (not hard) for brief→prd→design: A solo developer may have the business context in their head and just want to jump to the PRD. Hard blocks create friction. The quality checklist at the end catches missing layers.
When a subcommand is used:
/plan tickets separately)The planning process is conversational and interactive — not a form to fill out. You guide the developer through 7 phases, asking probing questions, challenging assumptions, and synthesizing answers into documents at checkpoints.
/feature first.stories/, not iterations/.templates/questions.md for inspiration.Goal: Understand the problem and motivation. Build the business case.
Explore: What problem? Who has it? Current vs desired behavior? Why now? Market context? What does success look like (measurably)? Constraints?
Interactive RICE scoring:
Pre-mortem: "It's 3 months later and this failed. Why?" Require minimum 3 risks with mitigations.
Done gate: Business case is clear, RICE score is calculated, success criteria are measurable, pre-mortem has ≥3 risks with mitigations.
Checkpoint: Write brief.md using templates/brief-template.md.
Goal: Draw a sharp line around what's in and out.
Explore: User stories? Core v1 features? What's explicitly out? Existing patterns to follow or break? Dependencies?
Technique: MoSCoW prioritization (MUST/SHOULD/COULD/WON'T). Push back if everything is a MUST.
INVEST validation: Check each user story against:
Done gate (partial): Every Must-have item has a description. Scope boundaries are explicit.
Checkpoint: Write prd.md first pass (User Stories + Scope sections) using templates/prd-template.md.
Goal: Establish the technical approach.
Explore: High-level architecture? Technologies involved? Key decisions (sync/async, polling/webhooks, etc.)? Integration points? Performance requirements? Data model changes? Auth considerations?
Key Architectural Decisions table: For each decision, document the choice, rationale, AND alternatives considered. This prevents revisiting decisions without context.
Technique: Sketch data flow verbally and confirm.
Output: Technical approach with decisions documented and justified.
Goal: Map architecture to specific files.
Explore: Files to modify? New files to create? Migrations? Config changes? Dependency graph?
File Manifest: New files, modified files, deleted files, config changes — each with purpose.
Technique: Walk through the codebase together. Propose a file list for validation.
Checkpoint: Write design.md (Architecture + File Manifest sections) using templates/design-template.md.
Goal: Systematically identify failure modes.
Probe: Input validation? Network failures? Concurrency/race conditions? Data integrity? Auth edge cases? State transitions? Backward compatibility? Resource limits?
Assumption Mapping table: For each assumption, assess certainty (High/Medium/Low) and impact (High/Medium/Low). High-impact + Low-certainty assumptions should trigger a spike before implementation.
Technique: "What's the worst thing that could happen? What's the second worst?"
Done gate: File manifest covers every change. Data model is complete. Edge cases addressed. High-impact/low-certainty assumptions have actions.
Checkpoint: Append Edge Cases and Assumption Mapping to design.md.
Goal: Define exactly what "done" looks like.
Explore: Acceptance criteria per feature (Given/When/Then)? Unit tests? Feature tests? Browser tests? Manual testing? Performance benchmarks? How to verify edge cases from Phase 5?
Done gate: Every Must-have item has ≥1 acceptance criterion. Testing strategy covers all AC. INVEST checklist passes.
Checkpoint: Append Acceptance Criteria + Testing Strategy + INVEST Checklist to prd.md.
Goal: Break work into ordered, shippable increments.
Explore: Optimal build order? PR/commit boundaries? Parallel vs sequential? Risky unknowns to spike first? Effort estimates (S/M/L)? Validation checkpoints?
Technique: Propose a build order. Find the minimum viable slice.
Done gate: Steps are ordered by dependency. Every file in design.md manifest is covered by a step. Effort estimates provided.
Checkpoint: Write plan.md using templates/plan-template.md. Run quality checklist.
After plan.md is written (either in full mode or via /plan tickets):
# 1. Check if a story ticket exists (from /research story)
# If not, create the story ticket first:
STORY_NUM=$(~/.local/bin/gh issue create \
--repo ABilenduke/content-engine \
--title "Story: {story-name}" \
--label "type:story,priority:{priority},area:{area}" \
--body "$(cat <<'STORYEOF'
## Summary
{one-line from brief.md or prd.md}
## Business Case
{from brief.md or summary}
## Acceptance Criteria
{from prd.md — copy the Given/When/Then criteria}
## Story Docs
- Brief: {path}/brief.md
- PRD: {path}/prd.md
- Design: {path}/design.md
- Plan: {path}/plan.md
STORYEOF
)" --json number --jq '.number')
# 2. Add story ticket to project board
~/.local/bin/gh issue edit $STORY_NUM --add-project "Content Engine"
# 3. Create sub-issues for each plan step
for each step in plan.md:
SUB_ID=$(~/.local/bin/gh api repos/ABilenduke/content-engine/issues \
-X POST \
-f title="Step {N}: {task name}" \
-f "labels[]=type:story" \
-f "labels[]=area:{area}" \
-f body="$(cat <<'SUBEOF'
## Step {N}: {Task Name}
**Files**: {from design.md file manifest}
**Dependencies**: None | Step N
**Estimated effort**: S / M / L
## Description
{from plan.md step description}
## Parent Story
#{story-issue-number}
SUBEOF
)" --jq '.id')
# 4. Add as sub-issue to story ticket
~/.local/bin/gh api repos/ABilenduke/content-engine/issues/$STORY_NUM/sub_issues \
-X POST -F sub_issue_id=$SUB_ID
# 5. Add sub-issue to project board
~/.local/bin/gh issue edit {sub-issue-number} --add-project "Content Engine"
done
Important: The sub_issue_id in the POST request is the issue's internal numeric id (from the id field), NOT the issue number. Create the issue first, get the id, then add as sub-issue.
If the story ticket was already created by /research story, update it:
~/.local/bin/gh issue edit {number} \
--body "$(cat <<'EOF'
## Summary
{updated with prd.md content}
## Acceptance Criteria
{from prd.md}
## Story Docs
- Brief: {path}/brief.md
- PRD: {path}/prd.md
- Design: {path}/design.md
- Plan: {path}/plan.md
EOF
)"
Record the ticket number in plan.md header: **Ticket**: #{issue-number}
/plan review)The /plan review subcommand detects drift between story documents and GitHub ticket state. It reads, reports, and optionally fixes discrepancies.
When to use: Before starting new work on a story, after a long pause, or when the board looks stale.
Source of truth hierarchy: Docs > GitHub. If they diverge, trust the docs.
Phase 1: Extract Ticket References
Read plan.md in the story directory. Extract:
**Ticket**: #{number} from the header**Sub-issue**: #{number} from each stepIf no ticket references are found:
/iterations/ (old format): report "This is an old-format iteration — GitHub tickets are not supported for legacy plans." and stop./stories/ (new format): report "No ticket references found in plan.md. Run /plan tickets to create them." and stop.Phase 2: Query GitHub State
For each referenced ticket, query its current state:
# Get story ticket state
~/.local/bin/gh issue view {story-number} \
--repo ABilenduke/content-engine \
--json number,title,state,labels,projectItems
# Get all sub-issues
~/.local/bin/gh api repos/ABilenduke/content-engine/issues/{story-number}/sub_issues \
--jq '.[] | {number: .number, title: .title, state: .state}'
# Get individual sub-issue details if needed
~/.local/bin/gh issue view {sub-number} \
--repo ABilenduke/content-engine \
--json number,title,state,labels,assignees
Phase 3: Report Discrepancies
Compare docs vs GitHub and produce a report:
## /plan review: {feature} / {story-name}
### Story Ticket: #{number}
- **GitHub state**: open | closed
- **Docs state**: {plan.md Status field}
- **Drift**: None | ⚠️ {description}
### Sub-Issues
| Step | Sub-issue | GitHub State | Plan State | Drift |
|------|-----------|-------------|------------|-------|
| 1 | #{N} | open | described | None |
| 2 | #{N} | closed | described | ⚠️ Closed but plan not marked complete |
| 3 | — | missing | described | ⚠️ No sub-issue for this step |
### Missing from Plan
Sub-issues on GitHub that aren't referenced in plan.md steps.
### Summary
- Total sub-issues: N in plan, M on GitHub
- Aligned: X | Drifted: Y | Missing: Z
Discrepancy types to detect:
Phase 4: Optionally Fix
After presenting the report, ask: "Want me to fix any of these discrepancies?"
Available fixes:
~/.local/bin/gh issue close {number} --repo ABilenduke/content-engine --comment "Closed by /plan review — work completed per journal.md"/plan tickets but only for the missing steps~/.local/bin/gh issue reopen {number} --repo ABilenduke/content-engineDo NOT auto-fix. Always present the report first and let the user decide.
Start EVERY response with:
📋 Planning [{feature} / {story-name}]: Phase N of 7 — [Phase Name]
[██████░░░░░░░░] N/7 complete
For subcommand mode:
📋 Planning [{feature} / {story-name}]: {layer} — [Phase Name]
Before finalizing (full mode runs all; subcommand mode runs relevant subset):
When the user points you at a path under iterations/:
/stories/ → NEW FORMAT: multi-file documents, four altitude layers/iterations/ → OLD FORMAT: monolithic plan.md, single file outputOld format behavior:
plan.md with all 7 sections (Sections 1-7) in one filetemplates/plan-template.md sections formatNew format behavior:
gh CLI/plan steps subcommand (requires design.md to exist).Once all documents are complete and confirmed:
/plan tickets)/execute and point it at this plan."docs/features/index.md with the new storyThis skill has a companion subagent at agents/prd-planner.md. The subagent runs planning in its own context window, keeping the main conversation clean for implementation.
$ARGUMENTS
Converted and distributed by TomeVault — claim your Tome and manage your conversions.