Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Autonomous development loops with iteration, backpressure gates, and completion criteria. Use for sustained coding sessions that require multiple iterations, test validation, and structured progress tracking. Supports Next.js, Python, FastAPI, and GPU workloads with Ralph Wiggum methodology adapted for OpenClaw.
Autonomous development loops with iteration, backpressure gates, and completion criteria. Use for sustained coding sessions that require multiple iterations, test validation, and structured progress tracking. Supports Next.js, Python, FastAPI, and GPU workloads with Ralph Wiggum methodology adapted for OpenClaw.
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
Ralph Mode implements the Ralph Wiggum technique adapted for OpenClaw: autonomous task completion through continuous iteration with backpressure gates, completion criteria, and structured planning.
Use Ralph Mode when: Building features that require multiple iterations and refinement Working on complex projects with acceptance criteria to validate Need automated testing, linting, or typecheck gates Want to track progress across many iterations systematically Prefer autonomous loops over manual turn-by-turn guidance
Phase 1: Requirements Definition Document specs in specs/ (one file per topic of concern) Define acceptance criteria (observable, verifiable outcomes) Create implementation plan with prioritized tasks Phase 2: Planning Gap analysis: compare specs against existing code Generate IMPLEMENTATION_PLAN.md with prioritized tasks No implementation during this phase Phase 3: Building (Iterative) Pick one task from plan per iteration Implement, validate, update plan, commit Continue until all tasks complete or criteria met
Reject incomplete work automatically through validation: Programmatic Gates (Always use these): Tests: [test command] - Must pass before committing Typecheck: [typecheck command] - Catch type errors early Lint: [lint command] - Enforce code quality Build: [build command] - Verify integration Subjective Gates (Use for UX, design, quality): LLM-as-judge reviews for tone, aesthetics, usability Binary pass/fail - converges through iteration Only add after programmatic gates work reliably
One task per iteration = fresh context each time Spawn sub-agents for exploration, not main context Lean prompts = smart zone (~40-60% utilization) Plans are disposable - regenerate cheap vs. salvage
Create this structure for each Ralph Mode project: project-root/ โโโ IMPLEMENTATION_PLAN.md # Shared state, updated each iteration โโโ AGENTS.md # Build/test/lint commands (~60 lines) โโโ specs/ # Requirements (one file per topic) โ โโโ topic-a.md โ โโโ topic-b.md โโโ src/ # Application code โโโ src/lib/ # Shared utilities
Can you describe the topic in one sentence without "and"? โ "User authentication with JWT and session management" โ "Auth, profiles, and billing" โ 3 topics
Specialized roles for different tasks: Hat: Architect (@architect) High-level design, data modeling, API contracts Focus: patterns, scalability, maintainability Hat: Implementer (@implementer) Write code, implement features, fix bugs Focus: correctness, performance, test coverage Hat: Tester (@tester) Test authoring, validation, edge cases Focus: coverage, reliability, reproducibility Hat: Reviewer (@reviewer) Code reviews, PR feedback, quality assessment Focus: style, readability, adherence to specs Usage: "Spawn a sub-agent with @architect hat to design the data model"
Your job as main agent: engineer setup, observe, course-correct. Don't allocate work to main context - Spawn sub-agents Let Ralph Ralph - LLM will self-identify, self-correct Use protection - Sandbox is your security boundary Plan is disposable - Regenerate when wrong/stale Move outside the loop - Sit and watch, don't micromanage
Each sub-agent iteration: Study - Read plan, specs, relevant code Select - Pick most important uncompleted task Implement - Write code, one task only Validate - Run tests, lint, typecheck (backpressure) Update - Mark task done, note discoveries, commit Exit - Next iteration starts fresh
Loop ends when: โ All IMPLEMENTATION_PLAN.md tasks completed โ All acceptance criteria met โ Tests passing, no blocking issues โ ๏ธ Max iterations reached (configure limit) ๐ Manual stop (Ctrl+C)
Define success upfront - avoid "seems done" ambiguity.
All tests pass: [test_command] returns 0 Typecheck passes: No TypeScript errors Build succeeds: Production bundle created Coverage threshold: e.g., 80%+
For quality criteria that resist automation: ## Completion Check - UX Quality Criteria: Navigation is intuitive, primary actions are discoverable Test: User can complete core flow without confusion ## Completion Check - Design Quality Criteria: Visual hierarchy is clear, brand consistency maintained Test: Layout follows established patterns Run LLM-as-judge sub-agent for binary pass/fail.
specs/ โโโ authentication.md โโโ database.md โโโ api-routes.md src/ โโโ app/ # App Router โโโ components/ # React components โโโ lib/ # Utilities (db, auth, helpers) โโโ types/ # TypeScript types AGENTS.md: Build: npm run dev Test: npm run test Typecheck: npx tsc --noEmit Lint: npm run lint
specs/ โโโ data-pipeline.md โโโ model-training.md โโโ api-endpoints.md src/ โโโ pipeline.py โโโ models/ โโโ api/ โโโ tests/ AGENTS.md: Build: python -m src.main Test: pytest Typecheck: mypy src/ Lint: ruff check src/
specs/ โโโ model-architecture.md โโโ training-data.md โโโ inference-pipeline.md src/ โโโ models/ โโโ training/ โโโ inference/ โโโ utils/ AGENTS.md: Train: python train.py Test: pytest tests/ Lint: ruff check src/ GPU Check: nvidia-smi
Start a Ralph Mode session: "Start Ralph Mode for my project at ~/projects/my-app. I want to implement user authentication with JWT. I will: Create IMPLEMENTATION_PLAN.md with prioritized tasks Spawn sub-agents for iterative implementation Apply backpressure gates (test, lint, typecheck) Track progress and announce completion
When trajectory goes wrong: Ctrl+C - Stop loop immediately Regenerate plan - "Discard IMPLEMENTATION_PLAN.md and re-plan" Reset - "Git reset to last known good state" Scope down - Create smaller scoped plan for specific work
For subjective criteria (tone, aesthetics, UX): Create src/lib/llm-review.ts: interface ReviewResult { pass: boolean; feedback?: string; } async function createReview(config: { criteria: string; artifact: string; // text or screenshot path }): Promise<ReviewResult>; Sub-agents discover and use this pattern for binary pass/fail checks.
Based on empirical usage, enforce these practices to avoid silent failures:
Before spawning a new Ralph session: Check for existing Ralph sub-agents via sessions_list Kill or verify completion of previous sessions Do NOT spawn overlapping Ralph sessions on same codebase Anti-pattern: Spawning Ralph v2 while v1 is still running = file conflicts, race conditions, lost work.
Never assume directory structure. At start of each iteration: // Verify current working directory const cwd = process.cwd(); console.log(`Working in: ${cwd}`); // Verify expected paths exist if (!fs.existsSync('./src/app')) { console.error('Expected ./src/app, found:', fs.readdirSync('.')); // Adapt or fail explicitly } Why: Ralph may be spawned from different contexts with different working directories.
If Ralph encounters unrecoverable errors: Log to PROGRESS.md with "## Status: BLOCKED" Describe blocker in detail List attempted solutions Exit cleanly (don't hang) Do not silently fail. A Ralph that stops iterating with no progress log is indistinguishable from one still working.
Common anti-patterns observed: Anti-PatternConsequencePreventionNo progress loggingParent agent cannot determine statusMandatory PROGRESS.mdSilent failureWork lost, time wastedExplicit error loggingOverlapping sessionsFile conflicts, corrupt stateCheck/cleanup before spawnPath assumptionsWrong directory, wrong filesExplicit verificationNo completion signalParent waits indefinitelyClear COMPLETE statusInfinite iterationResource waste, no progressTime limits + blockersComplex initial promptsSub-agent never starts (empty session logs)SIMPLIFY instructions
Evidence: Empty session logs (2 bytes), no tool calls, 0 tokens used
Instructions too complex - Overwhelms isolated session initialization No clear execution trigger - Agent doesn't know to start Branching logic - "If X do Y, if Z do W" confuses task selection Multiple files mentioned - Can't decide which to start with
## Task: [ONE specific thing] **File:** exact/path/to/file.ts **What:** Exact description of change **Validate:** Exact command to run **Then:** Update PROGRESS.md and exit ## Rules 1. Do NOT look at other files 2. Do NOT "check first" 3. Make the change, validate, exit
Fix lib/db.ts line 27: Change: PoolClient to pg.PoolClient Validate: npm run typecheck Exit immediately after
Each Ralph iteration gets ONE file. Not "all errors", not "check then decide". ONE file, ONE change, validate, exit.
If Ralph stalls: Check session logs (should show tool calls within 60s) If empty after spawn โ instructions too complex Reduce: ONE file, ONE line number, ONE change Shorter timeout forces smaller tasks (300s not 600s)
If cron reports same status repeatedly: Check PROGRESS.md was updated by sub-agent If not updated โ sub-agent skipped documentation step Update skill: Add "MANDATORY PROGRESS.md update" to prompt Manual fix: Update PROGRESS.md to reflect actual state
Ralph works when: Single file focus + explicit change + validate + exit Ralph stalls when: Complex decisions + multiple files + conditional logic
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.