Ralph logo

Ralph

Organization
IAPro-Community
ralph

Self-referential loop until task completion with architect verification

Overview

PublisherIAPro-Community
RepositoryOrquestrador-Maestro
Skill nameralph
Stars
63
Forks
11
Bundled files
Instructions only
LicenseApache-2.0
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 IAPro-Community 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/IAPro-Community/Orquestrador-Maestro/tree/v1/codex/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/IAPro-Community/Orquestrador-Maestro.git /tmp/Orquestrador-Maestro
mkdir -p .claude/skills
cp -r /tmp/Orquestrador-Maestro/codex/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 + ULTRAWORK - ITERATION {{ITERATION}}/{{MAX}}]

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

<Use_When>

  • Task requires guaranteed completion with verification (not just "do your best")
  • User says "ralph", "don't stop", "must complete", "finish this", or "keep going until done"
  • Work may span multiple iterations and needs persistence across retries
  • Task benefits from parallel execution with architect sign-off at the end </Use_When>

<Do_Not_Use_When>

  • User wants a full autonomous pipeline from idea to code -- use autopilot instead
  • User wants to explore or plan before committing -- use plan skill instead
  • User wants a quick one-shot fix -- delegate directly to an executor agent
  • User wants manual control over completion -- use ultrawork directly </Do_Not_Use_When>

<Why_This_Exists> Complex tasks often fail silently: partial implementations get declared "done", tests get skipped, edge cases get forgotten. Ralph prevents this by looping until work is genuinely complete, requiring fresh verification evidence before allowing completion, and using tiered architect review to confirm quality. </Why_This_Exists>

<Execution_Policy>

  • Fire independent agent calls simultaneously -- never wait sequentially for independent work
  • Use run_in_background: true for long operations (installs, builds, test suites)
  • Always pass the model parameter explicitly when delegating to agents
  • Read docs/shared/agent-tiers.md before first delegation to select correct agent tiers
  • Deliver the full implementation: no scope reduction, no partial completion, no deleting tests to make them pass
  • Default to concise, evidence-dense progress and completion reporting unless the user or risk level requires more detail
  • Treat newer user task updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints
  • If correctness depends on additional inspection, retrieval, execution, or verification, keep using the relevant tools until the execution loop is grounded
  • Continue through clear, low-risk, reversible next steps automatically; ask only when the next step is materially branching, destructive, or preference-dependent </Execution_Policy>

<Tool_Usage>

  • Before first MCP tool use, call ToolSearch("mcp") to discover deferred MCP tools
  • Use ask_codex with agent_role: "architect" for verification cross-checks when changes are security-sensitive, architectural, or involve complex multi-system integration
  • Skip Codex consultation for simple feature additions, well-tested changes, or time-critical verification
  • If ToolSearch finds no MCP tools or Codex is unavailable, proceed with architect agent verification alone -- never block on external tools
  • Use state_write / state_read for ralph mode state persistence between iterations
  • Persist context snapshot path in Ralph mode state so later phases and agents share the same grounding context </Tool_Usage>

State Management

Use the omx_state MCP server tools (state_write, state_read, state_clear) for Ralph lifecycle state.

  • On start: state_write({mode: "ralph", active: true, iteration: 1, max_iterations: 10, current_phase: "executing", started_at: "<now>", state: {context_snapshot_path: "<snapshot-path>"}})
  • On each iteration: state_write({mode: "ralph", iteration: <current>, current_phase: "executing"})
  • On verification/fix transition: state_write({mode: "ralph", current_phase: "verifying"}) or state_write({mode: "ralph", current_phase: "fixing"})
  • On completion: state_write({mode: "ralph", active: false, current_phase: "complete", completed_at: "<now>"})
  • On cancellation/cleanup: run $cancel (which should call state_clear(mode="ralph"))

Scenario Examples

Good: The user says continue after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.

Good: The user changes only the output shape or downstream delivery step (for example make a PR). Preserve earlier non-conflicting workflow constraints and apply the update locally.

Bad: The user says continue, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.

<Escalation_And_Stop_Conditions>

  • Stop and report when a fundamental blocker requires user input (missing credentials, unclear requirements, external service down)
  • Stop when the user says "stop", "cancel", or "abort" -- run /cancel
  • Continue working when the hook system sends "The boulder never stops" -- this means the iteration continues
  • If architect rejects verification, fix the issues and re-verify (do not stop)
  • If the same issue recurs across 3+ iterations, report it as a potential fundamental problem </Escalation_And_Stop_Conditions>

<Final_Checklist>

  • All requirements from the original task are met (no scope reduction)
  • Zero pending or in_progress TODO items
  • Fresh test run output shows all tests pass
  • Fresh build output shows success
  • lsp_diagnostics shows 0 errors on affected files
  • Architect verification passed (STANDARD tier minimum)
  • ai-slop-cleaner pass completed on changed files (or --no-deslop specified)
  • Post-deslop regression tests pass
  • /cancel run for clean state cleanup </Final_Checklist>

When the user provides the --prd flag, initialize a Product Requirements Document before starting the ralph loop.

Detecting PRD Mode

Check if {{PROMPT}} contains --prd or --PRD.

Detecting --no-deslop

Check if {{PROMPT}} contains --no-deslop. If --no-deslop is present, skip the deslop pass entirely after Step 7 and continue using the latest successful pre-deslop verification evidence.

Visual Reference Flags (Optional)

Ralph execution supports visual reference flags for screenshot tasks:

  • Repeatable image inputs: -i <image-path> (can be used multiple times)
  • Image directory input: --images-dir <directory>

Example: ralph -i refs/hn.png -i refs/hn-item.png --images-dir ./screenshots "match HackerNews layout"

PRD Workflow

  1. Run deep-interview in quick mode before creating PRD artifacts:
    • Execute: $deep-interview --quick <task>
    • Complete a compact requirements pass (context, goals, scope, constraints, validation)
    • Persist interview output to .omx/interviews/{slug}-{timestamp}.md
  2. Create canonical PRD/progress artifacts:
    • PRD: .omx/plans/prd-{slug}.md
    • Progress ledger: .omx/state/{scope}/ralph-progress.json (session scope when available, else root scope)
  3. Parse the task (everything after --prd flag)
  4. Break down into user stories:
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. Initialize canonical progress ledger at .omx/state/{scope}/ralph-progress.json
  2. Guidelines: right-sized stories (one session each), verifiable criteria, independent stories, priority order (foundational work first)
  3. Proceed to normal ralph loop using user stories as the task list

Example

User input: --prd build a todo app with React and TypeScript Workflow: Detect flag, extract task, create .omx/plans/prd-{slug}.md, create .omx/state/{scope}/ralph-progress.json, begin ralph loop.

Legacy compatibility

  • If .omx/prd.json exists and canonical PRD is absent, migrate one-way into .omx/plans/prd-{slug}.md.
  • If .omx/progress.txt exists and canonical progress ledger is absent, import one-way into .omx/state/{scope}/ralph-progress.json.
  • Keep legacy files unchanged for one release cycle.

Background Execution Rules

Run in background (run_in_background: true):

  • Package installation (npm install, pip install, cargo build)
  • Build processes (make, project build commands)
  • Test suites
  • Docker operations (docker build, docker pull)

Run blocking (foreground):

  • Quick status checks (git status, ls, pwd)
  • File reads and edits
  • Simple commands

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/IAPro-Community/Orquestrador-Maestro/tree/v1/codex/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 IAPro-Community under the Apache-2.0 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 👇