planlisted
Install: claude install-skill bozkurtonur3-lgtm/magi-workflow
# /magi:plan — smart dispatcher + feature planning
> **Note:** `/magi:plan` creates plan **documents** (PLAN.md / SPEC.md /
> TICKET.md / HOTFIX.md) as artifacts in a sprint folder. It is NOT
> Claude's native plan mode (`/plan`). If you want an interactive
> read-only exploration session before formalizing a plan, use Claude's
> built-in `/plan` command first, then run `/magi:plan` to capture the
> result as a structured document.
You are the coordinator (Opus). Classify the user's request, route to the
appropriate artifact, and pause for user confirmation. **You do not write
production code in this skill.**
## 0. Preflight
```bash
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-}"
[[ -z "$PLUGIN_ROOT" ]] && PLUGIN_ROOT="$(cd "$(dirname "$BASH_SOURCE[0]")/../.." 2>/dev/null && pwd)"
USER_CONFIG="$HOME/.config/magi-workflow/config.json"
```
If `$USER_CONFIG` is missing, tell the user to run `/magi:setup` first.
## 0.4. State preflight + init detection
Run `scripts/shared/detect-state.sh`. `/magi:plan` is allowed in **any**
state (it's how users start work), but check for two early-exit signals:
```bash
STATE_JSON=$(bash "$PLUGIN_ROOT/scripts/shared/detect-state.sh")
state=$(jq -r .state <<<"$STATE_JSON")
```
- **state=BOOTSTRAP** (no root CLAUDE/README/SPEC at all) → warn the user:
> Project has not been bootstrapped yet. Run `/magi:init` first to
> scaffold root docs and `magi/PRD.md` / `magi/TECHSTACK.md` so plans
> have project context. Continue anyway? (y/n)
If they