Oh My Claude - Ralplan Deep Dive

8 min read
TL;DR
  • Ralplan is a planning system where four agents (Planner, Architect, Critic, Analyst) collaborate
  • Up to 5 iteration loops are used to improve plan quality
  • Each agent focuses only on their specific role with clear separation of concerns
  • The Critic's evaluation provides objective quality validation
Cover

Introduction

There's one feature in Oh My Claude that I find most useful. It's called Ralplan. This feature applies the concept of Ralph Loop's iterative execution to planning. Instead of simply saying "make a plan," three agents—Planner, Architect, and Critic—loop up to 5 times to refine the plan. With Analyst added, a total of four agents collaborate.

Ralplan 4-Agent Loop

What is Ralplan

Core Concept

Planner, Architect, and Critic agents collaborate to complete work plans.

AgentRoleCodename
PlannerPlan creationPrometheus
ArchitectArchitecture consultingOracle
CriticRuthless review-
AnalystRequirement gap analysisMetis

What's interesting are the codenames assigned to the agents. Prometheus, the Titan who brought fire to humanity; Oracle, the prophecy institution of the Delphi temple; and Metis, the Titan goddess who was wiser than Zeus. You can see the naming sense.

Workflow

Planner (plan creation)
├── Analyst(Metis) mandatory consultation

Questions? → Architect (consultation)

Critic (review)

REJECT → Feedback to Planner (repeat)
OKAY → Plan complete

The Planner must consult with Analyst(Metis) when creating plans—getting gap analysis first. It loops up to 5 times, but exits immediately if the Critic gives an OKAY mid-way.

Agent Role Analysis

Planner (Prometheus) - The Strategist Who Only Plans

The Planner's identity is clear:

YOU ARE A PLANNER. YOU ARE NOT AN IMPLEMENTER. YOU DO NOT WRITE CODE.

When a user says "fix the login bug," it doesn't fix the code—it creates "a plan to fix the login bug." Code writing and file modification are prohibited actions.

Core Functions

PhaseDescription
Phase 1: InterviewInterviews to understand requirements
Phase 2: Plan GenerationCreates plan documents
Phase 3: ConfirmationHands off to Critic after user confirmation

Good to Know

There's a question classification system. Questions are categorized before being asked.

TypeExampleAction
Codebase Fact"What patterns are you using?"Explore codebase directly
User Preference"Priority?", "Timeline?"Ask user
Scope Decision"Should we include feature Y?"Ask user

Things that can be learned from the codebase aren't asked—they're found directly. And there's a rule to ask only one question at a time.

The plan document structure is also fixed: Context → Work Objectives → Guardrails (Must Have / Must NOT Have) → Tasks → Risks → Verification

Planner - Plan Creation


Architect (Oracle) - The Read-Only Consultant

The Architect also doesn't modify code.

IDENTITY: Consulting architect. You analyze, advise, recommend. You do NOT implement.

Core Functions

PhaseDescription
Phase 1: Context GatheringIdentifies relevant files, dependencies, test coverage
Phase 2: Deep AnalysisAnalyzes architecture, debugging, performance, security
Phase 3: RecommendationSummary → Diagnosis → Root cause → Recommendations → Trade-offs → References

Good to Know

The debugging protocol is systematic. First, Quick Assessment checks for obvious bugs (typos, missing imports), then enters Full Protocol if not.

The 3-Failure Circuit Breaker rule is interesting. If the same fix is attempted 3 times without success:

STOP recommending fixes → Question the architecture → "Is the approach fundamentally wrong?"

This rule prevents the trap of only treating symptoms while missing the essence.

SymptomWrong FixQuestion to Ask
TypeError: undefinedAdd null checkWhy is it undefined?
Flaky testsRerunWhat state is being shared?
Works locally only"It's a CI problem"What's the environment difference?

The output format is also fixed: Summary → Analysis → Root Cause → Recommendations (priority/effort/impact) → Trade-offs → References (file:line)

Architect - Architecture Consulting


Critic - The Reviewer Who Rejects 7 Times on Average

