# {{PROJECT_NAME}} - Python

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

## Quoi (Stack & Structure)

**Stack**: {{TECH_STACK}}
**Framework**: {{WEB_FRAMEWORK}}
**Python**: {{PYTHON_VERSION}}

### Structure du projet
```
{{PROJECT_NAME}}/
├── domain/              # Logique metier pure (aucune dependance)
│   ├── entities/        # Entites metier
│   ├── value_objects/   # Objets immuables
│   └── repositories/    # Interfaces (Protocols)
├── application/         # Use cases
│   ├── commands/        # Operations d'ecriture
│   ├── queries/         # Operations de lecture
│   └── services/        # Services applicatifs
└── infrastructure/      # Adaptateurs techniques
    ├── persistence/     # Implementations repositories
    ├── api/             # Routes FastAPI/Flask
    └── external/        # Services externes
```

## Pourquoi (Objectif & Organisation)

### Architecture: Clean/Hexagonale
- **Domain**: Logique metier pure, Protocols pour abstractions
- **Application**: Orchestration des use cases
- **Infrastructure**: Adaptateurs vers l'exterieur

Dependances: `Infrastructure -> Application -> Domain`

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

### Regles critiques

| Regle | Description |
|-------|-------------|
| Analyse avant code | Consulter `rules/01-workflow-analysis.md` |
| Type hints | Obligatoires sur toutes fonctions publiques |
| Coverage 80%+ | Domain 95%, Application 90%, Infra 75% |
| Docker obligatoire | Toutes commandes via Makefile |

## Comment (Commandes & Workflows)

### Commandes de developpement
```bash
make setup             # Configuration initiale
make dev               # Lancer environnement dev
make shell             # Shell dans container
```

### Pipeline de qualite
```bash
make lint              # Ruff
make format            # Black + isort
make type-check        # Mypy
make security-check    # Bandit
make test              # Tous les tests
make test-cov          # Tests avec couverture
make quality           # Tous les checks
```

### Base de donnees
```bash
make db-migrate        # Appliquer migrations
make db-rollback       # Rollback
make db-reset          # Reset complet
```

### Workflow de developpement
1. **Analyser** - `rules/01-workflow-analysis.md`
2. **TDD** - Test first (pytest)
3. **Qualite** - `make quality`
4. **Commit** - Conventional Commits

## 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` |
| Async | `rules/12-async.md` |

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

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

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