
Ralph Prd
- 1 installs
- 21 repo stars
- Updated August 5, 2026
- joaquimscosta/arkhe-claude-plugins
Interactive wizard that creates a PRD and scaffolds the task set and runner files needed to start the Ralph autonomous loop.
About
Creates a Product Requirements Document and scaffolds the Ralph project setup including tasks.json, PROMPT.md, and the loop runner. A developer uses it to prepare a project for autonomous development before running the Ralph loop.
- Interactive PRD discovery questions
- Scaffolds tasks.json, ralph.sh, and taskset files
Ralph Prd by the numbers
- 1 all-time installs (skills.sh)
- Ranked #2,479 of 3,282 Productivity & Planning skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/joaquimscosta/arkhe-claude-plugins --skill ralph-prdAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 21 |
| Last updated | August 5, 2026 |
| Repository | joaquimscosta/arkhe-claude-plugins ↗ |
What it does
Interactive wizard that creates a PRD and scaffolds the task set and runner files needed to start the Ralph autonomous loop.
Files
Ralph PRD Creation
Interactive wizard to create Product Requirements Document and Ralph project setup with task sets.
Quick Start
/create-prd # Start interactive wizard
/create-prd "Build a todo app" # Start with descriptionWhat It Creates
project/
├── PROMPT.md # Instructions for each iteration
├── ralph.sh # Loop runner (executable)
└── .ralph/
├── current-taskset -> tasksets/initial # Symlink to active taskset
└── tasksets/
└── initial/ # Your task set (named during setup)
├── tasks.json # Task list (JSON)
├── prd.md # Requirements (Markdown)
├── memories.md # Persistent learnings
├── config.json # Ralph settings
└── activity.log # Iteration log (empty)Discovery Questions
Ask these discovery questions:
0. Task Set Name - What should this collection be called? (default: "initial") 1. Problem - What problem are you solving? 2. Audience - Who is the target user? 3. Features - What are the 3-5 core features? 4. Tech Stack - What technologies to use? 5. Architecture - Monolith, microservices, etc.? 6. UI/UX - Visual requirements and preferences? 7. Auth - Authentication needs? 8. Integrations - Third-party services? 9. Success Criteria - How do we know it's done?
Question Specificity for Destructive Operations
When discovery questions involve deleting files, removing dependencies, or other destructive changes:
- Always include full paths of items being deleted or modified
- State size/scope — file count, line count, component count
- Explicitly state what will NOT be affected
- Frame as confirmation, not open question — "Deleting X, Y, Z. Proceed?" not "What should be deleted?"
See EXAMPLES.md for vague-vs-specific anti-patterns.
Task Generation
Convert features into atomic tasks with categories: setup, feature, integration, styling, testing, verification. See WORKFLOW.md for task format and categories.
Final verification task: Always include a final task with verificationTier: "visual" (UI projects) or "api" (API-only projects) that verifies the complete application works end-to-end. This catches issues that individual task verification misses.
Workflow
See WORKFLOW.md for detailed discovery flow.
Examples
See EXAMPLES.md for PRD examples.
Troubleshooting
See TROUBLESHOOTING.md for common issues.
Templates (MANDATORY)
You MUST read and use these templates when generating output files. Do NOT write simplified versions from memory — the loop depends on exact field names and signal formats.
prompt.md.template- CRITICAL: Contains theRALPH_COMPLETE:signal in Step 5. Read this template with the Read tool and fill in{{placeholders}}. Never hand-write PROMPT.md.tasks.json.template- CRITICAL: Tasks use"passes": false/"passes": true(NOT"status": "pending"/"status": "done"). The completion signal checkspasses.prd.md.template- PRD document structureconfig.json.template- Ralph configurationmemories.md.template- Learnings file
Why This Matters
The ralph.sh loop script checks for RALPH_COMPLETE: in the output to stop. The prompt.md.template Step 5 tells Ralph to emit this signal when all tasks have passes: true. If PROMPT.md is hand-written without Step 5, or tasks.json uses a different field name, the loop runs forever.
ralph.sh
Always copy ralph.sh from this plugin's scripts/ralph.sh directory. It contains required flags (--dangerously-skip-permissions, --disallowedTools) that are essential for non-interactive execution.
After Setup
./ralph.sh 20 # Start autonomous loopCreating Additional Task Sets
After initial setup, create more task sets:
/ralph taskset new "auth-feature" # Create new task set
/ralph taskset list # See all task sets
/ralph taskset switch "auth-feature" # Switch to itRalph PRD Examples
Example 1: Todo App PRD
Discovery Session
Q: What problem are you solving?
A: I need a simple way to track daily tasks without complex features.
Q: Who is the target audience?
A: Just me - a developer who wants a minimal todo app.
Q: What are the 3-5 core features?
A: Add todos, mark complete, delete todos, persist to localStorage.
Q: Tech stack?
A: React with TypeScript, Vite, Tailwind CSS.
Q: Architecture?
A: Frontend only, localStorage for persistence.
Q: UI/UX?
A: Minimal, clean, works on desktop.
Q: Auth needed?
A: No.
Q: Integrations?
A: None.
Q: Success criteria?
A: I can add, complete, and delete todos. Data persists on refresh.Generated tasks.json
(timestamps are generated at creation time)
{
"project": "simple-todo",
"created": "2026-02-01T10:00:00Z",
"tasks": [
{
"id": "setup-001",
"category": "setup",
"description": "Initialize Vite + React + TypeScript project",
"steps": [
"Run npm create vite@latest . -- --template react-ts",
"Install dependencies",
"Install Tailwind CSS",
"Verify dev server starts"
],
"verificationTier": "build",
"passes": false,
"iteration_completed": null
},
{
"id": "feat-001",
"category": "feature",
"description": "Create TodoList component with state",
"steps": [
"Create src/components/TodoList.tsx",
"Add useState for todos array",
"Render list of todo items"
],
"verificationTier": "build",
"passes": false,
"iteration_completed": null
},
{
"id": "feat-002",
"category": "feature",
"description": "Add todo creation functionality",
"steps": [
"Create AddTodo component",
"Add input field and submit handler",
"Connect to parent state"
],
"verificationTier": "build",
"passes": false,
"iteration_completed": null
},
{
"id": "feat-003",
"category": "feature",
"description": "Add complete and delete functionality",
"steps": [
"Add toggle complete handler",
"Add delete handler",
"Style completed items differently"
],
"verificationTier": "build",
"passes": false,
"iteration_completed": null
},
{
"id": "feat-004",
"category": "feature",
"description": "Add localStorage persistence",
"steps": [
"Save todos to localStorage on change",
"Load todos from localStorage on mount",
"Verify persistence across page refresh"
],
"verificationTier": "build",
"passes": false,
"iteration_completed": null
},
{
"id": "style-001",
"category": "styling",
"description": "Apply Tailwind CSS styling",
"steps": [
"Style the layout",
"Style todo items",
"Add hover and focus states"
],
"verificationTier": "visual",
"passes": false,
"iteration_completed": null
},
{
"id": "verify-001",
"category": "verification",
"description": "Final visual verification of complete todo app",
"steps": [
"Start dev server",
"Open http://localhost:5173 with playwright-cli",
"Take snapshot to verify layout renders correctly",
"Add a todo item, mark it complete, delete another",
"Screenshot final state",
"Verify localStorage persistence by refreshing",
"Stop dev server"
],
"verificationTier": "e2e",
"passes": false,
"iteration_completed": null
}
]
}---
Example 2: REST API PRD
Discovery Session
Q: What problem are you solving?
A: Need a user management API for a mobile app.
Q: Target audience?
A: Mobile app developers consuming this API.
Q: Core features?
A: User CRUD, authentication, password reset.
Q: Tech stack?
A: Node.js, Express, TypeScript, PostgreSQL.
Q: Architecture?
A: REST API with JWT auth, deployed to Railway.
Q: UI/UX?
A: N/A - API only.
Q: Auth?
A: JWT tokens, email/password login.
Q: Integrations?
A: SendGrid for email.
Q: Success criteria?
A: All endpoints work, JWT auth functional, documented with OpenAPI.Generated tasks.json
{
"project": "user-api",
"tasks": [
{
"id": "setup-001",
"category": "setup",
"description": "Initialize Express + TypeScript project",
"steps": [
"npm init",
"Install Express, TypeScript, dependencies",
"Configure tsconfig.json",
"Create basic server.ts"
],
"verificationTier": "build",
"passes": false
},
{
"id": "setup-002",
"category": "setup",
"description": "Set up PostgreSQL with Prisma",
"steps": [
"Install Prisma",
"Create user schema",
"Run initial migration"
],
"verificationTier": "build",
"passes": false
},
{
"id": "feat-001",
"category": "feature",
"description": "Create user CRUD endpoints",
"steps": [
"GET /users",
"GET /users/:id",
"POST /users",
"PUT /users/:id",
"DELETE /users/:id"
],
"verificationTier": "api",
"passes": false
},
{
"id": "feat-002",
"category": "feature",
"description": "Implement JWT authentication",
"steps": [
"POST /auth/login",
"POST /auth/register",
"JWT token generation",
"Auth middleware"
],
"verificationTier": "api",
"passes": false
},
{
"id": "feat-003",
"category": "feature",
"description": "Add password reset flow",
"steps": [
"POST /auth/forgot-password",
"POST /auth/reset-password",
"Token generation and validation"
],
"verificationTier": "build",
"passes": false
},
{
"id": "int-001",
"category": "integration",
"description": "Integrate SendGrid for email",
"steps": [
"Install SendGrid SDK",
"Create email service",
"Send verification and reset emails"
],
"verificationTier": "build",
"passes": false
},
{
"id": "test-001",
"category": "testing",
"description": "Add API tests",
"steps": [
"Install Jest and Supertest",
"Test auth endpoints",
"Test user CRUD"
],
"verificationTier": "build",
"passes": false
},
{
"id": "verify-001",
"category": "verification",
"description": "Final API verification of all endpoints",
"steps": [
"Start server",
"curl POST /auth/register with test user",
"curl POST /auth/login and capture JWT",
"curl GET /users with JWT header, verify 200",
"curl POST /users, PUT /users/:id, DELETE /users/:id",
"Verify all status codes and response bodies",
"Stop server"
],
"verificationTier": "api",
"passes": false
}
]
}---
Example 3: Quick PRD with Description
If you provide a description directly:
/create-prd "Build a markdown note-taking app with React"The wizard will pre-fill assumptions and ask only clarifying questions:
Based on "Build a markdown note-taking app with React", I'll assume:
- React + TypeScript + Vite
- Markdown editor with preview
- localStorage for persistence
- Minimal styling
Is this correct? (y/n/modify)---
Anti-Patterns to Avoid
Too Many Features
❌ Bad:
Features: User auth, real-time collaboration, version history,
AI suggestions, export to PDF, mobile app, team workspaces...✅ Good:
Features: Create notes, edit with markdown, save to localStorage.Vague Descriptions
❌ Bad:
Description: Make a modern web app✅ Good:
Description: Create a note-taking app that supports markdown
formatting with live previewMissing Success Criteria
❌ Bad:
Success: It works✅ Good:
Success:
- Can create, edit, delete notes
- Markdown renders correctly
- Notes persist across sessions
- Works on Chrome and Firefox---
Anti-Patterns: Discovery Question Specificity
When discovery involves destructive operations, vague questions lead to user confusion about scope.
File Deletion
❌ Vague:
Q: Should I clean up the old components?
A: Yes, go ahead.✅ Specific:
Q: I will delete these 3 files (47 lines total):
- src/components/OldHeader.tsx (18 lines)
- src/components/OldFooter.tsx (22 lines)
- src/components/OldNav.tsx (7 lines)
The new Header.tsx, Footer.tsx, and Nav.tsx are NOT affected.
Should I proceed?
A: Yes, delete those 3 files.Dependency Removal
❌ Vague:
Q: Should I remove the unused packages?
A: Sure.✅ Specific:
Q: I found 2 unused dependencies to remove:
- lodash (used nowhere after refactor)
- moment (replaced by date-fns in src/utils/date.ts)
Keeping: react, react-dom, date-fns, tailwindcss (all actively used).
Should I run `npm uninstall lodash moment`?
A: Yes, remove both.Route/Page Removal
❌ Vague:
Q: The old pages aren't needed anymore, right?✅ Specific:
Q: Task says to remove the legacy dashboard. This will delete:
- src/pages/Dashboard.tsx (142 lines) — the old dashboard
- src/pages/DashboardSettings.tsx (89 lines) — old settings panel
NOT affected: src/pages/NewDashboard.tsx (the replacement)
The sidebar link in Layout.tsx will be updated to point to NewDashboard.
Should I proceed?---
Example: Final Verification Task
Every task set should end with a verification task that confirms the complete application works.
UI Project (verificationTier: "visual" or "e2e")
{
"id": "verify-001",
"category": "verification",
"description": "Final visual verification of complete application",
"steps": [
"Start dev server",
"Open http://localhost:5173 with playwright-cli",
"Take snapshot to verify page structure",
"Screenshot the main page",
"Navigate to each route and screenshot",
"Verify no blank pages or broken layouts",
"Stop dev server"
],
"verificationTier": "visual",
"passes": false,
"iteration_completed": null
}API Project (verificationTier: "api")
{
"id": "verify-001",
"category": "verification",
"description": "Final API verification of all endpoints",
"steps": [
"Start server",
"curl each endpoint with valid auth",
"Verify all return expected status codes",
"Verify response bodies match schema",
"Test error cases (401, 404, 422)",
"Stop server"
],
"verificationTier": "api",
"passes": false,
"iteration_completed": null
}{
"project": "{{project_name}}",
"taskset": "{{taskset_name}}",
"created": "{{timestamp}}",
"ralph_version": "2.0.0",
"settings": {
"max_iterations": 20,
"completion_signal": "RALPH_COMPLETE:"
},
"tech_stack": {
"framework": "{{framework}}",
"language": "{{language}}",
"build_tool": "{{build_tool}}",
"styling": "{{styling}}"
},
"commands": {
"start": "{{start_command}}",
"lint": "{{lint_command}}",
"typecheck": "{{typecheck_command}}",
"test": "{{test_command}}",
"build": "{{build_command}}"
}
}
# Memories: {{taskset_name}}
> Persistent learnings that survive across iterations within this task set.
> Add memories with `/ralph remember "insight"` or append directly.
---
## Patterns
<!-- Code patterns, conventions, and standards discovered in this project -->
## Decisions
<!-- Architectural and design decisions made during development -->
## Fixes
<!-- Solutions to problems encountered (for future reference) -->
## Context
<!-- Important project context (deprecated folders, naming conventions, etc.) -->
---
<!-- Memories appended below by iterations -->
# {{project_name}} - Product Requirements Document
**Created:** {{timestamp}}
**Status:** Ready for Ralph
---
## Problem Statement
{{problem_statement}}
---
## Target Audience
{{target_audience}}
---
## Core Features
{{#features}}
### {{feature_number}}. {{feature_name}}
{{feature_description}}
{{/features}}
---
## Tech Stack
| Component | Choice |
|-----------|--------|
| Framework | {{framework}} |
| Language | {{language}} |
| Build Tool | {{build_tool}} |
| Styling | {{styling}} |
| Database | {{database}} |
---
## Architecture
{{architecture_description}}
---
## UI/UX Requirements
{{ui_requirements}}
---
## Authentication
{{auth_requirements}}
---
## Integrations
{{integrations}}
---
## Success Criteria
{{#success_criteria}}
- [ ] {{criterion}}
{{/success_criteria}}
---
## Out of Scope (v1)
{{out_of_scope}}
---
## Notes
- This PRD was generated for use with Ralph autonomous development loop
- Tasks are in `.ralph/current-taskset/tasks.json`
- Run `./ralph.sh` to start autonomous development
# Ralph Iteration Instructions
You are an autonomous development agent operating in the Ralph Wiggum loop. Each iteration runs in a **fresh context window**.
## Your Goals
1. Complete ONE task from the task list
2. Verify your work
3. Update task status
4. Commit changes
5. (Optional) Save learnings to memories
---
## Step 1: Orient
Read these files using the Read tool to understand current state:
- `.ralph/current-taskset/tasks.json` — current task state
- `.ralph/current-taskset/activity.log` — recent activity (last 5 entries)
- `.ralph/current-taskset/memories.md` — past learnings
---
## Step 2: Build (Builder Hat)
### Pick ONE Task
Find the first task in `.ralph/current-taskset/tasks.json` where `passes: false`.
### Implement
Follow the steps exactly as described in the task.
### Start the Application
{{start_command}}
### Verify
Run these commands to verify your work:
```bash
{{lint_command}}
{{typecheck_command}}
{{test_command}}
```
**Tier-specific checks** — read the task's `verificationTier` field:
| Tier | Additional Verification |
|------|------------------------|
| `build` | Standard checks only (default) |
| `visual` | Start dev server, use `playwright-cli` to open page + screenshot + close |
| `api` | Start server, `curl` endpoint, verify status + body |
| `e2e` | Start dev server, use `playwright-cli` for full user flow (see playwright-cli skill) |
If `verificationTier` is missing, treat as `"build"`. If `playwright-cli` unavailable, fall back to `build` and log warning.
---
## Step 3: Verify (Verifier Hat)
### Review
- Does the implementation meet all task steps?
- Did all verification commands pass?
- Did tier-specific verification pass? (check verificationTier)
- Is the code clean and documented?
### Update Task Status
Edit `.ralph/current-taskset/tasks.json`:
- Set `passes: true` for the completed task
- Set `iteration_completed` to the current iteration number
### Log Activity
Append to `.ralph/current-taskset/activity.log`:
```
=== ITERATION N | YYYY-MM-DD HH:MM:SS ===
TASK: {task_id} - {description}
ACTIONS:
- {what you did}
STATUS: PASS
COMMIT: {hash} "{message}"
---
```
### Commit
```bash
git add .
git commit -m "feat: {descriptive message}"
```
---
## Step 4: Learn (Optional)
If you discovered something worth remembering for future iterations:
Append to `.ralph/current-taskset/memories.md`:
```
## YYYY-MM-DD: {insight title}
{detailed insight - what you learned, why it matters}
---
```
Examples of useful memories:
- "Found that X library requires Y configuration"
- "Pattern for handling Z works better than expected"
- "Gotcha: A causes B under conditions C"
---
## Step 5: Decide
Check `.ralph/current-taskset/tasks.json`:
**If ALL tasks have `passes: true`:**
Output this exact signal:
```
RALPH_COMPLETE: All tasks verified
```
**If tasks remain incomplete:**
End this iteration. The loop will continue with fresh context.
---
## Important Rules
1. **ONE task per iteration** - Do not work on multiple tasks
2. **Complete fully** - Don't leave partial work
3. **Always verify** - Run lint/typecheck/tests
4. **Always commit** - One commit per completed task
5. **Log everything** - Future iterations need context
6. **Save learnings** - Help future iterations avoid mistakes
7. **tasks.json only** - Do not use TaskCreate/TaskUpdate
---
## Project Info
- **Project:** {{project_name}}
- **Task Set:** {{taskset_name}}
- **Tech Stack:** {{tech_stack}}
- **PRD:** `.ralph/current-taskset/prd.md`
{
"project": "{{project_name}}",
"taskset": "{{taskset_name}}",
"created": "{{timestamp}}",
"tasks": [
{
"id": "setup-001",
"category": "setup",
"description": "{{setup_description}}",
"steps": [
"{{setup_step_1}}",
"{{setup_step_2}}",
"{{setup_step_3}}"
],
"verificationTier": "build",
"passes": false,
"iteration_completed": null
},
{
"id": "feat-001",
"category": "feature",
"description": "{{feature_1_description}}",
"steps": [
"{{feature_1_step_1}}",
"{{feature_1_step_2}}"
],
"verificationTier": "build",
"passes": false,
"iteration_completed": null
}
]
}
Ralph PRD Troubleshooting
Common Issues
Issue: Wizard interrupted mid-flow
Symptoms:
- Partial
.ralph/directory created - Missing files (tasks.json, prd.md, or config.json)
Solution:
# Check what was created
ls -la .ralph/current-taskset/
# If incomplete, remove and restart
rm -rf .ralph/ PROMPT.md ralph.sh
/create-prd---
Issue: Invalid or empty task set name
Symptoms:
- Error creating directory under
.ralph/tasksets/ - Symlink
.ralph/current-tasksetpoints to non-existent directory
Causes & Solutions:
1. Name contains special characters
- Use alphanumeric characters, hyphens, and underscores only
- Example:
auth-feature,initial_setup
2. Name is empty
- Provide a name when prompted, or accept the default ("initial")
---
Issue: Existing .ralph/ directory conflicts
Symptoms:
- PRD creation fails or overwrites existing task sets
- Symlink already exists
Solution:
# Check existing state
ls -la .ralph/tasksets/
# To add a new task set without overwriting
/ralph taskset new "new-feature"
# To start completely fresh
rm -rf .ralph/ PROMPT.md ralph.sh
/create-prd---
Issue: Generated tasks too vague
Symptoms:
- Ralph loop fails to complete tasks
- Tasks like "implement the feature" without specific steps
Causes & Solutions:
1. Vague feature descriptions during wizard
- Be specific: "User login with email/password and JWT tokens" instead of "authentication"
- Include tech stack details and constraints
2. Fix after generation
# Edit tasks directly
vi .ralph/current-taskset/tasks.json
# Add specific steps to each task
# Break large tasks into smaller ones (prefix: setup-, feat-, test-)---
Issue: Generated tasks too granular
Symptoms:
- 50+ tasks generated for a simple project
- Tasks overlap or duplicate each other
Solution:
# Review and consolidate tasks
cat .ralph/current-taskset/tasks.json | jq '.tasks | length'
# Edit to merge related tasks
vi .ralph/current-taskset/tasks.json
# Aim for 10-25 tasks for most projects---
Issue: ralph.sh not generated or not executable
Symptoms:
bash: ralph.sh: No such file or directorybash: ralph.sh: Permission denied
Solution:
# If missing, re-run PRD creation
/create-prd
# If permission issue
chmod +x ralph.sh---
Issue: PROMPT.md missing or incorrect
Symptoms:
- Ralph loop doesn't know what to do
- Generic behavior instead of project-specific
Solution:
# Check if PROMPT.md exists and has content
ls -la PROMPT.md
wc -l PROMPT.md
# If missing or empty, re-run PRD creation
/create-prd---
Debugging Tips
Verify Complete Setup
# All required files should exist
ls -la PROMPT.md ralph.sh
ls -la .ralph/current-taskset/tasks.json
ls -la .ralph/current-taskset/prd.md
ls -la .ralph/current-taskset/config.json
ls -la .ralph/current-taskset/memories.md
ls -la .ralph/current-taskset/activity.logInspect Generated Tasks
# Pretty print tasks
cat .ralph/current-taskset/tasks.json | jq '.'
# Count tasks by category
cat .ralph/current-taskset/tasks.json | jq '[.tasks[].category] | group_by(.) | map({(.[0]): length}) | add'Review PRD Content
# Check the generated PRD
cat .ralph/current-taskset/prd.md---
Getting Help
If you're still stuck:
1. Verify all required files exist (see checklist above) 2. Check that tasks.json is valid JSON: cat .ralph/current-taskset/tasks.json | jq . 3. Re-run /create-prd for a fresh start 4. Review EXAMPLES.md for expected output format 5. Review WORKFLOW.md for the expected creation flow
Ralph PRD Creation Workflow
Step-by-step guide for creating a Product Requirements Document and Ralph project setup with task sets.
Overview
The /create-prd command walks you through an interactive discovery session, then generates all files needed to run a Ralph autonomous loop with task set isolation.
Discovery Flow
┌─────────────────────────────────────────────────────────────────┐
│ PRD CREATION WORKFLOW │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 0: TASK SET NAME │ │
│ │ │ │
│ │ Q: What should this task set be called? │ │
│ │ Default: "initial" │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 1: PROBLEM DEFINITION │ │
│ │ │ │
│ │ Q: What problem are you solving? │ │
│ │ Q: Who experiences this problem? │ │
│ │ Q: What's the impact of not solving it? │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 2: TARGET AUDIENCE │ │
│ │ │ │
│ │ Q: Who is the primary user? │ │
│ │ Q: What's their technical level? │ │
│ │ Q: How will they use this? │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 3: CORE FEATURES (3-5 features) │ │
│ │ │ │
│ │ Q: What are the must-have features? │ │
│ │ Q: What can be deferred to later? │ │
│ │ Q: What's the MVP scope? │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 4: TECH STACK │ │
│ │ │ │
│ │ Q: Preferred framework? (React, Vue, etc.) │ │
│ │ Q: Preferred language? (TypeScript, JavaScript) │ │
│ │ Q: Build tool? (Vite, Next.js, etc.) │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 5: ARCHITECTURE │ │
│ │ │ │
│ │ Q: Frontend only, fullstack, or API? │ │
│ │ Q: Data storage needs? │ │
│ │ Q: External services needed? │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 6: UI/UX │ │
│ │ │ │
│ │ Q: Design style? (minimal, modern, etc.) │ │
│ │ Q: Responsive requirements? │ │
│ │ Q: Accessibility needs? │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 7: AUTHENTICATION (if needed) │ │
│ │ │ │
│ │ Q: Auth required? │ │
│ │ Q: Auth method? (email/password, OAuth, etc.) │ │
│ │ Q: User roles needed? │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 8: INTEGRATIONS │ │
│ │ │ │
│ │ Q: Third-party APIs? │ │
│ │ Q: Payment processing? │ │
│ │ Q: Analytics? │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ STEP 9: SUCCESS CRITERIA │ │
│ │ │ │
│ │ Q: What defines "done"? │ │
│ │ Q: Key acceptance criteria? │ │
│ │ Q: Quality requirements? │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ GENERATION │ │
│ │ │ │
│ │ 1. Create .ralph/tasksets/{name}/ directory │ │
│ │ 2. Generate .ralph/tasksets/{name}/tasks.json │ │
│ │ 3. Generate .ralph/tasksets/{name}/prd.md │ │
│ │ 4. Generate .ralph/tasksets/{name}/memories.md │ │
│ │ 5. Create symlink .ralph/current-taskset │ │
│ │ 6. Generate PROMPT.md (with symlink paths) │ │
│ │ 7. Copy ralph.sh │ │
│ │ 8. Create .ralph/tasksets/{name}/config.json │ │
│ │ 9. Create empty .ralph/tasksets/{name}/activity.log │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘Question Details
Step 0: Task Set Name
Ask:
- "What would you like to name this task set?"
- "Examples: 'initial', 'auth-feature', 'test-coverage'"
Validation:
- Lowercase only
- Alphanumeric and hyphens only
- No spaces
- Default: "initial"
Step 1: Problem Definition
Ask:
- "What problem are you trying to solve with this project?"
- "Who currently experiences this problem?"
- "What happens if this problem isn't solved?"
Good answers include:
- Specific pain points
- Target user context
- Current workarounds
Step 2: Target Audience
Ask:
- "Who is the primary user of this application?"
- "What's their technical level?"
- "In what context will they use this?"
Consider:
- Developers vs. end users
- Mobile vs. desktop
- Frequency of use
Step 3: Core Features
Ask:
- "What are the 3-5 must-have features for v1?"
- "What features can wait for v2?"
- "What's the absolute minimum for a working product?"
Goal: Keep scope tight for Ralph to complete autonomously.
Step 4: Tech Stack
Ask:
- "Do you have a preferred framework?"
- "TypeScript or JavaScript?"
- "Any specific tools you want to use?"
Defaults if not specified:
- React + TypeScript
- Vite for bundling
- Tailwind for styling
Step 5: Architecture
Ask:
- "Frontend only, fullstack, or API only?"
- "Do you need a database?"
- "Any external services or APIs?"
Options:
- Static site / SPA
- Full-stack with backend
- API only
- Serverless
Step 6: UI/UX
Ask:
- "What visual style? (minimal, playful, corporate)"
- "Does it need to work on mobile?"
- "Any accessibility requirements?"
Step 7: Authentication
Ask:
- "Does this need user authentication?"
- "What auth method? (email/password, OAuth, magic links)"
- "Different user roles needed?"
Step 8: Integrations
Ask:
- "Any third-party APIs to integrate?"
- "Payment processing needed?"
- "Analytics or tracking?"
Step 9: Success Criteria
Ask:
- "What makes this project 'done'?"
- "Key things that must work?"
- "Quality bar? (tests, accessibility, performance)"
---
Task Generation
After discovery, generate tasks following this structure:
Task Categories
| Category | Description | Example |
|---|---|---|
setup | Project initialization | "Initialize React project" |
feature | Core functionality | "Add user login form" |
integration | External services | "Connect to Stripe API" |
styling | UI/UX work | "Add responsive styles" |
testing | Test coverage | "Write unit tests" |
Task Ordering
1. Setup tasks first - Must complete before features 2. Core features - In dependency order 3. Integrations - After related features 4. Styling - Can often be last 5. Testing - Parallel or at end
Task Granularity
Each task should be:
- Completable in ONE iteration
- Independently verifiable
- Clear in scope
Too big:
"Build the entire authentication system"
Right size:
"Create login form component"
"Add login API endpoint"
"Connect form to API"
"Add session management"
---
File Generation
.ralph/tasksets/{name}/tasks.json
{
"project": "{project-name}",
"taskset": "{taskset-name}",
"created": "{ISO-timestamp}",
"tasks": [
{
"id": "setup-001",
"category": "setup",
"description": "{description}",
"steps": ["{step1}", "{step2}"],
"passes": false,
"iteration_completed": null
}
]
}.ralph/tasksets/{name}/prd.md
Human-readable requirements document with:
- Problem statement
- Target audience
- Feature list
- Tech stack decisions
- Success criteria
.ralph/tasksets/{name}/memories.md
Empty template for persistent learnings:
# Memories: {taskset-name}
> Persistent learnings that survive across iterations.
## Patterns
<!-- Code patterns discovered -->
## Decisions
<!-- Design decisions made -->
## Fixes
<!-- Solutions to problems -->
## Context
<!-- Project context -->PROMPT.md
Instructions for each iteration, including:
- Reference to current-taskset/tasks.json and activity.log
- Reference to current-taskset/memories.md
- Start commands for the tech stack
- Verification commands
- Hat-lite workflow instructions
- Completion signal format
ralph.sh
Copy from plugin's scripts directory, or generate if needed.
.ralph/tasksets/{name}/config.json
{
"project": "{project-name}",
"taskset": "{taskset-name}",
"ralph_version": "2.0.0",
"max_iterations": 20,
"tech_stack": "{stack}",
"verification_commands": {
"lint": "npm run lint",
"typecheck": "npm run typecheck",
"test": "npm run test"
}
}.ralph/current-taskset
Symlink pointing to the active task set:
ln -sfn tasksets/{name} .ralph/current-taskset