Boilerplate
Generate minimal project scaffolds from short descriptions. Turn "CLI in Go with cobra" or "React app with auth" into a runnable structure with the right files and commands.
When to Use
- •User wants to start a new project from a description
- •User asks for a scaffold, boilerplate, or starter
- •User says "create a X that does Y" and expects a project layout
Workflow
- •Parse request: Language, framework, key features (auth, DB, API, CLI)
- •Choose stack: Specific tools (e.g. cobra for Go CLI, Vite+React for frontend)
- •Design layout: Directories, main entry, config, README
- •Generate: Minimal files to run (main, config, one example)
- •Ask for clarifications, personalisation if needed
Scaffold Rules
- •Minimal: Only what’s needed to run and one clear path (e.g. one command, one route).
- •Conventional: Standard layout (e.g. cmd/ for Go, src/ for TS/JS).
- •Runnable: User can install deps and run with 1–2 commands.
- •Documented: README with install, run, and (if applicable) env vars.
README for Scaffolds
markdown
# [Project Name] [One-line description] ## Setup \`\`\`bash [install deps: npm install, go mod download, etc.] \`\`\` ## Run \`\`\`bash [npm run dev, go run ., etc.] \`\`\` ## [Optional: Env / Config]
What to Generate
- •Always: Entry point, dependency file (package.json, go.mod, Cargo.toml, etc.), README
- •When relevant: Config (e.g. .env.example), one test, .gitignore
- •Avoid: Full app logic; keep to minimal “hello world” or one feature
Ambiguity
If the request is vague:
- •Pick one reasonable stack and say what you chose: "Using Vite + React; say if you want Next.js instead."
- •Default to TypeScript for Node/React unless they say "JavaScript".
Anti-Patterns
- •❌ Huge template with many options; keep it small
- •❌ Unrunnable (missing deps, wrong paths)
- •❌ No README or run instructions
- •❌ Over-engineered (e.g. full DDD for a tiny CLI)