Story Draft Workflow
PRD-first story creation — reads Confluence PRDs, traces ACs to requirements, and flags coverage gaps.
Pipeline
Phase Summary
Hover over any phase name to see what it does in detail.
| # | Phase | Purpose | Key Output |
|---|---|---|---|
| 1 | INTAKE | Accept feature concept or Jira ID, extract Confluence links | INTAKE.md |
| 2 | CONTEXT | Fetch PRD from Confluence, parse into structured requirements | CONTEXT.md + PRD_REQUIREMENTS.md |
| 3 | SPECIFY | Write PRD-traced ACs, scope boundaries, edge cases | SPECIFICATION.md |
| 4 | DECOMPOSE | Break into stories with PRD coverage matrix | DECOMPOSITION.md |
| 5 | VALIDATE_DOR | Run DoR checklist, verify PRD was read if linked | DOR_VALIDATION.md |
| 6 | PUBLISH | Create/update Jira tickets with PRD traceability | PUBLISH.md |
PRD-First Approach
When a Confluence PRD is linked to the ticket (or provided via --prd), the workflow switches from inference-based to requirements-driven:
| Phase | Without PRD | With PRD |
|---|---|---|
| CONTEXT | Reads ticket + codebase only | Fetches Confluence pages, parses into PRD_REQUIREMENTS.md with FR-N, NFR-N IDs |
| SPECIFY | ACs inferred from description | Each AC traces to a requirement ID. Untraced ACs flagged as [ASSUMED] |
| DECOMPOSE | Splits by size only | PRD coverage matrix. Recommends additional stories for uncovered requirements |
| VALIDATE_DOR | Standard DoR checklist | Blocks if PRD linked but never read. Checks coverage ≥50% |
| PUBLISH | Standard PO Specification | Adds PRD Traceability section with source link and coverage summary |
Invocation Modes
Mode A: Enrich Existing
/story-draft DO-2902 — Takes an existing epic or story Jira ID, fetches current ticket data, auto-discovers linked Confluence PRD pages, and enriches with full PO specifications.
Mode B: Create from Scratch
/story-draft "Build a recommendation engine" — Takes a free-text feature concept, researches codebase context, and creates fully specified stories from scratch.
--prd flag
/story-draft DO-3255 --prd https://...atlassian.net/wiki/spaces/DH/pages/5408981093/Einstein+Recommendations
Explicitly provide a Confluence PRD URL. The page is fetched and used as the primary requirements source, even if the ticket description doesn't link to it. Works with both Mode A and Mode B.
What Gets Added to Jira
The PUBLISH phase appends a structured PO Specification section to each Jira ticket description:
--- PO Specification (auto-generated) ---
Acceptance Criteria:
AC1: [title] — Traces to: FR-1
Given [precondition]
When [action]
Then [expected result]
PRD Traceability:
Source PRD: [Confluence page title](url)
Requirements covered: FR-1, FR-3, NFR-1 (6 of 9 total)
Assumed ACs: AC4 (team convention), AC6 (codebase pattern)
Scope:
In scope: [explicit boundaries]
Out of scope: [explicit exclusions]
Dependencies:
Blocked by: [linked tickets]
Blocks: [downstream tickets]
Estimates:
Story points: [estimate]
Feature flag: [flag name if applicable]
Labels:
po-drafted
Signal Flow
| Signal | Type | Meaning |
|---|---|---|
| PHASE_COMPLETE | Advance | Phase done, advance to next |
| BLOCKED_NEEDS_PO | Block | Cannot proceed without Product Owner clarification |
| SCOPE_TOO_LARGE | Block | Story exceeds size threshold, needs further decomposition |
| DOR_FAILED | Loopback | Definition of Ready check failed, loop back to SPECIFY |
| DOR_FAILED_PRD_UNREAD | Loopback | PRD was linked in ticket but never fetched — loop back to CONTEXT to read Confluence pages |
| STORIES_PUBLISHED | Terminal | All stories created/updated in Jira, workflow complete |