[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XDVHVY7MCGH6WR9FX36FXD":3,"skill-same:01M6XDVHVY7MCGH6WR9FX36FXD":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":25,"linkOnly":26,"markdownContent":27,"markdownBody":28,"frontMatter":29,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M6XDVHVY7MCGH6WR9FX36FXD","plan",null,"Strategic planning with optional interview workflow","sapsapshen\u002Fai-memory-router","sapsapshen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20347959?v=4","01M6XDQEF1DP50DKF37H81J3J5","shenmian","01M6XDQEJPE41Y3DT2763X8ZJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcodex\u002Fplan\u002FSKILL.md",[],[5,19,20,21,22,23,24],"workflow","planning","interview","strategic planning","strategic","with","2026-11-10 10:12:30",false,"---\nname: plan\ndescription: Strategic planning with optional interview workflow\n---\n\n\u003CPurpose>\nPlan 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\u002FArchitect\u002FCritic loop with RALPLAN-DR structured deliberation) and review mode (Critic evaluation of existing plans).\n\u003C\u002FPurpose>\n\n\u003CUse_When>\n- User wants to plan before implementing -- \"plan this\", \"plan the\", \"let's plan\"\n- User wants structured requirements gathering for a vague idea\n- User wants an existing plan reviewed -- \"review this plan\", `--review`\n- User wants multi-perspective consensus on a plan -- `--consensus`, \"ralplan\"\n- Task is broad or vague and needs scoping before any code is written\n\u003C\u002FUse_When>\n\n\u003CDo_Not_Use_When>\n- User wants autonomous end-to-end execution -- use `autopilot` instead\n- User wants to start coding immediately with a clear task -- use `ralph` or delegate to executor\n- User asks a simple question that can be answered directly -- just answer it\n- Task is a single focused fix with obvious scope -- skip planning, just do it\n\u003C\u002FDo_Not_Use_When>\n\n\u003CWhy_This_Exists>\nJumping 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.\n\u003C\u002FWhy_This_Exists>\n\n\u003CExecution_Policy>\n- Auto-detect interview vs direct mode based on request specificity\n- Ask one question at a time during interviews -- never batch multiple questions\n- Gather codebase facts via `explore` agent before asking the user about them\n- When session guidance enables `USE_OMX_EXPLORE_CMD`, prefer `omx explore` for simple read-only repository lookups during planning; keep prompts narrow and concrete, and keep prompt-heavy or ambiguous planning work on the richer normal path and fall back normally if `omx explore` is unavailable.\n- Plans must meet quality standards: 80%+ claims cite file\u002Fline, 90%+ criteria are testable\n- Implementation step count must be right-sized to task scope; avoid defaulting to exactly five steps when the work is clearly smaller or larger\n- Consensus mode outputs the final plan by default; add `--interactive` to enable execution handoff\n- Consensus mode uses RALPLAN-DR short mode by default; switch to deliberate mode with `--deliberate` or when the request explicitly signals high risk (auth\u002Fsecurity, data migration, destructive\u002Firreversible changes, production incident, compliance\u002FPII, public API breakage)\n- Default to concise, evidence-dense progress and completion reporting unless the user or risk level requires more detail\n- Treat newer user task updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints\n- If correctness depends on additional inspection, retrieval, execution, or verification, keep using the relevant tools until the plan is grounded\n- Continue through clear, low-risk, reversible next steps automatically; ask only when the next step is materially branching, destructive, or preference-dependent\n\u003C\u002FExecution_Policy>\n\n\u003CSteps>\n\n### Mode Selection\n\n| Mode | Trigger | Behavior |\n|------|---------|----------|\n| Interview | Default for broad requests | Interactive requirements gathering |\n| Direct | `--direct`, or detailed request | Skip interview, generate plan directly |\n| Consensus | `--consensus`, \"ralplan\" | Planner -> Architect -> Critic loop until agreement with RALPLAN-DR structured deliberation (short by default, `--deliberate` for high-risk); outputs plan by default |\n| Consensus Interactive | `--consensus --interactive` | Same as Consensus but pauses for user feedback at draft and approval steps, then hands off to execution |\n| Review | `--review`, \"review this plan\" | Critic evaluation of existing plan |\n\n### Interview Mode (broad\u002Fvague requests)\n\n1. **Classify the request**: Broad (vague verbs, no specific files, touches 3+ areas) triggers interview mode\n2. **Ask one focused question** using `AskUserQuestion` for preferences, scope, and constraints\n3. **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\n4. **Build on answers**: Each question builds on the previous answer\n5. **Consult Analyst** (THOROUGH tier) for hidden requirements, edge cases, and risks\n6. **Create plan** when the user signals readiness: \"create the plan\", \"I'm ready\", \"make it a work plan\"\n\n### Direct Mode (detailed requests)\n\n1. **Quick Analysis**: Optional brief Analyst consultation\n2. **Create plan**: Generate comprehensive work plan immediately\n3. **Review** (optional): Critic review if requested\n\n### Consensus Mode (`--consensus` \u002F \"ralplan\")\n\n**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. The workflow auto-proceeds through planning steps (Planner\u002FArchitect\u002FCritic) but outputs the final plan without executing.\n\n1. **Planner** creates initial plan and a compact **RALPLAN-DR summary** before any Architect review. The summary **MUST** include:\n   - **Principles** (3-5)\n   - **Decision Drivers** (top 3)\n   - **Viable Options** (>=2) with bounded pros\u002Fcons for each option\n   - If only one viable option remains, an explicit **invalidation rationale** for the alternatives that were rejected\n   - In **deliberate mode**: a **pre-mortem** (3 failure scenarios) and an **expanded test plan** covering **unit \u002F integration \u002F e2e \u002F observability**\n2. **User feedback** *(--interactive only)*: If running with `--interactive`, **MUST** use `AskUserQuestion` to present the draft plan **plus the RALPLAN-DR Principles \u002F Decision Drivers \u002F Options summary for early direction alignment** with these options:\n   - **Proceed to review** — send to Architect and Critic for evaluation\n   - **Request changes** — return to step 1 with user feedback incorporated\n   - **Skip review** — go directly to final approval (step 7)\n   If NOT running with `--interactive`, automatically proceed to review (step 3).\n3. **Architect** reviews for architectural soundness using `ask_codex` with `agent_role: \"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. **Wait for this step to complete before proceeding to step 4.** Do NOT run steps 3 and 4 in parallel.\n4. **Critic** evaluates against quality criteria using `ask_codex` with `agent_role: \"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\u002Fweak pre-mortem or missing\u002Fweak expanded test plan. Run only after step 3 is complete.\n5. **Re-review loop** (max 5 iterations): If Critic rejects or iterates, execute this closed loop:\n   a. Collect all feedback from Architect + Critic\n   b. Pass feedback to Planner to produce a revised plan\n   c. **Return to Step 3** — Architect reviews the revised plan\n   d. **Return to Step 4** — Critic evaluates the revised plan\n   e. Repeat until Critic approves OR max 5 iterations reached\n   f. If max iterations reached without approval, present the best version to user via `AskUserQuestion` with note that expert consensus was not reached\n6. **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:\n   a. Collect all improvement suggestions from Architect and Critic responses\n   b. Deduplicate and categorize the suggestions\n   c. Update the plan file in `.omx\u002Fplans\u002F` with the accepted improvements (add missing details, refine steps, strengthen acceptance criteria, ADR updates, etc.)\n   d. Note which improvements were applied in a brief changelog section at the end of the plan\n   e. Before any execution handoff, derive an explicit **available-agent-types roster** from the known prompt catalog and add concrete **follow-up staffing guidance** for both `$ralph` and `$team` (recommended roles, counts, suggested reasoning levels by lane, and why each lane exists)\n   f. For the `$team` path, add an explicit launch-hint block with concrete `omx team` \u002F `$team` commands and a **team verification path** (what team proves before shutdown, what Ralph verifies after handoff)\n7. On Critic approval (with improvements applied): *(--interactive only)* If running with `--interactive`, use `AskUserQuestion` to present the plan with these options:\n   - **Approve and execute** — proceed to implementation via ralph+ultrawork\n   - **Approve and implement via team** — proceed to implementation via coordinated parallel team agents\n   - **Request changes** — return to step 1 with user feedback\n   - **Reject** — discard the plan entirely\n   If NOT running with `--interactive`, output the final approved plan and stop. Do NOT auto-execute.\n8. *(--interactive only)* User chooses via the structured `AskUserQuestion` UI (never ask for approval in plain text)\n9. On user approval (--interactive only):\n   - **Approve and execute**: **MUST** invoke `$ralph` with the approved plan path from `.omx\u002Fplans\u002F` as context **plus the explicit available-agent-types roster, suggested reasoning levels, concrete role allocation guidance, and direct launch hints for Ralph follow-up work**. Do NOT implement directly. Do NOT edit source code files in the planning agent. The ralph skill handles execution via ultrawork parallel agents.\n   - **Approve and implement via team**: **MUST** invoke `$team` with the approved plan path from `.omx\u002Fplans\u002F` as context **plus the explicit available-agent-types roster, suggested reasoning levels, concrete staffing \u002F worker-role allocation guidance, explicit `omx team` \u002F `$team` launch hints, and the team verification path**. Do NOT implement directly. The team skill coordinates parallel agents across the staged pipeline for faster execution on large tasks.\n\n### Review Mode (`--review`)\n\n0. Treat review as a reviewer-only pass. The context that wrote the plan, cleanup proposal, or diff MUST NOT be the context that approves it.\n1. Read plan file from `.omx\u002Fplans\u002F`\n2. Evaluate via Critic using `ask_codex` with `agent_role: \"critic\"`\n3. For cleanup\u002Frefactor\u002Fanti-slop work, verify that the artifact includes a cleanup plan, regression tests or an explicit test gap, smell-by-smell passes, and quality gates.\n4. Return verdict: APPROVED, REVISE (with specific feedback), or REJECT (replanning required)\n5. If the current context authored the artifact, hand the review to `\u002Freview`, `critic`, `quality-reviewer`, `security-reviewer`, or `verifier` as appropriate.\n\n### Plan Output Format\n\nEvery plan includes:\n- Requirements Summary\n- Acceptance Criteria (testable)\n- Implementation Steps (with file references)\n- Adaptive step count sized to the actual scope (not a fixed five-step template)\n- Risks and Mitigations\n- Verification Steps\n- For consensus\u002Fralplan: **RALPLAN-DR summary** (Principles, Decision Drivers, Options)\n- For consensus\u002Fralplan final output: **ADR** (Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups)\n- For consensus\u002Fralplan execution handoff: **Available-Agent-Types Roster**, **Follow-up Staffing Guidance** (including suggested reasoning levels by lane), explicit `omx team` \u002F `$team` **Launch Hints**, and **Team Verification Path**\n- For deliberate consensus mode: **Pre-mortem (3 scenarios)** and **Expanded Test Plan** (unit\u002Fintegration\u002Fe2e\u002Fobservability)\n\nPlans are saved to `.omx\u002Fplans\u002F`. Drafts go to `.omx\u002Fdrafts\u002F`.\n\u003C\u002FSteps>\n\n\u003CTool_Usage>\n- Before first MCP tool use, call `ToolSearch(\"mcp\")` to discover deferred MCP tools\n- Use `AskUserQuestion` for preference questions (scope, priority, timeline, risk tolerance) -- provides clickable UI\n- Use plain text for questions needing specific values (port numbers, names, follow-up clarifications)\n- Use the `explore` agent (LOW tier, bounded quick pass) to gather codebase facts before asking the user\n- Use `ask_codex` with `agent_role: \"planner\"` for planning validation on large-scope plans\n- Use `ask_codex` with `agent_role: \"analyst\"` for requirements analysis\n- Use `ask_codex` with `agent_role: \"critic\"` for plan review in consensus and review modes\n- If ToolSearch finds no MCP tools or Codex is unavailable, fall back to equivalent OMX prompt agents -- never block on external tools\n- **CRITICAL — Consensus mode agent calls MUST be sequential, never parallel.** Always await the Architect result before issuing the Critic call.\n- In consensus mode, default to RALPLAN-DR short mode; enable deliberate mode on `--deliberate` or explicit high-risk signals (auth\u002Fsecurity, migrations, destructive changes, production incidents, compliance\u002FPII, public API breakage)\n- In consensus mode with `--interactive`: use `AskUserQuestion` for the user feedback step (step 2) and the final approval step (step 7) -- never ask for approval in plain text. Without `--interactive`, auto-proceed through planning steps without pausing. Output the final plan without execution.\n- In consensus mode with `--interactive`, on user approval **MUST** invoke `$ralph` for execution (step 9) -- never implement directly in the planning agent\n- In consensus mode, execution follow-up handoff **MUST** include an explicit available-agent-types roster plus concrete staffing \u002F role-allocation guidance grounded in that roster, suggested reasoning levels by lane, explicit `omx team` \u002F `$team` launch hints, and a team verification path\n\u003C\u002FTool_Usage>\n\n\n## Scenario Examples\n\n**Good:** The user says `continue` after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.\n\n**Good:** The user changes only the output shape or downstream delivery step (for example `make a PR`). Preserve earlier non-conflicting workflow constraints and apply the update locally.\n\n**Bad:** The user says `continue`, and the workflow restarts discovery or stops before the missing verification\u002Fevidence is gathered.\n\n\u003CExamples>\n\u003CGood>\nAdaptive interview (gathering facts before asking):\n```\nPlanner: [spawns explore agent: \"find authentication implementation\"]\nPlanner: [receives: \"Auth is in src\u002Fauth\u002F using JWT with passport.js\"]\nPlanner: \"I see you're using JWT authentication with passport.js in src\u002Fauth\u002F.\n         For this new feature, should we extend the existing auth or add a separate auth flow?\"\n```\nWhy good: Answers its own codebase question first, then asks an informed preference question.\n\u003C\u002FGood>\n\n\u003CGood>\nSingle question at a time:\n```\nQ1: \"What's the main goal?\"\nA1: \"Improve performance\"\nQ2: \"For performance, what matters more -- latency or throughput?\"\nA2: \"Latency\"\nQ3: \"For latency, are we optimizing for p50 or p99?\"\n```\nWhy good: Each question builds on the previous answer. Focused and progressive.\n\u003C\u002FGood>\n\n\u003CBad>\nAsking about things you could look up:\n```\nPlanner: \"Where is authentication implemented in your codebase?\"\nUser: \"Uh, somewhere in src\u002Fauth I think?\"\n```\nWhy bad: The planner should spawn an explore agent to find this, not ask the user.\n\u003C\u002FBad>\n\n\u003CBad>\nBatching multiple questions:\n```\n\"What's the scope? And the timeline? And who's the audience?\"\n```\nWhy bad: Three questions at once causes shallow answers. Ask one at a time.\n\u003C\u002FBad>\n\n\u003CBad>\nPresenting all design options at once:\n```\n\"Here are 4 approaches: Option A... Option B... Option C... Option D... Which do you prefer?\"\n```\nWhy bad: Decision fatigue. Present one option with trade-offs, get reaction, then present the next.\n\u003C\u002FBad>\n\u003C\u002FExamples>\n\n\u003CEscalation_And_Stop_Conditions>\n- Stop interviewing when requirements are clear enough to plan -- do not over-interview\n- In consensus mode, stop after 5 Planner\u002FArchitect\u002FCritic iterations and present the best version\n- Consensus mode outputs the plan by default; with `--interactive`, user can approve and hand off to ralph\u002Fteam\n- If the user says \"just do it\" or \"skip planning\", **MUST** invoke `$ralph` to transition to execution mode. Do NOT implement directly in the planning agent.\n- Escalate to the user when there are irreconcilable trade-offs that require a business decision\n\u003C\u002FEscalation_And_Stop_Conditions>\n\n\u003CFinal_Checklist>\n- [ ] Plan has testable acceptance criteria (90%+ concrete)\n- [ ] Plan references specific files\u002Flines where applicable (80%+ claims)\n- [ ] All risks have mitigations identified\n- [ ] No vague terms without metrics (\"fast\" -> \"p99 \u003C 200ms\")\n- [ ] Plan saved to `.omx\u002Fplans\u002F`\n- [ ] In consensus mode: RALPLAN-DR summary includes 3-5 principles, top 3 drivers, and >=2 viable options (or explicit invalidation rationale)\n- [ ] In consensus mode final output: ADR section included (Decision \u002F Drivers \u002F Alternatives considered \u002F Why chosen \u002F Consequences \u002F Follow-ups)\n- [ ] In deliberate consensus mode: pre-mortem (3 scenarios) + expanded test plan (unit\u002Fintegration\u002Fe2e\u002Fobservability) included\n- [ ] In consensus mode with `--interactive`: user explicitly approved before any execution; without `--interactive`: output final plan after Critic approval (no auto-execution)\n\u003C\u002FFinal_Checklist>\n\n\u003CAdvanced>\n## Design Option Presentation\n\nWhen presenting design choices during interviews, chunk them:\n\n1. **Overview** (2-3 sentences)\n2. **Option A** with trade-offs\n3. [Wait for user reaction]\n4. **Option B** with trade-offs\n5. [Wait for user reaction]\n6. **Recommendation** (only after options discussed)\n\nFormat for each option:\n```\n### Option A: [Name]\n**Approach:** [1 sentence]\n**Pros:** [bullets]\n**Cons:** [bullets]\n\nWhat's your reaction to this approach?\n```\n\n## Question Classification\n\nBefore asking any interview question, classify it:\n\n| Type | Examples | Action |\n|------|----------|--------|\n| Codebase Fact | \"What patterns exist?\", \"Where is X?\" | Explore first, do not ask user |\n| User Preference | \"Priority?\", \"Timeline?\" | Ask user via AskUserQuestion |\n| Scope Decision | \"Include feature Y?\" | Ask user |\n| Requirement | \"Performance constraints?\" | Ask user |\n\n## Review Quality Criteria\n\n| Criterion | Standard |\n|-----------|----------|\n| Clarity | 80%+ claims cite file\u002Fline |\n| Testability | 90%+ criteria are concrete |\n| Verification | All file refs exist |\n| Specificity | No vague terms |\n\n## Deprecation Notice\n\nThe separate `\u002Fplanner`, `\u002Fralplan`, and `\u002Freview` skills have been merged into `$plan`. All workflows (interview, direct, consensus, review) are available through `$plan`.\n\u003C\u002FAdvanced>\n","\u003CPurpose>\nPlan 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\u002FArchitect\u002FCritic loop with RALPLAN-DR structured deliberation) and review mode (Critic evaluation of existing plans).\n\u003C\u002FPurpose>\n\n\u003CUse_When>\n- User wants to plan before implementing -- \"plan this\", \"plan the\", \"let's plan\"\n- User wants structured requirements gathering for a vague idea\n- User wants an existing plan reviewed -- \"review this plan\", `--review`\n- User wants multi-perspective consensus on a plan -- `--consensus`, \"ralplan\"\n- Task is broad or vague and needs scoping before any code is written\n\u003C\u002FUse_When>\n\n\u003CDo_Not_Use_When>\n- User wants autonomous end-to-end execution -- use `autopilot` instead\n- User wants to start coding immediately with a clear task -- use `ralph` or delegate to executor\n- User asks a simple question that can be answered directly -- just answer it\n- Task is a single focused fix with obvious scope -- skip planning, just do it\n\u003C\u002FDo_Not_Use_When>\n\n\u003CWhy_This_Exists>\nJumping 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.\n\u003C\u002FWhy_This_Exists>\n\n\u003CExecution_Policy>\n- Auto-detect interview vs direct mode based on request specificity\n- Ask one question at a time during interviews -- never batch multiple questions\n- Gather codebase facts via `explore` agent before asking the user about them\n- When session guidance enables `USE_OMX_EXPLORE_CMD`, prefer `omx explore` for simple read-only repository lookups during planning; keep prompts narrow and concrete, and keep prompt-heavy or ambiguous planning work on the richer normal path and fall back normally if `omx explore` is unavailable.\n- Plans must meet quality standards: 80%+ claims cite file\u002Fline, 90%+ criteria are testable\n- Implementation step count must be right-sized to task scope; avoid defaulting to exactly five steps when the work is clearly smaller or larger\n- Consensus mode outputs the final plan by default; add `--interactive` to enable execution handoff\n- Consensus mode uses RALPLAN-DR short mode by default; switch to deliberate mode with `--deliberate` or when the request explicitly signals high risk (auth\u002Fsecurity, data migration, destructive\u002Firreversible changes, production incident, compliance\u002FPII, public API breakage)\n- Default to concise, evidence-dense progress and completion reporting unless the user or risk level requires more detail\n- Treat newer user task updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints\n- If correctness depends on additional inspection, retrieval, execution, or verification, keep using the relevant tools until the plan is grounded\n- Continue through clear, low-risk, reversible next steps automatically; ask only when the next step is materially branching, destructive, or preference-dependent\n\u003C\u002FExecution_Policy>\n\n\u003CSteps>\n\n### Mode Selection\n\n| Mode | Trigger | Behavior |\n|------|---------|----------|\n| Interview | Default for broad requests | Interactive requirements gathering |\n| Direct | `--direct`, or detailed request | Skip interview, generate plan directly |\n| Consensus | `--consensus`, \"ralplan\" | Planner -> Architect -> Critic loop until agreement with RALPLAN-DR structured deliberation (short by default, `--deliberate` for high-risk); outputs plan by default |\n| Consensus Interactive | `--consensus --interactive` | Same as Consensus but pauses for user feedback at draft and approval steps, then hands off to execution |\n| Review | `--review`, \"review this plan\" | Critic evaluation of existing plan |\n\n### Interview Mode (broad\u002Fvague requests)\n\n1. **Classify the request**: Broad (vague verbs, no specific files, touches 3+ areas) triggers interview mode\n2. **Ask one focused question** using `AskUserQuestion` for preferences, scope, and constraints\n3. **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\n4. **Build on answers**: Each question builds on the previous answer\n5. **Consult Analyst** (THOROUGH tier) for hidden requirements, edge cases, and risks\n6. **Create plan** when the user signals readiness: \"create the plan\", \"I'm ready\", \"make it a work plan\"\n\n### Direct Mode (detailed requests)\n\n1. **Quick Analysis**: Optional brief Analyst consultation\n2. **Create plan**: Generate comprehensive work plan immediately\n3. **Review** (optional): Critic review if requested\n\n### Consensus Mode (`--consensus` \u002F \"ralplan\")\n\n**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. The workflow auto-proceeds through planning steps (Planner\u002FArchitect\u002FCritic) but outputs the final plan without executing.\n\n1. **Planner** creates initial plan and a compact **RALPLAN-DR summary** before any Architect review. The summary **MUST** include:\n   - **Principles** (3-5)\n   - **Decision Drivers** (top 3)\n   - **Viable Options** (>=2) with bounded pros\u002Fcons for each option\n   - If only one viable option remains, an explicit **invalidation rationale** for the alternatives that were rejected\n   - In **deliberate mode**: a **pre-mortem** (3 failure scenarios) and an **expanded test plan** covering **unit \u002F integration \u002F e2e \u002F observability**\n2. **User feedback** *(--interactive only)*: If running with `--interactive`, **MUST** use `AskUserQuestion` to present the draft plan **plus the RALPLAN-DR Principles \u002F Decision Drivers \u002F Options summary for early direction alignment** with these options:\n   - **Proceed to review** — send to Architect and Critic for evaluation\n   - **Request changes** — return to step 1 with user feedback incorporated\n   - **Skip review** — go directly to final approval (step 7)\n   If NOT running with `--interactive`, automatically proceed to review (step 3).\n3. **Architect** reviews for architectural soundness using `ask_codex` with `agent_role: \"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. **Wait for this step to complete before proceeding to step 4.** Do NOT run steps 3 and 4 in parallel.\n4. **Critic** evaluates against quality criteria using `ask_codex` with `agent_role: \"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\u002Fweak pre-mortem or missing\u002Fweak expanded test plan. Run only after step 3 is complete.\n5. **Re-review loop** (max 5 iterations): If Critic rejects or iterates, execute this closed loop:\n   a. Collect all feedback from Architect + Critic\n   b. Pass feedback to Planner to produce a revised plan\n   c. **Return to Step 3** — Architect reviews the revised plan\n   d. **Return to Step 4** — Critic evaluates the revised plan\n   e. Repeat until Critic approves OR max 5 iterations reached\n   f. If max iterations reached without approval, present the best version to user via `AskUserQuestion` with note that expert consensus was not reached\n6. **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:\n   a. Collect all improvement suggestions from Architect and Critic responses\n   b. Deduplicate and categorize the suggestions\n   c. Update the plan file in `.omx\u002Fplans\u002F` with the accepted improvements (add missing details, refine steps, strengthen acceptance criteria, ADR updates, etc.)\n   d. Note which improvements were applied in a brief changelog section at the end of the plan\n   e. Before any execution handoff, derive an explicit **available-agent-types roster** from the known prompt catalog and add concrete **follow-up staffing guidance** for both `$ralph` and `$team` (recommended roles, counts, suggested reasoning levels by lane, and why each lane exists)\n   f. For the `$team` path, add an explicit launch-hint block with concrete `omx team` \u002F `$team` commands and a **team verification path** (what team proves before shutdown, what Ralph verifies after handoff)\n7. On Critic approval (with improvements applied): *(--interactive only)* If running with `--interactive`, use `AskUserQuestion` to present the plan with these options:\n   - **Approve and execute** — proceed to implementation via ralph+ultrawork\n   - **Approve and implement via team** — proceed to implementation via coordinated parallel team agents\n   - **Request changes** — return to step 1 with user feedback\n   - **Reject** — discard the plan entirely\n   If NOT running with `--interactive`, output the final approved plan and stop. Do NOT auto-execute.\n8. *(--interactive only)* User chooses via the structured `AskUserQuestion` UI (never ask for approval in plain text)\n9. On user approval (--interactive only):\n   - **Approve and execute**: **MUST** invoke `$ralph` with the approved plan path from `.omx\u002Fplans\u002F` as context **plus the explicit available-agent-types roster, suggested reasoning levels, concrete role allocation guidance, and direct launch hints for Ralph follow-up work**. Do NOT implement directly. Do NOT edit source code files in the planning agent. The ralph skill handles execution via ultrawork parallel agents.\n   - **Approve and implement via team**: **MUST** invoke `$team` with the approved plan path from `.omx\u002Fplans\u002F` as context **plus the explicit available-agent-types roster, suggested reasoning levels, concrete staffing \u002F worker-role allocation guidance, explicit `omx team` \u002F `$team` launch hints, and the team verification path**. Do NOT implement directly. The team skill coordinates parallel agents across the staged pipeline for faster execution on large tasks.\n\n### Review Mode (`--review`)\n\n0. Treat review as a reviewer-only pass. The context that wrote the plan, cleanup proposal, or diff MUST NOT be the context that approves it.\n1. Read plan file from `.omx\u002Fplans\u002F`\n2. Evaluate via Critic using `ask_codex` with `agent_role: \"critic\"`\n3. For cleanup\u002Frefactor\u002Fanti-slop work, verify that the artifact includes a cleanup plan, regression tests or an explicit test gap, smell-by-smell passes, and quality gates.\n4. Return verdict: APPROVED, REVISE (with specific feedback), or REJECT (replanning required)\n5. If the current context authored the artifact, hand the review to `\u002Freview`, `critic`, `quality-reviewer`, `security-reviewer`, or `verifier` as appropriate.\n\n### Plan Output Format\n\nEvery plan includes:\n- Requirements Summary\n- Acceptance Criteria (testable)\n- Implementation Steps (with file references)\n- Adaptive step count sized to the actual scope (not a fixed five-step template)\n- Risks and Mitigations\n- Verification Steps\n- For consensus\u002Fralplan: **RALPLAN-DR summary** (Principles, Decision Drivers, Options)\n- For consensus\u002Fralplan final output: **ADR** (Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups)\n- For consensus\u002Fralplan execution handoff: **Available-Agent-Types Roster**, **Follow-up Staffing Guidance** (including suggested reasoning levels by lane), explicit `omx team` \u002F `$team` **Launch Hints**, and **Team Verification Path**\n- For deliberate consensus mode: **Pre-mortem (3 scenarios)** and **Expanded Test Plan** (unit\u002Fintegration\u002Fe2e\u002Fobservability)\n\nPlans are saved to `.omx\u002Fplans\u002F`. Drafts go to `.omx\u002Fdrafts\u002F`.\n\u003C\u002FSteps>\n\n\u003CTool_Usage>\n- Before first MCP tool use, call `ToolSearch(\"mcp\")` to discover deferred MCP tools\n- Use `AskUserQuestion` for preference questions (scope, priority, timeline, risk tolerance) -- provides clickable UI\n- Use plain text for questions needing specific values (port numbers, names, follow-up clarifications)\n- Use the `explore` agent (LOW tier, bounded quick pass) to gather codebase facts before asking the user\n- Use `ask_codex` with `agent_role: \"planner\"` for planning validation on large-scope plans\n- Use `ask_codex` with `agent_role: \"analyst\"` for requirements analysis\n- Use `ask_codex` with `agent_role: \"critic\"` for plan review in consensus and review modes\n- If ToolSearch finds no MCP tools or Codex is unavailable, fall back to equivalent OMX prompt agents -- never block on external tools\n- **CRITICAL — Consensus mode agent calls MUST be sequential, never parallel.** Always await the Architect result before issuing the Critic call.\n- In consensus mode, default to RALPLAN-DR short mode; enable deliberate mode on `--deliberate` or explicit high-risk signals (auth\u002Fsecurity, migrations, destructive changes, production incidents, compliance\u002FPII, public API breakage)\n- In consensus mode with `--interactive`: use `AskUserQuestion` for the user feedback step (step 2) and the final approval step (step 7) -- never ask for approval in plain text. Without `--interactive`, auto-proceed through planning steps without pausing. Output the final plan without execution.\n- In consensus mode with `--interactive`, on user approval **MUST** invoke `$ralph` for execution (step 9) -- never implement directly in the planning agent\n- In consensus mode, execution follow-up handoff **MUST** include an explicit available-agent-types roster plus concrete staffing \u002F role-allocation guidance grounded in that roster, suggested reasoning levels by lane, explicit `omx team` \u002F `$team` launch hints, and a team verification path\n\u003C\u002FTool_Usage>\n\n\n## Scenario Examples\n\n**Good:** The user says `continue` after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.\n\n**Good:** The user changes only the output shape or downstream delivery step (for example `make a PR`). Preserve earlier non-conflicting workflow constraints and apply the update locally.\n\n**Bad:** The user says `continue`, and the workflow restarts discovery or stops before the missing verification\u002Fevidence is gathered.\n\n\u003CExamples>\n\u003CGood>\nAdaptive interview (gathering facts before asking):\n```\nPlanner: [spawns explore agent: \"find authentication implementation\"]\nPlanner: [receives: \"Auth is in src\u002Fauth\u002F using JWT with passport.js\"]\nPlanner: \"I see you're using JWT authentication with passport.js in src\u002Fauth\u002F.\n         For this new feature, should we extend the existing auth or add a separate auth flow?\"\n```\nWhy good: Answers its own codebase question first, then asks an informed preference question.\n\u003C\u002FGood>\n\n\u003CGood>\nSingle question at a time:\n```\nQ1: \"What's the main goal?\"\nA1: \"Improve performance\"\nQ2: \"For performance, what matters more -- latency or throughput?\"\nA2: \"Latency\"\nQ3: \"For latency, are we optimizing for p50 or p99?\"\n```\nWhy good: Each question builds on the previous answer. Focused and progressive.\n\u003C\u002FGood>\n\n\u003CBad>\nAsking about things you could look up:\n```\nPlanner: \"Where is authentication implemented in your codebase?\"\nUser: \"Uh, somewhere in src\u002Fauth I think?\"\n```\nWhy bad: The planner should spawn an explore agent to find this, not ask the user.\n\u003C\u002FBad>\n\n\u003CBad>\nBatching multiple questions:\n```\n\"What's the scope? And the timeline? And who's the audience?\"\n```\nWhy bad: Three questions at once causes shallow answers. Ask one at a time.\n\u003C\u002FBad>\n\n\u003CBad>\nPresenting all design options at once:\n```\n\"Here are 4 approaches: Option A... Option B... Option C... Option D... Which do you prefer?\"\n```\nWhy bad: Decision fatigue. Present one option with trade-offs, get reaction, then present the next.\n\u003C\u002FBad>\n\u003C\u002FExamples>\n\n\u003CEscalation_And_Stop_Conditions>\n- Stop interviewing when requirements are clear enough to plan -- do not over-interview\n- In consensus mode, stop after 5 Planner\u002FArchitect\u002FCritic iterations and present the best version\n- Consensus mode outputs the plan by default; with `--interactive`, user can approve and hand off to ralph\u002Fteam\n- If the user says \"just do it\" or \"skip planning\", **MUST** invoke `$ralph` to transition to execution mode. Do NOT implement directly in the planning agent.\n- Escalate to the user when there are irreconcilable trade-offs that require a business decision\n\u003C\u002FEscalation_And_Stop_Conditions>\n\n\u003CFinal_Checklist>\n- [ ] Plan has testable acceptance criteria (90%+ concrete)\n- [ ] Plan references specific files\u002Flines where applicable (80%+ claims)\n- [ ] All risks have mitigations identified\n- [ ] No vague terms without metrics (\"fast\" -> \"p99 \u003C 200ms\")\n- [ ] Plan saved to `.omx\u002Fplans\u002F`\n- [ ] In consensus mode: RALPLAN-DR summary includes 3-5 principles, top 3 drivers, and >=2 viable options (or explicit invalidation rationale)\n- [ ] In consensus mode final output: ADR section included (Decision \u002F Drivers \u002F Alternatives considered \u002F Why chosen \u002F Consequences \u002F Follow-ups)\n- [ ] In deliberate consensus mode: pre-mortem (3 scenarios) + expanded test plan (unit\u002Fintegration\u002Fe2e\u002Fobservability) included\n- [ ] In consensus mode with `--interactive`: user explicitly approved before any execution; without `--interactive`: output final plan after Critic approval (no auto-execution)\n\u003C\u002FFinal_Checklist>\n\n\u003CAdvanced>\n## Design Option Presentation\n\nWhen presenting design choices during interviews, chunk them:\n\n1. **Overview** (2-3 sentences)\n2. **Option A** with trade-offs\n3. [Wait for user reaction]\n4. **Option B** with trade-offs\n5. [Wait for user reaction]\n6. **Recommendation** (only after options discussed)\n\nFormat for each option:\n```\n### Option A: [Name]\n**Approach:** [1 sentence]\n**Pros:** [bullets]\n**Cons:** [bullets]\n\nWhat's your reaction to this approach?\n```\n\n## Question Classification\n\nBefore asking any interview question, classify it:\n\n| Type | Examples | Action |\n|------|----------|--------|\n| Codebase Fact | \"What patterns exist?\", \"Where is X?\" | Explore first, do not ask user |\n| User Preference | \"Priority?\", \"Timeline?\" | Ask user via AskUserQuestion |\n| Scope Decision | \"Include feature Y?\" | Ask user |\n| Requirement | \"Performance constraints?\" | Ask user |\n\n## Review Quality Criteria\n\n| Criterion | Standard |\n|-----------|----------|\n| Clarity | 80%+ claims cite file\u002Fline |\n| Testability | 90%+ criteria are concrete |\n| Verification | All file refs exist |\n| Specificity | No vague terms |\n\n## Deprecation Notice\n\nThe separate `\u002Fplanner`, `\u002Fralplan`, and `\u002Freview` skills have been merged into `$plan`. All workflows (interview, direct, consensus, review) are available through `$plan`.\n\u003C\u002FAdvanced>\n",{"name":5,"description":7},"main","7a38d8e7073e61c16eda85681cb32fb68a8657a5","skills-store\u002Fcodex\u002Fplan","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router","https:\u002F\u002Fgithub.com\u002Fsapsapshen","2026-04-14 21:12:12",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add sapsapshen\u002Fai-memory-router --skill plan",{"tool":42,"command":43},"bunx","bunx skills add sapsapshen\u002Fai-memory-router --skill plan",{"tool":45,"command":46},"pnpm","pnpm dlx skills add sapsapshen\u002Fai-memory-router --skill plan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcodex\u002Fplan\u002FSKILL.md",true,[],[51,61,68,76,82,90],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":56,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":60},"01M72R8PZX1ABFHJGTYPA4CAF1","webapp-testing","To test local web applications, write native Python Playwright scripts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fwebapp-testing\u002FSKILL.md",[],[],"2026-11-10 22:39:42",{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":60},"01M72QG37MMZNDY7X7GXPAK5W6","python-packaging","Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fpython-packaging\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":72,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":60},"01M72NXR0QMP9G46TW6A2DH59C","canvas-design","These are instructions for creating design philosophies - aesthetic movements that are then EXPRESSED VISUALLY. Output only .md files, .pdf files, and .png files.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fcanvas-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fglobal\u002Fcanvas-design\u002FSKILL.md",[],[],{"skillNo":77,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":60},"01M72N55TK3EEQ4QK4AWDC2KZS","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":60},"01M72MTWC150CFAP4Y5GSNKF80","slack-gif-creator","A toolkit providing utilities and knowledge for creating animated GIFs optimized for Slack.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fslack-gif-creator\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":55,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":60},"01M72KPT3VVNSP88MNAY466TZT","frontend-design","You are a frontend designer-engineer, not a layout generator.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Ffrontend-design\u002FSKILL.md",[],[]]