ralph-prompt-project

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ralph Prompt Generator: Complete Project

Ralph提示词生成器:完整项目

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.
使用Ralph Wiggum技术从头开始生成用于构建完整项目的全面提示词。这些提示词将开发划分为架构阶段(设计、实现、测试、文档),并包含清晰的里程碑和增量完成要求。
最适用场景:
  • 从头构建完整的REST API
  • 创建CLI工具
  • 开发库/包
  • 构建Web应用程序
  • 创建自动化工具
  • 需求明确的全新项目
实际成功案例:
  • Geoffrey Huntley使用Ralph在3个月内创建了“cursed”编程语言
  • Y Combinator黑客马拉松:一夜之间生成6个代码仓库
  • 完成价值5万美元的合同,仅花费297美元的API成本
Ralph理念:这些成功源于Ralph接受失败是确定性且可修复的。每次迭代都能从之前的尝试中学习。不要害怕失败——失败是预期之内的,它能为通过提示词调优(而非更换工具)进行改进提供数据。

Quick Start

快速开始

Input Required:
  1. Project description (what to build)
  2. Technical requirements (language, framework, features)
  3. Success criteria (what makes it complete)
  4. Final completion promise
Generate prompt with:
Generate a Ralph project prompt for:
Project: [Project description]
Tech stack: [Language, framework, tools]
Features: [List of required features]
Promise: [COMPLETION_PHRASE]
所需输入:
  1. 项目描述(要构建的内容)
  2. 技术要求(语言、框架、功能)
  3. 成功标准(什么标志着项目完成)
  4. 最终完成承诺语
生成提示词的命令:
Generate a Ralph project prompt for:
Project: [Project description]
Tech stack: [Language, framework, tools]
Features: [List of required features]
Promise: [COMPLETION_PHRASE]

Prompt Generation Workflow

提示词生成工作流

Step 1: Define Project Scope

步骤1:定义项目范围

Project Definition Template:
markdown
PROJECT: [Project Name]
PURPOSE: [One sentence explaining what it does]
TECH STACK: [Languages, frameworks, tools]
TARGET USERS: [Who will use this]

CORE FEATURES:
1. [Feature 1]
2. [Feature 2]
3. [Feature 3]

NON-GOALS (Out of scope):
- [What this project will NOT do]
- [Explicit exclusions]

SUCCESS DEFINITION:
[Measurable, verifiable completion criteria]
项目定义模板:
markdown
PROJECT: [项目名称]
PURPOSE: [一句话说明项目功能]
TECH STACK: [语言、框架、工具]
TARGET USERS: [目标用户]

CORE FEATURES:
1. [功能1]
2. [功能2]
3. [功能3]

NON-GOALS (超出范围):
- [项目不包含的内容]
- [明确排除项]

SUCCESS DEFINITION:
[可衡量、可验证的完成标准]

Step 2: Map Project Phases

步骤2:映射项目阶段

Standard project phases:
PhaseNamePurposeTypical %
0SetupProject scaffolding, dependencies5%
1ArchitectureDesign patterns, structure10%
2CoreMain functionality40%
3FeaturesAdditional features25%
4TestingTest coverage10%
5PolishDocumentation, cleanup10%
标准项目阶段:
阶段名称目标典型占比
0项目搭建项目脚手架、依赖配置5%
1架构设计设计模式、结构规划10%
2核心功能主要功能实现40%
3扩展功能附加功能开发25%
4测试阶段测试覆盖率保障10%
5优化完善文档编写、代码清理10%

Step 3: Define Milestones

步骤3:定义里程碑

Each phase needs concrete milestones:
Good Milestones:
  • Verifiable by running commands
  • Binary (complete or not)
  • Independent of subjective judgment
Examples:
  • "Project builds without errors" (verifiable)
  • "All tests pass" (verifiable)
  • "CLI help command works" (verifiable)
