Plan

From Yeachan-Heo/oh-my-claudecode · View interactive version

Plan is an AI agent skill from the GitHub repository Yeachan-Heo/oh-my-claudecode. Strategic planning with optional interview workflow

How to use this skill

Skill file

<Purpose>

Plan creates comprehensive, actionable work plans through intelligent interaction. It auto-detects whether to interview the user (broad requests) or plan directly (detailed requests), and supports consensus mode (iterative Planner/Architect/Critic loop with RALPLAN-DR structured deliberation) and review mode (Critic evaluation of existing plans).

</Purpose>

<Use_When>

</Use_When>

<Do_Not_Use_When>

</Do_Not_Use_When>

<Why_This_Exists>

Jumping into code without understanding requirements leads to rework, scope creep, and missed edge cases. Plan provides structured requirements gathering, expert analysis, and quality-gated plans so that execution starts from a solid foundation. The consensus mode adds multi-perspective validation for high-stakes projects.

</Why_This_Exists>

<Execution_Policy>

</Execution_Policy>

<Steps>

Mode Selection

| Mode | Trigger | Behavior |

| --------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

| Interview | Default for broad requests | Interactive requirements gathering |

| Direct | --direct, or detailed request | Skip interview, generate plan directly |

| Consensus | --consensus, "ralplan" | Planner -> Architect -> Critic loop until agreement with RALPLAN-DR structured deliberation (short by default, --deliberate for high-risk); add --interactive for user prompts at draft and approval steps |

| Review | --review, "review this plan" | Critic evaluation of existing plan |

Interview Mode (broad/vague requests)

  1. Classify the request: Broad (vague verbs, no specific files, touches 3+ areas) triggers interview mode
  2. Ask one focused question using AskUserQuestion for preferences, scope, and constraints
  3. Gather codebase facts first: Before asking "what patterns does your code use?", spawn an explore agent to find out, then ask informed follow-up questions
  4. Build on answers: Each question builds on the previous answer
  5. Consult Analyst (Opus) for hidden requirements, edge cases, and risks
  6. Create plan when the user signals readiness: "create the plan", "I'm ready", "make it a work plan"

Direct Mode (detailed requests)

  1. Quick Analysis: Optional brief Analyst consultation
  2. Create plan: Generate comprehensive work plan immediately
  3. Review (optional): Critic review if requested

Consensus Mode (`--consensus` / "ralplan")

RALPLAN-DR modes: Short (default, bounded structure) and Deliberate (for --deliberate or explicit high-risk requests). Both modes keep the same Planner -> Architect -> Critic sequence and the same AskUserQuestion gates.

Provider overrides (supported when the provider CLI is installed):

State lifecycle: The persistent-mode stop hook uses ralplan-state.json to enforce continuation during the consensus loop. The skill MUST manage this state:

Without cleanup, the stop hook blocks all subsequent stops with [RALPLAN - CONSENSUS PLANNING] reinforcement messages even after the consensus workflow has finished. Always pass session_id to avoid clearing other concurrent sessions' state.

  1. Planner creates initial plan and a compact RALPLAN-DR summary before any Architect review. The summary MUST include:
  1. User feedback _(--interactive only)_: If running with --interactive, MUST use AskUserQuestion to present the draft plan plus the RALPLAN-DR Principles / Decision Drivers / Options summary for early direction alignment with these options:

If NOT running with --interactive, automatically proceed to review (step 3).

  1. Architect reviews for architectural soundness using Task(subagent_type="oh-my-claudecode:architect", ...). Architect review MUST include: strongest steelman counterargument (antithesis) against the favored option, at least one meaningful tradeoff tension, and (when possible) a synthesis path. In deliberate mode, Architect should explicitly flag principle violations. Architect MUST evaluate the same fixed plan snapshot produced by Planner in step 1 without mutating it; Architect output MUST NOT be passed to Critic.
  2. Critic evaluates against quality criteria using Task(subagent_type="oh-my-claudecode:critic", ...). Critic MUST verify principle-option consistency, fair alternative exploration, risk mitigation clarity, testable acceptance criteria, and concrete verification steps. Critic MUST explicitly reject shallow alternatives, driver contradictions, vague risks, or weak verification. In deliberate mode, Critic MUST reject missing/weak pre-mortem or missing/weak expanded test plan. Critic MUST evaluate the same fixed plan snapshot independently, as a separate, individually awaited Task call; Critic MUST NOT consume or receive the Architect review.

> Independent parallel-or-sequential reviews of one fixed plan snapshot (context-dependent). Architect and Critic each review the same fixed plan snapshot produced by Planner in step 1, and neither review mutates it. Architect output MUST NOT be passed to Critic. When both Architect and Critic use Claude agents (default), they MAY run in parallel as background subagents. When either Architect or Critic uses an external provider (e.g., --architect codex, --critic codex), they MUST run sequentially as separate, individually awaited Task calls — never in parallel — to prevent sibling cascade failures from rate-limit errors. Critic MUST NOT consume or receive the Architect review. Architect and Critic results MUST be combined only by Planner during revision or improvement synthesis, and only after both reviews have completed.

  1. Re-review loop (max 5 iterations): If Critic rejects, execute this closed loop:

