[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6G101K9RH7752P6AW71Q67X":3,"skill-same:01M6G101K9RH7752P6AW71Q67X":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M6G101K9RH7752P6AW71Q67X","ralph-mode",null,"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.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Frichginsberg\u002Fralph-mode\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"ralph mode","ralph","fastapi","with","loops","progress","gates","iteration","next","ralph wiggum","use","openclaw","autonomous","coding","Next.js","gpu","development","sessions","test","python","2026-11-10 10:12:30",false,"---\nname: ralph-mode\ndescription: 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.\n---\n\n# Ralph Mode - Autonomous Development Loops\n\nRalph Mode implements the Ralph Wiggum technique adapted for OpenClaw: autonomous task completion through continuous iteration with backpressure gates, completion criteria, and structured planning.\n\n## When to Use\n\nUse Ralph Mode when:\n- Building features that require multiple iterations and refinement\n- Working on complex projects with acceptance criteria to validate\n- Need automated testing, linting, or typecheck gates\n- Want to track progress across many iterations systematically\n- Prefer autonomous loops over manual turn-by-turn guidance\n\n## Core Principles\n\n### Three-Phase Workflow\n\n**Phase 1: Requirements Definition**\n- Document specs in `specs\u002F` (one file per topic of concern)\n- Define acceptance criteria (observable, verifiable outcomes)\n- Create implementation plan with prioritized tasks\n\n**Phase 2: Planning**\n- Gap analysis: compare specs against existing code\n- Generate `IMPLEMENTATION_PLAN.md` with prioritized tasks\n- No implementation during this phase\n\n**Phase 3: Building (Iterative)**\n- Pick one task from plan per iteration\n- Implement, validate, update plan, commit\n- Continue until all tasks complete or criteria met\n\n### Backpressure Gates\n\nReject incomplete work automatically through validation:\n\n**Programmatic Gates (Always use these):**\n- Tests: `[test command]` - Must pass before committing\n- Typecheck: `[typecheck command]` - Catch type errors early\n- Lint: `[lint command]` - Enforce code quality\n- Build: `[build command]` - Verify integration\n\n**Subjective Gates (Use for UX, design, quality):**\n- LLM-as-judge reviews for tone, aesthetics, usability\n- Binary pass\u002Ffail - converges through iteration\n- Only add after programmatic gates work reliably\n\n### Context Efficiency\n\n- One task per iteration = fresh context each time\n- Spawn sub-agents for exploration, not main context\n- Lean prompts = smart zone (~40-60% utilization)\n- Plans are disposable - regenerate cheap vs. salvage\n\n## File Structure\n\nCreate this structure for each Ralph Mode project:\n\n```\nproject-root\u002F\n├── IMPLEMENTATION_PLAN.md     # Shared state, updated each iteration\n├── AGENTS.md                  # Build\u002Ftest\u002Flint commands (~60 lines)\n├── specs\u002F                     # Requirements (one file per topic)\n│   ├── topic-a.md\n│   └── topic-b.md\n├── src\u002F                        # Application code\n└── src\u002Flib\u002F                    # Shared utilities\n```\n\n### IMPLEMENTATION_PLAN.md\n\nPriority task list - single source of truth. Format:\n\n```markdown\n# Implementation Plan\n\n## In Progress\n- [ ] Task name (iteration N)\n  - Notes: discoveries, bugs, blockers\n\n## Completed\n- [x] Task name (iteration N)\n\n## Backlog\n- [ ] Future task\n```\n\n### Topic Scope Test\n\nCan you describe the topic in one sentence without \"and\"?\n- ✅ \"User authentication with JWT and session management\"\n- ❌ \"Auth, profiles, and billing\" → 3 topics\n\n### AGENTS.md - Operational Guide\n\nSuccinct guide for running the project. Keep under 60 lines:\n\n```markdown\n# Project Operations\n\n## Build Commands\nnpm run dev      # Development server\nnpm run build     # Production build\n\n## Validation\nnpm run test      # All tests\nnpm run lint      # ESLint\nnpm run typecheck  # TypeScript\nnpm run e2e       # E2E tests\n\n## Operational Notes\n- Tests must pass before committing\n- Typecheck failures block commits\n- Use existing utilities from src\u002Flib over ad-hoc copies\n```\n\n## Hats (Personas)\n\nSpecialized roles for different tasks:\n\n**Hat: Architect** (`@architect`)\n- High-level design, data modeling, API contracts\n- Focus: patterns, scalability, maintainability\n\n**Hat: Implementer** (`@implementer`)\n- Write code, implement features, fix bugs\n- Focus: correctness, performance, test coverage\n\n**Hat: Tester** (`@tester`)\n- Test authoring, validation, edge cases\n- Focus: coverage, reliability, reproducibility\n\n**Hat: Reviewer** (`@reviewer`)\n- Code reviews, PR feedback, quality assessment\n- Focus: style, readability, adherence to specs\n\n**Usage:**\n```\n\"Spawn a sub-agent with @architect hat to design the data model\"\n```\n\n## Loop Mechanics\n\n### Outer Loop (You coordinate)\n\nYour job as main agent: engineer setup, observe, course-correct.\n\n1. **Don't allocate work to main context** - Spawn sub-agents\n2. **Let Ralph Ralph** - LLM will self-identify, self-correct\n3. **Use protection** - Sandbox is your security boundary\n4. **Plan is disposable** - Regenerate when wrong\u002Fstale\n5. **Move outside the loop** - Sit and watch, don't micromanage\n\n### Inner Loop (Sub-agent executes)\n\nEach sub-agent iteration:\n1. **Study** - Read plan, specs, relevant code\n2. **Select** - Pick most important uncompleted task\n3. **Implement** - Write code, one task only\n4. **Validate** - Run tests, lint, typecheck (backpressure)\n5. **Update** - Mark task done, note discoveries, commit\n6. **Exit** - Next iteration starts fresh\n\n### Stopping Conditions\n\nLoop ends when:\n- ✅ All IMPLEMENTATION_PLAN.md tasks completed\n- ✅ All acceptance criteria met\n- ✅ Tests passing, no blocking issues\n- ⚠️ Max iterations reached (configure limit)\n- ? Manual stop (Ctrl+C)\n\n## Completion Criteria\n\nDefine success upfront - avoid \"seems done\" ambiguity.\n\n### Programmatic (Measurable)\n- All tests pass: `[test_command]` returns 0\n- Typecheck passes: No TypeScript errors\n- Build succeeds: Production bundle created\n- Coverage threshold: e.g., 80%+\n\n### Subjective (LLM-as-Judge)\nFor quality criteria that resist automation:\n\n```markdown\n## Completion Check - UX Quality\nCriteria: Navigation is intuitive, primary actions are discoverable\nTest: User can complete core flow without confusion\n\n## Completion Check - Design Quality\nCriteria: Visual hierarchy is clear, brand consistency maintained\nTest: Layout follows established patterns\n```\n\nRun LLM-as-judge sub-agent for binary pass\u002Ffail.\n\n## Technology-Specific Patterns\n\n### Next.js Full Stack\n\n```\nspecs\u002F\n├── authentication.md\n├── database.md\n└── api-routes.md\n\nsrc\u002F\n├── app\u002F                    # App Router\n├── components\u002F              # React components\n├── lib\u002F                    # Utilities (db, auth, helpers)\n└── types\u002F                   # TypeScript types\n\nAGENTS.md:\n  Build: npm run dev\n  Test: npm run test\n  Typecheck: npx tsc --noEmit\n  Lint: npm run lint\n```\n\n### Python (Scripts\u002FNotebooks\u002FFastAPI)\n\n```\nspecs\u002F\n├── data-pipeline.md\n├── model-training.md\n└── api-endpoints.md\n\nsrc\u002F\n├── pipeline.py\n├── models\u002F\n├── api\u002F\n└── tests\u002F\n\nAGENTS.md:\n  Build: python -m src.main\n  Test: pytest\n  Typecheck: mypy src\u002F\n  Lint: ruff check src\u002F\n```\n\n### GPU Workloads\n\n```\nspecs\u002F\n├── model-architecture.md\n├── training-data.md\n└── inference-pipeline.md\n\nsrc\u002F\n├── models\u002F\n├── training\u002F\n├── inference\u002F\n└── utils\u002F\n\nAGENTS.md:\n  Train: python train.py\n  Test: pytest tests\u002F\n  Lint: ruff check src\u002F\n  GPU Check: nvidia-smi\n```\n\n## Quick Start Command\n\nStart a Ralph Mode session:\n\n```\n\"Start Ralph Mode for my project at ~\u002Fprojects\u002Fmy-app. I want to implement user authentication with JWT.\n```\n\nI will:\n1. Create IMPLEMENTATION_PLAN.md with prioritized tasks\n2. Spawn sub-agents for iterative implementation\n3. Apply backpressure gates (test, lint, typecheck)\n4. Track progress and announce completion\n\n## Operational Learnings\n\nWhen Ralph patterns emerge, update AGENTS.md:\n\n```markdown\n## Discovered Patterns\n\n- When adding API routes, also add to OpenAPI spec\n- Use existing db utilities from src\u002Flib\u002Fdb over direct calls\n- Test files must be co-located with implementation\n```\n\n## Escape Hatches\n\nWhen trajectory goes wrong:\n- **Ctrl+C** - Stop loop immediately\n- **Regenerate plan** - \"Discard IMPLEMENTATION_PLAN.md and re-plan\"\n- **Reset** - \"Git reset to last known good state\"\n- **Scope down** - Create smaller scoped plan for specific work\n\n## Advanced: LLM-as-Judge Fixture\n\nFor subjective criteria (tone, aesthetics, UX):\n\nCreate `src\u002Flib\u002Fllm-review.ts`:\n\n```typescript\ninterface ReviewResult {\n  pass: boolean;\n  feedback?: string;\n}\n\nasync function createReview(config: {\n  criteria: string;\n  artifact: string; \u002F\u002F text or screenshot path\n}): Promise\u003CReviewResult>;\n```\n\nSub-agents discover and use this pattern for binary pass\u002Ffail checks.\n\n## Critical Operational Requirements\n\nBased on empirical usage, enforce these practices to avoid silent failures:\n\n### 1. Mandatory Progress Logging\n\n**Ralph MUST write to PROGRESS.md after EVERY iteration.** This is non-negotiable.\n\nCreate `PROGRESS.md` in project root at start:\n\n```markdown\n# Ralph: [Task Name]\n\n## Iteration [N] - [Timestamp]\n\n### Status\n- [ ] In Progress | [ ] Blocked | [ ] Complete\n\n### What Was Done\n- [Item 1]\n- [Item 2]\n\n### Blockers\n- None | [Description]\n\n### Next Step\n[Specific next task from IMPLEMENTATION_PLAN.md]\n\n### Files Changed\n- `path\u002Fto\u002Ffile.ts` - [brief description]\n```\n\n**Why:** External observers (parent agents, crons, humans) can tail one file instead of scanning directories or inferring state from session logs.\n\n### 2. Session Isolation & Cleanup\n\nBefore spawning a new Ralph session:\n- Check for existing Ralph sub-agents via `sessions_list`\n- Kill or verify completion of previous sessions\n- Do NOT spawn overlapping Ralph sessions on same codebase\n\n**Anti-pattern:** Spawning Ralph v2 while v1 is still running = file conflicts, race conditions, lost work.\n\n### 3. Explicit Path Verification\n\nNever assume directory structure. At start of each iteration:\n\n```typescript\n\u002F\u002F Verify current working directory\nconst cwd = process.cwd();\nconsole.log(`Working in: ${cwd}`);\n\n\u002F\u002F Verify expected paths exist\nif (!fs.existsSync('.\u002Fsrc\u002Fapp')) {\n  console.error('Expected .\u002Fsrc\u002Fapp, found:', fs.readdirSync('.'));\n  \u002F\u002F Adapt or fail explicitly\n}\n```\n\n**Why:** Ralph may be spawned from different contexts with different working directories.\n\n### 4. Completion Signal Protocol\n\nWhen done, Ralph MUST:\n\n1. Write final `PROGRESS.md` with \"## Status: COMPLETE\"\n2. List all created\u002Fmodified files\n3. Exit cleanly (no hanging processes)\n\nExample completion PROGRESS.md:\n\n```markdown\n# Ralph: Influencer Detail Page\n\n## Status: COMPLETE ✅\n\n**Finished:** [ISO timestamp]\n\n### Final Verification\n- [x] TypeScript: Pass\n- [x] Tests: Pass  \n- [x] Build: Pass\n\n### Files Created\n- `src\u002Fapp\u002Ffeature\u002Fpage.tsx`\n- `src\u002Fapp\u002Fapi\u002Ffeature\u002Froute.ts`\n\n### Testing Instructions\n1. Run: `npm run dev`\n2. Visit: `http:\u002F\u002Flocalhost:3000\u002Ffeature`\n3. Verify: [specific checks]\n```\n\n### 5. Error Handling Requirements\n\nIf Ralph encounters unrecoverable errors:\n\n1. Log to PROGRESS.md with \"## Status: BLOCKED\"\n2. Describe blocker in detail\n3. List attempted solutions\n4. Exit cleanly (don't hang)\n\n**Do not silently fail.** A Ralph that stops iterating with no progress log is indistinguishable from one still working.\n\n### 6. Iteration Time Limits\n\nSet explicit iteration timeouts:\n\n```markdown\n## Operational Parameters\n- Max iteration time: 10 minutes\n- Total session timeout: 60 minutes\n- If iteration exceeds limit: Log blocker, exit\n```\n\n**Why:** Prevents infinite loops on stuck tasks, allows parent agent to intervene.\n\n## Memory Updates\n\nAfter each Ralph Mode session, document:\n\n```markdown\n## [Date] Ralph Mode Session\n\n**Project:** [project-name]\n**Duration:** [iterations]\n**Outcome:** success \u002F partial \u002F blocked\n**Learnings:**\n- What worked well\n- What needs adjustment\n- Patterns to add to AGENTS.md\n```\n\n## Appendix: Hall of Failures\n\nCommon anti-patterns observed:\n\n| Anti-Pattern | Consequence | Prevention |\n|--------------|-------------|------------|\n| No progress logging | Parent agent cannot determine status | Mandatory PROGRESS.md |\n| Silent failure | Work lost, time wasted | Explicit error logging |\n| Overlapping sessions | File conflicts, corrupt state | Check\u002Fcleanup before spawn |\n| Path assumptions | Wrong directory, wrong files | Explicit verification |\n| No completion signal | Parent waits indefinitely | Clear COMPLETE status |\n| Infinite iteration | Resource waste, no progress | Time limits + blockers |\n","# Ralph Mode - Autonomous Development Loops\n\nRalph Mode implements the Ralph Wiggum technique adapted for OpenClaw: autonomous task completion through continuous iteration with backpressure gates, completion criteria, and structured planning.\n\n## When to Use\n\nUse Ralph Mode when:\n- Building features that require multiple iterations and refinement\n- Working on complex projects with acceptance criteria to validate\n- Need automated testing, linting, or typecheck gates\n- Want to track progress across many iterations systematically\n- Prefer autonomous loops over manual turn-by-turn guidance\n\n## Core Principles\n\n### Three-Phase Workflow\n\n**Phase 1: Requirements Definition**\n- Document specs in `specs\u002F` (one file per topic of concern)\n- Define acceptance criteria (observable, verifiable outcomes)\n- Create implementation plan with prioritized tasks\n\n**Phase 2: Planning**\n- Gap analysis: compare specs against existing code\n- Generate `IMPLEMENTATION_PLAN.md` with prioritized tasks\n- No implementation during this phase\n\n**Phase 3: Building (Iterative)**\n- Pick one task from plan per iteration\n- Implement, validate, update plan, commit\n- Continue until all tasks complete or criteria met\n\n### Backpressure Gates\n\nReject incomplete work automatically through validation:\n\n**Programmatic Gates (Always use these):**\n- Tests: `[test command]` - Must pass before committing\n- Typecheck: `[typecheck command]` - Catch type errors early\n- Lint: `[lint command]` - Enforce code quality\n- Build: `[build command]` - Verify integration\n\n**Subjective Gates (Use for UX, design, quality):**\n- LLM-as-judge reviews for tone, aesthetics, usability\n- Binary pass\u002Ffail - converges through iteration\n- Only add after programmatic gates work reliably\n\n### Context Efficiency\n\n- One task per iteration = fresh context each time\n- Spawn sub-agents for exploration, not main context\n- Lean prompts = smart zone (~40-60% utilization)\n- Plans are disposable - regenerate cheap vs. salvage\n\n## File Structure\n\nCreate this structure for each Ralph Mode project:\n\n```\nproject-root\u002F\n├── IMPLEMENTATION_PLAN.md     # Shared state, updated each iteration\n├── AGENTS.md                  # Build\u002Ftest\u002Flint commands (~60 lines)\n├── specs\u002F                     # Requirements (one file per topic)\n│   ├── topic-a.md\n│   └── topic-b.md\n├── src\u002F                        # Application code\n└── src\u002Flib\u002F                    # Shared utilities\n```\n\n### IMPLEMENTATION_PLAN.md\n\nPriority task list - single source of truth. Format:\n\n```markdown\n# Implementation Plan\n\n## In Progress\n- [ ] Task name (iteration N)\n  - Notes: discoveries, bugs, blockers\n\n## Completed\n- [x] Task name (iteration N)\n\n## Backlog\n- [ ] Future task\n```\n\n### Topic Scope Test\n\nCan you describe the topic in one sentence without \"and\"?\n- ✅ \"User authentication with JWT and session management\"\n- ❌ \"Auth, profiles, and billing\" → 3 topics\n\n### AGENTS.md - Operational Guide\n\nSuccinct guide for running the project. Keep under 60 lines:\n\n```markdown\n# Project Operations\n\n## Build Commands\nnpm run dev      # Development server\nnpm run build     # Production build\n\n## Validation\nnpm run test      # All tests\nnpm run lint      # ESLint\nnpm run typecheck  # TypeScript\nnpm run e2e       # E2E tests\n\n## Operational Notes\n- Tests must pass before committing\n- Typecheck failures block commits\n- Use existing utilities from src\u002Flib over ad-hoc copies\n```\n\n## Hats (Personas)\n\nSpecialized roles for different tasks:\n\n**Hat: Architect** (`@architect`)\n- High-level design, data modeling, API contracts\n- Focus: patterns, scalability, maintainability\n\n**Hat: Implementer** (`@implementer`)\n- Write code, implement features, fix bugs\n- Focus: correctness, performance, test coverage\n\n**Hat: Tester** (`@tester`)\n- Test authoring, validation, edge cases\n- Focus: coverage, reliability, reproducibility\n\n**Hat: Reviewer** (`@reviewer`)\n- Code reviews, PR feedback, quality assessment\n- Focus: style, readability, adherence to specs\n\n**Usage:**\n```\n\"Spawn a sub-agent with @architect hat to design the data model\"\n```\n\n## Loop Mechanics\n\n### Outer Loop (You coordinate)\n\nYour job as main agent: engineer setup, observe, course-correct.\n\n1. **Don't allocate work to main context** - Spawn sub-agents\n2. **Let Ralph Ralph** - LLM will self-identify, self-correct\n3. **Use protection** - Sandbox is your security boundary\n4. **Plan is disposable** - Regenerate when wrong\u002Fstale\n5. **Move outside the loop** - Sit and watch, don't micromanage\n\n### Inner Loop (Sub-agent executes)\n\nEach sub-agent iteration:\n1. **Study** - Read plan, specs, relevant code\n2. **Select** - Pick most important uncompleted task\n3. **Implement** - Write code, one task only\n4. **Validate** - Run tests, lint, typecheck (backpressure)\n5. **Update** - Mark task done, note discoveries, commit\n6. **Exit** - Next iteration starts fresh\n\n### Stopping Conditions\n\nLoop ends when:\n- ✅ All IMPLEMENTATION_PLAN.md tasks completed\n- ✅ All acceptance criteria met\n- ✅ Tests passing, no blocking issues\n- ⚠️ Max iterations reached (configure limit)\n- ? Manual stop (Ctrl+C)\n\n## Completion Criteria\n\nDefine success upfront - avoid \"seems done\" ambiguity.\n\n### Programmatic (Measurable)\n- All tests pass: `[test_command]` returns 0\n- Typecheck passes: No TypeScript errors\n- Build succeeds: Production bundle created\n- Coverage threshold: e.g., 80%+\n\n### Subjective (LLM-as-Judge)\nFor quality criteria that resist automation:\n\n```markdown\n## Completion Check - UX Quality\nCriteria: Navigation is intuitive, primary actions are discoverable\nTest: User can complete core flow without confusion\n\n## Completion Check - Design Quality\nCriteria: Visual hierarchy is clear, brand consistency maintained\nTest: Layout follows established patterns\n```\n\nRun LLM-as-judge sub-agent for binary pass\u002Ffail.\n\n## Technology-Specific Patterns\n\n### Next.js Full Stack\n\n```\nspecs\u002F\n├── authentication.md\n├── database.md\n└── api-routes.md\n\nsrc\u002F\n├── app\u002F                    # App Router\n├── components\u002F              # React components\n├── lib\u002F                    # Utilities (db, auth, helpers)\n└── types\u002F                   # TypeScript types\n\nAGENTS.md:\n  Build: npm run dev\n  Test: npm run test\n  Typecheck: npx tsc --noEmit\n  Lint: npm run lint\n```\n\n### Python (Scripts\u002FNotebooks\u002FFastAPI)\n\n```\nspecs\u002F\n├── data-pipeline.md\n├── model-training.md\n└── api-endpoints.md\n\nsrc\u002F\n├── pipeline.py\n├── models\u002F\n├── api\u002F\n└── tests\u002F\n\nAGENTS.md:\n  Build: python -m src.main\n  Test: pytest\n  Typecheck: mypy src\u002F\n  Lint: ruff check src\u002F\n```\n\n### GPU Workloads\n\n```\nspecs\u002F\n├── model-architecture.md\n├── training-data.md\n└── inference-pipeline.md\n\nsrc\u002F\n├── models\u002F\n├── training\u002F\n├── inference\u002F\n└── utils\u002F\n\nAGENTS.md:\n  Train: python train.py\n  Test: pytest tests\u002F\n  Lint: ruff check src\u002F\n  GPU Check: nvidia-smi\n```\n\n## Quick Start Command\n\nStart a Ralph Mode session:\n\n```\n\"Start Ralph Mode for my project at ~\u002Fprojects\u002Fmy-app. I want to implement user authentication with JWT.\n```\n\nI will:\n1. Create IMPLEMENTATION_PLAN.md with prioritized tasks\n2. Spawn sub-agents for iterative implementation\n3. Apply backpressure gates (test, lint, typecheck)\n4. Track progress and announce completion\n\n## Operational Learnings\n\nWhen Ralph patterns emerge, update AGENTS.md:\n\n```markdown\n## Discovered Patterns\n\n- When adding API routes, also add to OpenAPI spec\n- Use existing db utilities from src\u002Flib\u002Fdb over direct calls\n- Test files must be co-located with implementation\n```\n\n## Escape Hatches\n\nWhen trajectory goes wrong:\n- **Ctrl+C** - Stop loop immediately\n- **Regenerate plan** - \"Discard IMPLEMENTATION_PLAN.md and re-plan\"\n- **Reset** - \"Git reset to last known good state\"\n- **Scope down** - Create smaller scoped plan for specific work\n\n## Advanced: LLM-as-Judge Fixture\n\nFor subjective criteria (tone, aesthetics, UX):\n\nCreate `src\u002Flib\u002Fllm-review.ts`:\n\n```typescript\ninterface ReviewResult {\n  pass: boolean;\n  feedback?: string;\n}\n\nasync function createReview(config: {\n  criteria: string;\n  artifact: string; \u002F\u002F text or screenshot path\n}): Promise\u003CReviewResult>;\n```\n\nSub-agents discover and use this pattern for binary pass\u002Ffail checks.\n\n## Critical Operational Requirements\n\nBased on empirical usage, enforce these practices to avoid silent failures:\n\n### 1. Mandatory Progress Logging\n\n**Ralph MUST write to PROGRESS.md after EVERY iteration.** This is non-negotiable.\n\nCreate `PROGRESS.md` in project root at start:\n\n```markdown\n# Ralph: [Task Name]\n\n## Iteration [N] - [Timestamp]\n\n### Status\n- [ ] In Progress | [ ] Blocked | [ ] Complete\n\n### What Was Done\n- [Item 1]\n- [Item 2]\n\n### Blockers\n- None | [Description]\n\n### Next Step\n[Specific next task from IMPLEMENTATION_PLAN.md]\n\n### Files Changed\n- `path\u002Fto\u002Ffile.ts` - [brief description]\n```\n\n**Why:** External observers (parent agents, crons, humans) can tail one file instead of scanning directories or inferring state from session logs.\n\n### 2. Session Isolation & Cleanup\n\nBefore spawning a new Ralph session:\n- Check for existing Ralph sub-agents via `sessions_list`\n- Kill or verify completion of previous sessions\n- Do NOT spawn overlapping Ralph sessions on same codebase\n\n**Anti-pattern:** Spawning Ralph v2 while v1 is still running = file conflicts, race conditions, lost work.\n\n### 3. Explicit Path Verification\n\nNever assume directory structure. At start of each iteration:\n\n```typescript\n\u002F\u002F Verify current working directory\nconst cwd = process.cwd();\nconsole.log(`Working in: ${cwd}`);\n\n\u002F\u002F Verify expected paths exist\nif (!fs.existsSync('.\u002Fsrc\u002Fapp')) {\n  console.error('Expected .\u002Fsrc\u002Fapp, found:', fs.readdirSync('.'));\n  \u002F\u002F Adapt or fail explicitly\n}\n```\n\n**Why:** Ralph may be spawned from different contexts with different working directories.\n\n### 4. Completion Signal Protocol\n\nWhen done, Ralph MUST:\n\n1. Write final `PROGRESS.md` with \"## Status: COMPLETE\"\n2. List all created\u002Fmodified files\n3. Exit cleanly (no hanging processes)\n\nExample completion PROGRESS.md:\n\n```markdown\n# Ralph: Influencer Detail Page\n\n## Status: COMPLETE ✅\n\n**Finished:** [ISO timestamp]\n\n### Final Verification\n- [x] TypeScript: Pass\n- [x] Tests: Pass  \n- [x] Build: Pass\n\n### Files Created\n- `src\u002Fapp\u002Ffeature\u002Fpage.tsx`\n- `src\u002Fapp\u002Fapi\u002Ffeature\u002Froute.ts`\n\n### Testing Instructions\n1. Run: `npm run dev`\n2. Visit: `http:\u002F\u002Flocalhost:3000\u002Ffeature`\n3. Verify: [specific checks]\n```\n\n### 5. Error Handling Requirements\n\nIf Ralph encounters unrecoverable errors:\n\n1. Log to PROGRESS.md with \"## Status: BLOCKED\"\n2. Describe blocker in detail\n3. List attempted solutions\n4. Exit cleanly (don't hang)\n\n**Do not silently fail.** A Ralph that stops iterating with no progress log is indistinguishable from one still working.\n\n### 6. Iteration Time Limits\n\nSet explicit iteration timeouts:\n\n```markdown\n## Operational Parameters\n- Max iteration time: 10 minutes\n- Total session timeout: 60 minutes\n- If iteration exceeds limit: Log blocker, exit\n```\n\n**Why:** Prevents infinite loops on stuck tasks, allows parent agent to intervene.\n\n## Memory Updates\n\nAfter each Ralph Mode session, document:\n\n```markdown\n## [Date] Ralph Mode Session\n\n**Project:** [project-name]\n**Duration:** [iterations]\n**Outcome:** success \u002F partial \u002F blocked\n**Learnings:**\n- What worked well\n- What needs adjustment\n- Patterns to add to AGENTS.md\n```\n\n## Appendix: Hall of Failures\n\nCommon anti-patterns observed:\n\n| Anti-Pattern | Consequence | Prevention |\n|--------------|-------------|------------|\n| No progress logging | Parent agent cannot determine status | Mandatory PROGRESS.md |\n| Silent failure | Work lost, time wasted | Explicit error logging |\n| Overlapping sessions | File conflicts, corrupt state | Check\u002Fcleanup before spawn |\n| Path assumptions | Wrong directory, wrong files | Explicit verification |\n| No completion signal | Parent waits indefinitely | Clear COMPLETE status |\n| Infinite iteration | Resource waste, no progress | Time limits + blockers |\n",{"name":5,"description":7},"main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Frichginsberg\u002Fralph-mode",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add kbarbel640-del\u002Fskills --skill ralph-mode",{"tool":56,"command":57},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill ralph-mode",{"tool":59,"command":60},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill ralph-mode","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Frichginsberg\u002Fralph-mode\u002FSKILL.md",true,[64,70,74,78],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"_meta.json","REFERENCE","参考文档",487,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Frichginsberg\u002Fralph-mode\u002F_meta.json",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fbackpressure.md",4026,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Frichginsberg\u002Fralph-mode\u002Freferences\u002Fbackpressure.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fpatterns.md",6881,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Frichginsberg\u002Fralph-mode\u002Freferences\u002Fpatterns.md",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Floop.sh","SCRIPT","脚本",5033,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Frichginsberg\u002Fralph-mode\u002Fscripts\u002Floop.sh",[85,110,132,150,155,175],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":38},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[92,93,94,21,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109],"crowd prompting","prompting","api","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":38},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[117,94,118,119,120,121,122,123,124,125,29,126,127,128,129,130,131,98,28],"dilemm ai","arena","analyze","browser","openclaw agent","create","automation","browser automation","bot","design","strategy","headless","compete","submit","matchmaking",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":38},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[],[139,140,141,142,143,144,145,21,146,130,28,147,94,148,149],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":151,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":38},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[142,141,140,139,149,144,145,21,143,130,28,146,147,94,148],{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":38},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[162,163,164,165,166,167,168,169,170,171,172,173,174],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":38},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[],[182,183,184,185,21,186,187,43,188,147,189,190,191,192,193,107,194,195,196],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]