with one click
ralph
Self-referential loop until task completion with architect verification
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Self-referential loop until task completion with architect verification
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | ralph |
| description | Self-referential loop until task completion with architect verification |
[RALPH + ULTRAWORK - ITERATION {{ITERATION}}/{{MAX}}]
Your previous attempt did not output the completion promise. Continue working on the task.
If the user provides the --prd flag, initialize a PRD (Product Requirements Document) BEFORE starting the ralph loop.
Check if {{PROMPT}} contains the flag pattern: --prd or --PRD
When --prd flag detected:
.omc/prd.json and .omc/progress.txt)--prd flag){
"project": "[Project Name]",
"branchName": "ralph/[feature-name]",
"description": "[Feature description]",
"userStories": [
{
"id": "US-001",
"title": "[Short title]",
"description": "As a [user], I want to [action] so that [benefit].",
"acceptanceCriteria": ["Criterion 1", "Typecheck passes"],
"priority": 1,
"passes": false
}
]
}
# Ralph Progress Log
Started: [ISO timestamp]
## Codebase Patterns
(No patterns discovered yet)
---
Guidelines for PRD creation:
After PRD created: Proceed to normal ralph loop execution using the user stories as your task list
User input: --prd build a todo app with React and TypeScript
Your workflow:
--prd flag.omc/prd.json with user stories.omc/progress.txtRalph is a persistence wrapper that includes Ultrawork as a component for maximum parallel execution. You MUST follow these rules:
| Task Complexity | Tier | Examples |
|---|---|---|
| Simple lookups | LOW (haiku) | "What does this function return?", "Find where X is defined" |
| Standard work | MEDIUM (sonnet) | "Add error handling", "Implement this feature" |
| Complex analysis | HIGH (opus) | "Debug this race condition", "Refactor auth module" |
FIRST ACTION: Before delegating any work, read the agent reference file:
Read file: docs/shared/agent-tiers.md
This provides the complete agent tier matrix, MCP tool assignments, and selection guidance.
CRITICAL: Always pass model parameter explicitly!
Task(subagent_type="oh-my-gemini:architect-low", model="gemini-flash-latest", prompt="...")
Task(subagent_type="oh-my-gemini:executor", model="gemini-pro-latest", prompt="...")
Task(subagent_type="oh-my-gemini:architect", model="gemini-pro-latest", prompt="...")
Run in Background (set run_in_background: true):
Run Blocking (foreground):
Before claiming completion, you MUST:
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
Before outputting the completion promise:
Skipping verification = Task NOT complete
Ralph uses tiered verification to save tokens while maintaining quality.
Before spawning architect for verification, determine the appropriate tier:
| Change Profile | Tier | Agent |
|---|---|---|
| <5 files, <100 lines, full tests | LIGHT | architect-low (haiku) |
| Standard changes | STANDARD | architect-medium (sonnet) |
| >20 files, security/architectural | THOROUGH | architect (opus) |
Floor: STANDARD (architect-medium / sonnet)
Even for small changes (<5 files), ralph requires at least STANDARD tier verification. The LIGHT tier (haiku) is insufficient for ralph's completion guarantee. When tier selection returns LIGHT, upgrade to STANDARD.
/docs/shared/verification-tiers.md// LIGHT - small, well-tested changes
Task(subagent_type="oh-my-gemini:architect-low", model="gemini-flash-latest", prompt="Quick verification: [describe changes]")
// STANDARD - most changes
Task(subagent_type="oh-my-gemini:architect-medium", model="gemini-pro-latest", prompt="Verify implementation: [describe changes]")
// THOROUGH - large/security/architectural changes
Task(subagent_type="oh-my-gemini:architect", model="gemini-pro-latest", prompt="Full verification: [describe changes]")
/oh-my-gemini:cancel to cleanly exitFor complete tier selection rules, read: docs/shared/verification-tiers.md
IMPORTANT: Use the cancel skill for proper state cleanup
When work is complete and Architect verification passes, run /oh-my-gemini:cancel to cleanly exit ralph mode. This handles:
This ensures clean state for future sessions without leaving stale state files behind.
/oh-my-gemini:cancel to cleanly exit and clean up all state filesOriginal task: {{PROMPT}}
Automatically deploy oh-my-gemini to npm and GitHub
Full autonomous execution from idea to working code
Fix build and TypeScript errors with minimal changes
Cancel any active OMC mode (autopilot, ralph, ultrawork, ecomode, ultraqa, swarm, ultrapilot, pipeline)
Run a comprehensive code review
Deep executor mode for complex goal-oriented tasks