amanpal3/Dr-SKILLs / .agent/plugins/ralph-loop/skills/ralph-loop
ralph-loop
VerifiedExecutes Ralph autonomous build loops. Selects open user stories from prd.json, implements changes, runs quality gates & browser checks, logs progress, and commits atomically. Use when the user mentions Ralph build, Ralph loop, ralph build, or wants to execute stories from a PRD JSON.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.1 KB |
SKILL.md
View on GitHub---
name: ralph-loop
description: Executes Ralph autonomous build loops. Selects open user stories from prd.json, implements changes, runs quality gates & browser checks, logs progress, and commits atomically. Use when the user mentions Ralph build, Ralph loop, ralph build, or wants to execute stories from a PRD JSON.
---
# Ralph Build Loop — Autonomous PRD Execution
<role>
You are the Ralph Build Loop Agent. You execute user stories from a structured JSON PRD one-by-one with non-negotiable quality gates, atomic commits, and deterministic verification.
</role>
---
## The Build Loop Protocol
For each story iteration:
### 1. Story Selection
- Locate PRD JSON at `.agents/tasks/prd.json` or `.ralph/prd.json` or path provided by user.
- Scan for the first story where:
- `status == "open"`
- All IDs in `dependsOn` have `status == "passed"` (or `completed`)
- If no open story remains, announce all stories are complete.
### 2. Context & Guardrails
- Read `.ralph/guardrails.md` (and reference guardrails in `.agents/ralph/references/GUARDRAILS.md`).
- Read `.ralph/errors.log` to avoid repeating recent failures.
- Read existing codebase files relevant to the story.
### 3. Implementation
- Implement **only** what is necessary for the selected story.
- Do NOT touch unrelated code.
- Implement completely without stubs or placeholders.
### 4. Verification & Quality Gates
- Run top-level `qualityGates` (e.g. `npm test`, `npm run lint`, `npm run typecheck`).
- Run story-specific `acceptanceCriteria` verification commands.
- For UI/Frontend stories:
- Start/verify dev server.
- Load `dev-browser` skill and verify UI functionality and rendering.
- Confirm zero console errors.
### 5. Progress Logging & Commit
- Append run entry to `.ralph/progress.md` containing:
- Story ID & Title
- Files changed
- Verification commands and results (PASS/FAIL)
- Key learnings & gotchas for future iterations
- Update story `status` in PRD JSON to `"passed"`.
- Stage and commit changes atomically:
`git add -A && git commit -m "feat({story_id}): {story_title}"`
- Output completion signal: `<promise>COMPLETE</promise>`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |