Creates an implementation-ready plan for a feature, bug fix, refactor, or chore from a PRD, issue, document, or description using codebase evidence, first-principles reasoning, and conditional root-cause analysis, research, or spikes. Publishes issue-derived plans back to their source issue. Use when the user asks to "plan this feature", "plan this bug fix", "plan issue X", "create an implementation plan", "turn this PRD into a plan", investigate how a change should be built, link related plans, or invokes $prp-plan.
73
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Arguments:
$ARGUMENTS(and$1,$2, ...) refer to the arguments given when this skill was invoked. Take them from the user's request; if absent, infer them from the conversation.
Produce a plan a human can scan and an implementation agent can execute without rediscovering the design. Identify the invariant, find the existing primitives, and choose the smallest solution supported by evidence.
Plan only. Do not implement, commit, or open a PR. A spike is allowed only to settle an architectural hinge; its code remains throwaway under the prp-spike contract.
Input: $ARGUMENTS (if absent, use the conversation).
workflows/update-references.md and stops.publish <existing .plan.md> publishes or refreshes that plan on its recorded source issue, updates Plan Publication, verifies the shared comment, and stops. Do not redesign the plan unless the user asks to revise it.Accept a PRD path, issue reference or URL, another document, free-form text, or conversation context.
For a PRD:
For an issue from GitHub, Jira, Linear, or another tracker:
For every input, establish:
Do not invent personas, business value, or vanity metrics. If the affected user, problem, desired outcome, or meaningful success signal is materially uncertain, stop and recommend clarifying the product intent before architecture turns assumptions into code. Ask the user only when ambiguity changes the product contract or would produce materially different plans.
Read repository guidance and discover the actual project structure. Do not assume src/, a framework, or a validation stack.
Read the project's optional sidecars when they exist: direction.md for product direction and scope, and engineering.md for the standard work is checked against, the engineering-manager sidecar. They live anywhere in the repository: follow the path repository guidance names, or find them by name with git ls-files. Absence is normal; never create them. Product direction bounds what this plan may propose, and a proposal that contradicts it needs the user's decision before it becomes tasks.
For a non-trivial code change, read references/agent-prompts.md, then launch these agents in parallel when capacity permits, or sequentially when it does not. Every listed role remains required:
codebase-explorer to locate relevant files, analogous behavior, tests, configuration, and existing primitives.codebase-analyst to trace the current control flow, data flow, state changes, contracts, and observable behavior.root-cause-analyzer to reproduce the symptom, falsify competing explanations, and prove the causal chain and smallest fix boundary.For a small documentation, configuration, or narrowly localized change, use only the agent or direct inspection needed to remove uncertainty. The planner owns synthesis and must inspect the decisive files itself.
Collect only relevant evidence:
file:line references;Do not preserve a known poor local convention merely because it exists. Fit the architecture while applying repository and global quality guidance.
For a bug, error, regression, stack trace, or unexplained behavior, do not plan from the report's assumed cause. Give the root-cause agent the original symptom and tracker context without a preferred fix, then consume its evidence alongside the explorer and analyst results.
Require a reproducible observation when reasonably possible, a causal chain, rejected alternatives, the smallest responsible fix boundary, and a regression check. If the diagnosis is conditional or unresolved, surface the missing evidence and recommendation at the design gate. Do not disguise an unproven cause as an implementation task.
The planner does not create issues, edit issue bodies, or publish diagnosis through $prp-debug. Its only tracker write is publishing and verifying its completed plan under step 8.
For requests that do not assert broken current behavior, skip this step.
Read references/planning-craft.md and challenge the first plausible design before committing to it.
Apply its foundation and laziness tests to the candidate design. Establish the data shape and owner, the existing or missing primitive, where each decision belongs, what coordination the design avoids, and what can be deleted. Justify any shared state, scaffold, new abstraction, or cross-layer signal by the invariant it protects rather than by hypothetical future need.
Answer:
Prefer the smallest valuable vertical slice: it must deliver or directly unlock the user outcome, not merely create an elegant technical primitive. Reuse proven primitives, keep ownership clear, and avoid speculative flexibility. Simplicity is not fewer plan details; it is fewer moving parts in the proposed system.
External research is conditional. Use web-researcher when current documentation, dependency versions, platform behavior, security guidance, or an unfamiliar tool affects the design. Ask a narrow question tied to the architectural decision and prefer primary sources.
Delegate $prp-spike to a separate agent before finalizing when an uncertain, falsifiable claim materially changes the architecture, especially when:
The planner chooses the question. Use the exact agent-delegation prompt under references/planning-craft.md → Decide when to spike, wait for that agent, then consume its verdict and evidence. Never build the spike in the planner context or copy spike code into the plan as production code.
Before writing the plan, state the recommended approach and its evidence. Stop and ask the user when:
Explain the invariant, discovery, recommendation, and cost of the alternatives. Do not bury a load-bearing decision in the artifact.
Minor uncertainties may remain in the plan only with a recommendation, supporting evidence, and the consequence of choosing differently.
Resolve the canonical store and save the plan to $PRP_DIR/plans/<kebab-case-name>.plan.md:
# --- PRP store resolver (canonical; keep byte-identical across skills) ---
# Adopt the store that already records this root; mint a key only when none does.
_gd="$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null)"
case "$_gd" in */.git) _root="${_gd%/.git}" ;; "") _root="$PWD" ;; *) _root="$_gd" ;; esac
_root="$(cd "$_root" && pwd -P)"
_name="$(basename "$_root" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-' | sed 's/^-*//;s/-*$//')"
_home="${PRP_HOME:-$HOME/.prp}"
_hit="$(grep -lsF "\"path\": \"$_root\"" "$_home"/*/project.json 2>/dev/null | head -1)"
PRP_DIR="${_hit%/project.json}"
[ -n "$PRP_DIR" ] || PRP_DIR="$_home/${_name:-project}-$(printf %s "$_root" | git hash-object --stdin | cut -c1-8)"
mkdir -p "$PRP_DIR"; [ -f "$PRP_DIR/project.json" ] || printf '{"path": "%s", "name": "%s"}\n' "$_root" "${_name:-project}" > "$PRP_DIR/project.json"
mkdir -p "$PRP_DIR/plans"Read templates/plan-template.md and references/task-format.md. Keep its required human-scannable spine; assign a stable plan ID, reusing it when revising the same plan, set the source issue metadata when planning from a tracker, and include conditional sections only when they add information. The source metadata is the store lookup key; do not add a separate plan index that can drift.
Write in plain, concrete language. Use the repository's exact terms, remove filler and formulaic phrasing, and keep one name for each concept throughout the plan.
Use references/visuals.md when either applies:
When existing users, behavior, or stored data can be affected, include one compact Delivery Considerations section covering only what applies: discoverability, compatibility, rollout, migration, observability, reversibility, documentation, or communication.
Tasks describe outcomes in dependency order. Each task identifies its files and integration points, applicable precedent, implementation detail, tests, and focused validation. Acceptance criteria state the observable completed behavior once, and the validation gates prove those criteria. Use commands verified from this repository, not a generic language catalog.
The plan must make incomplete work unacceptable: every requested outcome is covered, and every validation has an owner. If something cannot be completed in this implementation, resolve the scope with the user before presenting the plan as ready.
If the input came from an issue—or publish mode supplied an issue-derived plan—publish the complete rendered plan to that issue through the configured tracker access. Prefix the body with <!-- prp-plan-id: <plan-id> -->, capture its stable comment URL, record that URL as Plan Publication in the local plan, and update the published comment to the same final plan. Read the issue back and verify the complete final plan exists at that URL. Reuse and update the existing marked comment when refreshing the same plan ID rather than creating duplicates. If publication or verification fails, preserve the local plan but report the publication blocker; do not claim the shared handoff is complete.
Before reporting completion, verify:
If the input came from a PRD, invoke $prp-prd-update planned with the PRD path, selected phase, and absolute plan path. Verify that the phase is in-progress and links to the plan.
Read templates/report-format.md and report the recommendation, absolute plan path, source PRD or issue when applicable, evidence or spike used, visuals included, and the next step.
references/planning-craft.md — invariant, primitive, simplicity, spike, and decision-gate reasoningreferences/agent-prompts.md — adaptive prompts for the planner's evidence-gathering agentsreferences/task-format.md — implementation task content and sizingreferences/visuals.md — conditional UX and architecture diagramstemplates/plan-template.md — adaptive plan artifacttemplates/report-format.md — concise user handoffworkflows/update-references.md — bidirectional plan linking mode9724799
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.