skills/golem-powers/prd/SKILL.md
Use when planning a feature, starting a new project, or asked to create a PRD. Generates JSON-based PRD for Ralph. Adding stories uses update.json pattern. Covers PRD, create PRD, plan feature, Ralph stories. NOT for: running Ralph (user runs externally).
npx skillsauth add etanhey/golems prdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create PRDs for autonomous AI implementation via Ralph loop.
AskUserQuestion tool)git rev-parse --show-toplevelprd-json/index.json - Story order (stats computed automatically)prd-json/stories/{US-XXX}.json - One file per storyprd-json/AGENTS.md with skills sectionprogress.txt at git root🛑 DO NOT IMPLEMENT - Ralph handles that externally.
Before creating stories, determine which skills are relevant for THIS project:
# What's in this project?
[ -f "convex.json" ] && echo "HAS_CONVEX=true"
[ -f ".linear" ] || grep -q "linear" package.json 2>/dev/null && echo "HAS_LINEAR=true"
[ -d "src/components" ] || [ -d "app" ] && echo "HAS_UI=true"
[ -f "playwright.config.ts" ] && echo "HAS_PLAYWRIGHT=true"
UNIVERSAL (always include):
| Skill | Why |
|-------|-----|
| /ralph-commit | Atomic commits with criterion check |
| /coderabbit | Code review before commits (iterate until clean) |
| context7 MCP | Look up library docs when unsure about APIs |
| gh / /pr-loop | Git operations, PRs, issues |
| /create-pr | Push and create PRs |
| Git status/diff + handoff files | Context recovery after long breaks |
PROJECT-SPECIFIC (include if detected):
| If Project Has... | Include Skill | Why |
|-------------------|---------------|-----|
| convex.json | Convex CLI/docs | Dev server, deploy, functions |
| .linear or Linear in deps | /linear | Issue tracking |
| UI (/app, /components) | Browser plugin / Playwright | Browser automation |
| 1Password secrets | /1password | Secrets management |
| Complex PRD (10+ stories) | /prd-manager | Bulk story operations |
| Needs isolation | Native git worktree | Branch isolation |
DO NOT INCLUDE (meta skills, not for Ralph):
/prd, /skills, /writing-skills, /ralph-install, /example-*# See all installed skills
ls -1 ~/.claude/commands/*/SKILL.md 2>/dev/null | while read f; do
skill=$(dirname "$f" | xargs basename)
desc=$(awk '/^description:/{gsub(/^description: *"?/, ""); gsub(/"$/, ""); print}' "$f")
echo "/$skill: $desc"
done
Don't dump all skills - only include ones this project will actually use. Ralph should see a focused list, not 20+ skills.
Ralph routes stories to AI models based on the prefix. Wrong prefix = wrong model = failed story.
| Prefix | Model | When to Use |
|--------|-------|-------------|
| US- | Sonnet | Simple features, UI, CRUD. < 5 criteria, 1-3 files. Clear implementation path. |
| BUG- | Sonnet | Bug fixes, error handling, regressions. |
| V- | Haiku | Verification only (checking criteria, no code changes). |
| TEST- | Haiku | Writing tests only, no production code. |
| MP- | Opus | Complex infra, algorithms, multi-file refactors, architectural decisions. > 6 criteria, 4+ files. |
| AUDIT- | Opus | Deep code review, security, architecture. |
Decision rule: If any criterion says "approach chosen", "design decision", or requires choosing between strategies — use MP-, not US-. Sonnet struggles with open-ended design. When in doubt, use MP-.
Config: ~/.config/golems/config.json → models object. Default fallback: opus.
Each story must complete in ONE context window (~10 min of AI work).
Right-sized: Add one component, update one action, fix one bug Too big (split): "Build dashboard" → Schema + Queries + UI + Filters
⚠️ MANDATORY: Last two criteria of EVERY story (in this exact order):
"Run CodeRabbit review - must pass (or create BUG if unfixable)""Commit: {type}: {STORY-ID} {description}"CodeRabbit ALWAYS comes BEFORE commit. No exceptions.
When to add test criteria:
Why this matters: If a function has tests, and a future story accidentally deletes that function, the tests will fail and block the commit. Tests are your safety net against regressions.
Example criteria:
"Add unit test for _ralph_new_helper_function"
"Run ./tests/test-ralph.zsh - must pass (49/49)"
"Add regression test: verify X doesn't break when Y"
Every story ends with a commit criterion. Match type to story:
| Story Type | Commit Type | Example |
|------------|-------------|---------|
| US-XXX (feature) | feat: | feat: US-001 add login button |
| BUG-XXX (bug fix) | fix: | fix: BUG-001 resolve crash on empty state |
| V-XXX (verification) | test: | test: V-001 verify login flow |
| TEST-XXX (e2e tests) | test: | test: TEST-001 playwright tests for auth |
| MP-XXX (infrastructure) | refactor: or chore: | refactor: MP-001 restructure auth module |
| AUDIT-XXX (audit/review) | docs: or chore: | docs: AUDIT-001 update README |
Last two criteria (always):
"Run CodeRabbit review - must pass (or create BUG if unfixable)"
"Commit: {type}: {STORY-ID} {description}"
Examples:
"Run CodeRabbit review - must pass (or create BUG if unfixable)""Commit: feat: US-034 add user profile page""Commit: fix: BUG-012 handle null response from API""Commit: test: V-034 verify profile page renders correctly""Commit: refactor: MP-002 migrate to modular contexts"For RTL projects (Hebrew/Arabic): Include RTL checklist in stories: flex order reversal, text-right/items-end, RTL propagation in nested flex containers.
For modals/dynamic states: Each dynamic state = separate story. Don't bundle modal states into one story.
NEVER edit index.json directly when adding stories to an existing PRD!
Use prd-json/update.json instead. Ralph auto-merges it on next run.
prd-json/stories/ (e.g., US-034.json)prd-json/update.json:{
"storyOrder": ["...existing IDs...", "US-034", "US-035"],
"pending": ["...existing pending...", "US-034", "US-035"]
}
Note: Do NOT include stats - they are computed automatically from arrays.
3. Ralph merges update.json → index.json automatically, then deletes update.json
{
"$schema": "https://ralph.dev/schemas/prd-index.schema.json",
"generatedAt": "2026-01-19T12:00:00Z",
"nextStory": "US-001",
"storyOrder": ["US-001", "US-002", "V-001", "V-002"],
"pending": ["US-001", "US-002", "V-001", "V-002"],
"blocked": []
}
Note: Do NOT include stats - the UI computes them from array lengths.
{
"id": "US-001",
"title": "[Story Title]",
"description": "[What and why]",
"acceptanceCriteria": [
{"text": "[Specific criterion]", "checked": false},
{"text": "Typecheck passes", "checked": false},
{"text": "Verify in browser", "checked": false},
{"text": "Run CodeRabbit review - must pass (or create BUG if unfixable)", "checked": false},
{"text": "Commit: feat: US-001 [description]", "checked": false}
],
"passes": false,
"blockedBy": null
}
Create at repository root:
prd-json/index.jsonprd-json/stories/*.jsonprd-json/AGENTS.md - Instructions for AI agents (see template below)progress.txtIMPORTANT: Run skill discovery first and include ACTUAL descriptions in AGENTS.md:
# Generate skills table for AGENTS.md
echo "| Skill | When to Use |"
echo "|-------|-------------|"
ls -1 ~/.claude/commands/golem-powers/*/SKILL.md 2>/dev/null | while read f; do
skill=$(dirname "$f" | xargs basename)
desc=$(awk '/^description:/{gsub(/^description: *"?/, ""); gsub(/"$/, ""); print}' "$f")
echo "| \`/$skill\` | $desc |"
done
# Get project contexts from registry
project_key="$(basename $(pwd))" # or the registered project name
jq -r --arg p "$project_key" '.projects[$p].contexts // [] | .[]' ~/.config/golems/registry.json 2>/dev/null
# AI Agent Instructions for PRD
## 🚀 Available Skills
**Invoke skills via `/skill-name` - read the description to know WHEN to use each:**
<!-- PASTE OUTPUT FROM SKILL DISCOVERY HERE -->
| Skill | When to Use |
|-------|-------------|
| `/ralph-commit` | Atomic commit + criterion check for Ralph stories. Use for "Commit:" criteria. |
| `/coderabbit` | Runs AI code reviews. Use when reviewing changes, preparing PRs, or checking code quality. |
| `/prd-manager` | Manage PRD stories - add, update, bulk operations. |
| Git status/diff + handoff files | Recover context by reading changed files and recent handoffs. |
## 📦 Project Contexts
**Ralph loads these contexts automatically from the registry:**
<!-- List contexts from: jq '.projects["<project>"].contexts[]' ~/.config/golems/registry.json -->
- `base` - Universal rules (scratchpad, AIDEV-NOTE, type safety)
- `skill-index` - Available skills reference
- `workflow/interactive` - CLAUDE_COUNTER, git safety
These contexts provide project-specific rules and patterns. If you need additional contexts, update the project's `contexts` array in `~/.config/golems/registry.json`.
## 🔄 CodeRabbit Iteration Rule
**For "Run CodeRabbit review" criteria, iterate until clean:**
1. Run: `cr review --prompt-only --type uncommitted`
2. If issues found → Fix them
3. Run CR again
4. Repeat until: "No issues found" or only intentional patterns remain
5. If intentional pattern → Add to CLAUDE.md's CodeRabbit Context section
**Never skip CR or commit with unresolved issues.**
## ⚠️ NEVER EDIT index.json DIRECTLY
To add/modify stories, use `update.json`:
1. Create story files in `stories/`
2. Write changes to `update.json` (not index.json!)
3. Ralph merges automatically on next run
## Example update.json
\`\`\`json
{
"storyOrder": ["existing...", "NEW-001"],
"pending": ["existing...", "NEW-001"]
}
\`\`\`
Note: Do NOT include `stats` - computed automatically.
## Story ID Rules
- Check `archive/` for used IDs before creating new ones
- Use next available number (e.g., if US-033 exists, use US-034)
Then say:
✅ PRD saved to
prd-json/with X stories + X verification stories. Run Ralph to execute. I will not implement - that's Ralph's job.
development
Create, edit, and verify golem-powers skills using the standard SKILL.md structure, workflow files, adapters, templates, and eval fixtures. Use for new skills, structural edits, workflows/adapters, and pre-deploy validation. NOT for invoking existing skills, superpowers skills, or skill-creator agent workflows.
testing
Extract structured knowledge from any video source — YouTube URLs or local screen recordings. YouTube → gems workflow (yt-dlp transcript → keyword hotspots → frame extract → brain_digest → structured gems). Screen recordings → QA workflow (reuses /qa-video stalker pipeline). Use when user shares a YouTube link wanting deep extraction with frames, shares a .mov/.mp4 for QA processing, says "extract from video", "video gems", "process this recording", or mentions gem extraction from video content.
testing
Use when running or reviewing any recurring monitor loop for merge queues, worker queues, collab tails, or agent completion. Enforces drive-to-completion ticks: every tick must query live state with `!`, classify whether real progress happened, and then dispatch, verify-and-decrement, or escalate-park. Triggers on: monitor loop, /loop, recurring tick, keep monitoring, silent autonomous, merge gate, blocked review, no-progress loop.
tools
MeHayom freelance client management — daily updates, decision tracking, time logging. Use when drafting Yuval updates, logging scope changes, tracking hours, or any MeHayom client communication. Triggers: 'draft Yuval update', 'client update', 'daily update', 'log decision', 'track time', 'mehayom'.