SDD 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.md in the same bundle: confirm its explicit approval field and matching
human event in verified; existence alone is insufficient.
- The current
domain.md as product-language and domain evidence; optional project.md only
when it materially informs actors or journeys (omit it from sources otherwise).
- 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; on not_initialized, stop and return next_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_APPLICABLE only 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 to RF-NNN) and SC-NNN (linked to CA-NNN) identifiers;
never renumber, reuse, or silently replace an ID.
- Read
templates/stories.md and 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 begins DRAFT and PENDING; 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_APPLICABLE
disposition: set lifecycle APPROVED (or NOT_APPLICABLE), human_approval: APPROVED, and
append a verified event with the human actor and timestamp. Rejection sets both to
REJECTED, 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.
1---2name: sdd-stories3description: >4 Create, revise, or resolve applicability for SDD Composy user stories (US/SC) from5 an approved PRD and domain evidence, stopping at the human gate. Use after the PRD6 is approved — 'gerar as histórias de usuário', 'cenários de aceite', 'stories for7 prd-SLUG', 'is stories NOT_APPLICABLE here'. Do NOT use before the PRD is8 approved, for the TechSpec, or for user-story writing outside SDD.9metadata:10 source: https://skillmd.com/skills/pwdev-solucoes/sdd-stories11 version: 0.1.012---1314# SDD Stories1516Create, revise, or resolve applicability for `tasks/prd-<slug>/stories.md`: stable `US-NNN`17stories and `SC-NNN` scenarios derived from an approved PRD and domain evidence, stopping at an18explicit human gate. This skill makes no architecture decisions.1920## Inputs2122- A human-approved `prd.md` in the same bundle: confirm its explicit approval field and matching23 human event in `verified`; existence alone is insufficient.24- The current `domain.md` as product-language and domain evidence; optional `project.md` only25 when it materially informs actors or journeys (omit it from `sources` otherwise).26- The configured OKF actor identifier and an ISO 8601 timestamp with explicit UTC offset.2728Stop if the PRD is missing, pending, rejected, stale, or lacks its human approval event.2930## Procedure31321. Run `scripts/sdd_language.py <repo-root>` and use the persisted language for every human-facing33 sentence; on `not_initialized`, stop and return `next_action: run_init` (rules: `references/language.md`).342. Resolve the approved PRD and `tasks/prd-<slug>/stories.md`; read an existing document before35 revising it and preserve identifiers and human-authored content.363. Determine applicability from the approved scope: user-facing behavior and externally consumed37 APIs require stories; recommend `NOT_APPLICABLE` only for pure internal work, with a specific38 justification, and still stop for the explicit human decision.394. For required stories, derive actors, end-to-end journeys, dependencies, and edge cases from40 the approved RF and CA contracts plus domain evidence. Do not add scope or architecture.415. Assign stable `US-NNN` (linked to `RF-NNN`) and `SC-NNN` (linked to `CA-NNN`) identifiers;42 never renumber, reuse, or silently replace an ID.436. Read `templates/stories.md` and render it: keep its frontmatter keys and section headings exactly44 (translate prose only), fill provenance, lifecycle, applicability, approval field, and45 verification events, and record only sources actually consumed. Never write stories from46 memory without the template.477. Write only `tasks/prd-<slug>/stories.md`. A required draft begins `DRAFT` and `PENDING`; a48 proposed exemption includes its justification and stays unresolved until a human decides.498. Present the artifact, trace links, open issues, and applicability recommendation for human50 review. Do not route to TechSpec while the gate is pending.519. Only after a human explicitly approves the exact artifact or its justified `NOT_APPLICABLE`52 disposition: set lifecycle `APPROVED` (or `NOT_APPLICABLE`), `human_approval: APPROVED`, and53 append a `verified` event with the human actor and timestamp. Rejection sets both to54 `REJECTED`, records the human event, and blocks downstream work.5556## Read when5758- `references/stories.md` — writing a new stories document, or an applicability, content, or59 traceability question is not answered above.60- `references/workflow.md` ("Human-contract lifecycle vocabulary") — recording a decision.61- `references/okf.md` — a frontmatter question the template does not answer.6263## Output6465Return the stories path, slug, consumed sources, generated actor and timestamp, applicability and66justification, lifecycle status, human approval value, RF/US and CA/SC trace summary, unresolved67issues, and the next permitted stage; state clearly when downstream generation remains blocked.6869Safety: 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`.