원클릭으로
ralph-loop
Single-agent autonomous iteration loop: PRD-driven, self-verifying, with configurable iteration limits and completion criteria.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Single-agent autonomous iteration loop: PRD-driven, self-verifying, with configurable iteration limits and completion criteria.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Multi-agent delegation rules, three-phase workflow (Plan/Build/Review), model selection, collaboration gates, and Ralph Loop integration.
Autonomous build driver after SDD spec approval: phase-scoped headless build sessions, driver-owned commits, cross-provider review gates, milestone pauses, and fail-closed escalation — under explicit opt-in autonomy profiles.
When and how to ask clarifying questions before implementing. Data model review gate and ambiguity resolution rules.
Quality gates, prohibited patterns, verification discipline, and self-audit rules for all code generation and review sessions.
Cross-copilot portable conventions: read before write, minimal changes, git discipline, project structure, and priority rules.
Copyright header rules for generated source files. Applies the company name from providers.toml to new files.
| name | ralph-loop |
| description | Single-agent autonomous iteration loop: PRD-driven, self-verifying, with configurable iteration limits and completion criteria. |
A single agent runs in a loop until the task is complete. Each iteration reads a plan, picks the next incomplete item, implements it, runs tests, and commits if passing.
| Factor | Ralph Loop | Team Workflow |
|---|---|---|
| Task scope | Single-domain, well-defined | Multi-domain, cross-cutting |
| Completion criteria | Verifiable by tests | Requires human judgment |
| Codebase familiarity | Greenfield or well-understood | Unfamiliar or complex |
| Design decisions needed | Few or none (plan is locked) | Many, iterative |
| Parallelism benefit | Low (sequential work) | High (independent domains) |
| Test suite | Exists and reliable | Missing or incomplete |
Use Ralph Loop when:
Use Team Workflow when:
while true; do cat PROMPT.md | claude -p; done
Or use the official ralph-wiggum plugin which implements this via a Stop hook with safety guards.
{
"stories": [
{ "id": "1", "description": "Set up project structure", "passes": true },
{ "id": "2", "description": "Implement data model", "passes": false },
{ "id": "3", "description": "Add API endpoints", "passes": false }
]
}
Each iteration picks the first story where passes: false, implements it, runs tests, and flips to true if tests pass.
When specs/<id>/spec.md exists for the feature being built, use it as the PRD input:
specs/<id>/spec.md to extract user stories and requirements.passes: false.If no spec.md exists (e.g., spec_mode: none), use the manually provided PRD format above.
Append-only. Each entry records what happened in one iteration:
## Iteration 3 — Story 2: Implement data model
- Created src/models/user.ts with User and Profile entities
- Added Prisma schema migration
- Tests: 12 passed, 0 failed
- Committed: abc1234
- Learned: Prisma requires explicit relation fields on both sides
The "Learned" line is critical — it prevents the agent from repeating mistakes in future iterations.
During Phase 2 (Build), the Team Lead can delegate a task to a sub-agent running in Ralph Loop mode. This works well for:
The Team Lead sets the PRD and iteration limit, the sub-agent loops until done or stuck, then returns results to the lead for integration.
| Mode | Model | Effort | Delegation |
|---|---|---|---|
| Ralph Loop (standalone) | Fast (Sonnet) | Medium | None — single agent loops |
| Ralph Loop (inside Build) | Fast (Sonnet) | Medium | Sub-agent runs the loop |