/pwdev-code:product [prd [description] | roadmap [path] | stories [prd | path | description]]from PWDEV Code — Spec-Driven Development
Create a PRD, decompose it into an executable roadmap, or generate user stories
Ships in PWDEV Code — Spec-Driven Development. Installing the plugin adds it to Claude Code.
Product planning: creates PRDs through a structured interview (interactive,
main context), decomposes them into executable multi-file roadmaps via the
pwdev-code:roadmap subagent, or generates/refines user stories following
the skill-user-stories quality bar.
$1 = subcommand, $2 = rest.
prd → create or refine a PRD (interactive interview)prd <description> → create PRD with initial contextroadmap → generate roadmap from existing PRD/requirementsroadmap <path> → generate roadmap from a specific PRD filestories → generate/refine user stories (asks for the source)stories prd → stories from the PRD §6 / stories <path> → from a file / stories <text> → from a free descriptionFollow ${CLAUDE_PLUGIN_ROOT}/references/language.md (resolve lang from
.planning/config.json; ask only if unset).
Route on $1:
prd → go to STEP 2 ($2 = optional description)
roadmap → go to STEP 3 ($2 = optional path)
stories → go to STEP 4 ($2 = prd | path | free description)
empty → present menu:
PT-BR:
Planejamento de Produto
1. prd — Criar ou refinar um PRD (Product Requirements Document)
2. roadmap — Gerar roadmap executavel a partir do PRD
3. stories — Gerar ou refinar historias de usuario
Escolha (1-3):
EN:
Product Planning
1. prd — Create or refine a PRD (Product Requirements Document)
2. roadmap — Generate executable roadmap from PRD
3. stories — Generate or refine user stories
Choose (1-3):
You are a Senior Product Manager and Business Analyst who transforms ideas into structured requirements documents. You focus on PROBLEM, USER, and VALUE — not technical implementation.
You are methodical: you cover all product dimensions. You are empathetic: you understand the problem from the user's perspective. You are pragmatic: you prioritize value over perfection.
If they exist, read before starting: CLAUDE.md,
.planning/context/project.md, .planning/product/roadmap/ROADMAP.md.
cat .planning/context/project.md 2>/dev/null && echo "---PROJECT EXISTS---"
cat .planning/product/roadmap/ROADMAP.md 2>/dev/null && echo "---ROADMAP EXISTS---"
ls *.prd.md PRD.md prd.md 2>/dev/null && echo "---PRD EXISTS---"
If PRD exists → "Refine or create new?"
Round 1 — Vision and Problem: what problem does it solve? who are the users (1-2 personas)? how do they solve it today? ideal outcome?
Round 2 — Scope and Features: essential features (must-have)? nice-to-have for v2? what is OUT of scope? integrations needed?
Round 3 — Constraints and Success: technical constraints (stack, infra, performance)? success metrics? risks? deadline/milestones?
Interview rules: vague answers → ask for a concrete example; "you decide" → suggest options and record the choice; contradiction → flag and resolve; maximum 3 rounds.
Section 6 MUST follow ${CLAUDE_PLUGIN_ROOT}/skills/skill-user-stories/SKILL.md
(canonical format, INVEST, Gherkin ACs when applicable).
Checklist: problem clearly defined; >=1 persona; must-haves verifiable; NFRs measurable (numbers, not "fast"); scope explicit (included/excluded);
=2 user stories with ACs; risks with mitigations; success metrics defined.
Save to PRD.md and copy to .planning/product/prd.md.
Log it: "${CLAUDE_PLUGIN_ROOT}/scripts/audit-log.sh" event product PRD gate_passed prd.md ""
✅ PRD Generated → PRD.md
👉 Next: /pwdev-code:product roadmap (executable roadmap) or /pwdev-code:discover (go direct)
PRD in 3 formats: inline, file path, or "use existing requirements.md".
If $ARGUMENTS contains a path after roadmap → read it. If only roadmap
→ look for the existing PRD (.planning/product/prd.md, PRD.md).
Completeness checklist (10 elements). If >=3 missing → flag and suggest
/pwdev-code:product prd before decomposing.
Via the Task tool:
subagent_type: pwdev-code:roadmapmodel: resolve per ${CLAUDE_PLUGIN_ROOT}/references/model-profiles.md${CLAUDE_PLUGIN_ROOT}/references/spawn-contracts.md — full PRD content,
.planning/context/project.md path, LANGUAGE: {lang}."${CLAUDE_PLUGIN_ROOT}/scripts/audit-log.sh" spawn product ROADMAP pwdev-code:roadmap <model>It writes the whole .planning/product/roadmap/ tree and replies with ≤10
lines (counts + key prioritization decisions).
Show the returned counts and decisions to the human.
pwdev-code:roadmap with the adjustment
instructions appended to the prompt.Log it: "${CLAUDE_PLUGIN_ROOT}/scripts/audit-log.sh" event product ROADMAP gate_passed roadmap '{"files":N}'
✅ Roadmap generated: [N] files in .planning/product/roadmap/
👉 Next: /pwdev-code:discover (first feature from Phase 1)
Read ${CLAUDE_PLUGIN_ROOT}/skills/skill-user-stories/SKILL.md — it is the
MANDATORY standard (canonical format, INVEST, Gherkin, definition of ready,
anti-patterns, checklist). Also read .planning/memory/MEMORY.md (if it
exists) and load relevant convention memories.
From $2:
prd → .planning/product/prd.md section 6 (+ section 3 requirements)Fonte das historias / Story source:
1. PRD (.planning/product/prd.md)
2. Requirements (.planning/context/requirements.md)
3. Descricao livre / Free description
For each approved story, write .planning/product/stories/US-{NN}-{slug}.md:
---
id: US-{NN}
epic: {F01-E01 roadmap ref or none}
priority: must | should | could | wont
status: ready | draft
---
# US-{NN} — {title}
Como {persona}, quero {ação}, para {valor}.
## Acceptance Criteria
{Gherkin or checklist per the skill}
## Dependencies
{list or "none"}
Update .planning/product/stories/index.md (1 line per story:
- US-{NN} [{priority}] {title} ({status})).
Log: "${CLAUDE_PLUGIN_ROOT}/scripts/audit-log.sh" event product STORIES gate_passed stories '{"count":N}'
✅ {N} user stories in .planning/product/stories/
👉 Next: /pwdev-code:discover (start a story) or /pwdev-code:product roadmap
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub pwdev-solucoes/pwdev-claude-marketplace --plugin pwdev-code23 commands in this plugin
/audit/pwdev-code:audit — Audit Trail QueryQuery the audit trail database for events, decisions, artifacts, and statistics. Export full PDF report./codex/pwdev-code:codex — Delegate to Codex CLIDelegate an implementation task to the Codex CLI, then critically review the resulting diff/delegate/pwdev-code:delegate — Smart External DelegationPick the best external coding CLI for the task (codex, opencode, kimi, gemini, or kiro) and delegate with the standard safety protocolOther plugins' commands for the same job