Standard project layout and Spec-Kit usage patterns for AI-driven, spec-driven monorepos that host frontend, backend, and specs in a single repository.
Use this Skill whenever you are:
CLAUDE.md files, specs, and configuration
files so AI agents always see the right context. [file:10][web:11][web:24]This Skill must work for any AI‑driven monorepo, not just a single hackathon.
/specs for requirements and architecture./frontend for UI/web clients./backend for APIs, agents, MCP servers, etc./infra or /deploy folders for Kubernetes, Dapr, CI/CD.A typical spec-driven monorepo should follow a structure like:
/.spec-kit/ – Spec-Kit configuration and internal files.
/specs/ – Human-readable specs:
overview.md – project summary and current phase.architecture.md – high-level system architecture.features/ – feature specs (e.g. task-crud.md, authentication.md).api/ – API endpoint and protocol specs.database/ – schema and model specs.ui/ – UI and UX specs (components, pages, flows).infra/ (optional) – deployment, K8s, Dapr, Kafka specs. [file:10][web:11]/frontend/ – Frontend application(s), each with:
CLAUDE.md for frontend-specific rules./backend/ – Backend application(s), each with:
CLAUDE.md for backend-specific rules.Root level:
CLAUDE.md – global instructions and navigation..spec-kit/config.yaml – Spec-Kit configuration for this repo.README.md – human entrypoint. [file:10][web:11][web:24]Exact names may vary, but the pattern should remain.
The .spec-kit/config.yaml file should:
specs).Example conceptual structure:
structure.specs_dir = "specs"structure.features_dir = "specs/features"structure.api_dir = "specs/api"structure.database_dir = "specs/database"structure.ui_dir = "specs/ui"The configuration must stay in sync with the actual folder layout:
.spec-kit/config.yaml.Use multiple CLAUDE.md files with clear scopes:
Root CLAUDE.md:
@specs/features/task-crud.md).Frontend frontend/CLAUDE.md:
Backend backend/CLAUDE.md:
CLAUDE.md files must not conflict:
All significant changes must start from specs:
/specs before changing code.@specs/features/task-crud.md). [file:10][web:11][web:24]Specs should be structured, not free-form essays:
When specs change, code must be updated to match, not vice versa.
Frontend and backend code should not be mixed in the same folders.
Cross-cutting concerns (types, contracts, shared models) should live in explicit shared modules, not hidden imports.
Tools and agents (e.g. MCP servers, AI agents) should be placed where:
specs/api or specs/agents). [file:10].spec-kit/config.yaml, and actual folders drift out
of sync. [web:11][web:24]When present, this Skill should align with:
/.spec-kit/config.yaml – Spec-Kit configuration./specs/... – all specifications, organized by type./frontend/... – frontend apps and their CLAUDE instructions./backend/... – backend apps and their CLAUDE instructions.CLAUDE.md and README.md – primary navigation and workflow docs.If these are missing, propose creating them following this structure instead of inventing a new, ad-hoc monorepo layout.