python-architecture
Installation
SKILL.md
Python Architecture
Priority: P0 (CRITICAL)
Rules
- Keep domain decisions independent from HTTP, DB, env, and queue clients.
- Define ports where callers need substitution; implement adapters at the edge.
- Compose runtime dependencies in startup or wiring modules.
- Treat contracts, policy, and normalization helpers as standalone modules.
Recipe
- Place pure contracts and policy in domain/application modules.
- Keep adapters thin: DB, HTTP, bot, MCP, subprocess, storage.
- Push workflow orchestration into services that call contracts and ports.
- Separate report formatting from fact gathering.
- Add focused regression tests before moving boundary code.