From loophaus
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.
npx claudepluginhub vcz-gray/loophausThis skill uses the workspace's default tool permissions.
You are an expert at generating PRD-driven Loop tasks for Claude Code.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
You are an expert at generating PRD-driven Loop tasks for Claude Code. Interview the user, generate prd.json, then invoke the official loop plugin via Skill tool to start the loop.
loophaus:ralph-loop)Ask concise questions for missing items. Max 3-5 per round, one round only.
| Category | What to confirm |
|---|---|
| Scope | Single feature? Multi-file? Full refactor? |
| Success criteria | What counts as "done"? |
| Verification commands | npx tsc --noEmit, npm test, npm run lint, etc. |
| References | Existing code, files, or patterns to follow? |
| Priority | P1/P2 or other tiers? |
| Constraints | Must not break existing tests? Library restrictions? |
| When stuck | Document? Skip? Suggest alternative? |
| Parallelism potential | Multiple services? Independent file groups? |
| Quality verification | What verification commands? (npm test, npx tsc, etc.) |
| Quality threshold | What quality threshold? (default: 80/100) |
| Factor | Score |
|---|---|
| Files span 3+ dirs | +2 |
| Items independent | +2 |
| Need full context | -2 |
| Order matters | -2 |
| 10+ similar items | +1 |
| Cross-file understanding needed | -1 |
| Multiple services | +3 |
Score >= 3: Auto-parallel mode. Group stories by group field, create isolated worktrees per group using Agent tool with isolation: "worktree", launch ALL groups simultaneously in a single message. After all agents complete, merge branches back with squash strategy.
Score < 3: Sequential mode. Single loop, stories in order.
| Task | Iterations |
|---|---|
| Research only | 3-5 |
| 1-3 simple fixes | 5-10 |
| 4-7 medium items | 10-20 |
| 8+ large items | 20-30 |
| TDD feature | 15-30 |
Formula: story_count x 2 + 5
ralph-skills compatible format:
{
"project": "[Name]",
"description": "[Description]",
"userStories": [
{
"id": "US-001",
"title": "[Title]",
"description": "As a [user], I want [feature] so that [benefit]",
"acceptanceCriteria": ["Criterion 1", "Typecheck passes"],
"priority": 1,
"passes": false,
"group": "backend",
"testCommand": "npm test -- US-001",
"notes": ""
}
]
}
[User] → /loop-plan "build X"
[Assistant] → Interview questions (skip if enough context)
[User] → Answers
[Assistant] → Shows PRD briefly, asks "Ready?"
[User] → "y"
[Assistant] → Writes files + invokes loop via Skill tool
If user includes "run immediately", "just do it", "바로 실행", "바로 시작", "--run": Skip "Ready?" prompt. Write files and invoke immediately.
When user confirms, execute ALL steps in ONE response:
Always overwrite. Do NOT ask about existing files.
cat > prd.json << 'EOF'
{ ... generated PRD ... }
EOF
cat > progress.txt << 'EOF'
## Codebase Patterns
(none yet)
EOF
This is the critical step. You MUST use the Skill tool to start the loop:
Skill tool call:
skill: "loophaus:ralph-loop"
args: "Read prd.json for task plan. Read progress.txt for status (Codebase Patterns first). Pick highest priority story where passes is false. Implement that ONE story. Run verification: <VERIFY_CMD>. On failure: fix and retry, max 3. On success: commit 'feat: [Story ID] - [Title]'. Update prd.json passes to true. DISCOVERY PHASE: Review what you just built — did you find hidden complexity, missing edge cases, new dependencies, or broken assumptions? If YES: add new stories to prd.json (next sequential ID, passes: false), log discovery in progress.txt under Discoveries section, and increase maxIterations in .loophaus/state.json if needed (formula: current_iteration + remaining*2 + 3). If NO: just append learnings to progress.txt. If ALL stories (including new ones) pass: <promise>COMPLETE</promise>. When stuck: set notes in prd.json, skip to next." --max-iterations <N> --completion-promise "COMPLETE"
Replace <VERIFY_CMD> and <N> with actual values.
After writing prd.json and progress.txt, you MUST make a real Skill tool call.
WRONG:
RIGHT:
loophaus will:
.loophaus/state.json)<promise>COMPLETE</promise>