# /feature-full - Creation Feature Complete OneShot

> **Synergie Skill/Commande:**
> - **Skill** (`templates/skills/feature-full/`) → Invocation automatique par Claude
> - **Commande** (`/feature-full`) → Invocation manuelle par l'utilisateur
>
> Ce skill orchestre tous les autres skills pour une experience de developpement optimale.

---

## ARGUMENTS

```
/feature-full <entity> [options]
```

| Option | Description |
|--------|-------------|
| `--area` | Zone de navigation (platform, business, personal) |
| `--module` | Module parent |
| `--notifications` | Activer les notifications (defaut: oui) |
| `--workflows` | Activer les workflows/emails (defaut: non) |
| `--ai` | Activer l'assistance IA (defaut: non) |
| `--crud` | Operations CRUD (defaut: all) |

---

## WORKFLOW ONESHOT

### PHASE 1: ANALYSE (2 min)

```
AskUserQuestion: {
  questions: [
    {
      header: "Entity",
      question: "Quel est le nom de l'entite principale ?",
      options: [
        { label: "Saisie libre", description: "Ex: Product, Order, Customer" }
      ]
    },
    {
      header: "Area",
      question: "Dans quelle zone de navigation ?",
      options: [
        { label: "platform", description: "Administration systeme" },
        { label: "business", description: "Fonctionnalites metier" },
        { label: "personal", description: "Espace personnel" }
      ]
    },
    {
      header: "Integrations",
      question: "Quelles integrations activer ?",
      multiSelect: true,
      options: [
        { label: "Notifications", description: "In-app + SignalR (Recommended)" },
        { label: "Workflows", description: "Emails automatiques" },
        { label: "AI", description: "Assistance IA" }
      ]
    }
  ]
}
```

### PHASE 2: GENERATION (30 min)

Execute automatiquement dans l'ordre :

```
1. DOMAIN LAYER
   → Entity + Enums + Factory Methods
   → /application templates-backend

2. APPLICATION LAYER
   → Interface + DTOs + Permissions
   → /application templates-backend

3. INFRASTRUCTURE LAYER
   → EF Core Configuration + Service
   → /application templates-backend
   → /efcore:migration

4. API LAYER
   → Controller + Authorize + Swagger
   → /controller:create

5. WEB LAYER
   → Pages + Hooks + i18n + Routes
   → /application templates-frontend
   → /ui-components

6. NOTIFICATIONS (si active)
   → NotificationType + Service injection
   → /notification add

7. WORKFLOWS (si active)
   → Trigger + Workflow + Template
   → /workflow create

8. AI (si active)
   → Prompt + Schema + Service
   → /ai-prompt create

9. VALIDATION
   → dotnet build
   → npm run build
   → npm run lint
```

### PHASE 3: RESUME (1 min)

Affiche le resume de tout ce qui a ete cree.

---

## EXEMPLE COMPLET

```bash
/feature-full Product --area business --notifications --workflows --ai
```

**Genere automatiquement :**

| Layer | Fichiers |
|-------|----------|
| Domain | `Product.cs`, `ProductStatus.cs` |
| Application | `IProductService.cs`, `ProductDto.cs`, `Permissions.cs` |
| Infrastructure | `ProductConfiguration.cs`, `ProductService.cs`, `PermissionConfiguration.cs` |
| API | `ProductsController.cs` |
| Web | `ProductsPage.tsx`, `useProducts.ts`, `productsApi.ts`, i18n (4 langues) |
| Notifications | `NotificationType.ProductCreated`, SignalR integration |
| Workflows | `product.created` trigger, email template |
| AI | `product-analyzer` prompt, `ProductAnalysisResult` |

---

## TEMPLATES ORCHESTRATION

### Template Execution Order

```typescript
// 1. Domain
await generateDomainLayer(entity, config);

// 2. Application
await generateApplicationLayer(entity, config);

// 3. Infrastructure
await generateInfrastructureLayer(entity, config);
await runCommand('/efcore:migration', `Add${entity}`);

// 4. API
await runCommand('/controller:create', entity);

// 5. Web
await generateWebLayer(entity, config);

// 6. Integrations
if (config.notifications) {
  await runCommand('/notification', `add ${entity}`);
}
if (config.workflows) {
  await runCommand('/workflow', `create ${entity}.created`);
}
if (config.ai) {
  await runCommand('/ai-prompt', `create ${entity}-analyzer`);
}

// 7. Validation
await runCommand('dotnet', 'build');
await runCommand('npm', 'run build');
await runCommand('npm', 'run lint');
```

---

## CHECKLIST AUTOMATIQUE

```
DOMAIN LAYER
  ✓ Entity {Entity}.cs avec Factory Method
  ✓ Enum {Entity}Status.cs
  ✓ IAuditableEntity implemente

APPLICATION LAYER
  ✓ Interface I{Entity}Service.cs
  ✓ DTOs: {Entity}Dto, Create/Update Requests
  ✓ Permissions dans Permissions.cs
  ✓ Permissions dans PermissionConfiguration.cs

INFRASTRUCTURE LAYER
  ✓ {Entity}Configuration.cs (EF Core)
  ✓ {Entity}Service.cs implementation
  ✓ DbSet<{Entity}> dans ApplicationDbContext
  ✓ DI registration
  ✓ Migration EF Core

API LAYER
  ✓ {Entity}Controller.cs
  ✓ [Authorize] + [RequirePermission]
  ✓ [ProducesResponseType]
  ✓ Logging

WEB LAYER
  ✓ {module}Api.ts
  ✓ use{Module}.ts (avec SignalR si notifications)
  ✓ {Module}Page.tsx
  ✓ {Module}Form.tsx
  ✓ {Module}DetailPage.tsx
  ✓ i18n: fr, en, it, de
  ✓ Routes dans App.tsx

NOTIFICATIONS (si active)
  ✓ NotificationType ajoute
  ✓ SendNotificationAsync dans service
  ✓ useSignalR dans hook

WORKFLOWS (si active)
  ✓ Trigger cree
  ✓ Workflow cree
  ✓ Email template
  ✓ TriggerAsync dans service

AI (si active)
  ✓ Prompt cree
  ✓ OutputSchema
  ✓ DTO Result
  ✓ ExecutePromptAsync dans service
  ✓ Bouton IA frontend

VALIDATION
  ✓ dotnet build OK
  ✓ npm run build OK
  ✓ npm run lint OK
```

---

## REGLES ABSOLUES

1. **TOUJOURS** suivre l'ordre des phases
2. **TOUJOURS** valider chaque phase avant la suivante
3. **TOUJOURS** utiliser les skills specialises
4. **TOUJOURS** respecter l'architecture en couches
5. **TOUJOURS** creer les 4 langues i18n
6. **TOUJOURS** ajouter les permissions dans les 2 fichiers
7. **JAMAIS** sauter une phase
8. **JAMAIS** generer du code sans validation
9. **JAMAIS** oublier les integrations demandees

---

## SKILLS ORCHESTRES

| Skill | Phase | Action |
|-------|-------|--------|
| `/application` | 1-5 | Generation full-stack |
| `/controller` | 4 | Controller API |
| `/ui-components` | 5 | Composants UI |
| `/notification` | 6 | Notifications |
| `/workflow` | 7 | Workflows/Emails |
| `/ai-prompt` | 8 | IA |
| `/efcore:migration` | 3 | Migration DB |

---

User: $ARGUMENTS
