Help us improve
Share bugs, ideas, or general feedback.
From loophaus
Starts PRD-driven loop in Claude Code: reads prd.json + progress.txt per iteration, implements stories, verifies, commits, discovers new tasks, uses loophaus stop hook.
npx claudepluginhub vcz-gray/loophausHow this skill is triggered — by the user, by Claude, or both
Slash command
/loophaus:ralph-claude-loopThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Start a Loop optimized for Claude Code. This skill sets up the loop state, activates the official stop hook, and begins working on the first pending story from prd.json.
Interviews user to generate PRD.json with scope, criteria, and phases, then invokes loop skill for iterative, one-story-per-cycle task implementation in Claude Code.
Iteratively builds complex features from a PRD using subagents for fresh-context tasks, progress tracking in .claude/autopilot/progress.md, and git restore points. For migrations, MVPs, or multi-task implementations.
Automates iterative coding task execution with fresh-context sub-agents, PRD.md/PROGRESS.md tracking, and git commits until completion.
Share bugs, ideas, or general feedback.
Start a Loop optimized for Claude Code. This skill sets up the loop state, activates the official stop hook, and begins working on the first pending story from prd.json.
loophaus plugin must be installedprd.json file must exist in the project root (generate one with /loop-plan).loophaus/state.json (the state file)<promise>COMPLETE</promise>┌─ IMPLEMENT ─────────────────────────────┐
│ Pick next story → implement → verify │
└─────────────────────┬───────────────────┘
▼
┌─ DISCOVER ──────────────────────────────┐
│ Review what you just built. │
│ Did you find: │
│ - Hidden complexity? │
│ - Missing edge cases? │
│ - New dependencies? │
│ - Broken assumptions from the PRD? │
└─────────────────────┬───────────────────┘
▼
┌─ UPDATE PRD ────────────────────────────┐
│ If discoveries found: │
│ 1. Add new stories to prd.json │
│ 2. Log discoveries in progress.txt │
│ 3. Adjust max_iterations if needed │
│ If nothing new: skip │
└─────────────────────┬───────────────────┘
▼
┌─ CONTINUE ──────────────────────────────┐
│ Mark current story done → next story │
└─────────────────────────────────────────┘
Run the setup script to create the state file:
mkdir -p .loophaus && cat > .loophaus/state.json << 'LOOP_STATE'
{
"active": true,
"prompt": "Read prd.json for the task plan. Read progress.txt for current status (check Codebase Patterns section first). Pick the highest priority user story where passes is false. Implement that ONE story. Run verification: $VERIFY_CMD. On failure: read error, fix, retry up to 3 times. On success: commit with message feat: [Story ID] - [Story Title]. Update prd.json: set passes to true for the completed story. DISCOVERY PHASE — After completing the story, review what you just built: did implementation reveal hidden complexity not covered by existing stories? Are there missing edge cases, error handling, or integration points? Did you discover new dependencies or broken assumptions? Are there follow-up tasks needed for what you just built? If YES to any: add new user stories to prd.json with the next available ID (e.g. US-010), set passes: false, and set priority appropriately. Log the discovery in progress.txt under Discoveries section with rationale. If NO: skip, just append progress to progress.txt with learnings. If ALL stories (including newly added ones) have passes true, output <promise>COMPLETE</promise>. When stuck after 3 retries: set notes field in prd.json with error details, move to next story.",
"completionPromise": "COMPLETE",
"maxIterations": $MAX_ITERATIONS,
"currentIteration": 0,
"sessionId": ""
}
LOOP_STATE
Replace $MAX_ITERATIONS with the desired limit and $VERIFY_CMD with the project's verification command.
After setup, immediately begin working:
passes: falsemaxIterations in .loophaus/state.jsonWhen adding N new stories, update maxIterations:
new_max = current_iteration + (remaining_stories + new_stories) * 2 + 3
Only increase, never decrease. Update the value in .loophaus/state.json.
CRITICAL RULE: Only output <promise>COMPLETE</promise> when ALL stories in prd.json (including dynamically added ones) have passes: true. Do not output it prematurely.