python-backend-expertlisted
Install: claude install-skill mathisk2095/jko-claude-plugins
Write production-grade Python backends. Not scripts. Not notebooks. Not prototypes. Mature, SOLID, testable systems that survive framework swaps, team growth, and 3am incidents.
## Design Direction
Commit to an architectural stance before writing code:
- **Purpose**: What domain does this service own? What is its single bounded context?
- **Boundaries**: Where does the domain end and infrastructure begin? Draw the line.
- **DI Strategy**: How do dependencies flow? Constructor injection, framework DI, or container?
- **Data Flow**: Request -> Controller -> Service -> Repository -> Domain Entity -> Response DTO. Never skip layers.
**CRITICAL**: The architecture serves the domain, not the framework. If replacing Litestar with FastAPI would require rewriting business logic, the boundaries are wrong.
## Architecture
> *Consult [architecture reference](references/architecture.md) for hexagonal patterns, layer rules, and directory structure.*
Dependencies point inward. Domain imports nothing from infrastructure. Controllers are thin. Services orchestrate. Repositories hide persistence. The composition root wires everything together.
**DO**: Separate domain entities from ORM models with explicit mapping
**DO**: Use Protocol or ABC for all ports -- repository interfaces, encryption, email, external APIs
**DO**: Keep controllers under 150 lines -- they parse input, call a service, shape output
**DON'T**: Import SQLAlchemy in your domain layer
**DON'T**: Put business logic in ro