Ralph logo

Ralph

Community
MeroZemory
ralph

Self-referential loop until task completion with architect verification

Overview

PublisherMeroZemory
Repositoryoh-my-droid
Skill nameralph
Stars
29
Forks
7
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by MeroZemory on GitHub. Read the source before you install it.

Installation

Install the Ralph AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/MeroZemory/oh-my-droid/tree/main/skills/ralph
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MeroZemory/oh-my-droid.git /tmp/oh-my-droid
mkdir -p .claude/skills
cp -r /tmp/oh-my-droid/skills/ralph .claude/skills/ralph
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ralph in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ralph on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ralph is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Ralph Skill

[RALPH + ULTRAWORK - ITERATION {{ITERATION}}/{{MAX}}]

Your previous attempt did not output the completion promise. Continue working on the task.

PRD MODE (OPTIONAL)

If the user provides the --prd flag, initialize a PRD (Product Requirements Document) BEFORE starting the ralph loop.

Detecting PRD Mode

Check if {{PROMPT}} contains the flag pattern: --prd or --PRD

PRD Initialization Workflow

When --prd flag detected:

  1. Create PRD File Structure (.omd/prd.json and .omd/progress.txt)
  2. Parse the task (everything after --prd flag)
  3. Break down into user stories with this structure:
json
{
  "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
    }
  ]
}
  1. Create progress.txt:
# Ralph Progress Log
Started: [ISO timestamp]

## Codebase Patterns
(No patterns discovered yet)

---
  1. Guidelines for PRD creation:

    • Right-sized stories: Each completable in one focused session
    • Verifiable criteria: Include "Typecheck passes", "Tests pass"
    • Independent stories: Minimize dependencies
    • Priority order: Foundational work (DB, types) before UI
  2. After PRD created: Proceed to normal ralph loop execution using the user stories as your task list

Example Usage

User input: --prd build a todo app with React and TypeScript

Your workflow:

  1. Detect --prd flag
  2. Extract task: "build a todo app with React and TypeScript"
  3. Create .omd/prd.json with user stories
  4. Create .omd/progress.txt
  5. Begin ralph loop using user stories as task breakdown

ULTRAWORK MODE (AUTO-ACTIVATED)

Ralph automatically activates Ultrawork for maximum parallel execution. You MUST follow these rules:

Parallel Execution Rules

  • PARALLEL: Fire independent calls simultaneously - NEVER wait sequentially
  • BACKGROUND FIRST: Use Task(run_in_background=true) for long operations (10+ concurrent)
  • DELEGATE: Route tasks to specialist agents immediately

Smart Model Routing (SAVE TOKENS)

Task ComplexityTierExamples
Simple lookupsLOW (haiku)"What does this function return?", "Find where X is defined"
Standard workMEDIUM (sonnet)"Add error handling", "Implement this feature"
Complex analysisHIGH (opus)"Debug this race condition", "Refactor auth module"

Available Agents by Tier

DomainLOW (Haiku)MEDIUM (Sonnet)HIGH (Opus)
Analysisarchitect-lowarchitect-mediumarchitect
Executionexecutor-lowexecutorexecutor-high
Searchexploreexplore-medium-
Researchresearcher-lowresearcher-
Frontenddesigner-lowdesignerdesigner-high
Docswriter--
Visual-vision-
Planning--planner
Critique--critic
Pre-Planning--analyst
Testing-qa-tester-
Securitysecurity-reviewer-low-security-reviewer
Buildbuild-fixer-lowbuild-fixer-
TDDtdd-guide-lowtdd-guide-
Code Reviewcode-reviewer-low-code-reviewer

CRITICAL: Always pass model parameter explicitly!

Task(subagent_type="oh-my-droid:architect-low", model="claude-haiku-4-5-20251001", prompt="...")
Task(subagent_type="oh-my-droid:executor", model="claude-sonnet-4-5-20250929", prompt="...")
Task(subagent_type="oh-my-droid:architect", model="claude-opus-4-5-20251101", prompt="...")

Background Execution Rules

Run in Background (set run_in_background: true):

  • Package installation: npm install, pip install, cargo build
  • Build processes: npm run build, make, tsc
  • Test suites: npm test, pytest, cargo test
  • Docker operations: docker build, docker pull

Run Blocking (foreground):

  • Quick status checks: git status, ls, pwd
  • File reads, edits
  • Simple commands

COMPLETION REQUIREMENTS

Before claiming completion, you MUST:

  1. Verify ALL requirements from the original task are met
  2. Ensure no partial implementations
  3. Check that code compiles/runs without errors
  4. Verify tests pass (if applicable)
  5. TODO LIST: Zero pending/in_progress tasks

VERIFICATION BEFORE COMPLETION (IRON LAW)

NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE

Before outputting the completion promise:

Steps (MANDATORY)

  1. IDENTIFY: What command proves the task is complete?
  2. RUN: Execute verification (test, build, lint)
  3. READ: Check output - did it actually pass?
  4. ONLY THEN: Proceed to Architect verification

Red Flags (STOP and verify)

  • Using "should", "probably", "seems to"
  • About to output completion without fresh evidence
  • Expressing satisfaction before verification

Evidence Chain

  1. Fresh test run output showing pass
  2. Fresh build output showing success
  3. lsp_diagnostics showing 0 errors
  4. THEN Architect verification
  5. THEN completion promise

Skipping verification = Task NOT complete

ARCHITECT VERIFICATION (MANDATORY)

When you believe the task is complete:

  1. First, spawn Architect to verify your work (ALWAYS pass model explicitly!):

    Task(subagent_type="oh-my-droid:architect", model="claude-opus-4-5-20251101", prompt="Verify this implementation is complete: [describe what you did]")
  2. Wait for Architect's assessment

  3. If Architect approves: Run /cancel to cleanly exit ralph mode

  4. If Architect finds issues: Fix them, then repeat verification

DO NOT exit without Architect verification.

ZERO TOLERANCE

  • NO Scope Reduction - deliver FULL implementation
  • NO Partial Completion - finish 100%
  • NO Premature Stopping - ALL TODOs must be complete
  • NO TEST DELETION - fix code, not tests

STATE CLEANUP ON COMPLETION

IMPORTANT: Use the cancel skill for proper state cleanup

When work is complete and Architect verification passes, run /cancel to cleanly exit ralph mode. This handles:

  • Deletion of ralph state files (both local and global)
  • Cleanup of linked ultrawork or ecomode state
  • Proper termination of the ralph loop

This ensures clean state for future sessions without leaving stale state files behind.

INSTRUCTIONS

  • Review your progress so far
  • Continue from where you left off
  • Use parallel execution and background tasks
  • When FULLY complete AND Architect verified: Run /cancel to cleanly exit and clean up all state files
  • Do not stop until the task is truly done

Original task: {{PROMPT}}

Frequently asked questions

What does the Ralph AI skill do?

Self-referential loop until task completion with architect verification

Why use Ralph on TypingMind?

Because you install it once and use it with any model. Ralph is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ralph in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/MeroZemory/oh-my-droid/tree/main/skills/ralph. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ralph?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ralph?

As many as you like. As long as a model supports skills, you can use Ralph with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ralph AI skill free?

Yes. It is published on GitHub by MeroZemory under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