---
name: workflow-project
description: |
  Meta-skill d'orchestration du workflow projet complet pour Bob le Développeur.
  Gère le processus de A à Z : Notes → Brief → CDC → Architecture → Estimation → Proposition → Planning → Prompts Dev.

  TRIGGERS PRINCIPAUX :
  - "Nouveau projet", "brief projet", "notes d'appel"
  - "Analyse ce projet", "estime ce projet"
  - "Génère tout", "workflow complet"
  - Documents projet (notes, docx, pptx, pdf)

  WORKFLOW COMPLET (9 étapes) :
  1. workflow-brief-from-notes → Brief structuré
  2. workflow-brief-analysis → Brief enrichi (AGENT itératif)
  3. workflow-cdc-from-brief → Cahier des charges détaillé
  4. workflow-architecture → Architecture technique (C4)
  5. workflow-estimation → Estimation en jours
  6. workflow-estimation-review → Revue & challenge estimation (AGENT itératif)
  7. workflow-proposition → Proposition commerciale
  8. workflow-planning → Plannings (interne + client)
  9. workflow-dev-prompts → Prompts Claude Code par feature
---

# Workflow Project

Meta-skill d'orchestration du processus projet complet pour **Bob le Développeur**.

## Pipeline complet

```
                              ┌──────────────────────┐
                              │   Notes d'appel      │
                              │   (input brut)       │
                              └──────────┬───────────┘
                                         │
                              ┌──────────▼───────────┐
                              │ workflow-brief-from- │
                              │       notes          │
                              │ → Brief-[Projet].md  │
                              └──────────┬───────────┘
                                         │
                              ┌──────────▼───────────┐
                              │ workflow-brief-      │
                              │    analysis (AGENT)  │
                              │ → Brief-Enrichi.md   │
                              └──────────┬───────────┘
                                         │
                              ┌──────────▼───────────┐
                              │ workflow-cdc-from-   │
                              │       brief          │
                              │ → CDC-[Projet].md    │
                              └──────────┬───────────┘
                                         │
              ┌──────────────────────────┼──────────────────────────┐
              │                          │                          │
   ┌──────────▼───────────┐   ┌──────────▼───────────┐   ┌──────────▼───────────┐
   │ workflow-architecture│   │ workflow-estimation  │   │ (dépend archi+estim) │
   │ → Architecture.md    │   │ → Estimation.md      │   │                      │
   └──────────┬───────────┘   └──────────┬───────────┘   └──────────────────────┘
              │                          │
              └──────────────┬───────────┘
                             │
                  ┌──────────▼───────────┐
                  │ workflow-estimation- │
                  │   review (AGENT)     │
                  │ → Estimation révisée │
                  └──────────┬───────────┘
                             │
                  ┌──────────▼───────────┐
                  │ workflow-planning    │
                  │ → Planning-Interne.md│
                  │ → Planning-Client.md │
                  └──────────┬───────────┘
                             │
                  ┌──────────▼───────────┐
                  │ workflow-proposition │
                  │ → Proposition.md     │
                  └──────────┬───────────┘
                             │
                  ┌──────────▼───────────┐
                  │ workflow-dev-prompts │
                  │ → prompts/*.md       │
                  │   (1 par feature)    │
                  └──────────────────────┘
```

## Étapes détaillées

### 1️⃣ workflow-brief-from-notes
**Input** : Notes brutes (appel client, bullet points, texte informel)
**Output** : `Brief-[Projet].md`

Transforme les notes en brief structuré :
- Contexte client
- Objectifs
- Fonctionnalités demandées
- Contraintes (budget, délais, tech)
- Questions ouvertes

---

### 2️⃣ workflow-brief-analysis (AGENT)
**Input** : `Brief-[Projet].md`
**Output** : `Brief-[Projet]-Enrichi.md`

⚠️ **AGENT ITÉRATIF** — Dialogue avec l'utilisateur :
- Recherche concurrence (WebSearch)
- Analyse des liens d'inspiration (WebFetch)
- Questions de clarification
- Suggestions de features

Le brief enrichi contient 4 sections :
- **A. Validé client** : Ce que le client a confirmé
- **B. Analyse** : Recherches et observations
- **C. Suggestions** : Propositions à valider
- **D. Points ouverts** : Questions en suspens

