--- name: openspec-workflow description: "Workflow complet OpenSpec (SDD) : templates d'artefacts, structure d'arborescence, format de specs GIVEN/WHEN/THEN, procédures d'initialisation, proposition, application et archivage. Utiliser pour créer ou gérer une arborescence OpenSpec dans un projet." --- # OpenSpec Workflow Skill de référence pour appliquer la méthode OpenSpec (Spec-Driven Development) dans un projet. OpenSpec est un framework léger de spécifications piloté par l'IA, où les specs vivent dans le code et servent d'alignement entre humains et agents. ## Philosophie - Fluide, pas rigide - Itératif, pas waterfall - Simple, pas complexe - Conçu pour le brownfield (projets existants), pas seulement le greenfield - Scalable du projet personnel à l'entreprise ## Arborescence OpenSpec Après initialisation (`openspec init`), la structure suivante est créée à la racine du projet : ``` openspec/ ├── config.json ← Configuration du projet OpenSpec ├── specs/ ← Spécifications vivantes, organisées par capacité │ └── / │ └── spec.md ← Requirements + scénarios pour cette capacité └── changes/ ← Propositions de changements (en cours) ├── / ← Un changement = un dossier │ ├── proposal.md ← Pourquoi ce changement, ce qui change │ ├── design.md ← Décisions techniques, approche retenue │ ├── tasks.md ← Checklist d'implémentation par phase │ └── specs/ ← Deltas de specs (ajouts/modifications) │ └── / │ └── spec.md └── archive/ ← Changements terminés et archivés └── YYYY-MM-DD-/ └── ... ← Même structure que le changement actif ``` ## Template : config.json ```json { "version": "1.0", "language": "fr", "spec_dir": "openspec/specs", "changes_dir": "openspec/changes" } ``` ## Template : spec.md (spécification d'une capacité) ```markdown # Specification ## Purpose ## Requirements ### Requirement: The system SHALL . #### Scenario: - **GIVEN** - **WHEN** - **THEN** - **AND** ### Requirement: The system SHALL . #### Scenario: - **GIVEN** - **WHEN** - **THEN** #### Scenario: - **GIVEN** - **WHEN** - **THEN** ``` ## Template : proposal.md ```markdown # Proposal: ## Summary ## Motivation ## Scope ### In scope - ### Out of scope - ## Impact ### Specs affected - `openspec/specs//spec.md` — ### Components affected - ## Open Questions - ``` ## Template : design.md ```markdown # Design: ## Approach ## Alternatives Considered ### Alternative 1: - **Pros:** - **Cons:** - **Why rejected:** ## Technical Decisions ### Decision 1: - **Choice:**