# {{PROJECT_NAME}} - C#/.NET

> Genere: {{GENERATION_DATE}} | Claude Craft v{{VERSION}}

## Quoi (Stack & Structure)

**Stack**: {{TECH_STACK}}
**Framework**: .NET {{DOTNET_VERSION}}, C# 13

### Structure du projet
```
src/
├── Domain/           # Logique metier (aucune dependance externe)
│   ├── Entities/     # Aggregates roots
│   ├── ValueObjects/ # Types immuables
│   ├── Events/       # Domain events
│   └── Interfaces/   # Contrats repositories
├── Application/      # Use cases, CQRS
│   ├── Commands/     # Operations d'ecriture
│   ├── Queries/      # Operations de lecture
│   └── Behaviors/    # Pipeline MediatR
├── Infrastructure/   # Concerns externes
│   ├── Data/         # EF Core, Repositories
│   └── Services/     # Services externes
└── WebAPI/           # Presentation layer
    └── Endpoints/    # Minimal API endpoints
```

## Pourquoi (Objectif & Organisation)

### Architecture: Clean Architecture + CQRS + DDD
- **Domain**: Modeles riches, aggregates, value objects
- **Application**: Orchestration via MediatR
- **Infrastructure**: EF Core, services externes
- **WebAPI**: Minimal API ou Controllers

Voir `rules/02-architecture.md` pour les patterns.

### Regles critiques

| Regle | Description |
|-------|-------------|
| Analyse avant code | Consulter `rules/01-workflow-analysis.md` |
| Nullable refs | `<Nullable>enable</Nullable>` |
| CancellationToken | Toujours passer aux methodes async |
| Coverage 80%+ | Domain et Application prioritaires |

## Comment (Commandes & Workflows)

### Commandes de developpement
```bash
dotnet build           # Build
dotnet run             # Run
dotnet watch run       # Hot reload
```

### Pipeline de qualite
```bash
dotnet test                              # Tests
dotnet test --collect:"XPlat Code Coverage" # Coverage
dotnet format --verify-no-changes        # Format check
```

### Base de donnees
```bash
dotnet ef migrations add [Name]          # Creer migration
dotnet ef database update                # Appliquer migrations
```

### Workflow de developpement
1. **Analyser** - `rules/01-workflow-analysis.md`
2. **TDD** - Test first (xUnit + FluentAssertions)
3. **Qualite** - `dotnet build -warnaserror && dotnet test`
4. **Commit** - Conventional Commits

## Commandes disponibles

- `/csharp:check-compliance` - Audit conformite complet
- `/csharp:check-architecture` - Validation architecture
- `/csharp:check-code-quality` - Analyse qualite code
- `/csharp:check-testing` - Analyse couverture tests
- `/csharp:check-security` - Audit securite (OWASP)
- `/csharp:generate-feature` - Generer feature CQRS

## References

| Contexte | Fichier |
|----------|---------|
| Workflow | `rules/01-workflow-analysis.md` |
| Architecture | `rules/02-architecture.md` |
| Standards | `rules/03-coding-standards.md` |
| SOLID | `rules/04-solid-principles.md` |
| Tests | `rules/07-testing.md` |
| Securite | `rules/11-security.md` |
| Aspire | `rules/12-aspire-cloud-native.md` |

<!-- PROJECT-SPECIFIC-START -->
## Specificites du projet

<!-- Cette section est preservee lors des mises a jour -->

<!-- PROJECT-SPECIFIC-END -->
