← ClaudeAtlas

organizing-fsd-architecturelisted

Guides organization of code using Feature-Sliced Design (FSD) architecture. Use when structuring projects, creating new features, determining file and layer placement, or reviewing architectural decisions. Also monitors codebase size and proactively suggests structural improvements.
dork-labs/dorkos · ★ 4 · AI & Automation · score 74
Install: claude install-skill dork-labs/dorkos
# Organizing FSD Architecture ## Overview This skill provides expertise for implementing Feature-Sliced Design (FSD) in the DorkOS monorepo. FSD organizes code by business domains with clear layer boundaries and unidirectional dependency rules. ## When to Use - Creating new features, widgets, or entities in `apps/client` - Deciding where code should live (which layer/segment) - Reviewing imports for layer violations - Refactoring components into FSD structure - Adding new services to `apps/server` (size-aware guidance) ## Layer Hierarchy FSD uses strict top-to-bottom dependency flow within `apps/client/src/layers/`: ``` app → widgets → features → entities → shared ``` | Layer | Purpose | Can Import From | | ----------- | ----------------------------------------------------- | -------------------------- | | `app/` | App initialization (`App.tsx`, `main.tsx`, providers) | All lower layers | | `widgets/` | Large UI compositions (app layout, sidebars) | features, entities, shared | | `features/` | Complete user-facing functionality (chat, commands) | entities, shared | | `entities/` | Business domain objects (Session, Command) | shared only | | `shared/` | Reusable utilities, UI primitives, Transport | Nothing (base layer) | ### Dependency Rules (Critical) ``` ALLOWED: Higher layer imports from lower layer features/chat/ui/Chat