每个阶段需要具体的里程碑:
优质里程碑特征:
  • 可通过运行命令验证
  • 二元结果(完成或未完成)
  • 不受主观判断影响
示例:
  • "项目可正常构建无错误"(可验证)
  • "所有测试用例通过"(可验证)
  • "CLI帮助命令可正常工作"(可验证)

Step 4: Structure the Prompt

步骤4:构建提示词结构

Use this template:
markdown
undefined
使用以下模板:
markdown
undefined

Project: [Project Name]

Project: [Project Name]

Vision

Vision

[2-3 sentences describing what this project is and why it exists]
[2-3句话描述项目是什么以及存在的意义]

Technical Specifications

Technical Specifications

  • Language: [e.g., TypeScript, Python, Go]
  • Framework: [e.g., Express, FastAPI, none]
  • Database: [e.g., PostgreSQL, SQLite, none]
  • Testing: [e.g., Jest, pytest, go test]
  • Build: [e.g., npm, poetry, go build]
  • Language: [例如:TypeScript, Python, Go]
  • Framework: [例如:Express, FastAPI, none]
  • Database: [例如:PostgreSQL, SQLite, none]
  • Testing: [例如:Jest, pytest, go test]
  • Build: [例如:npm, poetry, go build]

Core Features

Core Features

  1. [Feature 1]: [Brief description]
  2. [Feature 2]: [Brief description]
  3. [Feature 3]: [Brief description] [...]
  1. [...]

Non-Goals

Non-Goals

  • [Explicit exclusion 1]
  • [Explicit exclusion 2]

  • [明确排除项1]
  • [明确排除项2]

Phase 0: Project Setup (Foundation)

Phase 0: Project Setup (Foundation)

Objective

Objective

Initialize project structure with all dependencies and configuration.
Initialize project structure with all dependencies and configuration.

Tasks

Tasks

  1. Initialize project structure
  2. Set up package management
  3. Configure development tools (linting, formatting)
  4. Create initial directory structure
  5. Add basic configuration files
  1. Initialize project structure
  2. Set up package management
  3. Configure development tools (linting, formatting)
  4. Create initial directory structure
  5. Add basic configuration files

Deliverables

Deliverables

  • Project directory created
  • Dependencies installed
  • Linting configured and passing
  • Basic structure in place
  • README with setup instructions
  • Project directory created
  • Dependencies installed
  • Linting configured and passing
  • Basic structure in place
  • README with setup instructions

Verification

Verification

bash
undefined
bash
undefined

Project builds

Project builds

[build command]
[build command]

Lint passes

Lint passes

[lint command]
[lint command]

Basic structure exists

Basic structure exists

ls -la [expected directories]
undefined
ls -la [expected directories]
undefined

Phase 0 Checkpoint

Phase 0 Checkpoint

PHASE 0 COMPLETE:
- Project initialized: [path]
- Dependencies: Installed
- Lint: Passing
→ Continue to Phase 1

PHASE 0 COMPLETE:
- Project initialized: [path]
- Dependencies: Installed
- Lint: Passing
→ Continue to Phase 1

Phase 1: Architecture & Design

Phase 1: Architecture & Design

Objective

Objective

Establish core architecture, interfaces, and patterns.
Establish core architecture, interfaces, and patterns.

Tasks

Tasks

  1. Define main interfaces/types
  2. Create directory structure following chosen pattern
  3. Implement core utilities
  4. Set up error handling patterns
  5. Create configuration management
  1. Define main interfaces/types
  2. Create directory structure following chosen pattern
  3. Implement core utilities
  4. Set up error handling patterns
  5. Create configuration management

Deliverables

Deliverables

  • Core types/interfaces defined
  • Directory structure matches architecture
  • Utility functions implemented
  • Error handling pattern established
  • Configuration loading works
  • Core types/interfaces defined
  • Directory structure matches architecture
  • Utility functions implemented
  • Error handling pattern established
  • Configuration loading works