---

### 3️⃣ workflow-cdc-from-brief
**Input** : `Brief-[Projet]-Enrichi.md`
**Output** : `CDC-[Projet].md`

Cahier des charges complet :
- Spécifications écran par écran
- Wireframes ASCII
- Règles métier codifiées (RM-XXX-NNN)
- Critères d'acceptation (CA-XXX-NNN)
- Architecture technique préliminaire
- Endpoints API
- Modèle de données (ERD Mermaid)

---

### 4️⃣ workflow-architecture
**Input** : `CDC-[Projet].md`
**Output** : `Architecture-[Projet].md`

Document d'architecture C4 Model :
- Diagramme de contexte
- Diagramme de conteneurs
- Diagramme de composants
- Modèle de données détaillé
- Structure des modules backend
- Arborescence des fichiers

---

### 5️⃣ workflow-estimation
**Input** : `CDC-[Projet].md` + `Architecture-[Projet].md`
**Output** : `Estimation-[Projet].md`

Estimation technique en jours :
- Par module/feature
- Par couche (backend, frontend, infra)
- Total avec marge 20%
- Valeurs uniques (pas de fourchettes)

---

### 6️⃣ workflow-estimation-review (AGENT)
**Input** : `Estimation-[Projet].md` + `CDC-[Projet].md` + `Architecture-[Projet].md`
**Output** : `Estimation-[Projet].md` (révisée)

⚠️ **AGENT ITÉRATIF** — Challenge systématique de l'estimation :
- Vérification arithmétique
- Couverture CDC (RM-codes → tâches)
- Challenge valeurs vs références Bob
- Analyse risques sous/sur-estimation
- Cohérence budget client
- Benchmark projets similaires
- Discussion des écarts avec l'utilisateur
- Mise à jour de l'estimation

---

### 7️⃣ workflow-planning
**Input** : `Estimation-[Projet].md` (révisée) + `CDC-[Projet].md`
**Output** :
- `Planning-[Projet]-Interne.md`
- `Planning-[Projet]-Client.md`

**Version interne** :
- Gantt Mermaid détaillé
- Tâches avec dépendances
- Risques identifiés
- Points d'attention

**Version client** :
- Phases simplifiées
- Livrables par étape
- Besoins client (accès, validations)
- Jalons de facturation

---

### 8️⃣ workflow-proposition
**Input** : `Estimation-[Projet].md` (révisée) + `Planning-[Projet]-Client.md`
**Output** : `Proposition-[Projet].md`

Proposition commerciale :
- Récapitulatif du besoin
- Scope détaillé (inclus/exclus)
- Planning macro
- **Tarification** :
  - 9 900€ HT/mois/dev
  - Mois = ceil(jours/20)
  - TVA 20%
- Conditions de paiement (30/30/40)

---

### 9️⃣ workflow-dev-prompts
**Input** : `CDC-[Projet].md` + `Architecture-[Projet].md`
**Output** : `prompts/Prompts-[Feature].md` (1 par feature)

⚠️ **PROMPTS EN ANGLAIS**

Pour chaque feature/module :
- Prompt backend (implémentation)
- Prompt tests E2E (Jest + Supertest)
- Prompt(s) frontend (pages/composants)

---

## Points d'entrée flexibles

Le workflow peut démarrer à n'importe quelle étape selon l'input disponible :

| Si tu as... | Démarre à... |
|-------------|--------------|
| Notes d'appel brutes | Étape 1 (brief-from-notes) |
| Brief structuré | Étape 2 (brief-analysis) |
| Brief enrichi validé | Étape 3 (cdc-from-brief) |
| CDC complet | Étape 4 (architecture) |
| CDC + Archi | Étape 5 (estimation) |
| Estimation brute | Étape 6 (estimation-review) |
| Estimation révisée | Étape 7 (planning) |
| Estimation + Planning | Étape 8 (proposition) |
| CDC + Archi finaux | Étape 9 (dev-prompts) |

---

## Livrables générés

