Generate Ralph-compatible prompts for entire projects from scratch. Creates comprehensive prompts with architecture phase, implementation phases, testing, and documentation. Use when building complete applications, libraries, CLI tools, or any greenfield project requiring end-to-end development.
Generate Ralph-compatible prompts for entire projects from scratch. Creates comprehensive prompts with architecture phase, implementation phases, testing, and documentation. Use when building complete applications, libraries, CLI tools, or any greenfield project requiring end-to-end development.
Ralph Prompt Generator: Complete Project
Overview
Generates comprehensive prompts for building entire projects from scratch using the Ralph Wiggum technique. These prompts structure development into architectural phases (design, implementation, testing, documentation) with clear milestones and incremental completion.
Best For:
Building complete REST APIs from scratch
Creating CLI tools
Developing libraries/packages
Building web applications
Creating automation tools
Greenfield projects with clear requirements
Real-World Success:
Geoffrey Huntley used Ralph to create the "cursed" programming language over 3 months
Y Combinator hackathon: 6 repositories generated overnight
$50k contract completed for $297 in API costs
Ralph Philosophy: These successes work because Ralph embraces that failures are deterministic and fixable. Each iteration learns from the previous. Don't fear failures—they're expected and provide data for improvement through prompt tuning, not tool changes.
Consider if feature should be descoped (but DO NOT skip without documenting)
Do NOT output false promise - continue or wait for max-iterations
## Example: REST API Project
**Input:**
- Project: Todo List REST API
- Tech: Node.js, Express, TypeScript, SQLite
- Features: CRUD todos, user auth, categories, due dates
- Promise: TODO_API_COMPLETE
**Generated Prompt:**
```markdown
# Project: Todo List REST API
## Vision
A RESTful API for managing todo items with user authentication, categories, and due date tracking. Built with TypeScript and Express for type safety and ease of development.
## Technical Specifications
- **Language**: TypeScript
- **Framework**: Express.js
- **Database**: SQLite with better-sqlite3
- **Testing**: Jest with supertest
- **Build**: npm with tsc
## Core Features
1. **User Authentication**: JWT-based auth with signup/login/logout
2. **Todo CRUD**: Create, read, update, delete todo items
3. **Categories**: Organize todos by category
4. **Due Dates**: Set and track due dates with overdue detection
5. **Filtering**: Filter todos by status, category, due date
## Non-Goals
- Frontend/UI (API only)
- Real-time updates (polling only)
- File attachments
- Collaboration/sharing
---
## Phase 0: Project Setup
### Tasks
1. `npm init` with TypeScript configuration
2. Install dependencies: express, better-sqlite3, jsonwebtoken, bcrypt
3. Install dev dependencies: typescript, jest, supertest, eslint
4. Configure tsconfig.json, eslint, jest
5. Create directory structure: src/{routes,controllers,models,middleware}
### Deliverables
- [ ] package.json with all dependencies
- [ ] tsconfig.json configured
- [ ] ESLint configured and passing
- [ ] Directory structure created
- [ ] `npm run build` works
### Verification
```bash
npm run build
npm run lint
ls src/
Define TypeScript interfaces: User, Todo, Category
Create database schema and initialization
Set up Express app structure with middleware
Implement error handling middleware
Create config management
Deliverables
Types in src/types/
Database schema creates tables
Express app configured with JSON parsing, CORS
Error handler returns proper JSON errors
Config loads from environment
Verification
npm run build
npm test -- --grep "database"
Phase 2: Core Implementation
Tasks
Implement User model with password hashing
Create auth routes: POST /auth/signup, POST /auth/login
Implement JWT middleware for protected routes
Implement Todo model and CRUD
Create todo routes: GET, POST, PUT, DELETE /todos
Deliverables
Signup creates user, returns JWT
Login validates, returns JWT
Protected routes require valid JWT
CRUD operations work for todos
User can only access their own todos
Verification
# Signup
curl -X POST -H "Content-Type: application/json" \
-d '{"email":"test@test.com","password":"password123"}' \
http://localhost:3000/auth/signup
# Login and use token for todos
TOKEN=$(curl -s -X POST -H "Content-Type: application/json" \
-d '{"email":"test@test.com","password":"password123"}' \
http://localhost:3000/auth/login | jq -r '.token')
curl -H "Authorization: Bearer $TOKEN" http://localhost:3000/todos
Phase 3: Features
Tasks
Implement Category model and routes
Add category relationship to todos
Implement due date field with validation
Add overdue detection endpoint
Implement filtering (status, category, due date range)
Deliverables
Categories CRUD works
Todos can be assigned to categories
Due dates stored and validated
GET /todos/overdue returns overdue items
Filtering by query params works
Phase 4: Testing
Tasks
Unit tests for models
Integration tests for all routes
Auth flow tests
Edge case tests (invalid inputs, unauthorized access)
Deliverables
≥80% code coverage
All auth scenarios tested
All CRUD scenarios tested
Error cases tested
Verification
npm test -- --coverage
Phase 5: Documentation
Tasks
README with API documentation
Setup instructions
Example requests for each endpoint
Environment variables documentation
Deliverables
README complete
All endpoints documented
Examples provided
No TODOs remaining
Final Verification
npm run lint
npm run build
npm test -- --coverage
npm start # Manual smoke test
Completion
When all phases verified and:
All tests passing with ≥80% coverage
All endpoints working
Documentation complete
Output: TODO_API_COMPLETE
## Best Practices
### Project Scope
- Define clear boundaries (non-goals)
- Start smaller than you think necessary
- Add features incrementally
### Phase Management
- Complete phases in order
- Don't skip testing phase
- Document checkpoints
### Verification
- Include actual commands to run
- Make success criteria binary
- Automate where possible
### DO:
- Define clear project scope
- Use all 6 phases
- Include verification commands
- Set realistic feature scope
- Document progress at checkpoints
### DON'T:
- Skip architectural phase
- Rush to implementation
- Leave testing for "later"
- Scope creep mid-project
- Output promise before documentation
## Integration with Ralph Loop
```bash
/ralph-wiggum:ralph-loop "[paste generated prompt]" --completion-promise "YOUR_PROMISE" --max-iterations 100
Recommended iterations by project size:
Small project (CLI tool, simple API): --max-iterations 60-80
Medium project (Full API with auth): --max-iterations 100-150
Large project (Multi-feature app): --max-iterations 150-200
Tip: For large projects, consider splitting into multiple Ralph sessions:
First session: Phases 0-2 (Setup through Core)
Second session: Phases 3-5 (Features through Polish)
For single-task prompts, see ralph-prompt-single-task.
For multi-task prompts, see ralph-prompt-multi-task.
For research/analysis prompts, see ralph-prompt-research.