From prp-core
Creates feature implementation plans with codebase analysis and research. Also wires bidirectional back/forward references between existing plans.
How this skill is triggered — by the user, by Claude, or both
Slash command
/prp-core:prp-plan <feature description | path/to/prd.md> | update-references <plan-path> <related-plan-path> [back|forward]<feature description | path/to/prd.md> | update-references <plan-path> <related-plan-path> [back|forward]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<objective>
Core Principle: PLAN ONLY - no code written. Create a context-rich document that enables one-pass implementation success.
Execution Order: CODEBASE FIRST, RESEARCH SECOND. Solutions must fit existing patterns before introducing new ones.
Agent Strategy: Use specialized agents for intelligence gathering:
prp-core:codebase-explorer — finds WHERE code lives and extracts implementation patternsprp-core:codebase-analyst — analyzes HOW integration points work and traces data flowprp-core:web-researcher — strategic web research with citations and gap analysisLaunch codebase agents in parallel first, then research agent second.
CLAUDE.md rules: @CLAUDE.mdDirectory Discovery (run these to understand project structure):
ls -lals -la */ 2>/dev/null | head -50IMPORTANT: Do NOT assume src/ exists. Common alternatives include:
app/ (Next.js, Rails, Laravel)lib/ (Ruby gems, Elixir)packages/ (monorepos)cmd/, internal/, pkg/ (Go)Discover the actual structure before proceeding.
Before planning, check intent:
update-references <plan> <related> [back|forward]). → Follow workflows/update-references.md and stop. Do NOT run the planning phases below.Determine input type:
| Input Pattern | Type | Action |
|---|---|---|
Ends with .prd.md | PRD file | Parse PRD, select next phase |
Ends with .md and contains "Implementation Phases" | PRD file | Parse PRD, select next phase |
| File path that exists | Document | Read and extract feature description |
| Free-form text | Description | Use directly as feature input |
| Empty/blank | Conversation | Use conversation context as input |
Read the PRD file
Parse the Implementation Phases table - find rows with Status: pending
Check dependencies - only select phases whose dependencies are complete
Select the next actionable phase:
Extract phase context:
PHASE: {phase number and name}
GOAL: {from phase details}
SCOPE: {from phase details}
SUCCESS SIGNAL: {from phase details}
PRD CONTEXT: {problem statement, user, hypothesis from PRD}
Report selection to user:
PRD: {prd file path}
Selected Phase: #{number} - {name}
{If parallel phases available:}
Note: Phase {X} can also run in parallel (in separate worktree).
Proceeding with Phase #{number}...
PHASE_0_CHECKPOINT:
EXTRACT from input:
FORMULATE user story:
As a <user type>
I want to <action/goal>
So that <benefit/value>
PHASE_1_CHECKPOINT:
GATE: If requirements are AMBIGUOUS → STOP and ASK user for clarification before proceeding.
CRITICAL: Launch two specialized agents in parallel using multiple Task tool calls in a single message. Read references/agent-prompts.md now (mandatory) — it is the exact prompt text for every subagent launch in Phases 2, 3, and 5.
prp-core:codebase-explorer — finds WHERE code lives and extracts implementation patterns. Launch with the Phase 2 codebase-explorer prompt.prp-core:codebase-analyst — analyzes HOW integration points work and traces data flow. Launch with the Phase 2 codebase-analyst prompt.Combine findings from both agents into a unified discovery table:
| Category | File:Lines | Pattern Description | Code Snippet |
|---|---|---|---|
| NAMING | src/features/X/service.ts:10-15 | camelCase functions | export function createThing() |
| ERRORS | src/features/X/errors.ts:5-20 | Custom error classes | class ThingNotFoundError |
| LOGGING | src/core/logging/index.ts:1-10 | getLogger pattern | const logger = getLogger("domain") |
| TESTS | src/features/X/tests/service.test.ts:1-30 | describe/it blocks | describe("service", () => { |
| TYPES | src/features/X/models.ts:1-20 | Drizzle inference | type Thing = typeof things.$inferSelect |
| FLOW | src/features/X/service.ts:40-60 | Data transformation | input → validate → persist → respond |
PHASE_2_CHECKPOINT:
prp-core:codebase-explorer and prp-core:codebase-analyst) launched in parallel and completedONLY AFTER Phase 2 is complete - solutions must fit existing codebase patterns first.
Launch prp-core:web-researcher with the Phase 3 web-researcher prompt from references/agent-prompts.md, filling in the feature description and the dependency versions found in Phase 2.
FORMAT the agent's findings into plan references:
- [Library Docs v{version}](https://url#specific-section)
- KEY_INSIGHT: {what we learned that affects implementation}
- APPLIES_TO: {which task/file this affects}
- GOTCHA: {potential pitfall and how to avoid}
PHASE_3_CHECKPOINT:
prp-core:web-researcher agent launched and completedCREATE ASCII diagrams showing user experience before and after, then DOCUMENT interaction changes. Read templates/ux-diagram-format.md now (mandatory) — it is the exact BEFORE/AFTER diagram shape and interaction-changes table to produce.
PHASE_4_CHECKPOINT:
For complex features with multiple integration points, use prp-core:codebase-analyst to trace how existing architecture works at the integration points identified in Phase 2 — launch with the Phase 5 architecture deep-dive prompt from references/agent-prompts.md.
Then ANALYZE deeply (use extended thinking if needed):
DECIDE and document:
APPROACH_CHOSEN: [description]
RATIONALE: [why this over alternatives - reference codebase patterns]
ALTERNATIVES_REJECTED:
- [Alternative 1]: Rejected because [specific reason]
- [Alternative 2]: Rejected because [specific reason]
NOT_BUILDING (explicit scope limits):
- [Item 1 - explicitly out of scope and why]
- [Item 2 - explicitly out of scope and why]
PHASE_5_CHECKPOINT:
OUTPUT_PATH: .claude/PRPs/plans/{kebab-case-feature-name}.plan.md
Create directory if needed: mkdir -p .claude/PRPs/plans
PLAN_STRUCTURE: Read templates/plan-template.md now (mandatory) — it is the exact plan document to fill and save. Keep every section heading; fill every {placeholder} with real, project-specific content (the template's remaining snippets and table entries are illustrative examples from one TypeScript project, not content to keep). Before writing the plan's Step-by-Step Tasks section, read references/task-block-format.md (mandatory) for the task-block field detail and worked examples; before filling its Validation Commands section, read references/validation-commands.md (mandatory) for the per-language commands to embed.
If input was from PRD file, also update the PRD:
Update phase status in the Implementation Phases table:
pending to in-progressEdit the PRD file with these changes
REPORT_TO_USER (display after creating plan): Read templates/report-format.md now (mandatory) and display the "Plan Created" report in exactly that structure.
CONTEXT_COMPLETENESS:
prp-core:codebase-explorer and prp-core:codebase-analyst documented with file:line referencesIMPLEMENTATION_READINESS:
PATTERN_FAITHFULNESS:
VALIDATION_COVERAGE:
UX_CLARITY:
NO_PRIOR_KNOWLEDGE_TEST: Could an agent unfamiliar with this codebase implement using ONLY the plan?
<success_criteria>
CONTEXT_COMPLETE: All patterns, gotchas, integration points documented from actual codebase via prp-core:codebase-explorer and prp-core:codebase-analyst agents
IMPLEMENTATION_READY: Tasks executable top-to-bottom without questions, research, or clarification
PATTERN_FAITHFUL: Every new file mirrors existing codebase style exactly
VALIDATION_DEFINED: Every task has executable verification command
UX_DOCUMENTED: Before/After transformation is visually clear with data flows
ONE_PASS_TARGET: Confidence score 8+ indicates high likelihood of first-attempt success
</success_criteria>
references/agent-prompts.md — exact subagent prompts for Phases 2, 3, and 5 (mandatory read at Phase 2)templates/plan-template.md — the plan document to fill and save (mandatory read in Phase 6)templates/ux-diagram-format.md — the BEFORE/AFTER ASCII diagram shape and interaction-changes table (mandatory read in Phase 4)templates/report-format.md — the "Plan Created" report displayed to the user (mandatory read in Output)references/task-block-format.md — task-block field detail and worked examples (mandatory read in Phase 6, before writing Step-by-Step Tasks)references/validation-commands.md — per-language validation command catalog (mandatory read in Phase 6, before filling Validation Commands)workflows/update-references.md — the update-references mode (read only when Mode Select routes there)npx claudepluginhub wirasm/prps-agentic-eng --plugin prp-coreCreates a technical implementation plan from a PRD by researching codebase architecture, tracing data flows, and identifying patterns. Useful for scoping new features with YAGNI/SOLID principles.
Creates detailed implementation plans through interactive, iterative collaboration. Use when planning features, refactoring, or tasks with research and multi-agent analysis.
Creates specs and phased file-level implementation plans for features, bugs, refactors by researching codebase with search, graph queries, and context files.