一键导入
ralph-convert-prd
Converts PRDs into prd.json for Ralph. Use when preparing PRDs for Ralph or breaking features into atomic stories.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Converts PRDs into prd.json for Ralph. Use when preparing PRDs for Ralph or breaking features into atomic stories.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Promotes recurring feedback into the right skill, then guides /compact at phase boundaries.
Testing guidance for pytest, Jest/Vitest, Go, and TDD. Use when writing tests or improving coverage.
Methodical debugging with evidence and hypothesis testing. Use when troubleshooting fails or root cause is unclear.
Create new skills, commands, hooks, or subagents. Use when adding capabilities to Claude Code or Cursor.
PostgreSQL patterns for queries, schema, indexing, security. Use when writing SQL, designing schema, or adding indexes.
Reviews a GitHub PR diff for correctness, security, tests, architecture. Use when asked to review a PR or pull request.
| name | ralph-convert-prd |
| description | Converts PRDs into prd.json for Ralph. Use when preparing PRDs for Ralph or breaking features into atomic stories. |
| context | fork |
<quick_start>
storyTypeverificationCommands with real runtime checksblockedBy dependenciestasks/prd.json
</quick_start><essential_principles> Critical Rule: Each story must be completable in ONE Ralph iteration (one context window).
Stories that are too large cause the LLM to run out of context before completion, resulting in broken code.
Right-sized stories:
Too large (split these):
Never reference something that doesn't exist yet.
Each criterion must be verifiable and specific. Avoid vague language.Good criteria:
Bad criteria (too vague):
UI-focused stories MUST also include: "Verify in browser using Playwright e2e test"
By storyType:
| storyType | Required verification | Example |
|---|---|---|
database | Run migration + query DB to confirm schema | prisma migrate deploy, SQL query for new column |
backend | Run tests + curl endpoint with real data | curl -s http://localhost:3000/api/... |
api | curl endpoint, check status code and response body | curl -s -w '%{http_code}' ... |
frontend | Playwright e2e test that interacts with real UI | npx playwright test tests/e2e/... |
infra | Health check, config validation, service startup | curl -s http://localhost:3000/health |
test | Run the test suite | npm test / pytest |
Static checks (typecheck) are always included as baseline. Runtime validation is additionally required. </essential_principles>
<output_format>
{
"project": "[Project Name]",
"branchName": "ralph/[feature-name-kebab-case]",
"description": "[Feature description]",
"testCommands": {
"unit": "npm test",
"integration": "npm run test:integration",
"e2e": "npx playwright test",
"typecheck": "npm run typecheck"
},
"userStories": [
{
"id": "US-001",
"title": "[Story title]",
"description": "As a [user], I want [feature] so that [benefit]",
"storyType": "database",
"acceptanceCriteria": [
"Specific criterion 1",
"Typecheck passes"
],
"verificationCommands": [
{ "command": "npm run typecheck", "expect": "exit_code:0" },
{ "command": "curl -s http://localhost:3000/api/tasks | jq length", "expect": "not_empty" }
],
"status": "pending",
"priority": 1,
"attempts": 0,
"maxAttempts": 3,
"notes": "",
"blockedBy": [],
"docsToUpdate": ["README.md"],
"completedAt": null,
"lastAttemptLog": ""
}
]
}
Field requirements:
id: Sequential US-001, US-002, etc.title: Short, descriptive actiondescription: User story format (As a... I want... so that...)storyType: One of "backend" | "frontend" | "database" | "api" | "infra" | "test"acceptanceCriteria: Array of specific, verifiable criteriaverificationCommands: Array of {command, expect} with real runtime checksstatus: Always "pending" initiallypriority: Execution order (1 = first)attempts: Always 0 initiallymaxAttempts: Default 3 (increase for complex stories)blockedBy: Array of story IDs that must be "done" firstdocsToUpdate: Array of file paths to documentation that must be updatedcompletedAt: Always null initiallylastAttemptLog: Empty string initiallyExpect matchers for verificationCommands:
exit_code:0 — command exits with code 0exit_code:N — command exits with specific code Ncontains:STRING — stdout contains STRINGnot_empty — stdout is non-emptymatches:REGEX — stdout matches regex pattern
</output_format><pre_save_checklist> Before outputting the final prd.json, verify:
storyType assignedblockedBy dependencies are set correctlyverificationCommands with at least one runtime checkdocsToUpdate lists relevant docs for each storystatus is "pending", attempts is 0, maxAttempts is set
</pre_save_checklist><success_criteria> Conversion is complete when:
storyType assignedblockedBy setverificationCommands with real runtime checks