# {{PROJECT_NAME}} - Python

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

## What (Stack & Structure)

**Stack**: Python {{PYTHON_VERSION}}, {{WEB_FRAMEWORK}}

### Project Structure
```
{{PROJECT_NAME}}/
├── domain/           # Business logic (pure Python)
│   ├── entities/     # Domain entities
│   ├── value_objects/# Immutable value types
│   └── services/     # Domain services
├── application/      # Use cases
│   ├── commands/     # Write operations
│   └── queries/      # Read operations
├── infrastructure/   # Technical implementations
│   ├── persistence/  # Database repositories
│   ├── api/          # REST endpoints
│   └── external/     # Third-party services
└── tests/
```

## Why (Purpose & Organization)

### Architecture: Clean Architecture + DDD
- **Domain** layer: Pure Python, 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 |
|------|--------|
| Type hints | Static analysis with mypy |
| Dependency injection | Testable, loosely coupled |
| Repository pattern | Data access abstraction |
| 80%+ coverage | Quality assurance |

## How (Commands & Workflows)

### Development Commands
```bash
make install          # Install dependencies
make run              # Start server
make test             # Run tests
make lint             # Ruff + mypy
make format           # Black + isort
```

### Quality Pipeline
```bash
make lint             # Ruff + mypy
make test             # pytest with coverage
make security         # Bandit security check
```

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

## References

| Topic | Rule File |
|-------|-----------|
| Analysis | `rules/01-workflow-analysis.md` |
| Architecture | `rules/02-architecture.md` |
| Python 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 -->
