ralph-orchestrator
AGENTS.md3.2k starsChanged 9 months agoMITView on GitHub
The orchestrator is a thin coordination layer, not a platform. Agents are smart; let them do the work. IMPORTANT: Run cargo test before declaring any task done. Smoke test after code changes.
- Installs packages
1 other project uses a version of this.
Trending
Quiet since September.about the whole repository
Most recently taken up by
- Najeebullah3124/awesome-claude-universeword for word, first seen Apr 24, 2026
Who's talking about mikeyobrien/ralph-orchestrator
- A Hacker News story“Show HN: Yet another tool to wrap agents in a loop”Hacker News · Dec 17, 2025 · 6 points
- anthropics/claude-code“Feature Request: Add `clearContext` field to Stop hook output”GitHub · Jan 7, 2026 · 3 reactions
- @rusttrending.bsky.social“mikeyobrien / ralph-orchestrator: An improved implementation of the Ralph Wiggum technique for autonomous …”Bluesky · May 3, 2026 · 2 likes
- @rusttrending.bsky.social“mikeyobrien / ralph-orchestrator: An improved implementation of the Ralph Wiggum technique for autonomous …”Bluesky · Mar 26, 2026 · 2 likes
- @rusttrending.bsky.social“mikeyobrien / ralph-orchestrator: An improved implementation of the Ralph Wiggum technique for autonomous …”Bluesky · Feb 2, 2026 · 1 likes
The biggest 5 of 49 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 49
Talked about on GitHub, Bluesky and Hacker News (49 times).
On GitHub · 45
- Jan 7, 2026Feature Request: Add `clearContext` field to Stop hook output — anthropics/claude-code3 reactions · 5 comments
- Jan 4, 2026Add Ralph Wiggum Plugin Support — langgenius/dify1 reaction
- Sep 30, 2026agent-skills.github.mikeyobrien.ralph-orchestrator: init at 2.10.1 — sudosubin/agents.nix0 reactions
- Jul 23, 2026Bump the dev-dependencies group across 1 directory with 8 updates — makioshibori/mma-trpg0 reactions
- Jul 16, 2026Bump the dev-dependencies group across 1 directory with 8 updates — makioshibori/mma-trpg0 reactions · 1 comment
40 more on GitHub
- Jul 9, 2026Bump the dev-dependencies group across 1 directory with 5 updates — makioshibori/mma-trpg0 reactions · 1 comment
- Jul 2, 2026Bump the dev-dependencies group with 8 updates — makioshibori/mma-trpg0 reactions · 1 comment
- Jun 23, 2026ralph-orchestrator 2.10.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Jun 22, 2026ralph-orchestrator 2.10.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Jun 18, 2026Bump the dev-dependencies group across 1 directory with 8 updates — makioshibori/mma-trpg0 reactions · 1 comment
- Jun 11, 2026Bump the dev-dependencies group across 1 directory with 9 updates — makioshibori/mma-trpg0 reactions · 1 comment
- Jun 4, 2026Bump the dev-dependencies group across 1 directory with 6 updates — makioshibori/mma-trpg0 reactions · 1 comment
- May 28, 2026Bump the dev-dependencies group across 1 directory with 10 updates — makioshibori/mma-trpg0 reactions · 1 comment
- May 21, 2026Bump the dev-dependencies group across 1 directory with 6 updates — makioshibori/mma-trpg0 reactions · 1 comment
- May 8, 2026ralph-orchestrator 2.9.3 — Homebrew/homebrew-core0 reactions · 1 comment
- Apr 30, 2026Bump the dev-dependencies group with 9 updates — makioshibori/mma-trpg0 reactions · 1 comment
- Apr 18, 2026Audit candidate: mikeyobrien/ralph-orchestrator — xiaolai/nlpm0 reactions · 4 comments
- Apr 10, 2026ralph-orchestrator 2.9.2 — Homebrew/homebrew-core0 reactions · 1 comment
- Apr 4, 2026ralph-orchestrator 2.9.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Mar 16, 2026ralph-orchestrator 2.8.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Mar 10, 2026ralph-orchestrator 2.8.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Mar 6, 2026ralph-orchestrator 2.7.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Feb 28, 20262026-02-28 — marcindulak/learning-api-styles-gen-ai-experiments0 reactions
- Feb 25, 2026Add ralph skill with proper attribution — ZealousEar/claude-skills0 reactions
- Feb 25, 2026ralph-orchestrator 2.6.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Feb 20, 2026Ralph Loop Orchestrator — MateuszNaKodach/SelfImprovement0 reactions
- Feb 14, 2026ralph-orchestrator 2.5.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Feb 8, 2026ralph-orchestrator 2.5.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Feb 5, 2026ralph-orchestrator 2.4.4 — Homebrew/homebrew-core0 reactions · 1 comment
- Feb 2, 2026ralph-orchestrator 2.4.3 — Homebrew/homebrew-core0 reactions · 1 comment
- Feb 2, 2026ralph-orchestrator 2.4.2 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 30, 2026ralph-orchestrator 2.4.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 29, 2026ralph-orchestrator 2.3.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 29, 2026ralph-orchestrator 2.3.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 26, 2026ralph-orchestrator 2.2.5 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 25, 2026ralph-orchestrator 2.2.4 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 24, 2026ralph-orchestrator 2.2.2 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 22, 2026ralph-orchestrator 2.2.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 22, 2026ralph-orchestrator 2.2.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 21, 2026ralph-orchestrator 2.1.3 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 20, 2026ralph-orchestrator 2.1.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 20, 2026ralph-orchestrator 2.1.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 19, 2026ralph-orchestrator 2.0.10 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 18, 2026ralph-orchestrator 2.0.9 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 10, 2026Add resource: ralph-orchestrator — hesreallyhim/awesome-claude-code0 reactions
On Bluesky · 3
- May 3, 2026mikeyobrien / ralph-orchestrator: An improved implementation of the Ralph Wiggum technique for autonomous AI agent orchestration ★2797… — @rusttrending.bsky.social2 likes and reposts
- Mar 26, 2026mikeyobrien / ralph-orchestrator: An improved implementation of the Ralph Wiggum technique for autonomous AI agent orchestration ★2371… — @rusttrending.bsky.social2 likes and reposts · 1 reply
- Feb 2, 2026mikeyobrien / ralph-orchestrator: An improved implementation of the Ralph Wiggum technique for autonomous AI agent orchestration ★1590… — @rusttrending.bsky.social1 likes and repost
On Hacker News · 1
- Dec 17, 2025Show HN: Yet another tool to wrap agents in a loop6 points
Other versions1 project uses a version of this.
Word for word · 1
- Najeebullah3124/awesome-claude-universe★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- code-assistSkill
- code-task-generatorSkill
- evaluate-presetsSkill
- find-code-tasksSkill
- pddSkill
- playwriterSkill
- pr-demoSkill
- ralph-toolsSkill
- release-bumpSkill
- review-prSkill
- test-driven-developmentSkill
- tmux-terminalSkill
- tui-debug-in-paneSkill
- tui-validateSkill
- ralph-docsSkill
- ralph-hatsSkill
- ralph-loopSkill
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 18
IMPORTANT: Run cargo test before declaring any task done.
- Very specific: line 99
Create specs in .ralph/specs/ — do NOT implement without an approved spec first
- Very specific: line 100
Create code tasks in .ralph/tasks/ using .code-task.md extension
- Very specific: line 262
When an agent emits human.interact, the event loop sends the question via Telegram and blocks
- Very specific: line 290
Run cargo test before declaring any task done
- Distinctive: line 292
Prefer replay-based smoke tests over live API calls for CI
- Distinctive: line 294
Run python tests using a .venv
- Distinctive: line 296
When I ask you to view something that means to use playwright/chrome tools to go view it.
- Very specific: line 297
When adding or changing ralph tools subcommands, update the appropriate file in crates/ralph-core/data/: ralph-tools.md (shared commands), …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
The orchestrator is a thin coordination layer, not a platform. Agents are smart; let them do the work.
Build & Test
cargo build
cargo test
cargo test -p ralph-core test_name # Run single test
cargo test -p ralph-core smoke_runner # Smoke tests (replay-based)
cargo run -p ralph-e2e -- --mock # E2E tests (CI-safe)
./scripts/setup-hooks.sh # Install pre-commit hooks (once)IMPORTANT: Run cargo test before declaring any task done. Smoke test after code changes.
Web Dashboard
ralph web # Launch both servers (backend:3000, frontend:5173)
npm install # Install all dependencies
npm run dev # Dev mode (both)
npm run dev:server # Backend only
npm run dev:web # Frontend only
npm run test:server # Backend testsArchitecture
ralph-cli → CLI entry point, commands (run, plan, task, loops, web)
ralph-core → Orchestration logic, event loop, hats, memories, tasks
ralph-adapters → Backend integrations (Claude, Kiro, Gemini, Codex, Roo, etc.)
ralph-telegram → Telegram bot for human-in-the-loop communication
ralph-tui → Terminal UI (ratatui-based)
ralph-e2e → End-to-end test framework
ralph-proto → Protocol definitions
ralph-bench → Benchmarking
backend/ → Web server (@ralph-web/server) - Fastify + tRPC + SQLite
frontend/ → Web dashboard (@ralph-web/dashboard) - React + Vite + TailwindCSSKey Files
| File | Purpose |
.ralph/agent/memories.md | Persistent learning across sessions |
.ralph/agent/tasks.jsonl | Runtime work tracking |
.ralph/loop.lock | Contains PID + prompt of primary loop |
.ralph/loops.json | Registry of all tracked loops |
.ralph/merge-queue.jsonl | Event-sourced merge queue |
.ralph/telegram-state.json | Telegram bot state (chat ID, pending questions) |
Code Locations
- Event loop:
crates/ralph-core/src/event_loop/mod.rs - Hat system:
crates/ralph-core/src/hatless_ralph.rs - Memory system:
crates/ralph-core/src/memory.rs,memory_store.rs - Task system:
crates/ralph-core/src/task.rs,task_store.rs - Lock coordination:
crates/ralph-core/src/worktree.rs - Loop registry:
crates/ralph-core/src/loop_registry.rs - Merge queue:
crates/ralph-core/src/merge_queue.rs - CLI commands:
crates/ralph-cli/src/loops.rs,task_cli.rs - Telegram integration:
crates/ralph-telegram/src/(bot, service, state, handler) - RObot config:
crates/ralph-core/src/config.rs(RobotConfig,TelegramBotConfig) - Wave system:
crates/ralph-core/src/wave_tracker.rs,wave_detection.rs,wave_prompt.rs - Wave CLI:
crates/ralph-cli/src/wave.rs - Web server:
backend/ralph-web-server/src/(tRPC routes inapi/, runners inrunner/) - Web dashboard:
frontend/ralph-web/src/(React components incomponents/)
The Ralph Tenets
- Fresh Context Is Reliability — Each iteration clears context. Re-read specs, plan, code every cycle. Optimize for the "smart zone" (40-60% of ~176K usable tokens).
- Backpressure Over Prescription — Don't prescribe how; create gates that reject bad work. Tests, typechecks, builds, lints. For subjective criteria, use LLM-as-judge with binary pass/fail.
- The Plan Is Disposable — Regeneration costs one planning loop. Cheap. Never fight to save a plan.
- Disk Is State, Git Is Memory — Memories and Tasks are the handoff mechanisms. No sophisticated coordination needed.
- Steer With Signals, Not Scripts — The codebase is the instruction manual. When Ralph fails a specific way, add a sign for next time.
- Let Ralph Ralph — Sit on the loop, not in it. Tune like a guitar, don't conduct like an orchestra.
Anti-Patterns
- ❌ Building features into the orchestrator that agents can handle
- ❌ Complex retry logic (fresh context handles recovery)
- ❌ Detailed step-by-step instructions (use backpressure instead)
- ❌ Scoping work at task selection time (scope at plan creation instead)
- ❌ Assuming functionality is missing without code verification
Specs & Tasks
- Create specs in
.ralph/specs/— do NOT implement without an approved spec first - Create code tasks in
.ralph/tasks/using.code-task.mdextension - Work step-by-step: spec → dogfood spec → implement → dogfood implementation → done
Memories and Tasks (Default Mode)
Memories and tasks are enabled by default. Both must be enabled/disabled together:
When enabled (default):
- Scratchpad is disabled
- Tasks replace scratchpad for completion verification
- Loop terminates when no open tasks + consecutive LOOP_COMPLETE
To disable (legacy scratchpad mode):
memories:
enabled: false
tasks:
enabled: falseParallel Loops
Ralph supports multiple orchestration loops in parallel using git worktrees.
Primary Loop (holds .ralph/loop.lock)
├── Runs in main workspace
├── Processes merge queue on completion
└── Spawns merge-ralph for queued loops
Worktree Loops (.worktrees/<loop-id>/)
├── Isolated filesystem via git worktree
├── Symlinked memories, specs, tasks → main repo
├── Queue for merge on completion
└── Exit cleanly (no spawn)Testing Parallel Loops
cd $(mktemp -d) && git init && echo "<p>Hello</p>" > index.html && git add . && git commit -m "init"
# Terminal 1: Primary loop
ralph run -p "Add header before <p>" --max-iterations 5
# Terminal 2: Worktree loop
ralph run -p "Add footer after </p>" --max-iterations 5
# Monitor
ralph loopsAgent Waves (Intra-Loop Parallelism)
Waves enable a single hat to process multiple work items in parallel within one iteration.
Hat Config Fields
hats:
reviewer:
name: "Reviewer"
triggers: ["review.file"]
publishes: ["review.done"]
concurrency: 4 # Max parallel workers (default: 1)
instructions: "..."
synthesizer:
triggers: ["review.done"]
publishes: ["review.complete"]
aggregate: # Buffer results until all arrive
mode: wait_for_all
timeout: 300 # Seconds to waitconcurrency > 1enables wave execution for a hataggregatemakes a hat wait for all wave results before activating- A hat cannot have both
concurrency > 1andaggregate
Wave Dispatch
Agents dispatch waves via CLI:
ralph wave emit review.file --payloads "src/main.rs" "src/lib.rs" "src/config.rs"How It Works
- Agent emits wave events (tagged with shared
wave_id) - Loop runner detects wave events, resolves target hat
- Spawns N parallel backend instances (up to
concurrencylimit) - Each worker gets: focused prompt, per-worker events file, wave env vars
- Results merged back to main events file
- Aggregator hat picks up results on next iteration
Key Code Locations
- Wave CLI:
crates/ralph-cli/src/wave.rs - Wave detection:
crates/ralph-core/src/wave_detection.rs - Worker prompt:
crates/ralph-core/src/wave_prompt.rs - Wave tracker:
crates/ralph-core/src/wave_tracker.rs - Loop integration:
crates/ralph-cli/src/loop_runner.rs(execute_wave)
Presets
presets/wave-review.yml— Scatter-gather code review
Smoke Tests (Replay-Based)
Smoke tests use recorded JSONL fixtures instead of live API calls:
cargo test -p ralph-core smoke_runner # All smoke tests
cargo test -p ralph-core kiro # Kiro-specificFixtures location: crates/ralph-core/tests/fixtures/
Recording New Fixtures
cargo run --bin ralph -- run -c ralph.claude.yml --record-session session.jsonl -p "your prompt"E2E Testing
cargo run -p ralph-e2e -- claude # Live API tests
cargo run -p ralph-e2e -- --mock # CI-safe mock mode
cargo run -p ralph-e2e -- --mock --filter connect # Filter scenarios
cargo run -p ralph-e2e -- --list # List scenariosReports generated in .e2e-tests/.
RObot (Human-in-the-Loop)
Ralph supports human interaction during orchestration via Telegram. Agents can ask questions and humans can send proactive guidance.
Configuration
# ralph.yml
RObot:
enabled: true
timeout_seconds: 300 # How long to block waiting for a response
telegram:
bot_token: "your-token" # Or set RALPH_TELEGRAM_BOT_TOKEN env varEvent Types
| Event / Command | Direction | Purpose |
human.interact | Agent to Human | Agent asks a question; loop blocks until response or timeout |
human.response | Human to Agent | Reply to a human.interact question |
human.guidance | Human to Agent | Proactive guidance injected as ## ROBOT GUIDANCE in prompt |
ralph tools interact progress | Agent to Human | Non-blocking progress notification via Telegram (no event, direct send) |
How It Works
- The Telegram bot starts only on the primary loop (the one holding
.ralph/loop.lock) - When an agent emits
human.interact, the event loop sends the question via Telegram and blocks - Responses are published as
human.responseevents on the bus - Proactive messages become
human.guidanceevents, squashed into a numbered list in the prompt - Send failures retry with exponential backoff (3 attempts); if all fail, treated as timeout
- Parallel loops route messages via reply-to,
@loop-idprefix, or default to primary
See crates/ralph-telegram/README.md for setup instructions.
Diagnostics
TUI mode always logs to .ralph/diagnostics/logs/ralph-{timestamp}.log (last 5 kept automatically).
RALPH_DIAGNOSTICS=1 ralph run -p "your prompt"Output in .ralph/diagnostics/<timestamp>/:
agent-output.jsonl— Agent text, tool calls, resultsorchestration.jsonl— Hat selection, events, backpressureerrors.jsonl— Parse errors, validation failures
jq 'select(.type == "tool_call")' .ralph/diagnostics/*/agent-output.jsonl
ralph clean --diagnosticsIMPORTANT
- Run
cargo testbefore declaring any task done - Backwards compatibility doesn't matter — it adds clutter for no reason
- Prefer replay-based smoke tests over live API calls for CI
- BDD/Cucumber tests MUST exercise real runtime code paths via integration tests (not placeholder/source-only assertions)
- Run python tests using a .venv
- You MUST not commit ephemeral files
- When I ask you to view something that means to use playwright/chrome tools to go view it.
- When adding or changing
ralph toolssubcommands, update the appropriate file incrates/ralph-core/data/:ralph-tools.md(shared commands),ralph-tools-tasks.md(task commands), orralph-tools-memories.md(memory commands)..claude/skills/ralph-tools/SKILL.mdis a symlink to the baseralph-tools.md - Design docs and specs go in
.ralph/specsand one-off code tasks and bug fixes go in.ralph/tasks
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

