From oh-my-claudecode
Orchestrates Planner, Architect, and Critic agents in iterative loop to refine work plans until consensus. Ideal before executing complex tasks.
npx claudepluginhub mazenyassergithub/oh-my-claudecode --plugin oh-my-claudecodeThis skill uses the workspace's default tool permissions.
Ralplan orchestrates three specialized agents—Planner, Architect, and Critic—in an iterative loop until consensus is reached on a comprehensive work plan. This skill ensures plans are strategically sound, architecturally valid, and thoroughly reviewed before execution.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Ralplan orchestrates three specialized agents—Planner, Architect, and Critic—in an iterative loop until consensus is reached on a comprehensive work plan. This skill ensures plans are strategically sound, architecturally valid, and thoroughly reviewed before execution.
Three agents collaborate in structured phases to validate and refine work plans:
| Agent | Role | Output |
|---|---|---|
| Planner | Strategic Planner | Creates/refines the work plan |
| Architect | Strategic Advisor | Answers questions, validates architecture |
| Critic | Ruthless Reviewer | Critiques and identifies gaps |
┌─────────────────────────────────────────────────────────────────┐
│ RALPLAN LOOP │
│ │
│ ┌──────────────┐ │
│ │ PLANNER │◄────────────────────────────────┐ │
│ │ (Plans) │ │ │
│ └──────┬───────┘ │ │
│ │ │ │
│ ▼ │ │
│ ┌──────────────┐ Questions? ┌───────────┐ │ │
│ │ Has open │─────────────────► │ ARCHITECT │ │ │
│ │ questions? │ │ (Advises) │ │ │
│ └──────┬───────┘ └─────┬─────┘ │ │
│ │ │ │ │
│ │ No questions │ │ │
│ ▼ ▼ │ │
│ ┌──────────────┐ ┌──────────┐ │ │
│ │ CRITIC │◄─────────────────│ Answers │ │ │
│ │ (Reviews) │ └──────────┘ │ │
│ └──────┬───────┘ │ │
│ │ │ │
│ ▼ │ │
│ ┌──────────────┐ REJECT ┌──────────────┐│ │
│ │ Verdict? │─────────────────►│ Feedback ││ │
│ └──────┬───────┘ │ to Planner │┘ │
│ │ └─────────────┘ │
│ │ OKAY │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ PLAN APPROVED │ │
│ │ Ready for /ralph execution │ │
│ └──────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
Ralplan maintains persistent state in .omc/ralplan-state.json to track progress and enable recovery across interruptions:
{
"active": true,
"mode": "ralplan",
"iteration": 1,
"max_iterations": 5,
"plan_path": ".omc/plans/[feature].md",
"current_phase": "planner_planning",
"started_at": "ISO-timestamp",
"task_description": "[original task]"
}
Phases: planner_planning → architect_consultation → critic_review → handling_verdict → complete
The skill begins by establishing the planning environment:
.omc/plans/ directory if it doesn't existralplan-state.json with initial values:
active: trueiteration: 0max_iterations: 5current_phase: "planner_planning"started_at: Current ISO timestamptask_description: User's task descriptionThe Planner creates an initial plan based on task context:
.omc/plans/[feature-name].mdPLAN_READY: .omc/plans/[filename].mdThe Architect provides strategic guidance in two scenarios:
When invoked, the Architect receives file paths to read for analysis, not summaries. This enables thorough examination of the existing codebase context before providing recommendations.
The Critic examines the plan against quality standards:
OKAY (approval) or REJECT with specific issuesBased on Critic's verdict, the skill either approves the plan or continues iteration:
If verdict is OKAY:
/ralph or manual orchestrationactive: false, current_phase: "complete"If verdict is REJECT:
iteration >= max_iterations (5):
| Rule | Description |
|---|---|
| Max 5 iterations | Safety limit prevents infinite loops |
| Planner owns plan | Only Planner writes to plan file |
| Architect provides wisdom | Architect reads and advises, never modifies |
| Critic has final say | Plan approved only when Critic signals OKAY |
| Feedback is specific | Each rejection includes actionable improvements |
| State persists | Progress survives session interruptions |
The orchestrator must verify these gates before invoking Critic for each review:
If any gate fails, return to Planner with specific failure feedback for remediation.
ARCHITECT_QUESTION:
- Topic: [Architecture/Performance/Security/Pattern]
- Context: [What we're planning]
- Files to examine: [specific paths]
- Specific Question: [What we need answered]
ARCHITECT_ANSWER:
- Topic: [Matching topic]
- Analysis: [What Architect found after reading files]
- Recommendation: [Specific guidance]
- Trade-offs: [What to consider]
- References: [file:line citations from codebase]
CRITIC_FEEDBACK:
- Verdict: REJECT
- Critical Issues:
1. [Issue with specific fix required]
2. [Issue with specific fix required]
- Minor Issues:
1. [Nice to fix]
- Questions for Architect (if any):
1. [Architectural question needing expert input]
To stop an active ralplan session:
/cancel-ralph (automatically detects ralplan via state file).omc/ralplan-state.json[RALPLAN Iteration 0/5] Initializing...The iterative loop refines the plan until it meets the rigorous standards of all three agents, ensuring comprehensive, architecturally sound work plans ready for execution.