Ralph PRD Converter
Introduction
Ralph PRD Converter is a specialized utility for the Ralph autonomous agent ecosystem. It solves the critical challenge of translating high-level Product Requirements Documents (PRDs) into a machine-readable prd.json format that an autonomous agent can execute reliably.
The primary hurdle for autonomous agents is the context window. Large, vague tasks often lead to broken code and hallucination. This skill ensures that every requirement is:
- Atomized: Broken down into single-iteration tasks.
- Ordered: Sequenced by technical dependency (e.g., Database > Backend > UI).
- Verifiable: Equipped with concrete acceptance criteria that the agent can check via terminal or browser.
Installation
To integrate the Ralph PRD Converter into your Claude Code environment, ensure you have the Ralph repository cloned and configured.
-
Clone the repository:
git clone https://github.com/snarktank/ralph -
Navigate to your project directory where Ralph is initialized.
-
Ensure your
SKILL.mdor system prompt includes the Ralph conversion logic to recognize the following triggers:convert this prdturn this into ralph formatcreate prd.json from this
Usage
Once active, you can provide any Markdown or text-based PRD to Claude and request a conversion.
Example Prompt
“I have an existing PRD for a new user notification system. Convert this into Ralph format and create the
prd.jsonfile.”
Core Conversion Rules
To ensure the autonomous loop succeeds, the skill enforces several strict formatting rules:
- The One-Iteration Rule: Each user story must be completable in a single context window. If a change cannot be described in 2-3 sentences, the skill automatically splits it into smaller stories.
- Dependency Sequencing: Logic follows a strict hierarchy:
- Schema/Database changes and migrations.
- Server Actions and backend logic.
- UI Components utilizing the backend.
- Aggregated Views (Dashboards/Summaries).
- Verifiable Criteria: Every story includes mandatory checks such as
Typecheck passes. Frontend stories automatically includeVerify in browser using dev-browser skill.
Output Structure
The skill generates a structured prd.json located in your ralph/ directory:
{ "project": "ProjectName", "branchName": "ralph/feature-name", "description": "Feature summary", "userStories": [ { "id": "US-001", "title": "Add database column", "description": "As a user...", "acceptanceCriteria": ["Migration runs", "Typecheck passes"], "priority": 1, "passes": false, "notes": "" } ]}Best Practices
Note: Before saving a new
prd.json, the skill checks for existing files. If aprd.jsonexists for a different branch and contains progress, it will prompt to archive the previous run intoarchive/YYYY-MM-DD-feature-name/to prevent data loss.
- Be Specific: When providing the raw PRD, include specific field names or UI elements to help the skill generate better acceptance criteria.
- Verify Logic: Always review the generated
prioritysequence to ensure the database migrations are scheduled before the UI components. - Automated Verification: Ensure your environment has the
dev-browserskill enabled, as the PRD converter will frequently reference it for visual verification of frontend tasks.