Bootstrap a new project end-to-end. Use when the user wants to start a new project of any type — web app, mobile app, desktop app, game, game mod, CLI tool, library/package, browser extension, API/backend service, or AI/ML project. Interviews the user to understand requirements, researches the chosen stack, generates comprehensive documentation (PROJECT.md, ARCHITECTURE.md, STACK.md, ROADMAP.md, CONVENTIONS.md, DECISIONS.md, TEAM.md), scaffolds the codebase with proper configs and dependencies, creates specialized Claude Code agents and path-scoped rules, and assembles a persistent development team ready to begin work. Trigger when user mentions starting a new project, bootstrapping, scaffolding, initializing a codebase, or setting up a development environment from scratch.
Bootstrap a new project through five phases: Discover, Document, Build, Launch, Shutdown. Each phase builds on the previous — do not skip phases or reorder them.
Conduct 4 rounds of progressive questioning. Accept shorthand answers (e.g., "next" = Next.js, "ts" = TypeScript, "pg" = PostgreSQL). Do not overwhelm — ask one round at a time, wait for answers before proceeding.
Round 1: Project Type (ask directly, no reference file needed)
Present these options:
Also ask for the project name and a one-sentence description.
Record the project type, subtype, name, and description for DECISIONS.md.
Rounds 2-4: Stack, Scope, Preferences
Read the relevant section from references/interview-trees.md based on the chosen project type. Ask questions from:
After each answer, record the decision and rationale for DECISIONS.md.
After the interview, research the chosen stack. Read the relevant section from references/stack-profiles.md for research prompts.
Context7 research: For each major dependency in the chosen stack:
resolve-library-id to find the libraryquery-docs with the specific query from stack-profiles.mdWeb research: Run the WebSearch prompts from stack-profiles.md (substitute {{YEAR}} with the current year). Focus on:
Compile research findings — these inform documentation and scaffold decisions.
Read references/doc-templates.md for all templates.
Create 7 files in docs/ plus update the CLAUDE.md files. Draft each document using information from Phase 1 (interview answers + research findings). Fill in all template placeholders with project-specific content.
Update the root CLAUDE.md with:
Update .claude/CLAUDE.md with:
For each document, draft the full content in one pass, then review for consistency with other docs. Use the section-by-section approach from doc-coauthoring when a section needs user input — but most content should be derivable from Phase 1 answers.
scripts/init-project.sh --name "{{PROJECT_NAME}}" to create the universal skeletonreferences/stack-profiles.md for init commandsnpx create-next-app, cargo init).env.example with all required environment variables documented.gitignore with stack-specific entries from the stack profilegit add -A && git commit -m "chore: initial project scaffold"If the project directory already has files (e.g., from the boilerplate), integrate the scaffold around existing files rather than overwriting them.
Read references/agent-blueprints.md for templates.
Always create these universal agents:
code-reviewer.md — Opus, plan mode, read-only tools, PR review specialistproject-lead.md — Opus, default mode, full tools, project coordinatorThen create 3-5 type-specific agents based on the project type. Use the selection guide in agent-blueprints.md to determine which specialists to create.
Write each agent to .claude/agents/{{agent-name}}.md with:
All agents must be instructed on the GitHub issue-driven workflow (using the gh-cli skill for all GitHub operations):
gh issue edit N --add-assignee @me)gh issue develop N --branch type/issue-N-description)gh pr create --title "type: description" --body "Closes #N")gh pr review)gh pr merge --squash --delete-branch)All type-specific agents must use mode: plan (require plan approval). Only the project-lead uses default mode. When a teammate finishes planning, the team lead reviews and approves or rejects with feedback before the teammate can implement.
Read references/rules-blueprints.md for templates.
Always create these universal rules:
.claude/rules/shared/git-workflow.md — Branch naming, commit format, PR process.claude/rules/shared/code-style.md — Formatting, naming, file organization.claude/rules/shared/documentation.md — When to update docs, comment styleThen create framework-specific rules based on the chosen stack. Use the selection guide in rules-blueprints.md. Write rules to .claude/rules/{{layer}}/{{rule-name}}.md with appropriate globs frontmatter for path scoping.
Organize rules by layer:
shared/ — Apply everywherefrontend/ — Frontend-specificbackend/ — Backend-specifictesting/ — Test file conventionsRead references/hooks-blueprints.md for templates.
Set up context rot mitigation hooks that prevent degradation during long-running team sessions:
.claude/hooks/ directory.claude/hooks/session-start.js from the SessionStart hook template.claude/hooks/pre-compact.js from the PreCompact hook template.claude/settings.json with:
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=70 environment variable.claude/CLAUDE.mdnode .claude/hooks/session-start.js <<< '{"source":"startup"}' and node .claude/hooks/pre-compact.js <<< '{}'If .claude/settings.json already exists, merge the new keys into the existing file rather than overwriting it. If .claude/settings.local.json exists, do not modify it — it contains user-specific overrides.
Use TeamCreate to create a development team for the project.
Read docs/ROADMAP.md Phase 1 items. For each task:
gh issue create --title "type: description" --labels "phase-1,area" --body "..." with acceptance criteria in the bodyTaskCreate that references the GitHub issue numberTaskUpdateThis ensures every piece of work is tracked as a GitHub issue — the source of truth for project progress.
Spawn team members from the agent definitions created in Phase 3B. All type-specific agents must be spawned with plan mode required so the team lead must approve their implementation plans before they write code.
code-reviewer agent first (needed for PR reviews)project-lead agent (default mode — coordinates and approves plans)mode: plan as needed for Phase 1 tasksBrief each team member with:
gh CLI for all GitHub operations (issues, PRs, reviews)/compact proactively.Use TaskUpdate to assign initial tasks to appropriate team members based on their specialization. Tell teammates which GitHub issue to claim.
Important: Wait for teammates to complete their tasks before proceeding. Do not start implementing tasks yourself — use delegate mode to focus on coordination. The project-lead should:
Gracefully shut down the team after all work is complete. TeamDelete will fail if teammates are still active — the shutdown handshake ensures it succeeds.
For each teammate:
shutdown_request via SendMessage with type: "shutdown_request"shutdown_response and approve: trueShut down implementer agents first, then the code-reviewer, then the project-lead last.
After all teammates have acknowledged shutdown:
TeamDelete to remove the team and its task directory~/.claude/teams/{{team-name}}/ and ~/.claude/tasks/{{team-name}}/docs/ROADMAP.md — check off completed tasks, note any deferred workgit add -A && git commit -m "chore: complete project bootstrap"| File | Load When | Purpose |
|---|---|---|
| references/interview-trees.md | Phase 1A, after Round 1 | Drill-down questions per project type |
| references/stack-profiles.md | Phase 1B + 3A | Stack init commands, packages, research queries |
| references/doc-templates.md | Phase 2 | Templates for all docs/ files |
| references/agent-blueprints.md | Phase 3B | Agent definition templates |
| references/rules-blueprints.md | Phase 3C | Rule templates by stack/layer |
| references/hooks-blueprints.md | Phase 3D | Context rot mitigation hooks and settings |