home / skills / zpankz / mcp-skillset / ralph-prd

ralph-prd skill

/ralph-prd

This skill generates structured Product Requirements Documents for complex Ralph Loop tasks, breaking work into phases with clear success criteria and exit

npx playbooks add skill zpankz/mcp-skillset --skill ralph-prd

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
2.5 KB
---
name: ralph-prd
description: |
  Generates Product Requirements Documents for complex Ralph Loop tasks.
  Use when asked to "generate a PRD", "create product requirements", or
  "plan a ralph task". Delegates to prometheus agent for strategic planning.
allowed-tools: Read, Write, Grep, Glob, Bash
model: sonnet
context: fork
agent: ralph-domain-agent
user-invocable: true
---

# Ralph PRD Workflow

## Purpose

Generate structured Product Requirements Documents (PRDs) for complex Ralph Loop tasks. This skill helps break down large tasks into manageable phases with clear success criteria and exit conditions.

## Integrations

| Type | References |
|------|------------|
| skills | ralph-graceful-exit |
| agents | prometheus, metis |
| hooks | ralph-activity-log |

## PRD Template Structure

```json
{
  "title": "Task Title",
  "objective": "Clear goal statement",
  "success_criteria": [
    "Criterion 1: Specific, measurable outcome",
    "Criterion 2: Another measurable outcome"
  ],
  "phases": [
    {
      "name": "Phase 1: Discovery",
      "tasks": ["Task 1.1", "Task 1.2"],
      "completion": 0
    },
    {
      "name": "Phase 2: Implementation",
      "tasks": ["Task 2.1", "Task 2.2"],
      "completion": 0
    }
  ],
  "constraints": [
    "Constraint 1",
    "Constraint 2"
  ],
  "exit_conditions": [
    "All tests pass",
    "Documentation complete",
    "No regressions"
  ]
}
```

## Workflow

1. **Analyze task complexity** via metis agent
   - Identify scope and dependencies
   - Estimate effort per phase
   - Flag potential blockers

2. **Generate PRD JSON** via prometheus agent
   - Define clear objective
   - Break into phases
   - Set measurable success criteria

3. **Store PRD** in `.ralph/prd.json`
   - Create .ralph directory if needed
   - Validate JSON structure

4. **Track completion %** per iteration
   - Update phase completion as tasks finish
   - Log progress to ralph-activity-log

5. **Invoke ralph-graceful-exit** when criteria met
   - Check all success_criteria
   - Verify exit_conditions
   - Recommend completion

## Usage

### Generate PRD for New Task

```
/ralph-prd "Implement user authentication with OAuth2"
```

### Check PRD Progress

```
/ralph-prd status
```

### Update Phase Completion

```
/ralph-prd update --phase 1 --completion 100
```

## Progressive Loading

For detailed templates, see:
- [templates/default-prd.json](templates/default-prd.json) - Standard PRD template
- [templates/feature-prd.json](templates/feature-prd.json) - Feature-focused template

Overview

This skill generates structured Product Requirements Documents (PRDs) for complex Ralph Loop tasks. It breaks large objectives into phased plans with measurable success criteria and clear exit conditions. The output is saved as a validated JSON PRD and integrated with activity logging and graceful exit checks.

How this skill works

The skill analyzes task complexity and dependencies via the metis agent, producing phase-level estimates and blocker flags. It delegates PRD generation to the prometheus agent, which formats a JSON PRD with objective, phases, success criteria, constraints, and exit conditions. The PRD is stored in .ralph/prd.json, tracked for per-phase completion, and logged to ralph-activity-log. When success criteria and exit conditions are met, it invokes ralph-graceful-exit to recommend completion.

When to use it

  • When asked to generate a PRD or create product requirements for a Ralph Loop task
  • When planning or scoping a complex feature that needs phased delivery and measurable outcomes
  • When you need a validated JSON artifact stored in the project for automation or tracking
  • When you want progress tracked per phase and integrated activity logging
  • When preparing to trigger a graceful exit after meeting objective criteria

Best practices

  • Provide a single clear objective statement to keep the PRD focused
  • List measurable success criteria and concrete exit conditions for each phase
  • Use phased tasks with small, testable work items to enable accurate completion tracking
  • Run complexity analysis early to surface dependencies and blockers
  • Keep the .ralph/prd.json under source control and update completion percentages as work finishes

Example use cases

  • Create a PRD for implementing OAuth2 user authentication with phased rollout and test criteria
  • Plan a cross-team feature release that requires dependency mapping and staged implementation
  • Generate a feature-focused PRD template for product managers to hand off to engineering
  • Track and update phase completion during sprint iterations, logging progress automatically
  • Trigger a graceful exit decision after all success criteria and exit conditions are verified

FAQ

What format does the PRD use?

The PRD is generated as a validated JSON file following the skill's template (title, objective, success_criteria, phases, constraints, exit_conditions).

Where is the PRD saved?

PRDs are stored at .ralph/prd.json; the skill creates the .ralph directory if it does not exist and validates JSON structure before saving.

How is progress tracked?

Phase completion percentages are updated per iteration and logged to ralph-activity-log; tasks finishing update the phase completion which can trigger exit checks.