Project Organization
Standardize file locations, naming conventions, and directory structure for projects.
When to Use
- Creating a file and need the correct path
- Organizing existing files after a messy session
- Enforcing naming conventions across the project
- Other skills need to know where to save output (advisory mode)
Explicit: the project-organization skill [targets]
Workflow Integration
Operates in Phase 6 (Reflect) or advisory mode (called by any skill). Output supports the documenter agent.
Modes
| Mode | Trigger | Behavior |
|---|---|---|
| Advisory | Other skills reference this skill | Return correct path + naming for file type |
| Organize | User invokes directly | Scan → propose → confirm → execute |
Process (Organize Mode)
- Scan + categorize — list all files, assign each to directory category per
references/directory-rules.md, check naming conventions - Propose — present changes as from → to table, ask user approval
- Execute + report — move/rename files, create missing directories, list final structure
Process (Advisory Mode)
- Determine file type from context (source? doc? plan? test? asset?)
- Look up correct path from directory categories
- Apply naming rules (timestamped / evergreen / variant)
- Return:
{path}/{name}.{ext}
Output Format
## Project Organization: {scope}
**Mode:** {advisory | organize}
**Files scanned:** {N}
**Issues found:** {N}
### Changes
| From | To | Reason |
|------|------|--------|
| {old path} | {new path} | {rule violated} |
### Final Structure
{tree view of organized directories}
References
| Reference | When to load | Content |
|---|---|---|
| directory-rules.md | Steps 2-4 — categorizing + naming | Directory categories, naming patterns, nesting logic |
Failure Handling
| Failure | Recovery |
|---|---|
| File conflict (target exists) | Ask user: overwrite, rename, or skip |
| Protected path (.git, .env, node_modules) | Skip silently — never touch |
| No files found in target | Report "No files found in {path}" |
Constraints
- Never overwrite existing files without confirmation
- Never touch
.git/,node_modules/,.envfiles - Respect
.gitignorepatterns - Use
mk:prefix conventions for .cursor/skills/ directories
Gotchas
- Monorepo package
nameinpackage.jsonand the directory name can diverge silently — a workspace package atpackages/auth-service/with"name": "@company/auth"is referenced by consumers as@company/auth, but path aliases, Docker build contexts, and some bundlers resolve by directory name; mismatch causes "cannot find module" errors that only appear after a fresh install in CI. tsconfig.jsonpath aliases are NOT honored by test runners without separate config —paths: { "@/*": ["src/*"] }intsconfig.jsonresolves intscand Vite but Vitest and Jest use their own module resolvers; tests using@/aliases silently fall through tonode_moduleslookup and fail with "Cannot find module '@/utils'" unlessmoduleNameMapper(Jest) oralias(Vitest) is configured separately.- Circular path aliases break tree-shaking and cause
undefinedat runtime —src/utils/index.tsre-exporting fromsrc/components/which imports fromsrc/utils/creates a circular dependency that bundlers resolve non-deterministically; the symptom is a component that isundefinedwhen imported via the alias but defined when imported by relative path. - Absolute imports (
src/) vs relative imports (../../) inconsistency prevents reliable refactoring — mixing both styles means automated refactoring tools (VS Code "move file",ts-morph) update only the form they recognize; half the import sites break silently on any file move; enforce one style via ESLintimport/no-relative-parent-importsorimport/no-absolute-path. .gitignorepatterns not applying to already-tracked files causesdist/to appear in PRs — ifdist/was committed before being added to.gitignore, git continues tracking it;git rm -r --cached dist/is required to untrack it, and omitting this step means every build output change appears as a diff in PRs.