sdd-stories
Create, revise, or resolve applicability for SDD Composy user stories (US/SC) from an approved PRD and domain evidence, stopping at the human gate. Use after the PRD is approved — 'gerar as histórias
Files2
View on GitHubSKILL.mdplugins/sdd-composy/skills/sdd-stories/SKILL.md
GitHubSDD Stories
Create, revise, or resolve applicability for tasks/prd-<slug>/stories.md: stable US-NNN
stories and SC-NNN scenarios derived from an approved PRD and domain evidence, stopping at an
explicit human gate. This skill makes no architecture decisions.
Inputs
- A human-approved
prd.mdin the same bundle: confirm its explicit approval field and matching human event inverified; existence alone is insufficient. - The current
domain.mdas product-language and domain evidence; optionalproject.mdonly when it materially informs actors or journeys (omit it fromsourcesotherwise). - The configured OKF actor identifier and an ISO 8601 timestamp with explicit UTC offset.
Stop if the PRD is missing, pending, rejected, stale, or lacks its human approval event.
Procedure
- Run
scripts/sdd_language.py <repo-root>and use the persisted language for every human-facing sentence; onnot_initialized, stop and returnnext_action: run_init(rules:references/language.md). - Resolve the approved PRD and
tasks/prd-<slug>/stories.md; read an existing document before revising it and preserve identifiers and human-authored content. - Determine applicability from the approved scope: user-facing behavior and externally consumed
APIs require stories; recommend
NOT_APPLICABLEonly for pure internal work, with a specific justification, and still stop for the explicit human decision. - For required stories, derive actors, end-to-end journeys, dependencies, and edge cases from the approved RF and CA contracts plus domain evidence. Do not add scope or architecture.
- Assign stable
US-NNN(linked toRF-NNN) andSC-NNN(linked toCA-NNN) identifiers; never renumber, reuse, or silently replace an ID. - Read
templates/stories.mdand render it: keep its frontmatter keys and section headings exactly (translate prose only), fill provenance, lifecycle, applicability, approval field, and verification events, and record only sources actually consumed. Never write stories from memory without the template. - Write only
tasks/prd-<slug>/stories.md. A required draft beginsDRAFTandPENDING; a proposed exemption includes its justification and stays unresolved until a human decides. - Present the artifact, trace links, open issues, and applicability recommendation for human review. Do not route to TechSpec while the gate is pending.
- Only after a human explicitly approves the exact artifact or its justified
NOT_APPLICABLEdisposition: set lifecycleAPPROVED(orNOT_APPLICABLE),human_approval: APPROVED, and append averifiedevent with the human actor and timestamp. Rejection sets both toREJECTED, records the human event, and blocks downstream work.
Read when
references/stories.md— writing a new stories document, or an applicability, content, or traceability question is not answered above.references/workflow.md("Human-contract lifecycle vocabulary") — recording a decision.references/okf.md— a frontmatter question the template does not answer.
Output
Return the stories path, slug, consumed sources, generated actor and timestamp, applicability and justification, lifecycle status, human approval value, RF/US and CA/SC trace summary, unresolved issues, and the next permitted stage; state clearly when downstream generation remains blocked.
Safety: Do not commit, push, or publish. Do not read or expose .env, credentials, tokens, private keys, certificates, or fleet environment files. Full contract: references/safety.md.