Aller au contenu
Skillpedia
Programmation générale29k · #9605

spec-driven-workflow

Ce qu’il fait

Cette compétence fait rédiger par l'IA une spécification avant de construire une fonctionnalité. Elle s'adresse aux personnes qui veulent se mettre d'accord sur ce qui sera construit avant de commencer le travail.

Quand l’utiliser

  • ✓Quand une fonctionnalité doit être spécifiée avant que quiconque n'écrive du code.
  • ✓Quand vous voulez des critères d'acceptation qui peuvent être transformés en tests.
  • ✓Quand plusieurs personnes doivent travailler à partir d'une même définition convenue d'une fonctionnalité.

Lien du skill

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/spec-driven-workflow/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/spec-driven-workflow/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Rédige une spécification avec des critères d'acceptation pour une fonctionnalité de réinitialisation de mot de passe avant de commencer à coder.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Elle rédige la spécification, la vérifie pour repérer les lacunes et les ambiguïtés, puis extrait les critères d'acceptation sous forme de cas de test pour que le code puisse être contrôlé par rapport à eux.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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

  1. Eliminates rework. 60-80% of defects originate from requirements, not implementation. Catching ambiguity in a spec costs minutes; catching it in production costs days.
  2. 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.
  3. Enables parallelism. Once a spec is approved, frontend, backend, QA, and documentation can all start simultaneously.
  4. 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.
  5. 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:

  1. 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.

  2. 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.

  3. Breaking changes required. The implementation would change an existing API contract, database schema, or public interface. Always escalate.

  4. Security implications. Any change that touches authentication, authorization, encryption, or PII handling requires explicit approval.

  5. 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.

Questions fréquentes

Écrit-elle aussi le code ?

La compétence sert à rédiger et à vérifier la spécification d'abord ; le code vient après l'approbation de la spécification.

Dans quel format sont les critères ?

Ils utilisent un format Étant donné, Quand, Alors, qui correspond directement à des cas de test.

Les tests peuvent-ils être générés à partir de la spécification ?

Oui, un script extrait les cas de test des critères d'acceptation.

Détails

Description originale de l’auteur

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.

repo: alirezarezvani/claude-skills

Popularité

Étoiles GitHub
29k
Position au classement
#9605
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires