design.md: PRD Skill
Contextโ
๐ ADR-0036 mandates a new /sdd:prd skill producing a first-class optional artifact. This document sketches the implementation and wiring surface.
Goals / Non-Goalsโ
Goalsโ
- Author a PRD using the grill-first interrogation pattern.
- Validate EARS-shaped success criteria.
- Enforce status gates via
/sdd:checkand/sdd:audit. - Register PRDs as graph nodes with
governs:edges. - Isolate PRDs into their own qmd collection.
Non-Goalsโ
- Fine-tuning / weight distillation (out of scope for PRD itself; may be future work).
- Non-client-facing PRDs (the optionality rule is enforced by
check/audit, not by the skill gating who can call it).
Decisionsโ
Frontmatter shapeโ
YAML frontmatter per ๐ ADR-0003:
---
title: Short description
id: PRD-0001
status: draft | client-review | approved | shipped
client: Internal | Customer
created: YYYY-MM-DD
updated: YYYY-MM-DD
governs: [ADR-XXXX, SPEC-YYYY]
related: [ADR-ZZZZ]
---
adrs: is NOT accepted โ kept to the SPEC-0018 vocabulary. Unknown fields are silently dropped by graph.py (pre-existing behavior).
Template outlineโ
The PRD template (to be placed in references/prd-template.md) mirrors the contributor's structure:
- Problem / opportunity
- User stories
- Scope (in/out)
- Success criteria (EARS)
- Blast radius / touch points
- Clarification log (grill rounds)
- Open questions (blocks
approveduntil resolved or waived) - Decision log (links to ADRs)
Enforcement locationsโ
scripts/check-structure.shโ structural checks only (existing function).skills/graph/lib/graph.pyโ_scan_prds()and_extract_prd_id(), node typeprd, edge fieldsgoverns/related.skills/audit/SKILL.mdโ orchestration layer, calls gate validation functions.skills/check/SKILL.mdโ quick-check, validates PRD frontmatter and EARS shape.
Skill outline for /sdd:prdโ
Mirrors /sdd:adr structure:
- Resolve PRD directory per Artifact Path Resolution.
- Determine the next PRD number (scan-highest-and-increment).
- Run grill-first interrogation per
shared-patterns.mdยง "Grill-First Interrogation Pattern". - qmd-aware edge pre-search (find related ADRs/specs to cite as
governs:). - Draft frontmatter and body.
- Write file.
Graph integrationโ
Add _scan_prds (parallel to _scan_adrs/_scan_specs in graph.py). Glob docs/prds/PRD-*.md. Extract ID via regex. Parse frontmatter; harvest governs / related. Add to nodes with type prd. Status field is respected by orphans (shipped PRD with no spec = orphan; draft PRD = not).
Index integrationโ
/sdd:index reads the plugin's collections: setting (๐ ADR-0023) โ if PRDs exist, ensure a \{repo\}-prds collection with mask PRD-dir-based. Never overlap with specs collection mask.
Risks / Trade-offsโ
- Surface area: a new artifact type adds skill, graph, and index wiring; cost amortized over client-facing work.
- Optionality drift: if
auditdoes not enforce the optionality rule strictly, future auditors may start flagging pure engineering ADRs. The rule is explicit in audit checks.
Migration Planโ
None for existing repos; PRDs are opt-in. A repo adding the first PRD creates the directory and qmd collection ad hoc.
Open Questionsโ
None (resolved by ๐ ADR-0036).
Related Artifactsโ
Direct relationships declared in YAML frontmatter (per ADR-0023 / SPEC-0018). Run /sdd:graph chain SPEC-0037 for the transitive view.