一键导入
ralph-convert
Converts markdown PRDs into structured prd.json format for autonomous agent execution. Ensures stories are properly sized and ordered by dependencies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Converts markdown PRDs into structured prd.json format for autonomous agent execution. Ensures stories are properly sized and ordered by dependencies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Cancel an active ralph-loop. Removes the loop state file so the Stop hook becomes a no-op on the next session exit. Optional --remove-hook flag also unregisters the hook from .claude/settings.local.json.
Stop-hook driven Ralph loop. Activates a session-level Stop hook that reads prd.json, picks the next incomplete story, and re-prompts the assistant to implement it via the ralph-worker skill. Loop ends when all stories pass or --max-iterations is hit.
Read-only snapshot of the current project's Ralph state. Shows story completion, the next runnable story, dependency blocks, active blockers, and /ralph-loop state. Runs in a fraction of a second; safe to invoke at any time — it touches nothing.
Implements a single user story from prd.json with fresh context. Team-aware - spawns specialized agents (designers, developers, reviewers) based on story type. Used by ralph-agent orchestrator or manually for single-story implementation.
AI-powered architectural critique of an entire prd.json before the loop runs. Spawns one Backend Architect agent on the full PRD to flag ordering issues, sizing problems, missing stories, and dependency gaps that would otherwise surface as wasted retries mid-iteration. Complements `/ralph-validate` (which is static/structural) with judgment.
Autonomous coding agent that implements user stories from prd.json iteratively. Spawns specialized agent teams (designers, developers, reviewers) per story type. Works through stories one by one until all pass.
| name | ralph-convert |
| description | Converts markdown PRDs into structured prd.json format for autonomous agent execution. Ensures stories are properly sized and ordered by dependencies. |
Convert markdown PRDs into prd.json format for ralph-agent execution.
Transform PRD documents into structured JSON that ralph-agent can execute iteratively, with each user story sized to complete in a single focused session.
{
"name": "Feature Name",
"branch": "feature/feature-name",
"stories": [
{
"id": "US-001",
"title": "Story title",
"description": "As a [user], I want [action] so that [benefit].",
"priority": 1,
"type": "backend",
"team": {
"design": [],
"implement": ["Senior Developer"],
"review": ["Code Reviewer"]
},
"models": {
"design": "opus",
"implement": "sonnet",
"review": "opus"
},
"acceptance_criteria": [
"Specific criterion 1",
"Specific criterion 2",
"Typecheck passes"
],
"passes": false,
"notes": ""
}
]
}
The fundamental rule: Each story must be completable in ONE focused session.
Right-sized examples:
Too large (must split):
Splitting guidance:
Auto-classify each story and assign the appropriate agent team. If the PRD already has [type] tags, use those. Otherwise, infer from keywords and scope.
Classification rules:
| Type | Signals | Team |
|---|---|---|
backend | DB, migration, API, endpoint, service, model, controller, queue, cron | design: [] / implement: ["Senior Developer"] / review: ["Code Reviewer"] |
frontend | component, page, UI, form, modal, layout, styling, animation, UX | design: ["UX Researcher", "UI Designer"] / implement: ["Senior Developer"] / review: ["Code Reviewer"] |
fullstack | touches both API + UI, form submission with API, CRUD with views | design: ["UX Researcher"] / implement: ["Backend Architect", "Frontend Developer"] / review: ["Code Reviewer"] |
infra | CI/CD, Docker, deploy, config, env, pipeline, monitoring | design: [] / implement: ["DevOps Automator", "Senior Developer"] / review: ["Code Reviewer"] |
data | integration, external API, webhook, import/export, pipeline, ETL | design: [] / implement: ["Backend Architect"] / review: ["API Tester", "Code Reviewer"] |
Phase rules:
design phase is only for frontend and fullstack types. Skip for backend/infra/data.implement phase is always present.review phase is always present.Team can be customized: The user may override team assignments in the PRD. Respect any explicit overrides.
Every story gets a models object specifying which Claude model to use per phase:
| Phase | Default Model | Rationale |
|---|---|---|
| design | opus | Reasoning-heavy: UX analysis, architecture decisions |
| implement | sonnet | Code generation: fast and cost-effective |
| review | opus | Reasoning-heavy: evaluating correctness against criteria |
Apply defaults automatically. Users can override per-story by changing values to "opus", "sonnet", or "haiku".
Stories execute sequentially by priority number. Earlier stories CANNOT depend on later ones.
Recommended ordering:
Example:
Priority 1: Add status column to database
Priority 2: Add status to API response
Priority 3: Create StatusBadge component
Priority 4: Display StatusBadge in task list
Every criterion must be verifiable, not vague.
Good criteria:
status column with default value 'pending'"Bad criteria (avoid):
Every story MUST include:
UI-changing stories MUST also include:
tasks/prd-[feature].mdpriority numbers AND explicit depends_on: ["US-XXX", ...] arrays when one story genuinely requires another to finish first. The loop enforces depends_on — it will not pick a story until every id in that array has passes: true. Stories with no prerequisites get depends_on: [].archive/ with timestamp)Input PRD excerpt:
### US-001: Add Task Status
As a user, I want tasks to have a status so I can track progress.
Acceptance Criteria:
- Tasks have status field (pending, in_progress, completed)
- Status displays in task list
- Can filter by status
Output (split into right-sized stories with team assignments):
{
"name": "Task Status Feature",
"branch": "feature/task-status",
"stories": [
{
"id": "US-001",
"title": "Add status column to tasks table",
"description": "As a developer, I want a status column in the database so that tasks can track their state.",
"priority": 1,
"depends_on": [],
"type": "backend",
"team": {
"design": [],
"implement": ["Senior Developer"],
"review": ["Code Reviewer"]
},
"models": {
"design": "opus",
"implement": "sonnet",
"review": "opus"
},
"acceptance_criteria": [
"Add `status` column to tasks table",
"Default value is 'pending'",
"Valid values: pending, in_progress, completed",
"Migration runs successfully",
"Typecheck passes"
],
"passes": false,
"notes": ""
},
{
"id": "US-002",
"title": "Return status in task API",
"description": "As a frontend developer, I want the API to include status so I can display it.",
"priority": 2,
"depends_on": ["US-001"],
"type": "backend",
"team": {
"design": [],
"implement": ["Senior Developer"],
"review": ["Code Reviewer"]
},
"models": {
"design": "opus",
"implement": "sonnet",
"review": "opus"
},
"acceptance_criteria": [
"GET /tasks returns status field",
"GET /tasks/:id returns status field",
"Typecheck passes",
"Tests pass"
],
"passes": false,
"notes": ""
},
{
"id": "US-003",
"title": "Create TaskStatusBadge component",
"description": "As a user, I want to see task status visually so I can quickly identify state.",
"priority": 3,
"depends_on": [],
"type": "frontend",
"team": {
"design": ["UX Researcher", "UI Designer"],
"implement": ["Senior Developer"],
"review": ["Code Reviewer"]
},
"models": {
"design": "opus",
"implement": "sonnet",
"review": "opus"
},
"acceptance_criteria": [
"Component shows colored badge for each status",
"pending: gray, in_progress: blue, completed: green",
"Typecheck passes",
"Verify in browser"
],
"passes": false,
"notes": ""
},
{
"id": "US-004",
"title": "Display status in task list",
"description": "As a user, I want to see status badges in the task list.",
"priority": 4,
"depends_on": ["US-002", "US-003"],
"type": "frontend",
"team": {
"design": ["UX Researcher", "UI Designer"],
"implement": ["Senior Developer"],
"review": ["Code Reviewer"]
},
"models": {
"design": "opus",
"implement": "sonnet",
"review": "opus"
},
"acceptance_criteria": [
"TaskStatusBadge displays next to each task",
"Status updates when task changes",
"Typecheck passes",
"Verify in browser"
],
"passes": false,
"notes": ""
},
{
"id": "US-005",
"title": "Add status filter to task list",
"description": "As a user, I want to filter tasks by status so I can focus on specific items.",
"priority": 5,
"depends_on": ["US-004"],
"type": "frontend",
"team": {
"design": ["UX Researcher", "UI Designer"],
"implement": ["Senior Developer"],
"review": ["Code Reviewer"]
},
"models": {
"design": "opus",
"implement": "sonnet",
"review": "opus"
},
"acceptance_criteria": [
"Filter dropdown with status options",
"Selecting filter shows only matching tasks",
"Can clear filter to show all",
"Typecheck passes",
"Verify in browser"
],
"passes": false,
"notes": ""
}
]
}
Before creating a new prd.json:
archive/prd-[branch]-[timestamp].jsonBefore saving prd.json:
type (backend/frontend/fullstack/infra/data)team object with design/implement/review arraysmodels object with design, implement, and review keys