Verification

Verification

bash
undefined
bash
undefined

Types compile

Types compile

[typecheck command]
[typecheck command]

Config loads

Config loads

[test config command]
undefined
[test config command]
undefined

Phase 1 Checkpoint

Phase 1 Checkpoint

PHASE 1 COMPLETE:
- Architecture: [pattern used]
- Types: Defined and compiling
- Config: Loading correctly
→ Continue to Phase 2

PHASE 1 COMPLETE:
- Architecture: [pattern used]
- Types: Defined and compiling
- Config: Loading correctly
→ Continue to Phase 2

Phase 2: Core Implementation

Phase 2: Core Implementation

Objective

Objective

Implement the primary functionality that defines this project.
Implement the primary functionality that defines this project.

Tasks

Tasks

[List core implementation tasks based on project type]
[List core implementation tasks based on project type]

Deliverables

Deliverables

  • [Core deliverable 1]
  • [Core deliverable 2]
  • [Core deliverable 3]
  • Core tests passing
  • [Core deliverable 1]
  • [Core deliverable 2]
  • [Core deliverable 3]
  • Core tests passing

Verification

Verification

bash
undefined
bash
undefined

Core functionality works

Core functionality works

[verification command]
[verification command]

Tests pass

Tests pass

[test command]
undefined
[test command]
undefined

Phase 2 Checkpoint

Phase 2 Checkpoint

PHASE 2 COMPLETE:
- Core feature 1: Working
- Core feature 2: Working
- Tests: Passing
→ Continue to Phase 3

PHASE 2 COMPLETE:
- Core feature 1: Working
- Core feature 2: Working
- Tests: Passing
→ Continue to Phase 3

Phase 3: Feature Implementation

Phase 3: Feature Implementation

Objective

Objective

Add all required features beyond the core.
Add all required features beyond the core.

Tasks

Tasks

[List additional feature tasks]
[List additional feature tasks]

Deliverables

Deliverables

  • [Feature deliverable 1]
  • [Feature deliverable 2]
  • All feature tests passing
  • [Feature deliverable 1]
  • [Feature deliverable 2]
  • All feature tests passing

Verification

Verification

bash
undefined
bash
undefined

Features work

Features work

[feature verification commands]
[feature verification commands]

All tests pass

All tests pass

[full test command]
undefined
[full test command]
undefined

Phase 3 Checkpoint

Phase 3 Checkpoint

PHASE 3 COMPLETE:
- Feature 1: Working
- Feature 2: Working
- All tests: Passing
→ Continue to Phase 4

PHASE 3 COMPLETE:
- Feature 1: Working
- Feature 2: Working
- All tests: Passing
→ Continue to Phase 4

Phase 4: Testing & Quality

Phase 4: Testing & Quality

Objective

Objective

Ensure comprehensive test coverage and code quality.
Ensure comprehensive test coverage and code quality.

Tasks

Tasks

  1. Write unit tests for all modules
  2. Write integration tests
  3. Add edge case tests
  4. Ensure code coverage target met
  5. Fix any linting issues
  1. Write unit tests for all modules
  2. Write integration tests
  3. Add edge case tests
  4. Ensure code coverage target met
  5. Fix any linting issues

Deliverables

Deliverables

  • Unit test coverage ≥ [X]%
  • Integration tests passing
  • Edge cases covered
  • All lint rules pass
  • No TypeScript/type errors
  • Unit test coverage ≥ [X]%
  • Integration tests passing
  • Edge cases covered
  • All lint rules pass
  • No TypeScript/type errors

Verification

Verification

bash
undefined
bash
undefined

Coverage report

Coverage report

[coverage command]
[coverage command]

All quality checks

All quality checks

[lint command] && [typecheck command] && [test command]
undefined
[lint command] && [typecheck command] && [test command]
undefined

Phase 4 Checkpoint

Phase 4 Checkpoint

