[writes] Scaffold a new project from scratch with production-grade architecture, build system, CI/CD, tests, and tooling. Use when creating a greenfield application, starting a new microservice, or scaffolding a new service in a monorepo. Trigger: /forge-bootstrap, new project, scaffold project, create app from scratch
See shared/skill-contract.md for the standard exit-code table.
Before any action, verify:
git rev-parse --show-toplevel 2>/dev/null. If fails: report "Not a git repository. Initialize with git init first." and STOP..claude/forge.local.md exists. If not: report "Forge not initialized. Run /forge-init first." and STOP..gitignoreREADME.mdLICENSEAfter dispatch, fg-050-project-bootstrapper will:
Total time: 3-10 minutes. You'll be asked to confirm stack choices before scaffolding begins.
Parse input: The user's argument (everything after /forge-bootstrap) is the project description -- a free-text string like "Kotlin Spring Boot REST API with PostgreSQL" or "React Vite frontend with shared component library". If no input is provided, ask the user: "What kind of project would you like to scaffold? Describe the tech stack and purpose (e.g., 'Kotlin Spring Boot REST API with PostgreSQL')."
Validate input: Ensure the description contains at least a language or framework reference. If the description is too vague (e.g., just "a web app"), ask for clarification: "Could you specify the tech stack? For example: language, framework, database, or a template like 'React Vite TypeScript frontend'."
Detect available MCPs: Detect available MCPs per shared/mcp-detection.md detection table. Mark unavailable MCPs as degraded. Build a comma-separated list of detected integrations.
Dispatch the bootstrapper: Use the Agent tool to invoke fg-050-project-bootstrapper with the following prompt:
Bootstrap a new project:
{user_input}Available MCPs:
{detected_mcps}
Where {user_input} is the raw text the user provided.
Do nothing else: Do not scaffold, generate files, or make architecture decisions. The bootstrapper handles requirements gathering, tech stack selection, scaffolding, validation, and pipeline initialization autonomously.
Relay the result: When the bootstrapper completes, relay its final output (project summary, validation results, or escalation) back to the user unchanged.
| Condition | Action |
|---|---|
| Prerequisites fail | Report specific error message and STOP |
| Empty input | Ask user for project description before dispatching |
| Bootstrapper agent dispatch fails | Report "Project bootstrapper failed to start. Check plugin installation and try again." and STOP |
| Bootstrapper returns error | Relay the error unchanged. Suggest /forge-recover diagnose if state was partially created |
| State corruption after partial bootstrap | Run /forge-recover repair to fix state, then retry or use /forge-recover reset to start fresh |
/forge-init -- Configure an existing project for the forge (use instead when the project already has code)/forge-run -- Run the full pipeline after bootstrapping is complete/forge-migration -- Upgrade or migrate frameworks in an existing project/forge-shape -- Shape a vague idea into a structured spec before building