# {{PROJECT_NAME}} - PHP

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

## What (Stack & Structure)

**Stack**: PHP {{PHP_VERSION}}, {{PHP_FRAMEWORK}}, Doctrine/Eloquent

### Project Structure
```
src/
├── Domain/           # Business logic (NO external dependencies)
│   ├── Entity/       # Business entities
│   ├── ValueObject/  # Immutable value types
│   └── Repository/   # Repository interfaces
├── Application/      # Use cases (CQRS)
│   ├── Command/      # Write operations
│   └── Query/        # Read operations
├── Infrastructure/   # Technical implementations
│   ├── Persistence/  # Database repositories
│   └── Service/      # External services
└── Presentation/     # Controllers, API
```

## Why (Purpose & Organization)

### Architecture: Clean Architecture + CQRS
- **Domain** layer: Pure PHP, no framework dependencies
- **Application** layer: Use case orchestration
- **Infrastructure** layer: Framework/database specifics

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

### Critical Rules
| Rule | Reason |
|------|--------|
| `declare(strict_types=1)` | Type safety enforcement |
| PSR-12 + PHPStan level 9 | Code quality |
| Repository pattern | Data access abstraction |
| 80%+ coverage | Quality assurance |

## How (Commands & Workflows)

### Development Commands
```bash
composer install           # Install dependencies
{{CACHE_CLEAR_COMMAND}}    # Clear cache
vendor/bin/phpunit         # Run tests
vendor/bin/phpstan analyse # Static analysis
vendor/bin/php-cs-fixer fix # Code style
```

### Quality Pipeline
```bash
vendor/bin/php-cs-fixer fix --dry-run  # Check style
vendor/bin/phpstan analyse              # PHPStan level 9
vendor/bin/phpunit --coverage-html cov  # Tests + coverage
```

### Development Workflow
1. **Analyze** - Read code, understand domain (`rules/01-workflow-analysis.md`)
2. **TDD** - Write test -> Implement -> Refactor
3. **Quality** - Run `composer quality`
4. **Commit** - Conventional Commits format

## References

| Topic | Rule File |
|-------|-----------|
| Analysis | `rules/01-workflow-analysis.md` |
| Architecture | `rules/02-architecture.md` |
| PHP Standards | `rules/03-coding-standards.md` |
| SOLID | `rules/04-solid-principles.md` |
| Testing | `rules/07-testing.md` |
| Quality | `rules/08-quality-tools.md` |
| Security | `rules/11-security.md` |

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

{{TECH_STACK}}

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

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