Create file structure based on the stack. SGR-first: always start with domain schemas/models before any logic or views. Every project gets these common files:
<projects_dir>/<name>/
├── CLAUDE.md # AI-friendly project docs (map, not manual — see Harness Engineering)
├── Makefile # Common commands (run, test, build, lint, deploy, integration)
├── README.md # Human-friendly project docs
├── docs/
│ ├── prd.md # Copy of PRD
│ ├── QUALITY_SCORE.md # Domain quality grades (harness: garbage collection)
│ └── ARCHITECTURE.md # Module boundaries and dependency rules
├── cli/ # CLI utility — mirrors core business logic (CLI-First Testing principle)
│ └── main.ts|py # Deterministic pipeline entry point (no LLM required)
├── .claude/
│ └── skills/ # Product-specific workflow skills
│ └── dev/
│ └── SKILL.md # Dev workflow skill (run, test, deploy)
└── .gitignore # Stack-specific ignores
CLI-First Testing: generate a cli/ directory with a stub that imports core business logic from lib/ (or equivalent). The CLI should run the main pipeline deterministically without requiring LLM, network, or UI. This enables make integration for pipeline verification. See dev-principles.md → "CLI-First Testing".
.claude/skills/dev/SKILL.md — product dev workflow skill
Generate a skill that teaches Claude how to work with THIS specific project. Structure:
---
name: <name>-dev
description: Dev workflow for <Name> — run, test, build, deploy. Use when working on <Name> features, fixing bugs, or deploying changes. Do NOT use for other projects.
license: MIT
metadata:
author: <github_org>
version: "1.0.0"
allowed-tools: Read, Grep, Glob, Bash, Write, Edit
---
Body should include:
- Stack: key packages, versions, where configs live
- Commands:
make dev, make test, make build, make deploy (from Makefile)
- Architecture: directory structure, naming conventions, key patterns
- Testing: how to run tests, where test files live, testing conventions
- Common tasks: add a new page/screen, add an API endpoint, add a model
This makes every scaffolded project immediately Claude-friendly — new sessions get project context via the skill.
MCP server (optional): If PRD indicates a data/AI/developer product, also generate MCP server stub.
See templates/mcp-skills-bundle.md for the full "MCP + Skills bundle" pattern and rules for when to generate MCP.
Then add stack-specific files. See references/stack-structures.md for per-stack file listings (8 stacks: nextjs, ios, kotlin, cloudflare, astro-static, astro-hybrid, python-api, python-ml).