A starter kit for projects where an AI coding agent (Claude Code, or similar) is a first-class collaborator. Extracted from a working codebase. Stack-agnostic — the patterns are reusable; the specifics are yours to fill in.
scaffold/
├── CLAUDE.md Entry point: rules + doc-loading map for the agent
└── docs/
├── tech-constitution.md WHY: principles, stack rationale
├── architecture.md HOW: layers, request lifecycle, dependency rules
├── project-structure.md WHERE: folder map for the agent
├── testing.md Quality gates, test tiers, agent-readable outputs
├── test-inventory.md Catalog of tests that exist (populated as you go)
├── conventions/
│ ├── README.md Index of context-specific convention files
│ ├── development-guardrails.md Coding standards, security posture, observability
│ ├── component-inventory.md Catalog of reusable UI components
│ ├── data-inventory.md Catalog of tables / collections
│ └── domain-glossary.md Precise definitions of domain terms
└── operations/
├── README.md Index of operational runbooks
├── parallel-development.md Worktree/container isolation for parallel agents
├── debugging-gates.md How to diagnose quality-gate failures
└── environment-variables.md Env var reference (single source of truth)
Placeholders use {{DOUBLE_BRACES}} — search for them and fill in or delete.
CLAUDE.mdis the entry point. It states the rules the agent must follow and acts as a loader — listing mandatory docs to read first, and conditional docs to load only when working on specific areas.- Docs are structured by purpose and audience, not by topic.
tech-constitutionis for humans making stack decisions.architectureis for anyone modifying code.conventions/*are loaded on demand. - Inventories are queryable catalogs.
test-inventory,component-inventory,data-inventoryanswer "what already exists?" — preventing the agent from duplicating things. - One command runs all quality gates, and produces a machine-readable summary the agent can consume (
test:all:ai→.test-ai-results/summary.md). - Parallel development is first-class. Each agent session runs in an isolated worktree with its own infrastructure — no shared state, no port collisions.
- Doc maintenance is part of the task. Finishing a feature includes updating the relevant docs.
- Copy the tree into a new repo.
- Walk the files top-to-bottom and fill in
{{PLACEHOLDERS}}. - Delete sections that don't apply (e.g., if you don't have a UI, drop
component-inventory.md). - Wire
CLAUDE.mdsection 8 ("Context-Specific Conventions") to point at the files you kept. - Implement
test:all(and an AI-readable variant) that runs your actual quality gates. - Start building. The agent will load what it needs.
- A tech stack. Pick your own.
- CI configuration. Covered in
docs/operations/once you have one. - Plugin configs, hooks, or settings.json — those are per-environment.
- Templates for docs that only make sense once the project has real content (PR templates, ADRs, incident runbooks).