applying-vertical-slice-architecturelisted
Install: claude install-skill msewell/agent-stuff
# Applying Vertical Slice Architecture
Treat slices as self-contained behaviors, not miniature layered architectures. See [references/01-foundations-and-structure.md](references/01-foundations-and-structure.md) § Core Mental Model for the full framing.
## Workflow: Designing a new VSA codebase
1. **Assess fit.** Confirm VSA suits the project. See [references/01-foundations-and-structure.md](references/01-foundations-and-structure.md) § Decision Framework.
- VSA excels for systems with distinct use cases where requirements change per feature.
- VSA struggles when core domain invariants must be enforced identically across many operations, or the app is trivially small CRUD.
- VSA and Clean Architecture are orthogonal — one governs dependency direction, the other governs the axis of organization.
2. **Define slice granularity.** Each slice = one use case, named with a verb-noun pair (`BookAppointment`, `GetInvoice`). Group related slices under business-capability modules. See [references/01-foundations-and-structure.md](references/01-foundations-and-structure.md) § Defining Slice Granularity for right-sizing heuristics.
3. **Choose folder structure.** Start with single-file-per-feature (Option A). Promote to feature folders (Option B) or module nesting (Option C) when complexity warrants it. See [references/01-foundations-and-structure.md](references/01-foundations-and-structure.md) § Folder Structure Strategies for examples and trade-offs.
4. **Handle shared code us