From rp1-dev
Bootstraps greenfield projects by classifying directory state, prompting for name and target location, interviewing for project charter, and scaffolding tech stack.
npx claudepluginhub rp1-run/rp1This skill is limited to using the following tools:
Minimal coordinator: pre-flight checks -> charter-interviewer -> bootstrap-scaffolder.
Boots greenfield projects: classifies directory state (rp1-init, empty, non-empty), prompts for name/placement, sets up target dir, initializes charter for tech stack scaffolding.
Bootstraps new projects from scratch: gathers requirements for frontend SPAs, full-stack apps, APIs, CLI tools, libraries; researches latest best practices via WebSearch; creates blueprint; confirms; initializes with official CLI; sets up Claude Code agent system.
Generates complete production-ready projects from descriptions: directory structure, code, tests, docs, config, git init. Orchestrates pipeline with verification to ensure builds and tests pass.
Share bugs, ideas, or general feedback.
Minimal coordinator: pre-flight checks -> charter-interviewer -> bootstrap-scaffolder.
Extract these parameters from the user's input:
| Parameter | Required | Default | Description |
|---|---|---|---|
PROJECT_NAME | No | (prompted) | New project directory name (lowercase, hyphens allowed) |
Environment values (resolve via shell):
RP1_ROOT: !rp1 agent-tools rp1-root-dir (extract data.root from JSON response)ls -la
Classify directory state:
., .., .DS_Store, .rp1/, CLAUDE.md, AGENTS.md (user ran rp1 init here)., .., .DS_Store (no rp1 files)Extract CURRENT_DIR_NAME: basename of current working directory (e.g., /home/user/my-app -> my-app)
PROJECT_NAME provided: Validate (no spaces, valid dir chars). PROJECT_NAME = PROJECT_NAME
PROJECT_NAME empty + rp1-initialized: PROJECT_NAME = CURRENT_DIR_NAME (auto-extracted from directory basename)
PROJECT_NAME empty + Empty/Non-empty: {% ask_user "What would you like to name your project? Use lowercase, numbers, hyphens (e.g., my-awesome-app)." %}
Max 2 attempts for validation, then abort.
{% ask_user "Directory '{CURRENT_DIR_NAME}' contains rp1 configuration. Create project '{PROJECT_NAME}' here?", options: "Yes, proceed here (Recommended)", "Create subdirectory" %}
Yes, proceed here (Recommended): "Create the scaffolded project in the current directory"
Create subdirectory: "Create a new subdirectory '{PROJECT_NAME}' instead"
Yes/1: TARGET_DIR = cwd
subdirectory/2: TARGET_DIR = {cwd}/{PROJECT_NAME}
{% ask_user "Current directory is empty. Create files here or subdirectory '{PROJECT_NAME}'?", options: "here", "subdirectory" %}
{cwd}/{PROJECT_NAME}{% ask_user "Current dir has files: [list]. Project goes in ./{PROJECT_NAME}/ (won't modify existing). Proceed?", options: "yes", "no" %}
{cwd}/{PROJECT_NAME}Create subdir if needed: mkdir -p "{TARGET_DIR}" (fail -> abort)
mkdir -p "{TARGET_DIR}/{{$RP1_ROOT}}/context"
Create {TARGET_DIR}/{{$RP1_ROOT}}/context/charter.md:
# Project Charter: {PROJECT_NAME}
**Version**: 1.0.0 | **Status**: Draft | **Created**: {timestamp}
## Vision
_TBD_
## Problem & Context
_TBD_
## Target Users
_TBD_
## Business Rationale
_TBD_
## Scope Guardrails
### Will Do
_TBD_
### Won't Do
_TBD_
## Success Criteria
_TBD_
## Scratch Pad
<!-- Interview state - removed on completion -->
<!-- Mode: CREATE -->
<!-- Started: {timestamp} -->
<!-- End scratch pad -->
CHARTER_PATH = {TARGET_DIR}/{{$RP1_ROOT}}/context/charter.md
question_count = 0
while question_count < 10: {% dispatch_agent "rp1-dev:charter-interviewer" %} CHARTER_PATH: {CHARTER_PATH}, MODE: CREATE, RP1_ROOT: {{$RP1_ROOT}} {% enddispatch_agent %}
response = parse_json(output)
if response.type == "next_question":
answer = {% ask_user "response.next_question" %}
question_count++
Append to scratch pad: `### Q{n}: {topic}` / `**Asked**: {q}` / `**Answer**: {answer}`
elif response.type == "success":
Update charter sections w/ response.charter_content
Remove scratch pad section
break
elif response.type == "skip":
question_count++
Append: `### Q{n}: Skipped` / `**Skipped**: {response.message}`
elif response.type == "error":
Output: "Charter error: {response.message}. Re-run /bootstrap to retry."
break
ls "{TARGET_DIR}/{{$RP1_ROOT}}/context/charter.md" - missing -> warn, continue
Create {TARGET_DIR}/{{$RP1_ROOT}}/context/preferences.md:
# Project Preferences
**Generated**: {timestamp} | **Status**: In Progress
## Scratch Pad
<!-- Phase: INTERVIEW -->
<!-- Questions Asked: 0 -->
<!-- Started: {timestamp} -->
### Tech Stack State
Language: [?] | Runtime: [?] | Framework: [?] | PkgMgr: [?]
Testing: [?] | Build: [?] | Lint: [?] | Format: [?]
### Q&A History
### Research Notes
<!-- End scratch pad -->
PREFS_PATH = {TARGET_DIR}/{{$RP1_ROOT}}/context/preferences.md
question_count = 0, summary_iterations = 0
loop: {% dispatch_agent "rp1-dev:bootstrap-scaffolder" %} PROJECT_NAME, TARGET_DIR, CHARTER_PATH, PREFS_PATH, RP1_ROOT {% enddispatch_agent %}
response = parse_json(output)
if "next_question":
answer = {% ask_user "response.next_question" %}
question_count++
Append to scratch pad: ### Q{n}: {topic} / **Asked**: {q} / **Answer**: {answer}
continue
elif "research_ready": update phase to RESEARCH, continue
elif "summary":
answer = {% ask_user "{summary} Proceed?", options: "Yes", "No" %}
if Yes: update phase to SCAFFOLD, continue
else:
summary_iterations++
if >= 2: "Max revisions. Re-run /bootstrap." break
answer = {% ask_user "What would you like to change?" %}
Append to scratch pad: ### Revision: {answer}
continue
elif "scaffold": continue
elif "success": Output response.output, break
elif "error": Output error, break
ls "{TARGET_DIR}" - confirm: package.json (or equiv), src/, tests/, README.md, AGENTS.md
Bootstrap complete!
Project: {PROJECT_NAME} | Location: {TARGET_DIR}
Created: {{$RP1_ROOT}}/context/charter.md, preferences.md, AGENTS.md, CLAUDE.md, README.md, [pkg manifest], src/, tests/
Next: cd {PROJECT_NAME}, review code, run app (see README.md)
Commands: /rp1-dev:build, /rp1-dev:blueprint update, /rp1-base:knowledge-build
Single-pass. DO NOT:
Flow: Check dir (1x) -> Resolve name (1x, max 2 validations) -> Setup target (1x) -> charter-interviewer (1x) -> bootstrap-scaffolder (1x) -> Output -> STOP
Errors: Dir fail -> abort | User declines -> abort | Charter fails -> warn, continue | Scaffold fails -> report partial
Begin: check directory state, proceed through workflow.