# {{PROJECT_NAME}} - Symfony

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

## What (Stack & Structure)

**Stack**: Symfony 7.x, PHP 8.3+, Doctrine ORM, PHPUnit/Behat

### Project Structure
```
src/
├── Domain/           # Business logic (NO external dependencies)
│   ├── Entity/       # Aggregate roots
│   ├── ValueObject/  # Immutable objects
│   └── Repository/   # Repository interfaces
├── Application/      # Use Cases (CQRS)
│   ├── Command/      # Write operations
│   ├── Query/        # Read operations
│   └── Handler/      # Command/Query handlers
└── Infrastructure/   # Technical details
    ├── Persistence/  # Doctrine implementations
    ├── Http/         # Controllers
    └── Service/      # External services
```

## Why (Purpose & Organization)

### Architecture: Clean + DDD + Hexagonal
- **Domain** layer has ZERO external dependencies
- **Application** orchestrates use cases via CQRS
- **Infrastructure** implements technical details

See `rules/02-architecture-clean-ddd.md` for complete patterns.

### Critical Rules
| Rule | Reason |
|------|--------|
| Docker mandatory | Consistent environment (`make` commands only) |
| TDD strict | Tests BEFORE implementation |
| SOLID + DRY | Maintainable code |
| 80%+ coverage | Quality assurance |

## How (Commands & Workflows)

### Docker Commands (MANDATORY)
```bash
# NEVER run PHP/Composer directly - ALWAYS use make
make up                          # Start stack
make shell                       # PHP container shell
make console CMD="cache:clear"   # Symfony console
make composer CMD="require ..."  # Composer
```

### Quality Pipeline
```bash
make quality    # Full: cs-fix + phpstan + rector + tests
make phpstan    # Static analysis (max level)
make cs-fix     # Code style fix
make test       # All tests
make coverage   # Coverage report (target: 80%+)
```

### Database
```bash
make db-migrate   # Run migrations
make db-fixtures  # Load fixtures
make db-reset     # Full reset
```

### Development Workflow
1. **Analyze** - Read code, identify impacts (`rules/01-workflow-analysis.md`)
2. **TDD** - RED (test fails) → GREEN (minimal code) → REFACTOR
3. **Quality** - Run `make quality` (must pass)
4. **Commit** - Conventional Commits format

## References

| Topic | Rule File |
|-------|-----------|
| Analysis | `rules/01-workflow-analysis.md` |
| Architecture | `rules/02-architecture-clean-ddd.md` |
| PHP Standards | `rules/03-coding-standards.md` |
| SOLID | `rules/04-solid-principles.md` |
| Docker | `rules/06-docker-hadolint.md` |
| Testing | `rules/07-testing-tdd-bdd.md` |
| Quality | `rules/08-quality-tools.md` |
| Security | `rules/11-security-rgpd.md` |
| DDD Patterns | `rules/13-ddd-patterns.md` |

### Symfony-Specific Rules
- Value Objects: `rules/18-value-objects.md`
- Aggregates: `rules/19-aggregates.md`
- Domain Events: `rules/20-domain-events.md`
- CQRS: `rules/21-cqrs.md`

<!-- PROJECT-SPECIFIC-START -->
## Project Specifics

{{TECH_STACK}}

<!-- Add project-specific configuration below -->

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