ralph-json-start-loop

$npx mdskill add richtabor/agent-skills/ralph-json-start-loop

Run Ralph to execute PRD stories via git worktrees.

  • Automates feature implementation from JSON PRDs.
  • Integrates with git worktrees and dependency graphs.
  • Selects stories by failing tests and alphabetical order.
  • Outputs commit messages and completion signals.

SKILL.md

.github/skills/ralph-json-start-loopView on GitHub ↗
---
name: ralph-json-start-loop
description: Runs the Ralph autonomous loop. Executes stories from prds/*.json using git worktrees.
disable-model-invocation: true
argument-hint: "[iterations] [project-name]"
---

# Ralph

Run the autonomous loop to execute features from `prds/` directory.

## Usage

```
/ralph              # Run next available project (respects dependencies)
/ralph 25           # Run with 25 iterations
/ralph auth-flow    # Run specific project
```

## Process

Run the loop script in background mode:

```bash
~/.claude/skills/ralph/ralph.sh [iterations] [project-name]
```

Use `run_in_background: true` to prevent timeout. After starting, tell the user to check progress with `tail -f <worktree>/.ralph-progress.txt`.

### What It Does

1. Shows dependency graph, finds next available project
2. Creates git worktree at `../{repo}-{feature}/`
3. For each iteration:
   - Picks first story where `passes: false`
   - Implements it, runs quality checks
   - Commits: `feat: [id] - [title]`
   - Updates JSON, syncs back to main repo
4. When all stories pass, outputs `<promise>COMPLETE</promise>`

### Dependencies

Ralph reads `dependsOn` from each PRD and enforces ordering:

```json
{
  "projectName": "Dashboard",
  "dependsOn": ["auth-flow", "user-profile"]
}
```

Projects with incomplete dependencies are blocked. Ralph picks the first ready project alphabetically.

## Prerequisites

1. At least one `.json` PRD file in `.claude/plans/`, `plans/`, or `prds/`
2. Use plan mode to create a plan, then run `/ralph-json-create-issues` to convert it

## Notes

- Run multiple Ralphs in parallel on independent projects (separate terminals)
- Each works in its own worktree, no conflicts

More from richtabor/agent-skills

SkillDescription
accessibility-reviewReviews UI for accessibility issues against WCAG 2.1/2.2 AA. Triggers on "is this accessible?", "check accessibility", or contrast/a11y review requests.
fresh-eyesRe-reads code you just wrote with fresh perspective to catch bugs, errors, and issues. Use after completing a feature, fixing a bug, or any code changes. Triggers on "review my code", "fresh eyes", "check for bugs", "did I miss anything", or "sanity check".
og-imagesGuides creation of OpenGraph and Twitter share images using next/og ImageResponse. Covers layout patterns, custom fonts, avatars, title case, and Satori rules. Use when building OG images, Twitter cards, or social previews.
ralph-github-create-issuesConverts a PRD markdown file into GitHub Issues (parent + sub-issues) for ralph-github-start-loop to execute. Use when user wants to push PRD stories to GitHub Issues.
ralph-github-start-loopRuns autonomous loop fetching stories from GitHub Issues. Implements and closes issues as done. Triggers on "loop through my PRDs", "work on my issues", "start the autonomous loop", "implement my PRDs", or requests to work through GitHub issues autonomously.
ralph-json-create-issuesConverts a PRD or plan markdown file into prd.json format for ralph-json-start-loop to execute autonomously. Use when user wants to convert a PRD or plan to JSON stories.
red-pen>
review-agents-mdCreates minimal, effective AGENTS.md files using progressive disclosure. Triggers on "create agents.md", "refactor agents.md", "review my agents.md", "claude.md", or questions about agent configuration files. Also triggers proactively when a project is missing AGENTS.md.
technical-writingWrites technical blog posts about features being built. Triggers when user asks to write about development progress, implementations, or project updates.
x-writingTransforms notes into X (Twitter) posts. Triggers when user asks to create social content, draft tweets, or turn notes/ideas into posts.