PHASE 4 COMPLETE:
- Coverage: [X]%
- All tests: Passing
- Quality: All checks green
→ Continue to Phase 5

PHASE 4 COMPLETE:
- Coverage: [X]%
- All tests: Passing
- Quality: All checks green
→ Continue to Phase 5

Phase 5: Documentation & Polish

Phase 5: Documentation & Polish

Objective

Objective

Complete documentation and final polish.
Complete documentation and final polish.

Tasks

Tasks

  1. Write comprehensive README
  2. Add inline documentation/comments for complex code
  3. Create usage examples
  4. Add CHANGELOG if applicable
  5. Final code cleanup
  1. Write comprehensive README
  2. Add inline documentation/comments for complex code
  3. Create usage examples
  4. Add CHANGELOG if applicable
  5. Final code cleanup

Deliverables

Deliverables

  • README complete with all sections
  • Usage examples documented
  • Complex code has comments
  • No TODO comments remaining
  • Code formatted consistently
  • README complete with all sections
  • Usage examples documented
  • Complex code has comments
  • No TODO comments remaining
  • Code formatted consistently

Verification

Verification

bash
undefined
bash
undefined

Check for TODOs

Check for TODOs

grep -r "TODO" src/
grep -r "TODO" src/

Lint final

Lint final

[lint command]
[lint command]

Build final

Build final

[build command]

---
[build command]

---

Final Project Verification

Final Project Verification

Complete Checklist

Complete Checklist

  • Phase 0: Setup complete
  • Phase 1: Architecture established
  • Phase 2: Core functionality working
  • Phase 3: All features implemented
  • Phase 4: Tests passing, quality green
  • Phase 5: Documentation complete
  • Phase 0: Setup complete
  • Phase 1: Architecture established
  • Phase 2: Core functionality working
  • Phase 3: All features implemented
  • Phase 4: Tests passing, quality green
  • Phase 5: Documentation complete

Final Verification Commands

Final Verification Commands

bash
undefined
bash
undefined

Clean build

Clean build

[clean and build command]
[clean and build command]

All tests

All tests

[full test command]
[full test command]

Lint

Lint

[lint command]
[lint command]

Type check (if applicable)

Type check (if applicable)

[typecheck command]
[typecheck command]

Manual smoke test

Manual smoke test

[manual verification steps]
undefined
[manual verification steps]
undefined

Completion

Completion

When ALL of the following are true:
  • All 6 phases completed and verified
  • All tests passing
  • All quality checks green
  • Documentation complete
  • No TODO items remaining
Output: <promise>[COMPLETION_PHRASE]</promise>
When ALL of the following are true:
  • All 6 phases completed and verified
  • All tests passing
  • All quality checks green
  • Documentation complete
  • No TODO items remaining
Output: <promise>[COMPLETION_PHRASE]</promise>

Progress Tracking

Progress Tracking

Update after each phase:
PROJECT PROGRESS:
Phase 0 (Setup): [COMPLETE/IN PROGRESS]
Phase 1 (Architecture): [COMPLETE/IN PROGRESS/NOT STARTED]
Phase 2 (Core): [COMPLETE/IN PROGRESS/NOT STARTED]
Phase 3 (Features): [COMPLETE/IN PROGRESS/NOT STARTED]
Phase 4 (Testing): [COMPLETE/IN PROGRESS/NOT STARTED]
Phase 5 (Documentation): [COMPLETE/IN PROGRESS/NOT STARTED]

Current Phase: [X]
Overall: [description of state]
Update after each phase:
PROJECT PROGRESS:
Phase 0 (Setup): [COMPLETE/IN PROGRESS]
Phase 1 (Architecture): [COMPLETE/IN PROGRESS/NOT STARTED]
Phase 2 (Core): [COMPLETE/IN PROGRESS/NOT STARTED]
Phase 3 (Features): [COMPLETE/IN PROGRESS/NOT STARTED]
Phase 4 (Testing): [COMPLETE/IN PROGRESS/NOT STARTED]
Phase 5 (Documentation): [COMPLETE/IN PROGRESS/NOT STARTED]

