vertical-slice-architecturelisted
Install: claude install-skill mryll/skills
# Vertical Slice Architecture
## Quick Reference: The 5 Rules
1. **One feature = one directory** containing handler, request/response types, validation, and tests
2. **One entry point per feature** — a setup/registration function that receives the router and dependencies. Name varies by convention (`Setup`, `RegisterRoute`, `Map`); the role is the invariant, not the name.
3. **Minimize coupling between slices, maximize coupling within a slice**
4. **No premature abstractions** — no shared repository/service layers until genuine duplication emerges across multiple slices
5. **Test each feature primarily through its entry point**, verifying outcomes (DB state, API calls, response). Platform/adapter tests are also encouraged.
## Project Structure
```
{project}/
features/ # or internal/features/ (Go), Features/ (.NET)
{domain}/ # orders/, users/, kvs/
{operation}/ # create/, list/, delete/
handler # Single entry point + orchestration
request/response # DTOs
validator # Input validation (optional)
test # Co-located integration test
internal/ # Feature-private helpers (optional)
platform/ # or Infrastructure/ — shared cross-cutting concerns
middleware/ # Auth, error handling, idempotency
database/ # Connection pooling, circuit breakers
observability/ # Metrics, tracing, structured logging
opqueue/