The Critic rule contains this sentence:

Historical Data: Plans from authors average 7 rejections before receiving OKAY.

The statistic that plans are rejected an average of 7 times is actually written there. The phrase "ruthless critic" isn't there for nothing.

Core Functions: 4 Evaluation Criteria

CriterionWhat It Checks
ClarityCan each task be executed without guessing?
VerificationDoes every task have objective success criteria?
Context CompletenessCan you be 90%+ confident in what needs to be done?
Big PictureDo why, what, and how connect and make sense?

Good to Know

The review process has 5 stages:

  1. Read: Parse plan, extract file references
  2. Deep Verification: Verify all file references are actually valid
  3. Apply Criteria: Check 4 criteria
  4. Implementation Simulation: Mentally execute 2-3 tasks
  5. Write Report: Write evaluation report

Stage 4 is key. It simulates where you'd get stuck if you actually worked according to this plan.

Auto-REJECT Conditions (automatically rejected if any apply):

  • Vague expressions without measurement criteria ("performance improvement")
  • Code changes without file references
  • Tasks without acceptance criteria
  • Circular dependencies between tasks
  • No error handling consideration
  • No verification step

Critic - Ruthless Review


Analyst (Metis) - Pre-Planning Gap Analysis

The Analyst is a pre-consultant deployed before plan creation. It finds "questions that should have been asked but weren't" and catches scope expansion risks.

Core Functions: 6 Analysis Areas

AreaWhat It Finds
Missing QuestionsQuestions that should have been asked but weren't
Undefined GuardrailsParts needing explicit boundaries
Scope RisksPoints of scope expansion risk
Unvalidated AssumptionsThings assumed without validation
Missing Acceptance CriteriaMissing success criteria
Edge CasesExceptional situations not handled

Good to Know

Question categories are divided into three:

  • Functional: If X happens, what exactly should happen?
  • Technical: What patterns should be followed? What's the error handling strategy?
  • Scope: What's NOT included in this work? What's the minimum version?

Position in Workflow:

User Request

Analyst (Metis) ← "What's the missing requirement?"

Planner (Prometheus) ← "Plan creation"

Critic ← "Is this plan complete?"

After Analyst analysis, it hands off to @planner.

Analyst - Gap Analysis

Why This Approach Works

The Power of Role Separation

Each agent only performs their role.

AgentCan DoCannot Do
PlannerAsk questions, write plansWrite code
ArchitectRead files, analyze, recommendModify files
CriticReview plans, reject/approveWrite plans

With this separation, each stage focuses only on its own work. If the Planner tries to touch code too, the plan quality drops.

The Value of Iteration

Being able to iterate up to 5 times isn't just "try again." It's a structure where the Planner incorporates specific feedback from the Critic, and refines plans with Architect consultation when needed.

If you used to run a plan once and think "is this good enough?" before moving on, Ralplan automatically refines until the Critic gives an OKAY.

State Management

Progress is saved in .omc/ralplan-state.json. Even if the session disconnects, you know how far you've progressed.

{
  "iteration": 1,
  "max_iterations": 5,
  "current_phase": "critic_review"
}

Actual Usage Experience

Plans created with Ralplan are much more concise than traditional methods. And because they include "why this approach was chosen," they're good for review.

Previously, after receiving a plan, I'd spend considerable time worrying "is this right?", "is anything missing?"—but with Ralplan, the Critic has already done that worrying for you. Users only need to spend time on final review.

I'm so satisfied that I've extracted these commands and rules to use in Cursor as well.

Conclusion

Until recently, LLM usage was about who could write better prompts, but now it seems equally important how well you've designed agents/rules/automation on top of that.

Patterns like Ralplan that separate roles and improve quality through iteration can be applied elsewhere too.

These days, new things keep coming out, and it's fun to feel like I'm gaining new knowledge as I try them.


Refs

  • Oh My Claude GitHub Repository
  • Ralplan Skill Definition (ralplan.md)
  • Agent Rules: planner.mdc, architect.mdc, critic.mdc, analyst.mdc