sdd-generate-spec

Generates a spec.md file from an approved discovery report in an SDD pipeline.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/phm-aguiar/test_documentacao --skill sdd-generate-spec-phm-aguiar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sdd-generate-spec
Source: https://github.com/phm-aguiar/test_documentacao/tree/main/.claude/skills/sdd-generate-spec
Command: npx skills add https://github.com/phm-aguiar/test_documentacao --skill sdd-generate-spec-phm-aguiar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve? Turning a lengthy discovery report into a concise, canonical feature specification is manual and error-prone. This Skill automates the derivation of spec.md from an approved discovery document, enforcing structure, traceability, and approval gates in a spec-driven development workflow. ## Core Features & Use Cases - Discovery-to-Spec Derivation: Reads an approved discovery report from reports/ and condenses it into the canonical spec sections (purpose, scope, behavior, constraints, success criteria). - Approval Gate Enforcement: Aborts if the discovery report is not marked as approved, and keeps the generated spec at Aprovado: false until explicit user confirmation. - Traceability & Template Filling: Fills a canonical spec-template.md with placeholders and adds a mandatory Discovery Report reference field for end-to-end traceability. - Use Case: After finishing a brainstorm session that produced reports/042-login-discovery.md, invoke this Skill to generate specs/features/042-login/spec.md, review a preview, adjust sections, and save before moving to plan generation. ## Quick Start Generate the spec from the approved discovery report reports/042-login-discovery.md and save it under specs/features/.

Frequently Asked Questions about sdd-generate-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a spec.md from a discovery report?▼

Run the skill with the path to an approved discovery file, such as reports/<id>-<slug>-discovery.md. It extracts the discovery sections, fills the canonical spec template, shows a preview for confirmation, and writes specs/features/<id>-<slug>/spec.md.

What happens if the discovery report is not approved?▼

The skill checks the Aprovado metadata field in the discovery file. If it is false, it aborts and instructs you to complete the brainstorm approval gate first, since specs must only derive from approved discoveries.

Does the generated spec include the full Gherkin scenarios?▼

No. The spec uses natural language for the happy path and preserves only the titles of failure scenarios. The complete Gherkin scenarios remain in the discovery report to keep the spec concise.

Can the skill overwrite an existing spec.md file?▼

Not without confirmation. If spec.md already exists in the target feature directory, the skill asks whether to overwrite or abort before making any changes.

What is the next step after generating the spec?▼

The next step is running sdd-generate-plan, which consumes the generated spec.md. The spec remains at Aprovado: false until the user explicitly approves it during that planning stage.