Creates structured implementation plans with TDD task breakdown, dependency management, and capability assignment. Use when user says "plan this", "create a plan for [task]", "break down [feature]", "how should we implement [x]", "list all plans", or "switch to [plan]". Assigns best-fit agent, relevant skills, and model tier to each task using cached capabilities from context loading phase (Phase 0).
Transform user request into structured, executable plan with TDD task breakdown. Also supports listing and switching between multiple plans.
If --list: Jump to List Plans.
If --switch <track_id>: Jump to Switch Plan.
Otherwise: Continue with Create Plan.
Ensure exists - If the [ directory][mycelium-dir] does not exist, create the minimum bootstrap structure:
.mycelium/.mycelium/.mycelium/
└── state.json
Initialize state.json per the [session state docs][session-state-docs]. Also add .mycelium/ to .gitignore if not already present.
Update session state - Write invocation_mode: "single" to [state.json][session-state-docs]
Parse input:
Provide context:
.mycelium/context/*.md if exists (product, tech-stack, workflow)CLAUDE.md if existsLoad cached capabilities:
discovered_capabilities from state.json/mycelium-context-load firstmycelium:mycelium-work)Analyze the task:
grep, glob)Create detailed plan following the guidance below:
Save plan to .mycelium/plans/YYYY-MM-DD-{track-id}.md using the [plan template][plan-template]. The frontmatter must conform to the [plan frontmatter schema][plan-schema].
Register plan in session state:
state.jsonplans[] has status: "in_progress", set it to "paused" (both in plans[] AND in that plan file's YAML frontmatter status field)plans[]:
{
"track_id": "{track_id}",
"plan_file": "YYYY-MM-DD-{track-id}.md",
"status": "in_progress",
"created": "{timestamp}",
"total_tasks": {count},
"completed_tasks": 0
}
current_track to the new plan's { "id": "{track_id}", "type": "{type}", "plan_file": "..." }Hand off to next phase:
current_phase: "implementation" in state.jsoninvocation_mode == "full": Invoke mycelium-workinvocation_mode == "single": Suggest /mycelium-workDisplay all plans from state.json plans[] (fall back to globbing .mycelium/plans/*.md and reading frontmatter if plans[] is missing or empty).
Output format:
Plans:
* multi-plan_20260211 in_progress 2/7 tasks (active)
auth_20260210 paused 0/5 tasks
bugfix_20260209 completed 3/3 tasks
* marks the active plan (matches current_track.id)preview- prefixed files unless --all is passedcreated descending (newest first)Switch the active plan to <track_id>:
state.json<track_id> in plans[]. If not found, check .mycelium/plans/ for a matching file and register it first. If still not found, error: "Plan <track_id> not found."status: "in_progress") to "paused" in both plans[] and its plan file frontmatter"in_progress" in both plans[] and its plan file frontmattercurrent_track to point to the target plan<track_id>"/mycelium-work or /mycelium-continue to resumeThis section provides comprehensive guidance for creating detailed implementation plans with proper task decomposition and dependency management.
Every plan follows this template (stored in templates/plans/plan.md.template):
---