Iterative planning with Planner, Architect, and Critic until consensus
Orchestrates Planner, Architect, and Critic agents in an iterative loop to refine work plans until consensus.
npx claudepluginhub mazenyassergithub/oh-my-claudecodeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
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.
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.