Current Phase: [X]
Overall: [description of state]

If Stuck

If Stuck

After multiple iterations on same issue:
  1. Document the specific blocker
  2. List what approaches have been tried
  3. Identify the root cause if possible
  4. Consider if feature should be descoped (but DO NOT skip without documenting)
  5. Do NOT output false promise - continue or wait for max-iterations
undefined
After multiple iterations on same issue:
  1. Document the specific blocker
  2. List what approaches have been tried
  3. Identify the root cause if possible
  4. Consider if feature should be descoped (but DO NOT skip without documenting)
  5. Do NOT output false promise - continue or wait for max-iterations
undefined

Example: REST API Project

示例:REST API项目

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
undefined
输入:
  • 项目:待办事项列表REST API
  • 技术栈:Node.js, Express, TypeScript, SQLite
  • 功能:待办事项CRUD、用户认证、分类管理、截止日期
  • 承诺语:TODO_API_COMPLETE
生成的提示词:
markdown
undefined

Project: Todo List REST API

Project: Todo List REST API

Vision

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.
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

Technical Specifications

  • Language: TypeScript
  • Framework: Express.js
  • Database: SQLite with better-sqlite3
  • Testing: Jest with supertest
  • Build: npm with tsc
  • Language: TypeScript
  • Framework: Express.js
  • Database: SQLite with better-sqlite3
  • Testing: Jest with supertest
  • Build: npm with tsc

Core Features

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
  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

Non-Goals

  • Frontend/UI (API only)
  • Real-time updates (polling only)
  • File attachments
  • Collaboration/sharing

  • Frontend/UI (API only)
  • Real-time updates (polling only)
  • File attachments
  • Collaboration/sharing

Phase 0: Project Setup

Phase 0: Project Setup

Tasks

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}
  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

Deliverables

  • package.json with all dependencies
  • tsconfig.json configured
  • ESLint configured and passing
  • Directory structure created
  • npm run build
    works
  • package.json with all dependencies
  • tsconfig.json configured
  • ESLint configured and passing
  • Directory structure created
  • npm run build
    works

Verification

Verification

bash
npm run build
npm run lint
ls src/
bash
npm run build
npm run lint
ls src/

Phase 0 Checkpoint

Phase 0 Checkpoint

PHASE 0 COMPLETE: Project scaffolded, builds successfully

PHASE 0 COMPLETE: Project scaffolded, builds successfully

Phase 1: Architecture

Phase 1: Architecture

Tasks

Tasks

  1. Define TypeScript interfaces: User, Todo, Category
  2. Create database schema and initialization
  3. Set up Express app structure with middleware
  4. Implement error handling middleware
  5. Create config management
  1. Define TypeScript interfaces: User, Todo, Category
  2. Create database schema and initialization
  3. Set up Express app structure with middleware
  4. Implement error handling middleware
  5. Create config management

Deliverables

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
  • 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

Verification

bash
npm run build
npm test -- --grep "database"

bash
npm run build
npm test -- --grep "database"

Phase 2: Core Implementation

Phase 2: Core Implementation

Tasks

Tasks

  1. Implement User model with password hashing
  2. Create auth routes: POST /auth/signup, POST /auth/login
  3. Implement JWT middleware for protected routes
  4. Implement Todo model and CRUD
  5. Create todo routes: GET, POST, PUT, DELETE /todos
  1. Implement User model with password hashing
  2. Create auth routes: POST /auth/signup, POST /auth/login
  3. Implement JWT middleware for protected routes
  4. Implement Todo model and CRUD
  5. Create todo routes: GET, POST, PUT, DELETE /todos

Deliverables

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
  • 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

Verification

bash
undefined
bash
undefined

Signup

