Generates a cross-validated technical plan from spec.md against product spec, presenting it for user approval. Also supports --dry-run for preview without state changes.
How this command is triggered — by the user, by Claude, or both
Slash command
/speckit-product-forge:planThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Product Forge — Phase 5: Technical Plan
You are the **Plan Architect** for Product Forge Phase 5.
Your job: generate a technical plan from `spec.md`, cross-validate it against the
product spec, and present the plan for user approval.
This is a **standalone command** — it does one thing and exits.
The next step is `/speckit.product-forge.tasks` (or any custom step you want to insert first).
## User Input
If `$ARGUMENTS` contains **`--dry-run`**, honor [docs/runtime.md §7](../docs/runtime.md#7-dry-run-semantics):
write `plan.md` (and any ADRs) under `{FEATURE_DIR}/.forge-dry-run/plan/...You are the Plan Architect for Product Forge Phase 5.
Your job: generate a technical plan from spec.md, cross-validate it against the
product spec, and present the plan for user approval.
This is a standalone command — it does one thing and exits.
The next step is /speckit.product-forge.tasks (or any custom step you want to insert first).
$ARGUMENTS
If $ARGUMENTS contains --dry-run, honor docs/runtime.md §7:
write plan.md (and any ADRs) under {FEATURE_DIR}/.forge-dry-run/plan/, do
not update .forge-status.yml, and emit a DRY-RUN-REPORT.md.
Interaction (normative): the approval gate in this phase uses the structured convention in docs/interaction.md (ready snippets in docs/templates/interaction-prompts.md). Present the Gate template — labeled options, recommended first, free-text fallback — rather than a free-form "say approved" prompt.
.forge-status.yml — bridge must be completedspec.md exists in FEATURE_DIRplan.md already exists:
ℹ️
plan.mdalready exists. Regenerating will overwrite it. Confirm to proceed, or run/speckit.product-forge.tasksto continue with the existing plan.
Collect context to pass to the plan agent:
Read the following artifacts to build a rich brief:
product-spec/product-spec.md → Must Have stories, functional requirements, tech constraintsresearch/codebase-analysis.md → integration points, affected modules, naming patternsspec.md → acceptance criteria, technical requirementsPrior lessons (v1.6, W5-D1). Read research/README.md and extract the section
titled exactly "Prior lessons that apply" — the selection research already
scored and rendered there (see research.md Step 2.5 and
docs/lessons-format.md). Do not re-read
.product-forge/lessons.md or re-score here — consume the existing selection only.
research/README.md is absent, or it contains no such section → forward no
lessons and note "No prior lessons forwarded" in the brief. Do not invent any.Show:
🎯 Plan Brief: {Feature Name}
SpecKit spec: {FEATURE_DIR}/spec.md
Product spec: {FEATURE_DIR}/product-spec/
Codebase path: {codebase_path}
Must Have stories to plan: {N}
Integration points: {N} (from codebase-analysis.md)
Key tech constraints:
• {constraint 1 from research}
• {constraint 2 from research}
• {constraint 3 from research}
Prior lessons to respect: {N} (from research/README.md → "Prior lessons that apply"; "none" if absent)
• {lesson title} — {one-line relevance}
Future (W5-D1): lessons may later carry a Kiro-style
applies_to_globsfield to scope which features they bind. If adopted, it MUST ship with a deterministic glob-matcher (match each lesson's globs against the affected module paths already listed inresearch/codebase-analysis.md) — never an LLM "does this seem relevant?" judgment. Until that matcher exists, selection stays tag-based inresearchand is consumed here as-is.
Delegate to SpecKit plan with the enriched context note:
"Product Forge context: This spec is backed by thorough research in
research/. Key integration points and affected modules are inresearch/codebase-analysis.md. User journeys and wireframes are inproduct-spec/. The plan must address all Must Have user stories fromproduct-spec/product-spec.md. After returning the plan, do NOT proceed to tasks or implementation — stop and return control."
If Step 2 forwarded any Prior lessons (v1.6, W5-D1), append them to the context note as explicit constraints the plan must satisfy — not background reading:
"Prior lessons that apply (from
research/README.md) — the plan MUST account for each: {for each forwarded lesson}{title}— {one-line relevance}. Where a lesson implies a guard (e.g. a resilience strategy, a check, a test), reflect it in the plan's design or its risks section."
If no lessons were forwarded, omit this paragraph entirely.
After SpecKit plan returns, automatically verify plan.md against the project constitution.
Locate the constitution file (in priority order):
.product-forge/config.yml → look for constitution_path key.specify/memory/constitution.mdStore resolved path as CONSTITUTION_PATH.
For each section below, mark ✅ / ⚠️ / ❌ based on what's present in plan.md:
Resilience & External Services
Data & Privacy
Testing
EDA (skip if not applicable)
Code Quality
Present results:
⚖️ Constitution Compliance: {Feature Name}
✅ Passed: {N} checks
⚠️ Warnings: {list — present but needs attention}
❌ Violated: {list — must be fixed before approval}
If ❌ violations found: add them as additional rows in the Cross-Validation table (Step 4).
bridge Step 4.6 already authored the FE↔BE contracts — contracts/openapi.yaml
(OpenAPI 3.1, HTTP endpoints) and contracts/asyncapi.yaml (AsyncAPI, events) — each
operation/message carrying a stable API-* id. Planning is the first phase that may
introduce new endpoints or events (e.g., an internal sync call, a derived event) not
foreseen at bridge time. This is a light refinement step, not a re-author:
contracts/openapi.yaml and contracts/asyncapi.yaml (skip silently if the
feature defines no API surface and neither file exists).API-* id. Keep existing API-* ids stable — never renumber or
repurpose an id bridge already minted.API-* ids from the relevant journey steps and the
contracts: column of traceability.yml, matching bridge's convention.api-docs later validates/regenerates against the implementation; this step only keeps
the up-front contract in sync with what the plan actually adds.
Read plan.md and cross-check against product-spec/product-spec.md:
| Check | Status | Notes |
|---|---|---|
| All Must Have user stories addressed in plan? | ✅/⚠️/❌ | List any missing |
| Technical integration matches codebase-analysis findings? | ✅/⚠️/❌ | |
| No unresolved open questions from product-spec? | ✅/⚠️/❌ | |
| Data model / schema aligned with product-spec requirements? | ✅/⚠️/❌ | |
| Non-functional requirements (perf, security) addressed? | ✅/⚠️/❌ | |
| API contracts consistent with product-spec user journeys? | ✅/⚠️/❌ |
If ❌ found: surface exact mismatches, ask user how to resolve before proceeding. If only ✅/⚠️: proceed to approval gate.
Present a summary:
📐 Technical Plan Created: {Feature Name}
Plan sections: {N}
• Architecture / data model
• API contracts: {N} endpoints
• Frontend components: {N}
• Backend services: {N}
• Migrations / schema changes: {N}
Cross-validation (product spec):
✅ {N} checks passed
⚠️ {N} warnings: {list}
❌ {N} issues: {list}
Constitution compliance:
✅ {N} checks passed
⚠️ {N} warnings: {list}
❌ {N} violations: {list}
Story coverage: {N}/{N} Must Have stories addressed
Then present the Gate prompt from interaction-prompts.md:
[Gate] Plan complete — {N}/{N} Must Have stories addressed, cross-validation {N}/{N} passed. How do you want to proceed?
1. Approve (recommended) — accept the plan and continue to tasks
2. Revise — re-run this phase with feedback
3. Skip tasks — move on without it (a reason may be required)
4. Rollback — return to an earlier phase by name
5. Abort — stop the lifecycle for this feature
(or type your own answer)
On Approve → update .forge-status.yml:
phases:
plan: completed
last_updated: "{ISO timestamp}"
On Revise, loop back with the user's feedback. On Rollback/Abort, hand
control back to the orchestrator without marking plan complete.
Before handoff, write {FEATURE_DIR}/plan/digest.md using the template at
docs/templates/phase-digest.md and record
its path on .forge-status.yml under phases.plan.digest_path.
The digest must include:
plan.md and any ADRs created during planning.tasks/implement
inherit them rather than re-discovering them.The orchestrator refuses to mark Phase 5 complete until digest.md exists.
See docs/runtime.md §8.
✅ Plan approved and saved to {FEATURE_DIR}/plan.md
Next step: /speckit.product-forge.tasks
(or insert any custom step before continuing)
Extension point: This is where community commands can be inserted. For example: a cost-estimation step, architecture review, security design check, or any custom validation — before task breakdown begins.
npx claudepluginhub vaiyav/speckit-product-forge --plugin speckit-product-forge/planProduces a step-by-step technical implementation plan from an approved feature spec, identifying files, functions, and data flows without writing code.
/planOrchestrates multi-agent workflow across analysis and design phases to produce requirements, constraints, NFRs, data model, API contracts, and quickstart guide.
/planCreates or updates technical implementation plan from spec.md and constitution, handles Git changes with interactive commit/push prompts, detects user language.
/prp-planGenerates detailed feature implementation plan from description or PRD file path, with codebase analysis, pattern extraction, user story, and complexity assessment.
/planGenerates an implementation plan for a feature by reading its spec, detecting stack (Next.js/Kotlin/etc.), designing architecture/files/tasks, and saving to .planning/plans/<feature>.md.
/planGenerates a detailed feature plan using the compiled layer. Checks for duplicates, identifies reuse, maps files to create/modify, and lists risks. Pauses for human approval before executing.