a. Collect all rejection feedback from Architect + Critic (Planner-only synthesis: Architect and Critic results MUST be combined only by Planner, and only after both reviews have completed).

b. Pass feedback to Planner to produce a revised plan

c. Return to Step 3 — Architect reviews the revised plan

d. Return to Step 4 — Critic evaluates the revised plan

e. Repeat until Critic approves OR max 5 iterations reached

f. If max iterations reached without approval, present the best version to user via AskUserQuestion with note that expert consensus was not reached

  1. Apply improvements: When reviewers approve with improvement suggestions, merge all accepted improvements into the plan file before proceeding. Final consensus output MUST include an ADR section with: Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups. Specifically:

a. Collect all improvement suggestions from Architect and Critic responses

b. Deduplicate and categorize the suggestions

c. Update the plan file in .omc/plans/ with the accepted improvements (add missing details, refine steps, strengthen acceptance criteria, ADR updates, etc.)

d. Note which improvements were applied in a brief changelog section at the end of the plan

  1. On Critic approval (with improvements applied): mark the plan status as pending approval unless explicit execution approval has already been captured. _(--interactive only)_ If running with --interactive, use AskUserQuestion to present the plan with these options:

If NOT running with --interactive, output the final plan marked pending approval, call state_clear(mode="ralplan", session_id=<current_session_id>), and stop. Do NOT auto-execute.

  1. _(--interactive only)_ User chooses via the structured AskUserQuestion UI (never ask for approval in plain text). If user selects Reject, call state_clear(mode="ralplan", session_id=<current_session_id>) and stop.
  2. On user approval (--interactive only): Call state_write(mode="ralplan", active=false, session_id=<current_session_id>) before invoking the execution skill (ralph/team), so the stop hook does not interfere with the execution mode's own enforcement. Do NOT use state_clear here — it writes a cancel signal that disables enforcement for the newly launched mode.

Review Mode (`--review`)

  1. Read plan file from .omc/plans/
  2. Evaluate via Critic using Task(subagent_type="oh-my-claudecode:critic", ...)
  3. Return verdict: APPROVED, REVISE (with specific feedback), or REJECT (replanning required)

Plan Output Format

Every plan includes:

Plans are saved to .omc/plans/. Drafts go to .omc/drafts/.

</Steps>

<Tool_Usage>

</Tool_Usage>

<Examples>

<Good>

Adaptive interview (gathering facts before asking):

Planner: [spawns explore agent: "find authentication implementation"]
Planner: [receives: "Auth is in src/auth/ using JWT with passport.js"]
Planner: "I see you're using JWT authentication with passport.js in src/auth/.
         For this new feature, should we extend the existing auth or add a separate auth flow?"

Why good: Answers its own codebase question first, then asks an informed preference question.

</Good>

<Good>

Single question at a time:

Q1: "What's the main goal?"
A1: "Improve performance"
Q2: "For performance, what matters more -- latency or throughput?"
A2: "Latency"
Q3: "For latency, are we optimizing for p50 or p99?"

Why good: Each question builds on the previous answer. Focused and progressive.

</Good>

<Bad>

Asking about things you could look up:

Planner: "Where is authentication implemented in your codebase?"
User: "Uh, somewhere in src/auth I think?"

Why bad: The planner should spawn an explore agent to find this, not ask the user.

</Bad>

<Bad>

Batching multiple questions:

"What's the scope? And the timeline? And who's the audience?"

Why bad: Three questions at once causes shallow answers. Ask one at a time.

</Bad>

<Bad>

Presenting all design options at once:

"Here are 4 approaches: Option A... Option B... Option C... Option D... Which do you prefer?"

Why bad: Decision fatigue. Present one option with trade-offs, get reaction, then present the next.

</Bad>

</Examples>

<Escalation_And_Stop_Conditions>

</Escalation_And_Stop_Conditions>

<Final_Checklist>

</Final_Checklist>

<Advanced>

Design Option Presentation

When presenting design choices during interviews, chunk them:

  1. Overview (2-3 sentences)
  2. Option A with trade-offs
  3. [Wait for user reaction]
  4. Option B with trade-offs
  5. [Wait for user reaction]
  6. Recommendation (only after options discussed)

Format for each option:

### Option A: [Name]
**Approach:** [1 sentence]
**Pros:** [bullets]
**Cons:** [bullets]

What's your reaction to this approach?

Question Classification

Before asking any interview question, classify it:

| Type | Examples | Action |

| --------------- | ------------------------------------- | ------------------------------ |

| Codebase Fact | "What patterns exist?", "Where is X?" | Explore first, do not ask user |

| User Preference | "Priority?", "Timeline?" | Ask user via AskUserQuestion |

| Scope Decision | "Include feature Y?" | Ask user |

| Requirement | "Performance constraints?" | Ask user |

Review Quality Criteria

| Criterion | Standard |

| ------------ | -------------------------- |

| Clarity | 80%+ claims cite file/line |

| Testability | 90%+ criteria are concrete |

| Verification | All file refs exist |

| Specificity | No vague terms |

Deprecation Notice

The separate /planner, /ralplan, and /review skills have been merged into /plan. All workflows (interview, direct, consensus, review) are available through /plan.

</Advanced>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.