
Ralph
Turn an existing markdown PRD into Ralph’s prd.json so autonomous Ralph iterations can execute one story per context window.
Overview
Ralph is an agent skill for the Build phase that converts existing PRDs into prd.json user stories sized for one autonomous Ralph iteration each.
Install
npx skills add https://github.com/snarktank/ralph --skill ralphWhat is this skill?
- Emits prd.json with project, branchName, description, and ordered userStories
- Enforces one-Ralph-iteration story sizing—the primary rule against context blow-ups
- Each story includes acceptanceCriteria, priority, passes, and notes fields
- User-story shape: As a / I want / so that plus testable criteria (e.g. typecheck passes)
- Triggers on convert PRD, Ralph JSON format, and prd.json creation requests
- Each user story must be completable in one Ralph iteration (one context window)
- Output schema includes userStories with id, priority, passes, and acceptanceCriteria arrays
Adoption & trust: 589 installs on skills.sh; 20k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have a PRD in markdown but Ralph cannot execute it until stories are JSON with tight, single-iteration scope and clear acceptance criteria.
Who is it for?
Builders already using or evaluating Ralph who have a PRD and want a strict one-story-per-context-window backlog.
Skip if: Teams with no PRD yet (write the PRD first), or projects that need multi-day epics in a single agent turn.
When should I use this skill?
You have an existing PRD and need prd.json; triggers include convert this prd, turn this into ralph format, create prd.json from this, ralph json.
What do I get? / Deliverables
You get a Ralph-ready prd.json with kebab-case branchName and prioritized user stories—then you point Ralph at that file to run autonomous iterations.
- prd.json with project metadata and sized userStories
- Suggested branchName under ralph/[feature-name-kebab-case]
Recommended Skills
Journey fit
Canonical shelf is Build because the output is executable agent backlog (user stories + acceptance criteria), not idea research or launch distribution. Fits agent-tooling: it formats work for the Ralph autonomous loop (branch naming, US-IDs, passes flags), not general PM docs alone.
How it compares
Use instead of hand-editing JSON or dumping an entire PRD into one giant agent prompt without story boundaries.
Common Questions / FAQ
Who is ralph for?
Solo and indie developers running Ralph-style autonomous agents who need PRDs converted into structured, iteration-sized JSON backlogs.
When should I use ralph?
In Build when you have a PRD and are about to start Ralph; say convert this PRD, create prd.json, or turn this into Ralph format before spawning iterations.
Is ralph safe to install?
Review the Security Audits panel on this Prism page and inspect the skill bundle in your repo before letting an agent write prd.json or branch names to disk.
SKILL.md
READMESKILL.md - Ralph
# Ralph PRD Converter Converts existing PRDs to the prd.json format that Ralph uses for autonomous execution. --- ## The Job Take a PRD (markdown file or text) and convert it to `prd.json` in your ralph directory. --- ## Output Format ```json { "project": "[Project Name]", "branchName": "ralph/[feature-name-kebab-case]", "description": "[Feature description from PRD title/intro]", "userStories": [ { "id": "US-001", "title": "[Story title]", "description": "As a [user], I want [feature] so that [benefit]", "acceptanceCriteria": [ "Criterion 1", "Criterion 2", "Typecheck passes" ], "priority": 1, "passes": false, "notes": "" } ] } ``` --- ## Story Size: The Number One Rule **Each story must be completable in ONE Ralph iteration (one context window).** Ralph spawns a fresh Amp 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 big (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 is too big. --- ## Story Ordering: Dependencies First Stories execute in priority order. Earlier stories must not depend on later ones. **Correct order:** 1. Schema/database changes (migrations) 2. Server actions / backend logic 3. UI components that use the backend 4. Dashboard/summary views that aggregate data **Wrong order:** 1. UI component (depends on schema that does not exist yet) 2. Schema change --- ## Acceptance Criteria: Must Be Verifiable Each criterion must be something Ralph can CHECK, not something vague. ### Good criteria (verifiable): - "Add `status` column to tasks table with default 'pending'" - "Filter dropdown has options: All, Active, Completed" - "Clicking delete shows confirmation dialog" - "Typecheck passes" - "Tests pass" ### Bad criteria (vague): - "Works correctly" - "User can do X easily" - "Good UX" - "Handles edge cases" ### Always include as final criterion: ``` "Typecheck passes" ``` For stories with testable logic, also include: ``` "Tests pass" ``` ### For stories that change UI, also include: ``` "Verify in browser using dev-browser skill" ``` 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 1. **Each user story becomes one JSON entry** 2. **IDs**: Sequential (US-001, US-002, etc.) 3. **Priority**: Based on dependency order, then document order 4. **All stories**: `passes: false` and empty `notes` 5. **branchName**: Derive from feature name, kebab-case, prefixed with `ralph/` 6. **Always add**: "Typecheck passes" to every story's acceptance criteria --- ## Splitting Large PRDs If a PRD has big features, split them: **Original:** > "Add user notification system" **Split into:** 1. US-001: Add notifications table to database 2. US-002: Create notification service for sending notifications 3. US-003: Add notification bell icon to header 4. US-004: Create notification dropdown panel 5. US-005: Add mark-as-read functionality 6. US-006: Add notification preferences page Each is one focused change that can b