Signup

curl -X POST -H "Content-Type: application/json"
-d '{"email":"test@test.com","password":"password123"}'
http://localhost:3000/auth/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

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

---
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

Phase 3: Features

Tasks

Tasks

  1. Implement Category model and routes
  2. Add category relationship to todos
  3. Implement due date field with validation
  4. Add overdue detection endpoint
  5. Implement filtering (status, category, due date range)
  1. Implement Category model and routes
  2. Add category relationship to todos
  3. Implement due date field with validation
  4. Add overdue detection endpoint
  5. Implement filtering (status, category, due date range)

Deliverables

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

  • 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

Phase 4: Testing

Tasks

Tasks

  1. Unit tests for models
  2. Integration tests for all routes
  3. Auth flow tests
  4. Edge case tests (invalid inputs, unauthorized access)
  1. Unit tests for models
  2. Integration tests for all routes
  3. Auth flow tests
  4. Edge case tests (invalid inputs, unauthorized access)

Deliverables

Deliverables

  • ≥80% code coverage
  • All auth scenarios tested
  • All CRUD scenarios tested
  • Error cases tested
  • ≥80% code coverage
  • All auth scenarios tested
  • All CRUD scenarios tested
  • Error cases tested

Verification

Verification

bash
npm test -- --coverage

bash
npm test -- --coverage

Phase 5: Documentation

Phase 5: Documentation

Tasks

Tasks

  1. README with API documentation
  2. Setup instructions
  3. Example requests for each endpoint
  4. Environment variables documentation
  1. README with API documentation
  2. Setup instructions
  3. Example requests for each endpoint
  4. Environment variables documentation

Deliverables

Deliverables

  • README complete
  • All endpoints documented
  • Examples provided
  • No TODOs remaining

  • README complete
  • All endpoints documented
  • Examples provided
  • No TODOs remaining

Final Verification

Final Verification

bash
npm run lint
npm run build
npm test -- --coverage
npm start  # Manual smoke test
bash
npm run lint
npm run build
npm test -- --coverage
npm start  # Manual smoke test

Completion

Completion

When all phases verified and:
  • All tests passing with ≥80% coverage
  • All endpoints working
  • Documentation complete
Output: <promise>TODO_API_COMPLETE</promise>
undefined
When all phases verified and:
  • All tests passing with ≥80% coverage
  • All endpoints working
  • Documentation complete
Output: <promise>TODO_API_COMPLETE</promise>
undefined

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
  • 定义清晰的项目范围
  • 使用全部6个阶段
  • 包含验证命令
  • 设置切合实际的功能范围
  • 在检查点记录进度

DON'T:

不要做:

  • Skip architectural phase
  • Rush to implementation
  • Leave testing for "later"
  • Scope creep mid-project
  • Output promise before documentation
  • 跳过架构设计阶段
  • 急于进入实现环节
  • 把测试留到“以后”
  • 项目中期随意扩大范围
  • 未完成文档就输出承诺语

Integration with Ralph Loop

与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:
  1. First session: Phases 0-2 (Setup through Core)
  2. 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
.
bash
/ralph-wiggum:ralph-loop "[paste generated prompt]" --completion-promise "YOUR_PROMISE" --max-iterations 100
按项目规模推荐的迭代次数:
  • 小型项目(CLI工具、简单API):
    --max-iterations 60-80
  • 中型项目(带认证的完整API):
    --max-iterations 100-150
  • 大型项目(多功能应用):
    --max-iterations 150-200
提示: 对于大型项目,建议拆分为多个Ralph会话:
  1. 第一个会话:阶段0-2(项目搭建到核心功能)
  2. 第二个会话:阶段3-5(扩展功能到优化完善)

如需单任务提示词,请查看
ralph-prompt-single-task
。 如需多任务提示词,请查看
ralph-prompt-multi-task
。 如需研究/分析类提示词,请查看
ralph-prompt-research