GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - beauwilliams/ralph-code: Ralph multiplatorm ochestrator, bring your own agent!

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.cursor/plans
.cursor/plans
 
 
cli
cli
 
 
core
core
 
 
temp-repos
temp-repos
 
 
HOW_TO_RALPH.md
HOW_TO_RALPH.md
 
 
README.md
README.md
 
 
install.sh
install.sh
 
 
video.md
video.md
 
 

Repository files navigation

Ralph - Unified Setup Framework for Coding Agents

A unified Ralph setup framework with a three-layer architecture that abstracts orchestration patterns across coding agent platforms (Cursor, Claude Code, Amp, Codex) while respecting platform-specific capabilities and model-specific behaviors.

Quick Start

Get started with Ralph in three steps:

  1. Install and initialize:

    ./install.sh
    ralph init cursor claude-opus-4.5
  2. Create specifications:

    mkdir specs
    # Write your requirements in specs/*.md files
  3. Run Ralph:

    ralph run  # Auto-detects: plan if no plan exists, build if plan exists

Or use explicit modes:

  • ralph plan - Generate or update implementation plan
  • ralph build - Implement from existing plan
  • ralph orchestrate - Execute hierarchical plans (plan of plans)

Monitor progress:

  • ralph status - Show current task status and context usage
  • ralph monitor - Real-time monitoring dashboard

Architecture

The framework uses a three-layer architecture:

┌─────────────────────────────────────────────────────────┐
│              ORCHESTRATOR LAYER                         │
│  (Task Management, Loop Control, Completion Detection)  │
└─────────────────────────────────────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────────────┐
│              PLATFORM ADAPTER LAYER                     │
│  (Coding Agent Interface - Cursor, Claude Code, etc.)  │
└─────────────────────────────────────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────────────┐
│              MODEL PROFILE LAYER                        │
│  (LLM Characteristics - Opus, GPT-4, Gemini, etc.)      │
└─────────────────────────────────────────────────────────┘

Layer Responsibilities

Orchestrator Layer:

  • Platform-agnostic task management and loop control
  • Uses Model Profiles to make decisions about task sizing, context allocation, prompt optimization
  • Coordinates multi-loop patterns (supervisor, classifier loops)
  • Handles completion detection based on model behaviors
  • Context optimization and eventual consistency

Platform Adapter Layer:

  • Platform-specific implementations (Cursor, Claude Code, Amp, Codex)
  • Handles platform differences (rules system, skills system, MCP integration)
  • Maps platform model identifiers to Model Profile IDs
  • Exposes platform capabilities to orchestrator

Model Profile Layer:

  • Describes underlying LLM characteristics (independent of platform)
  • Context window specifications (advertised, usable, overhead)
  • Behavioral patterns (forgetful areas, prompt preferences, response styles)
  • Token efficiency preferences
  • Smart zone thresholds and task sizing recommendations

Core Principles

Following Geoffrey Huntley's principles from HOW_TO_RALPH.md:

  • Context is an array - allocate deliberately
  • One goal per context window
  • Fresh context each iteration (zero auto-compaction)
  • Deterministic allocation (first 5K tokens for specs)
  • Human on the loop, not in the loop
  • Eventual consistency - Ralph will get there eventually
  • Minimal context usage - optimize everything for token efficiency
  • Strong linkage - Structured markdown format (checkboxes + hierarchy) makes plans machine-parseable
  • Specifications are critical - Good specs = good output

Features

  1. Three-Layer Architecture: Clean separation of orchestration, platform adaptation, and model characteristics
  2. Model Profile System: Centralized knowledge of LLM characteristics that inform decisions
  3. Platform Abstraction: Unified orchestrator interface with platform-specific adapters
  4. Unified Interface: Same workflow across all platforms
  5. Model-Aware Decisions: Orchestrator uses model profiles for task sizing, context allocation, prompt optimization
  6. Context Optimization: Built-in token counting, usage warnings, optimization recommendations
  7. Eventual Consistency: Retry logic, backpressure handling, failure recovery patterns
  8. Guardrails System: Config validation, task validation, safety checks
  9. Tool Integrations: Tmux, Headless Chrome, MCP-CLI, git work trees
  10. Extensibility: Skills/extensions system for custom capabilities

Installation

# Clone the repository
git clone https://github.com/your-org/ralph-framework.git
cd ralph-framework

# Run installer
./install.sh

# Initialize in your project
cd /path/to/your/project
ralph init cursor claude-opus-4.5

Usage

Initialize a Project

ralph init [platform] [model]

Example:

ralph init cursor claude-opus-4.5

Planning Mode

Generate or update an implementation plan:

ralph plan

This will:

  • Analyze specs/ directory
  • Study existing code
  • Generate/update IMPLEMENTATION_PLAN.md with prioritized tasks

Building Mode

Implement from existing plan:

ralph build

This will:

  • Read IMPLEMENTATION_PLAN.md
  • Implement unchecked tasks [ ]
  • Update checkboxes [x] as tasks complete

Auto-Detect Mode

ralph run

Automatically detects:

  • No plan → runs planning mode
  • Plan exists → runs building mode

Monitor Progress

ralph status    # Show current status
ralph monitor   # Real-time dashboard

Directory Structure

your-project/
├── .ralph/              # Ralph state directory
│   ├── config.json      # Configuration
│   ├── activity.log     # Activity tracking
│   ├── errors.log       # Error logging
│   └── token.log        # Token usage tracking
├── specs/               # Specifications (first 5K tokens)
│   └── *.md
├── PROMPT_plan.md      # Planning mode prompt
├── PROMPT_build.md      # Building mode prompt
└── IMPLEMENTATION_PLAN.md  # Task plan with checkboxes

Model Profiles

Model profiles describe LLM characteristics that inform orchestrator decisions:

  • Context window: Advertised, usable, overhead
  • Smart zone: Thresholds for optimal performance
  • Behaviors: Forgetful areas, prompt preferences, completion reliability
  • Token efficiency: Preferred formats, compact mode
  • Task sizing: Recommended max tokens per task

Example profiles included:

  • claude-opus-4.5.json
  • gpt-4-turbo.json
  • gemini-pro-1.5.json

Platform Adapters

Cursor (Priority 1)

  • Rules system integration
  • MCP (Model Context Protocol) integration
  • Token tracking and rotation
  • Session resume capability

Claude Code (Priority 2)

  • Simple loop implementation
  • Minimal setup
  • Maximum determinism

Amp (Priority 3)

  • Skills system integration
  • Markdown task format
  • Model-specific harness

Codex (Priority 4)

  • OpenAI Codex CLI integration
  • Image input support
  • Web search integration

Configuration

Configuration is stored in .ralph/config.json:

{
  "platform": "cursor",
  "model": "claude-opus-4.5",
  "orchestrator": {
    "max_iterations": 20,
    "task_format": "markdown",
    "completion_detection": "agent_signal"
  },
  "adapter_config": {
    "cursor": {
      "token_tracking": true,
      "rotation_threshold": 80000,
      "output_format": "stream-json"
    }
  }
}

Documentation

  • Architecture Documentation
  • Model Profiles
  • Context Optimization
  • Eventual Consistency
  • Tool Integrations
  • Planning vs Building Modes
  • Hierarchical Orchestration

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE file.

References

  • HOW_TO_RALPH.md - Geoffrey Huntley's core principles
  • Based on implementations from:
    • snarktank/ralph
    • ralph-wiggum-cursor
    • how-to-ralph-wiggum

About

Ralph multiplatorm ochestrator, bring your own agent!

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.