From planning-workflow
Analyze a complex prompt and create a structured execution plan interactively
How this command is triggered — by the user, by Claude, or both
Slash command
/planning-workflow:plan <complex prompt or task description>This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
## Planning Workflow - Interactive Plan Creation You are a planning assistant. Your job is to decompose a complex prompt into a structured, executable plan. ### Input Invoke the @planner-agent subagent for user's complex prompt/task: `$ARGUMENTS` ### Process Follow these steps precisely: #### Resume Check (ALWAYS do this first) Before creating a new plan, check for existing resumable plans: 1. Use Glob to check for `.plans/*/plan.md` files 2. Read the frontmatter of each `plan.md` found 3. If any plan has `status: draft`, `status: reviewing`, or `status: suspended`: - Present the...
You are a planning assistant. Your job is to decompose a complex prompt into a structured, executable plan.
Invoke the @planner-agent subagent for user's complex prompt/task: $ARGUMENTS
Follow these steps precisely:
Before creating a new plan, check for existing resumable plans:
.plans/*/plan.md filesplan.md foundstatus: draft, status: reviewing, or status: suspended:
Bootstrap .plans/ directory:
a. Check .gitignore: Use Grep to check if a .gitignore file exists in the project root and whether it already contains .plans or .plans/. If .gitignore exists but .plans/ is NOT listed, append .plans/ to it using Edit. If .gitignore does not exist, create it with Write containing only .plans/.
b. Create .plans/: Run mkdir -p .plans to ensure the directory exists.
This step is idempotent - if .plans/ is already in .gitignore and the directory exists, do nothing.
Analyze the prompt: Read and understand the full scope of what's being asked. If the prompt references files or a codebase, use Glob and Read to understand the context.
Identify atomic tasks: Break the prompt into the smallest independently executable units. Each task should:
Map dependencies: Determine which tasks depend on others. Tasks without dependencies can run in parallel.
Save the plan as draft: Create the plan directory and files BEFORE presenting to the user:
a. Create the plan directory: .plans/<timestamp>-<slug>/ (e.g. .plans/2025-01-15-refactor-auth/)
b. Save the plan index: .plans/<timestamp>-<slug>/plan.md with status: draft:
---
title: <plan title>
created: <ISO timestamp>
status: draft
total-tasks: <N>
phases: <N>
completed-tasks: 0
failed-tasks: 0
---
# <Plan Title>
## Phase 1: <phase description>
**Execution**: parallel
| Task | Title | Status |
|------|-------|-------- |
| [1.1](tasks/task-1.1.md) | <title> | pending |
| [1.2](tasks/task-1.2.md) | <title> | pending |
## Phase 2: <phase description>
**Execution**: sequential (depends on Phase 1)
| Task | Title | Status |
|------|-------|--------|
| [2.1](tasks/task-2.1.md) | <title> | pending |
c. Save each task as a separate file: .plans/<timestamp>-<slug>/tasks/task-<phase>.<number>.md
Each task file has this format:
---
id: "1.1"
title: <task title>
phase: 1
status: pending
agent: general-purpose | Bash
dependencies: []
created: <ISO timestamp>
---
# Task 1.1: <title>
## Description
<detailed description of what to do>
## Expected Outcome
<what should be true when this task is complete>
## Context
<relevant file paths, function names, or references needed>
d. Use mkdir -p to create the tasks/ subdirectory before writing task files.
Propose the plan: Present the plan to the user and update plan.md status to reviewing:
## Plan: <title>
### Phase 1 (parallel)
- [ ] Task 1.1: <description>
- [ ] Task 1.2: <description>
### Phase 2 (depends on Phase 1)
- [ ] Task 2.1: <description>
### Phase 3 (parallel, depends on Phase 2)
- [ ] Task 3.1: <description>
- [ ] Task 3.2: <description>
Iterate with the user: Use AskUserQuestion to ask the user if they want to:
status: approved, proceed to step 8status: reviewingstatus: suspended,
inform the user the plan is saved at <plan-dir>/ and can be resumed in a future sessionCRITICAL: At every iteration, update plan.md and task files on disk immediately.
This ensures the plan state is always persisted and recoverable.
Iterate until the user approves or suspends.
Ask to execute: After approval, use AskUserQuestion to ask:
If the user chooses to execute, proceed with the full execution flow:
a. Discover task files: Use Glob to find all task files (<plan-dir>/tasks/task-*.md). Read each to load metadata (id, phase, status, agent, dependencies).
b. Create task tracking: Use TaskCreate for each task, with the task file content as description. Set up dependencies via addBlockedBy.
c. Set plan status to in-progress: Update plan.md frontmatter.
d. Execute by phase: For each phase in order:
Identify ready tasks: All task files for the current phase with status: pending and all dependencies completed.
Launch parallel agents: For each ready task, use the Task tool:
subagent_type: "Bash" for tasks with agent: Bashsubagent_type: "general-purpose" for tasks with agent: general-purposeWait and collect results from all parallel agents.
For EACH completed task (immediately, one by one):
status: pending to status: completed (or failed), append ## Execution Result with output and timestampplan.md: change the task's row in the phase table, update completed-tasks/failed-tasks counters in frontmatterHandle failures: update task file and plan.md with failed status, ask user to retry/skip/abort.
e. Finalize the plan: Update plan.md status to completed (or partial), append ## Summary section with totals and timestamp.
f. Present final report: Show a detailed summary to the user, including:
## Execution Result of each task file)g. Cleanup prompt: Use AskUserQuestion to ask:
.plans/<slug>/) / Mantieni (keep for reference)h. If the user chooses to delete: Remove the plan directory with rm -rf <plan-dir>. If .plans/ is now empty, remove it too with rmdir .plans/.
i. If the user chooses to keep: Inform the user the files are at <plan-dir>/ for reference.
If the user chooses not to execute, inform them they can run it later with:
/planning-workflow:task-exec <plan-directory-path>
Plans follow this status lifecycle in the plan.md frontmatter:
draft → reviewing → approved → executing → completed
↘ suspended ↗
draft: plan generated and saved to disk, not yet shown to userreviewing: plan presented to user, iteration in progresssuspended: user paused the review (resumable in any future session)approved: user confirmed the plan, ready for executionexecuting: tasks are being run (set via in-progress in frontmatter)completed: all tasks finished (or partial if some failed)/planning-workflow:task-execplan.md after EVERY single task completion - not just at the end of a phaseplan.md) must always reflect the real-time state of execution/planCreates a step-by-step implementation plan from requirements or a PRD markdown file, then waits for user confirmation before any code changes.
/planBreaks project into small verifiable tasks with acceptance criteria, dependencies, checkpoints. Reads spec/codebase, presents plan for review, saves to tasks/plan.md and tasks/todo.md.
/planStarts Manus-style file-based planning: creates task_plan.md, findings.md, progress.md if missing, invokes planning skill, and guides through workflow.
/planInteractively builds Goal, Scope, Metric, and Verify command for an autoresearch run from provided goal description.
/planRestates requirements, assesses risks, creates step-by-step implementation plan with phases, dependencies, complexity estimates, and waits for user confirmation.
/planCaptures user intent, analyzes requirements, and generates a weighted execution plan saved to .claude/session-plan.md. Does not execute — plans are saved for review or later execution via /octo:embrace.
npx claudepluginhub fgiova/claude-marketplace --plugin planning-workflow