원클릭으로
plan
Plan a phase into executable tasks with dependencies and waves
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Plan a phase into executable tasks with dependencies and waves
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Initialize a Megazord project with configuration and planning structure
Systematic four-phase debugging (reproduce, isolate, root-cause, fix)
Socratic brainstorming to explore approaches before implementation
Execute the current phase plan (subagent or Agent Teams mode)
Show all available Megazord skills with descriptions and usage examples
Complete milestone lifecycle -- audit, archive, deferred items, and next version preparation
| name | plan |
| description | Plan a phase into executable tasks with dependencies and waves |
| disable-model-invocation | false |
Plan a phase by orchestrating research and planning agents. Produces PLAN.md files with task breakdown, dependencies, and completion criteria.
Reference @skills/init/design-system.md for visual output formatting.
Reference @skills/shared/presentation-standards.md for content formatting rules.
Reference @skills/shared/terminology.md for official term definitions.
Reference @skills/plan/agents.md for agent definitions and spawning patterns.
Output the stage banner:
╔═══════════════════════════════════════════════╗
║ ⚡ MEGAZORD ► PLANNING ║
╚═══════════════════════════════════════════════╝
Read .planning/megazord.config.json. If missing, display an error box and stop:
╔═══════════════════════════════════════════════╗
║ ✗ Project Not Initialized ║
╠═══════════════════════════════════════════════╣
║ No megazord.config.json found. ║
║ Run /mz:init to set up your project first. ║
╚═══════════════════════════════════════════════╝
If config exists, continue loading:
.planning/STATE.md for current position..planning/ROADMAP.md for phase listing./mz:plan 3 or /mz:plan phase 3)--skip-research flagadd-phase, remove-phase, insert-phase (see Step 2b)Store all loaded content in memory -- it will be embedded in Task prompts later.
After loading config, check for codebase map integration:
.planning/codebase/SUMMARY.md exists.> Codebase Map
✓ Loaded codebase summary (.planning/codebase/SUMMARY.md)
package.json, src/, lib/, app/, Cargo.toml, go.mod, requirements.txt, pyproject.toml, or pom.xml):
Display a soft warning:
> Brownfield
! Existing code detected but no codebase map found.
Run /mz:map first for better roadmap quality, or continue without.
Use AskUserQuestion (header: "Brownfield", 10 chars):
/mz:map to analyze the codebase, then re-run /mz:plan." and exit)Determine the plugin path:
plugin_path from the config JSON.plugin_path is not set in config, try ~/.claude/plugins/mz. Check if ~/.claude/plugins/mz/bin/megazord.mjs exists.Plugin path not configured. Run
/mz:settingsand setplugin_path, or re-run/mz:init.
Parse the user's message for phase management subcommands. If a subcommand is detected, handle it directly without spawning researcher/planner agents:
/mz:plan add-phase {description}Add a new phase to the end of the roadmap.
node {plugin_path}/bin/megazord.mjs tools roadmap add-phase --description "{description}"
> Phase Management
✓ Phase {N} added: {description}
/mz:plan remove-phase {N}Remove an unstarted phase from the roadmap.
node {plugin_path}/bin/megazord.mjs tools roadmap remove-phase --phase {N}
> Phase Management
✓ Phase {N} removed. Subsequent phases renumbered.
/mz:plan insert-phase {N} {description}Insert a new phase after phase N using decimal numbering.
node {plugin_path}/bin/megazord.mjs tools roadmap insert-phase --after {N} --description "{description}"
> Phase Management
✓ Phase {result_number} inserted after Phase {N}: {description}
If no subcommand is detected: Proceed to Step 3 (normal planning flow).
If a phase number was provided in the user's message: Use that phase number. Find its details in ROADMAP.md.
If no phase number provided: Detect the next unplanned phase. Scan ROADMAP.md for the first phase that:
- [x]).planning/phases/To check for PLAN.md files, use Glob: .planning/phases/{padded}-*/*-*-PLAN.md where {padded} is the zero-padded phase number (e.g., 03).
If no ROADMAP.md exists: This is a new project that needs a roadmap. Handle this:
Use AskUserQuestion:
If "Yes, create roadmap":
.planning/ following the established format (see existing ROADMAP.md for structure reference)If "No, use /mz:quick instead":
/mz:quick"If all phases are planned: Display: "All phases in the roadmap are planned. Run /mz:go to execute."
Display the target phase with inline context (per presentation-standards.md Section 4):
▸ Target
Phase {N}: {Phase Name} — {functional_sentence_from_goal}
Extract the functional sentence from the phase's Goal field in ROADMAP.md (max 8-10 words, user-centric).
After determining the target phase and BEFORE any research or planning, check the verification gate for the previous phase:
node {plugin_path}/bin/megazord.mjs tools roadmap check-gate --phase {N-1}
> Verification Gate
! Phase {N-1}: {Name} — has not passed verification.
Run /mz:verify {N-1} before planning Phase {N}.
Use AskUserQuestion (header: "Gate", 4 chars):
## Next Up
**Verify Phase {N-1}: {PrevName} — confirm deliverables before planning Phase {N}**
`/mz:verify {N-1}`
<sub>`/clear` — start fresh context for the next step</sub>
> Verification Gate
✓ Phase {N-1}: {Name} — verified
Important: Phase transitions remain manual. The gate is a warning, not a hard block. The user always decides whether to proceed.
Check if {phase_dir}/{padded}-CONTEXT.md exists (e.g., .planning/phases/03-core-skills-and-state-management/03-CONTEXT.md).
If CONTEXT.md exists: Read it and store content for later embedding. Display:
▸ Context
✓ Found {padded}-CONTEXT.md
If CONTEXT.md is missing: Display a warning (not an error). The warning varies based on the quality.brainstorming config setting:
When quality.brainstorming is true in config:
▸ Context
⚠ No context found for Phase {N}.
💡 Brainstorming is enabled -- run /mz:discuss first for better results, or continue without.
When quality.brainstorming is false in config:
▸ Context
⚠ No context found for Phase {N}. Run /mz:discuss first for better results, or continue without.
Use AskUserQuestion:
If "Run /mz:discuss first": Display the following and exit:
## Next Up
**Gather context for Phase {N}: {Name} — {functional_sentence_from_goal}**
`/mz:discuss {N}`
<sub>`/clear` — start fresh context for the next step</sub>
If "Continue": Proceed without CONTEXT.md content.
Important: This is a soft check -- warn but do not block. The user decides.
Determine whether to run research:
workflow.research from megazord.config.json. If false, skip research.--skip-research was in the user's arguments, skip research.{phase_dir}/{padded}-RESEARCH.md already exists, skip research and use the existing file.If research should run:
Display with contextual progress indicator (per presentation-standards.md Section 6):
▸ Research
◆ Researching Phase {N}: {Name}... (analyzing patterns and best practices)
Spawn the researcher agent:
Read {plugin_path}/agents/mz-researcher.md file content into memory.
Read all context files into memory: STATE.md, ROADMAP.md, CONTEXT.md (if exists).
Extract the relevant phase section from ROADMAP.md -- the ### Phase {N}: {Name} section, not the entire roadmap. Include the phase goal, dependencies, requirements, and success criteria.
Resolve the model for the researcher agent:
model_profile and model_overrides from the loaded config.model_overrides.researcher is set and not "inherit". If so, use that value. Otherwise, use the profile mapping: quality->opus, balanced->sonnet, budget->haiku.model field to the resolved value. Use simple string replacement to rewrite the model: {value} line in {plugin_path}/agents/mz-researcher.md (e.g., replace model: inherit or model: sonnet with model: {resolved_value}).Spawn researcher via Task tool:
subagent_type: "mz-researcher"description: "Research Phase {N}: {Name}"prompt: Compose the prompt with per-invocation context only (the agent definition is loaded from the registered agent file):
{phase_dir}/{padded}-RESEARCH.mdsubagent_type="mz-researcher" fails, fall back to subagent_type="general-purpose" with the agent definition embedded inline in <agent_role> tags (same as the pre-model-aware pattern).Wait for completion. After the researcher finishes, read the produced RESEARCH.md.
Display:
▸ Research
✓ Research complete: {padded}-RESEARCH.md
If research was skipped (flag):
▸ Research
○ Skipped (--skip-research)
If research already exists:
▸ Research
✓ Using existing {padded}-RESEARCH.md
Read the existing or newly created RESEARCH.md content into memory for the planner.
Gather all context for the planner:
### Phase {N} section including goal, requirements, success criteria)Display with contextual progress indicator (per presentation-standards.md Section 6):
▸ Planning
◆ Creating plans for Phase {N}: {Name}... (decomposing into tasks and waves)
Read {plugin_path}/agents/mz-planner.md file content into memory.
Resolve the model for the planner agent:
model_profile and model_overrides from the loaded config.model_overrides.planner is set and not "inherit". If so, use that value. Otherwise, use differentiated profile mapping: quality->opus, balanced->opus (planner is promoted), budget->sonnet (planner is promoted).model field to the resolved value. Use simple string replacement to rewrite the model: {value} line in {plugin_path}/agents/mz-planner.md.Spawn the planner via Task tool:
subagent_type: "mz-planner"description: "Plan Phase {N}: {Name}"prompt: Compose the prompt with per-invocation context only (the agent definition is loaded from the registered agent file):
<codebase_context>
{content of .planning/codebase/SUMMARY.md}
</codebase_context>
This gives the planner awareness of existing architecture, tech stack, conventions, and concerns when creating brownfield roadmaps.{phase_dir}/subagent_type="mz-planner" fails, fall back to subagent_type="general-purpose" with the agent definition embedded inline in <agent_role> tags (same as the pre-model-aware pattern).Wait for completion. The planner writes PLAN.md files directly to the phase directory.
Verify plans were created by listing files matching {phase_dir}/{padded}-*-PLAN.md using Glob.
If no plans were created, display an error:
╔═══════════════════════════════════════════════╗
║ ✗ Planning Failed ║
╠═══════════════════════════════════════════════╣
║ No PLAN.md files were created. ║
║ Check the phase requirements and try again. ║
╚═══════════════════════════════════════════════╝
Display:
▸ Planning
✓ Created {N} plan(s)
Determine whether to run plan verification:
workflow.plan_check from megazord.config.json. If false, skip to Step 7.If plan_check is enabled:
Display with contextual progress indicator (per presentation-standards.md Section 6):
▸ Plan Check
◆ Validating plans... (checking frontmatter, structure, and dependencies)
For each created PLAN.md file, validate using the CLI tool:
node {plugin_path}/bin/megazord.mjs tools frontmatter validate "{plan_path}" --schema plan
And validate plan structure:
node {plugin_path}/bin/megazord.mjs tools verify plan-structure "{plan_path}"
If validation errors are found:
Display result:
▸ Plan Check
✓ {N} plan(s) validated
Or if issues remain:
▸ Plan Check
⚠ {N} issue(s) found -- check plan files manually
If plan_check was skipped (config):
▸ Plan Check
~ Skipped (disabled in config)
After plans are created:
Count the created PLAN.md files.
Update STATE.md position via Bash:
node {plugin_path}/bin/megazord.mjs tools state update-position --phase {N} --total-phases {M} --phase-name "{Name}" --plan 0 --total-plans {plan_count} --status "Planned" --last-activity "{date} -- Phase {N} planned ({plan_count} plans)"
Where {plugin_path} is resolved by reading the plugin.json location (the Megazord plugin directory).
Update ROADMAP.md: In the phase's Plans: section, replace placeholder entries with actual plan filenames and brief objectives. Read each PLAN.md file's <objective> section to extract the brief objective text.
For example, replace:
Plans:
- [ ] 03-01: TBD
With:
Plans:
- [ ] 03-01-PLAN.md -- State management library and CLI tooling
- [ ] 03-02-PLAN.md -- /mz:plan skill with agent definitions
Update SESSION continuity in STATE.md via Bash:
node {plugin_path}/bin/megazord.mjs tools state update-session --last-session "{date}" --stopped-at "Phase {N} planned" --resume-file "{phase_dir}/{padded}-01-PLAN.md"
Display a plan summary using heading-based layout (per presentation-standards.md Section 1 — no action box for regular summaries):
### Phase {N}: {Name} — Planned
Plans: {count}
01: {functional_objective_plan_01}
02: {functional_objective_plan_02}
Wave 1: {plan_list} — {functional_summary_of_wave}
Wave 2: {plan_list} — {functional_summary_of_wave}
Where {functional_objective} is extracted from each plan's <objective> section — user-centric, max 10 words. Wave summaries should be functional: "Wave 1: Plans 01, 02 — foundation and reference docs" not just "Wave 1: 01, 02".
End with the Next Up block using the heading format (per presentation-standards.md Section 8):
## Next Up
**Execute Phase {N}: {Name} — {functional_sentence_from_goal}**
`/mz:go`
<sub>`/clear` — start fresh context for the next step</sub>
/mz:init. Exit./mz:quick. Exit.{plugin_path} for CLI commands and agent files is resolved from config.plugin_path, falling back to ~/.claude/plugins/mz.