Dans le dossier projet :
```
[Projet]/
├── Brief-[Projet].md
├── Brief-[Projet]-Enrichi.md
├── CDC-[Projet].md
├── Architecture-[Projet].md
├── Estimation-[Projet].md
├── Proposition-[Projet].md
├── Planning-[Projet]-Interne.md
├── Planning-[Projet]-Client.md
├── prompts/                          ← Prompts Claude Code (skills-aware)
│   ├── Prompts-Auth.md
│   ├── Prompts-[Feature1].md
│   └── Prompts-[Feature2].md
├── specs/                            ← Vue dev pour suivi tâches
│   ├── CONVENTIONS.md                ← Règles de code (du starter-kit)
│   ├── ROADMAP.md                    ← Auto-généré depuis le CDC
│   ├── auth.md                       ← Specs dev par feature (TASK-XXX)
│   └── [feature].md
└── CLAUDE.md                         ← Instructions Claude Code (pointe vers CDC + Archi)
```

## Dev Skills (starter-kit)

Les prompts générés à l'étape 9 s'appuient sur les **dev skills** du starter-kit.
Ces skills doivent être installés dans `~/.claude/skills/` avant de lancer le dev :

| Skill | Rôle |
|-------|------|
| `typescript-strict` | Conventions TS (no any, enums, Result) |
| `nestjs-stack` | Architecture backend (module/service/repo/controller) |
| `nextjs-stack` | Architecture frontend (pages, containers, React Query) |
| `ui-design` | Design system (Tailwind, shadcn, Lucide) |
| `dev-workflow` | Workflow tâche (spec → code → build → commit) |
| `ci-deploy` | CI/CD (GitHub Actions, Docker, deploy SSH) |
| `env-vars` | Gestion variables d'env + doc README |
| `prisma-migrations` | Migrations, seeds, conventions Prisma |
| `testing-patterns` | Tests E2E blackbox, fixtures, scénarios |
| `project-init` | Scaffolding complet nouveau projet |

Les prompts **activent ces skills** (ex: `Follow skill nestjs-stack`) au lieu de ré-expliquer les conventions. Résultat : prompts plus courts, plus précis, moins de dérive.

---

## Règles d'orchestration

1. **Séquentiel par défaut** : Chaque étape dépend de la précédente
2. **Validation intermédiaire** : Demander confirmation après chaque livrable majeur
3. **Itératif** : L'utilisateur peut demander des modifications à chaque étape
4. **Traçabilité** : Annoncer quelle skill est en cours d'exécution
5. **Flexible** : Peut démarrer/reprendre à n'importe quelle étape

---

## Exemple d'utilisation complète

**Utilisateur** : "J'ai des notes d'appel pour un nouveau projet, lance le workflow complet"

**Claude** :
1. Exécute `workflow-brief-from-notes` → Brief-[Projet].md
2. ✋ Validation
3. Exécute `workflow-brief-analysis` (AGENT) → Brief-Enrichi.md
4. ✋ Validation des suggestions
5. Exécute `workflow-cdc-from-brief` → CDC-[Projet].md
6. ✋ Validation du scope
7. Exécute `workflow-architecture` → Architecture-[Projet].md
8. Exécute `workflow-estimation` → Estimation-[Projet].md
9. Exécute `workflow-estimation-review` (AGENT) → Estimation révisée
10. ✋ Validation technique & budget
11. Exécute `workflow-planning` → Plannings
12. Exécute `workflow-proposition` → Proposition-[Projet].md
13. ✋ Validation commerciale
14. Exécute `workflow-dev-prompts` → Prompts par feature
15. 🎉 Projet prêt pour le développement !

---

## Tarification Bob le Développeur

| Paramètre     | Valeur                    |
| ------------- | ------------------------- |
| TJM implicite | ~495€/jour                |
| Tarif mensuel | 9 900€ HT/dev             |
| Jours/mois    | 20 jours                  |
| TVA           | 20%                       |
| Équipe type   | 1-2 devs senior fullstack |
| Paiement      | 100% en début de mois     |

---

## Stack technique

| Couche | Technologies |
|--------|--------------|
| Backend | Nest.js + Prisma + PostgreSQL |
| Frontend | Next.js 14 (App Router) + Tailwind + shadcn/ui |
| Auth | JWT + Passport |
| Tests backend | Jest + Supertest (E2E blackbox) |
| State management | Zustand + TanStack Query |
