How-To: Decompose PRDs and Curate the Backlog
This guide explains how to break high-level PRD documents into thin vertical slices and maintain a healthy backlog buffer.
Decomposing a PRD into Vertical Slices
When a PRD is approved in docs/project/product/accepted/, decompose it into vertical slices:
spec-ops prd decompose PRD-0001
This:
- Inspects checkable outcomes and user stories in the PRD.
- Emits granular vertical slice tasks into
docs/project/backlog/proposed/. - Emits an initial architectural spike task (unless
--no-spikeis provided). - Links the newly created tasks in the PRD frontmatter.
Decomposing by Checkable Outcomes (BDD Scenario Slices)
To decompose each discrete outcome under ## Checkable Outcomes into a dedicated BDD user story with an executable Gherkin skeleton:
spec-ops prd decompose PRD-0001 --by-outcomes
This:
- Parses every checkable outcome under
## Checkable Outcomes. - Validates falsifiability heuristics (rejecting subjective or non-falsifiable language with exit code 1).
- Synthesizes a dedicated BDD user story file under
docs/project/user_stories/accepted/us-XXXX-*.mdwith an executable Gherkin skeleton. - Generates implementing vertical slice tasks in
docs/project/backlog/proposed/linked to each story and outcome ID. - Updates
## Linked User Storiesand## Implementing Backlog Tasksin the PRD and appends tasks toPRIORITY.md.
Incremental Delta Scope Evolution (`--diff`)
As product scope evolves over time, running decomposition again must not overwrite active worktrees or destroy git commit provenance:
spec-ops prd decompose PRD-0001 --diff
This:
- Compares current PRD checkable outcomes against existing user stories and backlog tasks.
- Detects newly added outcomes and synthesizes only the targeted delta stories and proposed tasks.
- Preserves existing completed (
docs/project/backlog/complete/) and refined (docs/project/backlog/refined/) tasks byte-identically in git. - Appends newly created delta tasks to
PRIORITY.mdwithout reordering or modifying existing queue entries. - Emits real-time warnings if an outcome was removed but has active pending tasks in
proposed/orrefined/.
Replenishing the Refined Buffer Just-in-Time
To promote unblocked proposed tasks and maintain an optimal ready buffer:
spec-ops curate
Cognitive Inference-Driven Refinement
To critically audit candidate tasks against living repository reality, reconcile architectural drift across superseded ADRs and refactored modules, slice oversized tasks (>500 lines) into thin vertical slices, and synthesize Definition of Ready (DoR) acceptance criteria:
# Preview proposed reconciliations and decompositions without modifying disk state
spec-ops curate --infer --dry-run
# Execute cognitive curation and replenishment
spec-ops curate --infer