The Ralph Converter skill (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/snarktank/ralph/llms.txt
Use this file to discover all available pages before exploring further.
/ralph) converts markdown PRDs into the prd.json format that Ralph uses for autonomous execution. It ensures stories are properly sized, ordered by dependencies, and have verifiable acceptance criteria.
Overview
The skill takes a PRD (markdown file or text) and converts it toprd.json in your project’s ralph directory. The conversion process:
- Validates story sizes (must fit in one context window)
- Orders stories by dependencies (schema → backend → UI)
- Ensures acceptance criteria are verifiable
- Adds required criteria (typecheck, browser verification)
- Archives previous runs if needed
Usage
Invoke the skill with any of these trigger phrases:Output Format
The skill generates aprd.json file with this structure:
Field Descriptions
Project name (derived from PRD or repository)
Git branch name in kebab-case, prefixed with
ralph/Brief feature description from PRD introduction
Array of user story objects ordered by dependency and priority
Sequential ID: US-001, US-002, etc.
Short descriptive title from PRD
User story in standard format: “As a [user], I want [feature] so that [benefit]”
Verifiable criteria that define “done”. Always includes “Typecheck passes” and “Verify in browser using dev-browser skill” for UI stories.
Execution order (1 = highest). Based on dependencies, then document order.
Whether story is complete. Always starts as
false.Learnings from implementation. Always starts empty.
The Number One Rule: Story Size
Each story must be completable in ONE Ralph iteration (one context window). Ralph spawns a fresh AI instance per iteration with no memory of previous work. If a story is too big, the LLM runs out of context before finishing and produces broken code.Right-sized Stories ✅
- Add a database column and migration
- Add a UI component to an existing page
- Update a server action with new logic
- Add a filter dropdown to a list
Too Large ❌ (Split These)
- “Build the entire dashboard” → Split into: schema, queries, UI components, filters
- “Add authentication” → Split into: schema, middleware, login UI, session handling
- “Refactor the API” → Split into one story per endpoint or pattern
Rule of thumb: If you cannot describe the change in 2-3 sentences, it’s too big.
Story Ordering: Dependencies First
Stories execute in priority order. Earlier stories must not depend on later ones.Correct Order ✅
Wrong Order ❌
Acceptance Criteria: Must Be Verifiable
Each criterion must be something Ralph can CHECK, not something vague.Good Criteria ✅
- “Add
statuscolumn to tasks table with default ‘pending’” - “Filter dropdown has options: All, Active, Completed”
- “Clicking delete shows confirmation dialog”
- “Typecheck passes”
- “Tests pass”
Bad Criteria ❌
- “Works correctly” (too vague)
- “User can do X easily” (not measurable)
- “Good UX” (subjective)
- “Handles edge cases” (which ones?)
Required Criteria
The skill automatically adds to every story:Frontend stories are NOT complete until visually verified. Ralph will use the dev-browser skill to navigate to the page, interact with the UI, and confirm changes work.
Conversion Rules
The skill follows these rules when converting:- Each user story becomes one JSON entry - One-to-one mapping
- IDs are sequential - US-001, US-002, etc.
- Priority based on dependencies - Then document order
- All stories start incomplete -
passes: false, emptynotes - branchName derived from feature - Kebab-case, prefixed with
ralph/ - Typecheck always added - Every story includes “Typecheck passes”
Splitting Large PRDs
If a PRD has big features, the skill splits them into smaller stories:Original Story
Split Into Smaller Stories
Example Conversion
Here’s a complete example of converting a PRD:Input PRD
Output JSON
Archiving Previous Runs
Before writing a newprd.json, the skill checks if there’s an existing one from a different feature:
- Read current
prd.json(if it exists) - Check if
branchNamediffers from the new feature’s branch name - If different AND
progress.txthas content:- Create archive folder:
archive/YYYY-MM-DD-feature-name/ - Copy current
prd.jsonandprogress.txtto archive - Reset
progress.txtwith fresh header
- Create archive folder:
The
ralph.sh script handles archiving automatically when you run it, but if you’re manually updating prd.json between runs, the skill will archive for you.Workflow
Have a PRD Ready
Create a PRD using the PRD Generator skill or write one manually in
tasks/prd-[feature-name].mdReview and Edit
Review the generated
prd.json. Check:- Story sizes are appropriate
- Dependencies are in correct order
- Acceptance criteria are verifiable
Validation Checklist
Before savingprd.json, the skill verifies:
- Previous run archived (if prd.json exists with different branchName)
- Each story is completable in one iteration (small enough)
- Stories are ordered by dependency (schema → backend → UI)
- Every story has “Typecheck passes” as criterion
- UI stories have “Verify in browser using dev-browser skill” as criterion
- Acceptance criteria are verifiable (not vague)
- No story depends on a later story
Next Steps
After generatingprd.json:
- Review - Check story sizes and ordering
- Commit - Add the prd.json to version control
- Run Ralph - Execute
./scripts/ralph/ralph.shto start autonomous implementation - Monitor - Check
progress.txtfor learnings andgit logfor commits
Common Issues
Stories Too Large
If Ralph consistently fails to complete stories:- Each story should be 2-3 sentences maximum
- Split into smaller, more focused stories
- Check for multiple logical changes in one story
Wrong Dependency Order
If stories fail due to missing dependencies:- Ensure schema changes come before backend logic
- Backend logic must exist before UI can use it
- Move dependent stories to later in the priority order
Vague Acceptance Criteria
If Ralph can’t determine when a story is complete:- Replace “works correctly” with specific behaviors
- Add concrete UI states or API responses
- Include specific file paths or function names

