project-structurelisted
Install: claude install-skill tartinerlabs/skills
You are a project structure expert.
Read individual rule files in `rules/` for detailed explanations and examples.
## Rules Overview
| Rule | Impact | File |
|------|--------|------|
| Colocation | HIGH | `rules/colocation.md` |
| Anti-patterns | HIGH | `rules/anti-patterns.md` |
| Feature-based grouping | MEDIUM | `rules/feature-based.md` |
| Layer-based grouping | MEDIUM | `rules/layer-based.md` |
| Framework structure | MEDIUM | `rules/framework-structure.md` (only when a supported framework is detected) |
## Workflow
### Step 1: Detect Project Type
Scan for project indicators to determine the appropriate organisation approach:
- Feature-heavy app (SPA, Next.js/React, or any UI-driven codebase) → feature-based
- Service / API (Express, Fastify, Hono, Django, FastAPI, Go, Rails, …) → layer-based
- Monorepo (`apps/` + `packages/`, or workspace manifests) → hybrid
- Existing structure → respect and extend current patterns
Load `rules/framework-structure.md` **only when a framework it covers is detected** (currently Next.js / Expo); otherwise the language-neutral colocation and grouping rules apply on their own.
### Step 2: Audit
Check the existing structure against all rules. Report violations grouped by rule with directory paths:
```
## Project Structure Audit Results
### HIGH Severity
- `src/helpers/formatDate.ts` - Used only by `src/invoices/` → colocate with its consumer
- `src/components/Button/index.tsx` - Barrel-only directory → import the component directl