Generate a Product Requirements Document (PRD) as a Linear project with issues. Use when planning a feature, starting a new project, or when asked to create a PRD. Triggers on: create a prd, write prd for, plan this feature, requirements for, spec out.
Create Product Requirements Documents directly in Linear as a project with issues. This enables seamless integration with Ralph for autonomous implementation.
Prerequisites: Linear MCP must be configured. See https://linear.app/docs/mcp
.ralph-project configurationImportant: Do NOT start implementing. Just create the PRD in Linear.
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
B. Full-featured implementation
C. Just the backend/API
D. Just the UI
This lets users respond with "1A, 2C, 3B" for quick iteration.
Use mcp__linear-server__list_teams to get available teams and ask the user which team to use.
Use mcp__linear-server__create_project with the PRD content:
{
"name": "<Feature Name>",
"team": "<team-id-or-name>",
"description": "Branch: ralph/<feature-name-kebab-case>\n\n# <Feature Name>\n\n## Overview\n<Brief description>\n\n## Goals\n- Goal 1\n- Goal 2\n\n## Functional Requirements\n- FR-1: ...\n- FR-2: ...\n\n## Non-Goals\n- Non-goal 1\n\n## Technical Considerations\n- Notes...\n\n## Success Metrics\n- Metric 1",
"state": "planned"
}
Critical: The first line of the description MUST be Branch: ralph/<feature-name> for Ralph to identify the correct git branch.
For each user story, use mcp__linear-server__create_issue:
{
"title": "US-001: <Story Title>",
"team": "<team-id-or-name>",
"project": "<project-name-or-id>",
"description": "As a <user>, I want <feature> so that <benefit>.\n\n## Acceptance Criteria\n- [ ] Criterion 1\n- [ ] Criterion 2\n- [ ] Typecheck passes",
"priority": 1,
"state": "Todo"
}
Create issues in dependency order. Map story position to Linear priority:
| Story Position | Linear Priority | |----------------|-----------------| | 1st (first) | 1 (Urgent) | | 2nd | 2 (High) | | 3rd | 3 (Normal) | | 4th and later | 4 (Low) |
Stories should be ordered by dependencies:
Create .ralph-project in the Ralph directory:
{
"linearProjectId": "<project-id-from-step-3>",
"branchName": "ralph/<feature-name>"
}
Use the Write tool to save this file.
Each story needs:
Important:
Each story must be completable in ONE Ralph iteration (one context window). Right-sized stories:
Good (single iteration):
Too large (split these):
Rule of thumb: If you can't describe the change in 2-3 sentences, it's too big.
The PRD reader may be a junior developer or AI agent. Therefore:
After creating everything, show the user:
Created Linear Project: <Project Name>
Project ID: <uuid>
Branch: ralph/<feature-name>
Created Issues:
- <TEAM>-123: US-001: <Title> (Urgent)
- <TEAM>-124: US-002: <Title> (High)
- <TEAM>-125: US-003: <Title> (Normal)
- <TEAM>-126: US-004: <Title> (Low)
Saved .ralph-project configuration.
To start Ralph:
./ralph.sh [max_iterations]
User request: "Create a PRD for adding task priority to our todo app"
After clarifying questions, creates:
Linear Project: "Task Priority System"
Branch: ralph/task-priority on first lineLinear Issues:
TEAM-101: US-001: Add priority field to database (Urgent)TEAM-102: US-002: Display priority indicator on task cards (High)TEAM-103: US-003: Add priority selector to task edit (Normal)TEAM-104: US-004: Filter tasks by priority (Low)Local file: .ralph-project with project ID and branch name
Before finishing:
Branch: ralph/<feature-name>.ralph-project configurationSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer