Project structure
Apply only the roles and documents needed by the requested work. Preserve valid
project conventions; surface a material restructuring choice before making it.
Language and stack skills own language-specific commands and config.
Core layout
Name these roles according to the ecosystem:
- Root: user-facing
README.md, manifest, one canonical lockfile, agent context,
optional contribution rules, and governance files.
- Source: one conventional source root, organized by domain or namespace.
- Tests: unit tests co-located with source; end-to-end suites in one top-level
project-owned location; add layer-specific tests only for delivered or
regression-prone layers.
docs/: architecture, quick start, tooling, code style, and deployment.
- Scripts: one-off automation in
scripts/, bin/, or tools/.
- Generated output: one ignored build/output location.
- Optional: generator templates, static assets, and provisioned agent skills.
Tests must catch meaningful regressions. End-to-end coverage is the primary
system-level net; unit tests cover public module behavior without duplicating
the same assertion.
Governance
Projects on this style keep these canonical root files:
VISION.md: durable product and technical direction, including exclusions.
DEFINITION_OF_READY.md: hard gate before implementation.
DEFINITION_OF_DONE.md: hard gate before a change is called shippable.
In a multi-area repo, the nearest area-specific file wins. Link between
governance, agent, contributor, and project docs instead of duplicating policy.
Flag a missing governance file when a workflow requires it; do not invent a
substitute.
Agent context
AGENTS.md is canonical. CLAUDE.md is a symlink to it, or contains only an
include plus genuine Claude-specific additions when symlinks are unavailable.
Never maintain divergent copies.
Keep the root AGENTS.md lightweight: briefly identify the repository, then
spend its context on non-obvious gotchas, exact commands, hard constraints, and
safety boundaries. Do not restate a file tree or conventions evident from the
repository.
Add nested <area>/AGENTS.md only where rules differ; the root points to each
area. Use CONTRIBUTING.md for authoritative human merge requirements and link
to it rather than repeating them.
If curated skills are provisioned, .agents/skills/ and skills-lock.json are
generated by the skills tool, never hand-edited. Symlink .claude/skills to
.agents/skills.
Situational references
- Read references/documentation.md when creating
or restructuring README, docs, governance, agent files, or a multi-area repo.
- Read references/tooling.md when installing hooks,
scripts, changelog generation, markdown/link/duplication checks, or
architectural-drift enforcement.
Completion
- The repository's declared verification gate passes.
- Documentation changed by the work is current and has one authoritative home.
- Generated files were changed through their owner tool.
- No unrelated structural migration was introduced.
1---2name: project-structure3description: Applies the user's language-agnostic repository layout, documentation, governance, hook, test, agent-file, and changelog conventions. Use when scaffolding or restructuring a repo, writing AGENTS.md or docs, or laying out folders.4license: Unlicense OR MIT5---67# Project structure89Apply only the roles and documents needed by the requested work. Preserve valid10project conventions; surface a material restructuring choice before making it.11Language and stack skills own language-specific commands and config.1213## Core layout1415Name these roles according to the ecosystem:1617- Root: user-facing `README.md`, manifest, one canonical lockfile, agent context,18 optional contribution rules, and governance files.19- Source: one conventional source root, organized by domain or namespace.20- Tests: unit tests co-located with source; end-to-end suites in one top-level21 project-owned location; add layer-specific tests only for delivered or22 regression-prone layers.23- `docs/`: architecture, quick start, tooling, code style, and deployment.24- Scripts: one-off automation in `scripts/`, `bin/`, or `tools/`.25- Generated output: one ignored build/output location.26- Optional: generator templates, static assets, and provisioned agent skills.2728Tests must catch meaningful regressions. End-to-end coverage is the primary29system-level net; unit tests cover public module behavior without duplicating30the same assertion.3132## Governance3334Projects on this style keep these canonical root files:3536- `VISION.md`: durable product and technical direction, including exclusions.37- `DEFINITION_OF_READY.md`: hard gate before implementation.38- `DEFINITION_OF_DONE.md`: hard gate before a change is called shippable.3940In a multi-area repo, the nearest area-specific file wins. Link between41governance, agent, contributor, and project docs instead of duplicating policy.42Flag a missing governance file when a workflow requires it; do not invent a43substitute.4445## Agent context4647`AGENTS.md` is canonical. `CLAUDE.md` is a symlink to it, or contains only an48include plus genuine Claude-specific additions when symlinks are unavailable.49Never maintain divergent copies.5051Keep the root `AGENTS.md` lightweight: briefly identify the repository, then52spend its context on non-obvious gotchas, exact commands, hard constraints, and53safety boundaries. Do not restate a file tree or conventions evident from the54repository.5556Add nested `<area>/AGENTS.md` only where rules differ; the root points to each57area. Use `CONTRIBUTING.md` for authoritative human merge requirements and link58to it rather than repeating them.5960If curated skills are provisioned, `.agents/skills/` and `skills-lock.json` are61generated by the skills tool, never hand-edited. Symlink `.claude/skills` to62`.agents/skills`.6364## Situational references6566- Read [references/documentation.md](references/documentation.md) when creating67 or restructuring README, docs, governance, agent files, or a multi-area repo.68- Read [references/tooling.md](references/tooling.md) when installing hooks,69 scripts, changelog generation, markdown/link/duplication checks, or70 architectural-drift enforcement.7172## Completion7374- The repository's declared verification gate passes.75- Documentation changed by the work is current and has one authoritative home.76- Generated files were changed through their owner tool.77- No unrelated structural migration was introduced.