Generate a Product Requirements Document (prd.json) for the Ralph autonomous agent loop. Use when planning a feature, starting a new project, or preparing work for Ralph to implement. Triggers on: create a prd, write prd for, plan this feature, generate user stories, set up ralph for, spec out.
Create detailed Product Requirements Documents that are clear, actionable, and suitable for autonomous implementation by Ralph.
prd.json in project rootImportant: Do NOT start implementing. Just create the PRD.
Ask only critical questions where the initial prompt is ambiguous. Focus on:
1. What is the primary goal of this feature?
A. Improve user onboarding experience
B. Increase user retention
C. Reduce support burden
D. Other: [please specify]
2. Who is the target user?
A. New users only
B. Existing users only
C. All users
D. Admin users only
3. What is the scope?
A. Minimal viable version (MVP)
B. Full-featured implementation
C. Just the backend/API
D. Just the UI/frontend
4. What technology stack?
A. React + Node.js
B. Next.js
C. Plain HTML/CSS/JS
D. Other: [please specify]
5. What's explicitly OUT of scope?
A. Authentication/login
B. Database persistence
C. Mobile responsiveness
D. None of the above - include everything
This lets users respond with "1A, 2C, 3A, 4B, 5A" for quick iteration.
After gathering answers, break the feature into small, focused user stories.
Each story must be small enough to complete in one Ralph iteration (one agent context window, ~15-30 minutes of focused work).
Good story sizes:
Too large (must split):
Each story needs:
Criteria must be specific and verifiable, not vague.
Bad (too vague):
Good (specific and testable):
{ error: 'Invalid email' } for malformed input"For every story, include relevant items from:
For UI stories, always include:
For API stories, always include:
Explicitly state what this PRD will NOT include. This prevents scope creep and sets clear boundaries.
Examples:
Arrange stories so foundations come first:
A story cannot depend on a higher-numbered story.
The PRD reader may be a junior developer or AI agent (Ralph). Therefore:
Save as prd.json in the project root:
{
"projectName": "Feature Name",
"branchName": "ralph/feature-name",
"description": "Brief description of the feature and problem it solves",
"userStories": [
{
"id": "US-001",
"title": "Short action-oriented title",
"priority": 1,
"description": "Detailed context: what to build and why. Include relevant technical details.",
"acceptanceCriteria": [
"Specific verifiable criterion",
"Another specific criterion",
"Typecheck passes"
],
"passes": false
}
]
}
Fields:
projectName: Human-readable feature namebranchName: Git branch (convention: ralph/kebab-case-name)description: Overview of the feature and problem it solvesuserStories: Array of stories, ordered by prioritypasses: Always false initially (Ralph sets to true when complete){
"projectName": "Task Priority System",
"branchName": "ralph/task-priority",
"description": "Add priority levels to tasks so users can focus on what matters most. Tasks can be marked as high, medium, or low priority with visual indicators and filtering.",
"userStories": [
{
"id": "US-001",
"title": "Add priority field to database schema",
"priority": 1,
"description": "Add a priority column to the tasks table to persist priority across sessions. Priority should be an enum of 'high', 'medium', or 'low' with 'medium' as the default.",
"acceptanceCriteria": [
"Migration adds priority column to tasks table",
"Column type is enum: 'high' | 'medium' | 'low'",
"Default value is 'medium'",
"Migration runs without errors",
"Existing tasks get 'medium' priority"
],
"passes": false
},
{
"id": "US-002",
"title": "Display priority badge on task cards",
"priority": 2,
"description": "Show a colored badge on each task card indicating its priority level. Users should see priority at a glance without hovering or clicking.",
"acceptanceCriteria": [
"Each task card shows a priority badge",
"High priority: red badge with 'High' text",
"Medium priority: yellow badge with 'Medium' text",
"Low priority: gray badge with 'Low' text",
"Badge is visible without interaction",
"Typecheck passes",
"Visually verified in browser"
],
"passes": false
},
{
"id": "US-003",
"title": "Add priority selector to task edit form",
"priority": 3,
"description": "Allow users to change a task's priority when editing it. The selector should show the current priority and save changes immediately.",
"acceptanceCriteria": [
"Priority dropdown appears in task edit modal",
"Dropdown shows all three options: High, Medium, Low",
"Current priority is pre-selected",
"Selection change saves to database immediately",
"UI updates to reflect new priority without page reload",
"Typecheck passes",
"Visually verified in browser"
],
"passes": false
},
{
"id": "US-004",
"title": "Add priority filter to task list",
"priority": 4,
"description": "Add a filter dropdown to the task list header so users can view only tasks of a specific priority level.",
"acceptanceCriteria": [
"Filter dropdown in task list header",
"Options: All, High, Medium, Low",
"Selecting a filter shows only matching tasks",
"Filter state persists in URL query params",
"Shows 'No tasks found' when filter has no matches",
"Typecheck passes",
"Visually verified in browser"
],
"passes": false
}
]
}
Tell the user:
PRD saved to prd.json
To start Ralph:
./ralph.sh
To check story status:
cat prd.json | jq '.userStories[] | {id, title, passes}'
Before saving the PRD:
ralph/feature-name convention"passes": falseprd.jsonGoogle Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks OpenClaw to add a note, list notes, search notes, or manage note folders.
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
Use when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
Manage Trello boards, lists, and cards via the Trello REST API.
Category:productivity