Skill: Modular Folder & Type Specialist
Focus: Naming Conventions, Directory Structure, and Type Modularization.
🎯 Capability Overview
Enforces the strict organizational rules defined by Kürşat. This skill prevents the creation of monolithic files and ensures the project remains scalable and navigable.
🛠 Naming Standards
- •Rule #1 (Kebab-Case): Every file and directory name MUST be
kebab-case.- •Regex:
^[a-z0-9]+(-[a-z0-9]+)*(\.[a-z0-9]+)+$
- •Regex:
- •Exception: React Components (inside the file) should use
PascalCase, but the filename itself must remainkebab-case.tsx.
📂 Directory Structure Logic
- •Types: - Never use
types.tsorglobal.d.tsfor domain logic.- •Create a
/types/subdirectory within each module or a global@/typesfolder divided by domain. - •Example:
@/types/auth/login-request.ts,@/types/game/coordinate-system.ts.
- •Create a
- •Components:
- •Atomic design is preferred. Shared components go to
components/shared/. - •Each component should have its own folder if it has related sub-components or local types.
- •Atomic design is preferred. Shared components go to
🤖 Implementation Instructions for Agents
- •Before File Creation: Check the proposed path against the
kebab-caserule. If it fails, auto-correct the name. - •Type Extraction: If a developer agent writes an interface inside a
.tsxfile that exceeds 10 lines or is intended for reuse, extract it to a dedicated file in the appropriatetypes/folder. - •Verification: The Validation Agent must run a directory scan using this skill to flag non-compliant paths.
🚫 Forbidden Patterns
- •No
utils.ts(Use specific names likedate-formatter.ts). - •No
index.tsfiles that merely export everything from a folder (to avoid circular dependencies and promote explicit imports).