mk:bootstrap
End-to-end project orchestrator for new projects from scratch. Research -> design -> plan -> scaffold -> implement -> docs.
CLI boundary: npx mewkit init = project infrastructure (.claude/). mk:bootstrap = application code + full pipeline. Zero overlap. Never touch .claude/.
What This Skill Does
Orchestrates the complete journey from idea to running code for a brand-new project. Handles research, design, planning, file scaffolding, implementation via mk:cook, and documentation generation. Supports 4 execution modes ranging from fully-interactive (--full) to fully-automated (--fast).
When to Use
Explicit invocation only — never auto-activates.
mk:bootstrap [requirements]
mk:bootstrap [requirements] --full
mk:bootstrap [requirements] --fast
mk:bootstrap [requirements] --parallelDo NOT invoke when:
- Project already has source code — use
mk:plan-creator+mk:cookdirectly - You only need kit setup — use CLI (
npx mewkit init) - You need autonomous multi-hour builds of specified products — use
mk:autobuild - You need single-task feature work on existing projects — use
mk:cook
Example Prompt
Bootstrap a new full-stack SaaS application with a React frontend, Express API, PostgreSQL database, and JWT authentication. Include user registration, role-based access control, and a dashboard with real-time metrics.Core Capabilities
- Research — parallel subagent research on validation, competition, tech stack, design patterns
- Design — UI/UX design via
ui-ux-designersubagent, design guidelines document - Planning — structured plan via
mk:plan-creatorwith architecture, modules, file structure - Scaffolding — progressive file generation following naming conventions and dependency order
- Implementation — via
mk:cookwith TDD cycle, review, fix-first resolution - Documentation — via
mk:docs-initgenerating docs/ directory and README - Validation — post-scaffold validation catching missing files and placeholder leaks
Arguments
| Argument | Type | Description |
|---|---|---|
requirements | string | Required. Natural language description of what to build |
--full | flag | Maximum user control, gates at every step |
--fast | flag | No user gates, maximum speed, auto-commit |
--parallel | flag | Parallel implementation for independent components |
| (default) | - | Auto mode: balanced, design gate only |
Modes
| Mode | Flag | Research | Design | Plan Flag | Cook Flag | Git |
|---|---|---|---|---|---|---|
| Auto | (default) | Parallel researchers | UI/UX if frontend | --auto | --auto | Auto init |
| Full | --full | Parallel researchers, gate | UI/UX if frontend, gate | --hard | (interactive) | Ask user |
| Fast | --fast | 6 parallel batch, no gate | Skip | --fast | --auto | Auto init + commit |
| Parallel | --parallel | Parallel researchers, no gate | UI/UX if frontend, gate | --parallel | --parallel | Auto init |
Workflow
Pre-workflow. Bootstrap IS the full workflow for new projects:
mk:bootstrap -> [research -> design -> plan -> scaffold -> cook -> docs] -> doneFor subsequent features on the same project: use mk:plan-creator -> mk:cook directly.
Routing
Parse first flag from arguments:
--full-> loadreferences/workflow-full.md--fast-> loadreferences/workflow-fast.md--parallel-> loadreferences/workflow-parallel.md- default -> load
references/workflow-auto.md
Each workflow file defines the exact steps for that mode. After plan + scaffold, all modes load references/shared-phases.md for implementation -> docs -> final report.
Planning BEFORE Scaffolding
Plan first, scaffold second. The plan tells us WHAT to scaffold — planning is NOT optional.
- Plan — invoke
mk:plan-creatorwith mode-matched flag. Plan defines: architecture, modules, file structure, acceptance criteria. - Scaffold — generate files following the plan's architecture +
references/scaffolding-principles.md. Detect stack viascripts/detect-stack.sh. Validate withscripts/validate-bootstrap.sh.
Optional: invoke mk:plan-ceo-review on the plan (Full mode only).
Scaffolding Principles
Directory Structure
- Separate concerns by directory:
src/,tests/,docs/ - Mirror test structure to source:
src/auth/->tests/auth/ - Flat until necessary: don't nest until 5+ files exist at a level
- Convention over configuration: follow the stack's standard layout
File Generation
- Config files first: package.json/go.mod before any source
- Entry point second: main.ts/index.ts/main.go
- One module at a time: complete auth/ before moving to users/
- Every file must compile: no placeholder imports
- No empty files: every file has meaningful content
Progressive Generation
Step 1: Print proposed directory tree -> user confirms
Step 2: Generate config files (package.json, tsconfig, etc.)
Step 3: Generate entry point + core module
Step 4: Generate remaining modules (one at a time)
Step 5: Generate test scaffolds matching source structure
Step 6: Generate docs (README.md + code-standards.md only)Between steps: verify no compilation errors before proceeding.
What NOT to Generate
.claude/directory (CLI handles this).envfiles with real secrets (generate.env.exampleonly)- Lock files (npm install generates these)
- Build output directories (
dist/,build/) - IDE-specific config (
.vscode/,.idea/) unless user requests
Minimum Viable Scaffold
project/
src/
[entry-point] <- main.ts, index.ts, main.go, etc.
tests/
[entry-point.test] <- matching test file
[package-manifest] <- package.json, go.mod, Cargo.toml
[compiler-config] <- tsconfig.json, etc. (if applicable)
.gitignore
README.mdExtend from this minimum based on config.json features (docker, CI, database).
Naming Convention Enforcement
- TypeScript/Node: kebab-case files, camelCase functions, PascalCase classes
- Vue: PascalCase components, kebab-case files,
useprefix for composables - NestJS:
feature.service.ts,feature.controller.ts,feature.module.ts - Go/Rust: snake_case files
- Unknown stack: ask user for naming conventions before generating
Mode Details
Auto (default)
Balanced mode. Research + design gate. Good for most projects.
- Git init (auto)
- Research: 2-3 parallel researcher subagents
- Tech stack: auto-detect or auto-select from research
- Design:
ui-ux-designerif frontend, gate: user approves - Plan:
mk:plan-creator --auto - Scaffold: guided by plan, auto-confirm
- Shared phases: cook -> docs -> final report
Full (--full)
Maximum user control. Gates at every major step. For critical projects.
- Git init: ask user
- Clarify requirements: one question at a time, 100% clarity
- Research: 2-4 parallel researchers, gate: user approves summary
- Tech stack + design: gate for each
- Plan:
mk:plan-creator --hardwith Gate 1 approval. Optional:mk:plan-ceo-review - Scaffold: user confirms tree, progressive generation
- Shared phases: cook (interactive) -> docs -> final report
Fast (--fast)
No user gates. Maximum speed. For prototypes and hackathons.
- Git init (auto)
- Combined research + stack: 6 parallel researchers, no gate
- Plan:
mk:plan-creator --fast, auto-creates without approval - Scaffold: progressive, no user confirmation
- Shared phases: cook (auto) -> docs -> final report
- Auto-commit:
git add -A && git commit -m "feat: bootstrap [project-name]"
Parallel (--parallel)
Design gate only. Parallel implementation for independent components. For large projects.
- Git init (auto)
- Research: 2 parallel researchers, no gate
- Tech stack + design: gate for both
- Plan:
mk:plan-creator --parallelwith file ownership matrix, dependency graph - Scaffold: guided by plan, progressive
- Shared phases: cook (parallel, multiple developer agents), docs, final report
Shared Phases (MANDATORY — all modes)
After plan + scaffold, all modes execute these phases:
Phase A: Implementation
Activate mk:cook with mode-matched flag. Handles TDD, implementation, review, fix-first.
Phase B: Documentation
Activate mk:docs-init to generate docs/ directory and README.
Phase C: Final Report
Print summary and ask about commit.
BOOTSTRAP COMPLETE
Project: [name]
Stack: [detected/selected stack]
Files generated: [count]
Plan: [plan path]
Docs: [list of docs/ files]
Next steps:
- Review generated code and docs
- Use mk:plan-creator to plan next feature
- Use mk:document-release after shipping to keep docs in syncStack Detection
scripts/detect-stack.sh auto-detects project stack from existing project files. Supports 30+ stacks across mobile, systems, Go, Ruby, Java/Kotlin, PHP, Python, and Node.js ecosystems.
Validation
scripts/validate-bootstrap.sh runs post-scaffold checks:
- Basic structure exists (
src/,tests/) - Source files are not empty
- No placeholder tokens remain (
[TODO],[PROJECT_NAME],[PLACEHOLDER])
Exits BOOTSTRAP_VALID (0) or BOOTSTRAP_INCOMPLETE (1) with error details.
Gotchas
- Duplicating CLI init: generating
.claude/files thatnpx mewkit initalready provides — NEVER touch.claude/; bootstrap ownssrc/andtests/only - Over-scaffolding: generating 20+ files for a simple project — ask user about scope first; match generated files to actual needs
- Context overflow on large stacks: generating NestJS monorepo in one shot — progressive generation: structure first, then one module at a time; verify compilation between steps
- Wrong naming conventions: CamelCase files in TypeScript project — always check
agent-conduct.mdB1 for detected stack; ask user if stack is unknown - Placeholder leak:
[PROJECT_NAME]or[TODO]left in generated files —validate-bootstrap.shcatches these; fix before declaring BOOTSTRAP_VALID - Stale scaffold patterns: generating patterns from outdated framework versions — use
mk:docs-finderto check current framework docs before generating - Broken imports after generation: files reference modules that don't exist yet — generate in dependency order; entry point last (it imports everything)
- Skipping research on "simple" projects: hidden complexity — always run research unless
--fastmode - Running full pipeline on tiny scripts: bootstrapping a 50-line utility with full process — detect project size; if <5 files expected, use
--fastmode automatically
Tools
| Tool | Path | Purpose |
|---|---|---|
| Stack detector | scripts/detect-stack.sh | Auto-detect project stack from existing files |
| Validator | scripts/validate-bootstrap.sh | Post-scaffold structural integrity check |
| Config template | config.example.json | Project config with stack, features, conventions |
Common Use Cases
- Creating a new SaaS application from scratch
- Bootstrapping a microservice with Express/Fastify/NestJS
- Scaffolding a full-stack Next.js + TypeScript project
- Building a CLI tool prototype quickly (
--fast) - Large multi-module project with parallel team workflow (
--parallel) - Critical production project with stakeholder sign-offs (
--full)
Pro Tips
- Always plan before scaffolding — the plan defines WHAT to generate
- Use
--fastfor prototypes (<5 files expected),--autofor most projects,--fullfor critical ones - Progressive generation prevents context overflow on large projects
- Run
validate-bootstrap.shafter every scaffold — catches placeholder leaks immediately - Generate in dependency order: config -> core -> modules -> entry point
- The minimum viable scaffold (5 files) is the starting point — extend based on config.json features