What problem does it solve?
Deciding where frontend code should live in a large modular codebase is error-prone: wrong placements create circular dependencies, bundle bloat, and boundary violations that linters miss. This Skill encodes the tier model, move mechanics, and verification steps so module moves, new module carves, and boundary fixes land cleanly in one PR.
Core Features & Use Cases
- Placement decisions: Applies ordered tests (ownership, consumer-tier check, legitimate fixes, bridge placement, proven sharing) to decide where code belongs across the lib/basic/shared/feature/app tiers.
- Move procedure: Provides a six-step workflow covering consumer enumeration greps, before/after
bun run module-boundaries measurement, codemods, barrel exports, and full verification (lint, type-check, unit tests, static-viz bundle budget).
- Boundary rules and traps: Documents hard rules (no re-exports, no deep imports past enforced barrels, facade modules for vendor libraries), side-effect-free directory constraints, endpoint migration via
Api.injectEndpoints, and known traps like late binding and stale plans.
- Use Case: When moving a utility from a feature module into the shared tier, use this Skill to enumerate consumers, verify the destination tier sits below the lowest consumer, execute the move, and report violation counts before and after.
Quick Start
Ask the AI to move a specific frontend file or module to a new home and have it follow the modularization procedure with before and after boundary measurements.