spec-driven-workflow
O que ela faz
Esta skill faz a IA escrever uma especificação antes de construir uma funcionalidade. Ela é para quem quer combinar o que será construído antes de o trabalho começar.
Quando usar
- ✓Quando uma funcionalidade deve ser especificada antes de alguém escrever código.
- ✓Quando você quer critérios de aceitação que possam virar testes.
- ✓Quando várias pessoas precisam trabalhar a partir de uma definição combinada da funcionalidade.
Link da skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/spec-driven-workflow/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Escreva uma especificação com critérios de aceitação para uma funcionalidade de redefinição de senha antes de começarmos a programar.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
Ela redige a especificação, verifica se há lacunas e ambiguidades e extrai os critérios de aceitação como casos de teste, para que o código possa ser checado contra eles.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Spec-Driven Workflow — POWERFUL
Overview
Spec-driven workflow enforces a single, non-negotiable rule: write the specification BEFORE you write any code. Not alongside. Not after. Before.
This is not documentation. This is a contract. A spec defines what the system MUST do, what it SHOULD do, and what it explicitly WILL NOT do. Every line of code you write traces back to a requirement in the spec. Every test traces back to an acceptance criterion. If it is not in the spec, it does not get built.
Why Spec-First Matters
- Eliminates rework. 60-80% of defects originate from requirements, not implementation. Catching ambiguity in a spec costs minutes; catching it in production costs days.
- Forces clarity. If you cannot write what the system should do in plain language, you do not understand the problem well enough to write code.
- Enables parallelism. Once a spec is approved, frontend, backend, QA, and documentation can all start simultaneously.
- Creates accountability. The spec is the definition of done. No arguments about whether a feature is "complete" — either it satisfies the acceptance criteria or it does not.
- Feeds TDD directly. Acceptance criteria in Given/When/Then format translate 1:1 into test cases. The spec IS the test plan.
The Iron Law
NO CODE WITHOUT AN APPROVED SPEC.
NO EXCEPTIONS. NO "QUICK PROTOTYPES." NO "I'LL DOCUMENT IT LATER."
If the spec is not written, reviewed, and approved, implementation does not begin. Period.
The Spec Format
Every spec follows this structure. No sections are optional — if a section does not apply, write "N/A — [reason]" so reviewers know it was considered, not forgotten.
Mandatory Sections
| # | Section | Key Rules |
|---|---|---|
| 1 | Title and Metadata | Author, date, status (Draft/In Review/Approved/Superseded), reviewers |
| 2 | Context | Why this feature exists. 2-4 paragraphs with evidence (metrics, tickets). |
| 3 | Functional Requirements | RFC 2119 keywords (MUST/SHOULD/MAY). Numbered FR-N. Each is atomic and testable. |
| 4 | Non-Functional Requirements | Performance, security, accessibility, scalability, reliability — all with measurable thresholds. |
| 5 | Acceptance Criteria | Given/When/Then format. Every AC references at least one FR-* or NFR-*. |
| 6 | Edge Cases | Numbered EC-N. Cover failure modes for every external dependency. |
| 7 | API Contracts | TypeScript-style interfaces. Cover success and error responses. |
| 8 | Data Models | Table format with field, type, constraints. Every entity from requirements must have a model. |
| 9 | Out of Scope | Explicit exclusions with reasons. Prevents scope creep during implementation. |
RFC 2119 Keywords
| Keyword | Meaning |
|---|---|
| MUST | Absolute requirement. Non-conformant without it. |
| MUST NOT | Absolute prohibition. |
| SHOULD | Recommended. Omit only with documented justification. |
| MAY | Optional. Implementer's discretion. |
See spec_format_guide.md for the complete template with section-by-section examples, good/bad requirement patterns, and feature-type templates (CRUD, Integration, Migration).
See acceptance_criteria_patterns.md for a full pattern library of Given/When/Then criteria across authentication, CRUD, search, file upload, payment, notification, and accessibility scenarios.
Bounded Autonomy Rules
These rules define when an agent (human or AI) MUST stop and ask for guidance vs. when they can proceed independently.
STOP and Ask When:
Scope creep detected. The implementation requires something not in the spec. Even if it seems obviously needed, STOP. The spec might have excluded it deliberately.
Ambiguity exceeds 30%. If you cannot determine the correct behavior from the spec for more than 30% of a given requirement, the spec is incomplete. Do not guess.
Breaking changes required. The implementation would change an existing API contract, database schema, or public interface. Always escalate.
Security implications. Any change that touches authentication, authorization, encryption, or PII handling requires explicit approval.
Performance characteristics unknown. If a requirement says "MUST complete in < 500ms" but you have no way to measure or guarantee that, escalate before implementing a guess.
Perguntas frequentes
Ela também escreve o código?
A skill serve para escrever e checar a especificação primeiro; o código vem depois que a especificação for aprovada.
Em que formato estão os critérios?
Eles usam o formato Dado, Quando, Então, que se mapeia diretamente para casos de teste.
Os testes podem ser gerados a partir da especificação?
Sim. Um script extrai casos de teste dos critérios de aceitação.
Detalhes
Descrição original do autor
Use when a feature should be specified before coding (acceptance criteria, spec-first, tests from specs). Writes the spec with spec_generator.py, checks it with spec_validator.py and extracts tests with test_extractor.py.
Popularidade
- Estrelas no GitHub
- 29 mil
- Posição no ranking
- #9605
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
agent-launcher-orchestrator
29 milAjuda seu agente a planejar, criar, testar e agendar um agente gerenciado do Claude na sua própria conta, passo a passo, a partir de um objetivo claro.
grade-iterate
29 milPermite que seu agente avalie o trabalho de um agente de IA gerenciado com base em uma rubrica e o melhore em um número fixo de rodadas, para que ele nunca entre em loop infinito.
interview
29 milPermite que seu agente entreviste você sobre uma ideia de agente de IA e transforme suas respostas em um plano de construção simples antes de qualquer lançamento.
run-without-you
29 milAjuda seu agente a configurar um agente gerenciado de IA para rodar em um agendamento ou quando um evento acontecer, com o horário do cron verificado antes do lançamento.
Skills parecidas
diffs
394 milPermite que seu agente gere um diff real e compartilhável das edições, como link de visualização ou arquivo de imagem, em vez de um resumo escrito à mão.
coding-agent
394 milAjuda seu agente a passar um trabalho grande de programação para o Codex, Claude Code ou OpenCode em segundo plano e acompanhar o andamento.
gh-issues
394 milAjuda seu agente a encontrar issues do GitHub, escolher quais resolver e abrir pull requests com correções, acompanhando os comentários de revisão.