specs-from-prd¶
Plugin: core-standards
Category: Other
Command: /specs-from-prd
/vt-c-specs-from-prd — Generate Specs from PRD¶
Break down a PRD into implementation-sized specs for development. Produces spec files that feed directly into
/vt-c-activate→/vt-c-2-plan→/vt-c-3-build.
When to Use¶
- You have a completed PRD and want to generate implementation specs
- You are transitioning from product design to development
- You need to break a PRD's feature table into governed, dependency-ordered specs
Invocation¶
/vt-c-specs-from-prd # Uses default: 03-PRD/PRD.md
/vt-c-specs-from-prd path/to/PRD.md # Explicit PRD path
Workflow Position¶
/vt-c-pd-2-prd → /vt-c-pd-3-prototype → /vt-c-pd-4-validate → /vt-c-pd-6-handoff
↓
/vt-c-specs-from-prd ← YOU ARE HERE
↓
/vt-c-activate → /vt-c-2-plan → ...
For single specs from informal requirements (no PRD), use /vt-c-spec-from-requirements instead.
Execution Instructions¶
Step 0: Context Detection¶
-
Detect project name from the nearest
CLAUDE.md,package.json,.repo-manifest.yaml, or directory name. -
Locate specs directory using this search order: a. Read
.design-state.yaml— usespecs_directoryfield if present b. Check for existingspecs/directory c. Check for05-specs/,05-specs/,docs/specs/,specs/d. If nothing found, default tospecs/(will create in Step 5) -
Read
.design-state.yamlif it exists. Extract all existing SPEC IDs from thespecs_statuskeys. -
Scan existing spec files — glob for
specs/*/spec.md. Read frontmatterid:fields. -
Compute next available SPEC ID:
- Collect all IDs from
.design-state.yamlkeys AND spec file frontmatter - Parse numeric part from both
SPEC-NNNandspec-Npatterns - Next ID = max across all sources + 1
- Format as
SPEC-0NN(zero-padded to 3 digits)
Step 1: Read PRD and PID¶
- Read the PRD at the given path (default:
03-PRD/PRD.md) - If the file does not exist, ask the user for the correct path via AskUserQuestion
-
If the PRD has no feature table (Section 4 or similar), warn and ask the user to identify features
-
Read the PID if it exists (default:
03-PRD/PID.md) for tech stack constraints -
PID is optional — proceed without it if not found
-
Check for prototype — if
04-prototyp/exists, note it for prototype references in specs
Step 2: Analyze Features¶
- Extract all features from the PRD's feature table (typically Section 4: Feature Overview)
- For each feature, extract:
- Feature name and description
- Priority (P0/P1/P2)
- User stories and acceptance criteria
- Technical requirements from PID constraints
-
Dependencies between features
-
Display extraction summary:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ PRD Feature Extraction ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ PRD: [path] PID: [path or "not found"] Prototype: [path or "not found"] Features found: N | # | Feature | Priority | Dependencies | |---|---------|----------|--------------| | 1 | [name] | P0 | — | | 2 | [name] | P1 | Feature 1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -
Confirm with user via AskUserQuestion:
- Looks good — proceed to generate specs
- Adjust — user modifies feature list, priorities, or dependencies
- Cancel — exit without creating files
Step 3: Generate Project Setup Spec¶
Create specs/0-project-setup/spec.md with:
- Shared infrastructure requirements (CI/CD, linting, testing setup)
- Tech stack from PID
- Environment setup
- Design token / CD integration if applicable
YAML frontmatter:
---
id: SPEC-NNN
title: Project Setup
priority: P0
status: draft
dependencies: []
parent_prd: [relative path to PRD]
deliverable_types: [code]
---
Step 4: Generate Feature Specs¶
For each PRD feature, create specs/[N]-feature-name/spec.md with:
YAML frontmatter:
---
id: SPEC-NNN
title: [Feature Name]
priority: P0|P1|P2
status: draft
dependencies: [SPEC-NNN]
parent_prd: [relative path to PRD]
deliverable_types: [code]
---
Body sections (same structure as /vt-c-spec-from-requirements output):
1. # SPEC-NNN: [Title]
2. ## Problem — from PRD problem statement, scoped to this feature
3. ## Goal — from PRD feature description
4. ## User Stories — from PRD, with Given/When/Then acceptance criteria
5. ## Functional Requirements — table extracted from PRD
6. ## Visual Reference — prototype screenshots/paths if 04-prototyp/ exists
7. ## Non-Functional Requirements — from PID constraints
8. ## Edge Cases — identified from PRD and domain analysis
9. ## Scope — In Scope / Out of Scope for this specific feature
10. ## Dependencies — mapped to other generated SPEC IDs
11. ## Success Criteria — measurable outcomes
Rules: - Never use placeholder text ("TBD", "TODO", "N/A") - Omit sections with no content rather than using empty sections - Map inter-feature dependencies to actual SPEC IDs
Step 5: Register and Write Files¶
For each generated spec (project setup + features):
- Create spec directory:
specs/[N]-kebab-title/ - Write spec file:
specs/[N]-kebab-title/spec.md - Write state file:
specs/[N]-kebab-title/state.yamlIfdocs/user-manual/mkdocs.ymlexists, also add adocs_pagemapping: where[feature-slug]is the kebab-case feature name matching the page generated by/vt-c-user-manual-generate. - Update
.design-state.yaml: Add each spec tospecs_status:
If .design-state.yaml does not exist, create it with current_phase: development and specs_directory: specs/.
Step 5.5: Close Related Proposals¶
After all specs are generated, scan intake/pending/ for proposals that may have led to this PRD or its features:
- Search
intake/pending/from-research/andintake/pending/from-projects/for.mdfiles containing the PRD filename or any of the generated spec titles - For each match, display: Use AskUserQuestion:
- Move to processed — update
toolkit_proposal_status: spec-created, move tointake/processed/ - Skip — leave in pending (may be unrelated)
- If no matches found: skip silently
Step 6: Completion Summary¶
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Specs Generated from PRD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PRD: [path]
Generated: N specs
| ID | Feature | Priority | Dependencies |
|---|---|---|---|
| SPEC-NNN | Project Setup | P0 | — |
| SPEC-NNN | [Feature 1] | P0 | SPEC-NNN |
| SPEC-NNN | [Feature 2] | P1 | SPEC-NNN |
Files written:
specs/[N]-project-setup/spec.md + state.yaml
specs/[N]-feature-1/spec.md + state.yaml
specs/[N]-feature-2/spec.md + state.yaml
.design-state.yaml (updated)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NEXT STEPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. /vt-c-activate View spec dashboard and select first spec
2. /vt-c-activate SPEC-NNN Activate a specific spec for development
3. /vt-c-2-plan Create implementation plan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Edge Cases¶
| ID | Scenario | Handling |
|---|---|---|
| EC-1 | PRD has no feature table | Ask user to identify features interactively |
| EC-2 | PID does not exist | Proceed without tech stack constraints |
| EC-3 | SPEC ID collision | Increment until free ID found |
| EC-4 | No .design-state.yaml |
Create it with default structure |
| EC-5 | No specs/ directory |
Create it |
| EC-6 | User cancels after extraction | Exit without writing files |
Integration Points¶
| Skill | Relationship |
|---|---|
/vt-c-spec-from-requirements |
Creates single specs from informal input (complementary) |
/vt-c-activate |
Activates specs created by this skill |
/vt-c-pd-6-handoff |
Precedes this skill in the product design workflow |
/vt-c-2-plan |
Follows activation of specs created by this skill |