src/skills/x-internal-create-story-from-feature/SKILL.md
Generates Story artifacts from an existing Feature markdown with feature linkage and RNFs. Internal skill invoked by x-create-feature Stage 3.
npx skillsauth add edercnj/ia-dev-environment x-internal-create-story-from-featureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
🔒 INTERNAL SKILL — Invocada apenas por outras skills via Skill tool. Não é invocável pelo usuário diretamente. Ponto de entrada:
x-create-feature(Stage 3, pós-aprovação) ex-add-story-to-feature.
Generate 1-N Story markdown artifacts from an existing Feature artifact, linked to a target feature via --feature-id. This internal Product-First wrapper materializes only the Feature → Story step, preserving sourceFeature and deriving all 9 mandatory sections — including Persona & Cenário (§2), AC Gherkin (§4), and Decision Rationale (§8) — from the Feature source. These sections are never omitted: x-refine-story validates them as required dimensions and will reject the story if any is absent.
Nota: Esta skill possui escopo restrito — materializa apenas o passo Feature → Story, diferente de
x-internal-create-story(gerador genérico). Não é um alias legado.
Fluxo obrigatório: Esta skill é invocada automaticamente por
x-create-feature(Stage 3) após aprovação do refinamento da feature, ou porx-add-story-to-featurepara adições pós-refinamento. Não deve ser invocada manualmente pelo usuário.
x-create-feature Stage 3 when verdict == "approved" AND --from-feature is availablex-add-story-to-feature when adding new stories to an already-refined featureRead before starting:
src/templates/_TEMPLATE-STORY.mdsrc/knowledge/shared/governance-baselines/planning-standards-ra9/knowledge.md — knowledge pack planning-standards-ra9, mandatory RA9 source of truthsrc/skills/x-add-story-to-feature/references/full-protocol.md §Story Creation Procedure (gerador de story genérico inline)If the feature source cannot be resolved, stop with a validation error.
--from-feature:
.aikittools/**.--feature-id (FEATURE-NNNN or NNNN → NNNN).--capability-file and --product-file for RNF inheritance.story-<ID>-0001 — carrying the shared scaffolding
(project/package structure, framework bootstrap, common configs, base test infra). It is a DAG root
(no Blocked By); every subsequent story declares story-<ID>-0001 in ## 7 (Dependências →
Blocked By), directly or transitively. Foundation value uses the Layer-0 enablement format (state
which stories it unblocks). See decomposition-guide §Layer 0..aikittools/features/feature-<ID>-<slug>/story-<ID>-<NNNN>.md (numbering starts at 0001 =
foundation, then 0002, 0003, … in dependency order).Feature ID, Source Feature, Source Feature Link## 1 (Visão), ## 3 (Entrega de Valor), ## 5 (Contratos), ## 6 (Tasks), ## 7 (Dependências), ## 9 (Refinement Verdict — TBD)## 2 (Persona & Cenário): derive from the Feature's target users. x-refine-story
dimension persona requires a specific role (not "sistema"). Never omit.## 4 (AC — Gherkin): derive from the Feature's use case scenarios; all 4 mandatory
Gherkin categories required (Degenerate, Happy, Error/Boundary, Performance/SLA + Security).
x-refine-story will reject if any category is absent. Never omit.## 8 (Decision Rationale): derive key design decision and discarded alternative from
the Feature's alternatives. x-refine-story dimension alternatives checks this section.
Never omit.| Parameter | Required | Description |
| :--- | :--- | :--- |
| --from-feature <feature-file\|feature-id> | Yes | Feature markdown source |
| --feature-id <FEATURE-NNNN\|NNNN> | Yes | Feature identifier to link generated stories |
| --capability-file <path> | No | Capability markdown used to enrich inherited RNFs |
| --product-file <path> | No | Product markdown used to extend inherited RNFs |
| --output-dir <path> | No | Base output dir (default .aikittools/features) |
| --dry-run | No | Validate inputs without writing files |
| --no-commit | No | Skip commit (caller owns commit boundary) |
x-create-feature (Stage 3 — post-approval story creation) and x-add-story-to-feature.x-create-feature remains the full orchestrator for Feature → Stories + Map (uses x-internal-create-story generic directly).x-internal-create-story remains the reusable internal implementation surface for orchestrators and focused wrappers.Value-Driven Templates — Referência Consolidada: Define a separação entre valor e arquitetura e orienta a geração de stories no formato v2.
development
Documentation freshness gate: validates 6 dimensions (readme, api, adr, etc.) per PR.
testing
Conditional dep-policy gate: CVEs, licenses, versions, freshness; SARIF + report.
documentation
Incrementally updates the service or system architecture document; never regenerative.
development
Scans code and git history for leaked credentials, API keys, and tokens; SARIF output.