What problem does it solve? Codebases gradually degrade into spaghetti code: circular dependencies creep in, files grow past hundreds of lines, and shared modules start importing from feature layers. This Skill enforces structural discipline both before code is written (proactive checklists) and after (reactive scans), so architecture stays clean as the project grows. ## Core Features & Use Cases - Proactive checks before coding: A file placement decision tree, naming convention tables, import direction rules, function size limits, and duplicate detection guidance applied before writing new code. - Reactive scans on existing code: Detects circular dependencies via madge, unused exports via ts-unused-exports, and flags files over 300/500 lines using the included check-circular-deps.sh script. - Layered architecture enforcement: Unidirectional dependency rules (page → feature → shared → util), shared-module export-only rule, and a detailed anti-pattern gallery in references/architecture-patterns.md. - Use Case: Before adding a new payment module, ask where the files should go—the Skill walks the decision tree and recommends src/features/billing/ with components, services, and types subdirectories, while warning against putting domain logic in shared/. ## Quick Start Ask the agent to check the project structure for spaghetti code and circular dependencies, and it will run the health scan and produce a refactoring checklist.