with one click
workflow-plan
Create implementation plans from requirements
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Create implementation plans from requirements
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Backlog-scale orchestration on top of /workflow — drives PM items through refine → plan → implement → review → local-merge via role-specialized sub-agents dispatched in parallel waves, each item isolated in its own git worktree. Bare /swarm summarizes state; /swarm <goal> runs the orchestrator; /swarm:setup sets up the charter and .agent-tools/ umbrella; /swarm:continue resumes a paused run.
Capture durable knowledge from any engineering work — debugging solutions, refactors, features, design decisions, reusable patterns — and maintain memory quality so each unit of work compounds the next
Principal workflow entry — resolve portfolio mode (swarm resume/handoff or unit state machine), drive work without inventing path; hard-stop when path is not established
Initialize and maintain planning root (.agent-tools/planning preferred), conventions (tracks, gates, integration), runs ledger scaffold, and shared memory under .agent-tools/memory/ (AGENTS.md memory-link) for the workflow family.
Parent skill for the workflow family — principal session entry is /workflow:continue (also bare /workflow). Horizon mapping, brainstorm, refine, plan, execute, review, audit, compound. Vertical-slice and deliverable-partition modes.
Detect gaps in the canonical skill corpus, propose targeted improvements, validate changes, and present for review. Inventories src/** skill trees; optional run-ledger seeds for process IP gaps.
| name | workflow:plan |
| description | Create implementation plans from requirements |
| argument-hint | [--worktree] [requirements.md path, work item ID (LIN-123, PROJ-456), or feature description] |
| user-invocable | true |
Transform requirements into actionable implementation plans with task breakdowns and technical decisions.
Note: For discovering and refining requirements, use /workflow:refine first. This command expects clear
requirements as input.
$ARGUMENTS
Before interpreting input, extract the --worktree flag if present:
--worktree in $ARGUMENTSWORKTREE_MODE=true and strip --worktree from $ARGUMENTS before passing to Input DetectionWORKTREE_MODE=falseValidation (stop with error if any fail):
git rev-parse --show-toplevel differs from the main repo root (i.e., CWD is already a worktree), error:
ERROR: Already inside a git worktree. Cannot nest worktrees.
Run /workflow:plan without --worktree from this worktree.
If input is empty, check for existing context based on requirements source mode (see below):
./planning/*/requirements.md files. If found, list them and ask which to plan.Parse input to determine source type:
| Pattern | Source Type | Action |
|---|---|---|
./planning/<project>/requirements.md | Requirements doc | Load requirements, create implementation plan |
./planning/<project>/ | Planning directory | Load requirements.md from directory |
LIN-[0-9]+ | Linear issue | Fetch via Issue Retrieval Strategy — treat as requirements |
[A-Z]+-[0-9]+ | Jira ticket | Fetch via Issue Retrieval Strategy — treat as requirements |
http(s):// | URL | Fetch via Issue Retrieval Strategy if PM URL, else WebFetch — treat as requirements |
| Directory path | Existing plan | Load and review |
| Text | Feature description | Use directly (suggest /workflow:refine for complex features) |
For text input: If the description is vague or complex, suggest: "This sounds like it might benefit from
requirements discovery. Would you like to run /workflow:refine first to clarify requirements?"
Determine whether this planning session uses file mode or PM mode. Follow the detection logic from
@workflow (planning/pm-integration.md):
./planning/<project>/requirements.md exists → file mode. If absent and an issue key is
available → PM mode..claude/settings.json for PM system indicators. If found and
invocation is ambiguous, default to PM mode.State the determination to the user and allow course correction.
Implementation plan shape depends on decomposition mode (selection criteria in @workflow; full doctrine in @workflow (references/decomposition-modes.md)):
/workflow:refine and a mode was recorded, use that mode.State the determination to the user and allow course correction:
"I'll plan in [vertical-slice / deliverable-partition] mode. [Reason]. Say 'use [other] mode' if you'd prefer."
Use the Variant A/B breakdown template from @workflow (planning/templates.md) › Implementation Plan Document Template matching the selected mode.
# Check for existing planning
ls ./planning/ 2>/dev/null
# Get project name from git or directory
basename $(git rev-parse --show-toplevel 2>/dev/null || pwd)
# Check for PM tool configuration
cat .claude/settings.json 2>/dev/null | grep project_management
Run parallel exploration using sub-agents to understand context:
Codebase Analysis (Task: Explore):
Requirements Analysis:
Technical Research (if needed):
Using the Codebase Analysis output above, ask one question before breaking down the change: given the current shape of the code, is the change hard? If a behavior-preserving structural refactor would make the upcoming change small and safe, that refactor is prefactoring — "make the change easy, then make the easy change" (Kent Beck, Tidy First).
When prefactoring applies, capture it as enabling work that runs first (see Implementation Order). Hold it to these guardrails:
If requirements source is file mode:
blocks / blocked_by /
parallelizable_with from the requirements' Dependencies section (written by
/workflow:refine Phase 3.5)If requirements source is PM mode:
parallelizable_with note/label as dependency metadatarequirements.mdPresent requirements summary and ask:
/workflow:refine first to clarify requirements?"Surface dependency declarations. Echo back the blocks / blocked_by /
parallelizable_with relationships found (or note their absence) and let the user confirm or
adjust. These are written to the plan's frontmatter (below) so downstream orchestration
(/swarm) can schedule parallel waves safely.
Proceed to implementation planning once requirements are confirmed.
For task breakdown patterns, see @workflow (planning/task-breakdown.md).
Do not write files to disk yet — present for approval first (§Plan Approval Gate).
Target: ./planning/<project>/implementation-plan.md
Load and fill @workflow (planning/templates.md) › Implementation Plan Document Template
(frontmatter with blocks / blocked_by / parallelizable_with, Approach through Definition of Done,
Variant A vertical-slice or Variant B deliverable-partition breakdown). Empty dependency lists when none.
In deliverable-partition mode the breakdown carries parent ACs, AC traceability matrix, verbatim AC inheritance per sub-issue, and gap-prevention before parent epic close.
Do not write until approved. Target: ./planning/<project>/session-state.md.
Load Session State Template (plan-time) from @workflow (planning/templates.md):
session_count: 0, status: planned, progress zeros, Status awaiting approval, Next Steps → execute.
For PM-specific workflows, reference @workflow (PM integration)
Do not update PM tools until the user approves the plan (see §Plan Approval Gate). Once approved, apply the plan-time status update for the detected PM tool — status → In Progress plus a planning-complete comment/link. The Linear/Jira MCP calls and the manual fallback live in @workflow (planning/pm-integration.md) › Plan-Time Status Update.
Before presenting the plan for approval, review the slices and task breakdown holistically:
Ask yourself: Is there one reordering, simplification, or addition that would significantly increase value or reduce risk?
If a high-leverage insight surfaces:
### Key Insight
[Description of the high-leverage change and why it matters]
If nothing surfaces, proceed without comment — this step should add signal, not noise.
After the draft implementation plan is complete and the leverage check is done — before the Plan Approval Gate — optionally publish an interactive visual plan so the user can review direction more easily.
Load and follow @workflow (planning/references/visual-approval.md). Summary contract:
implementation-plan.md as the executable source of truth for execute, continue, or swarm.planning/conventions.md › Visual plan approval when
that section exists (never | on-substantial | always). Missing section keeps the
built-in default on-substantial — other project overrides (merge policy, tracks, PM) do
not turn visual plan off. See @workflow (planning/references/visual-approval.md).visual_plan: skipped — <reason> and proceed to the approval prompt. Never block the
gate; never invent a faux-visual wall of chat markdown as a substitute Plan surface.On success, keep the returned absolute URL or local plan dir for the approval prompt and for session-state after approve.
CRITICAL: When planning is complete, you MUST stop and present the plan to the user for approval. NEVER begin execution, save planning documents, or update PM tools until the user explicitly approves the plan. This is a hard gate — no exceptions.
Show the plan summary and ask the user to approve, using the Plan Approval Prompt from @workflow (planning/templates.md). It summarizes project, source, approach, slices with task counts, required vs out-of-scope task counts, and key technical decisions; states where the plan will be saved; includes the Visual plan link or skip line when the visual-approval step ran; and offers exactly three options: 1. Approve & Save, 2. Approve & Execute, 3. Revise.
The three options always approve or revise the markdown implementation plan that will be saved. The visual surface is optional context for that decision — not a fourth option and not execute input.
STOP HERE and wait for the user's response. Do not take any further action until the user explicitly chooses an option. This includes:
When the user approves (option 1 or 2), finalize the planning artifacts:
WORKTREE_MODE=true)Create an isolated worktree before saving planning docs:
./planning/my-project/ → my-project)REPO_ROOT before entering the worktree (once inside, git rev-parse --show-toplevel returns the worktree root):
REPO_ROOT=$(git rev-parse --show-toplevel)
Use the agent's worktree creation mechanism (see @git (worktree-create))
git branch -m <type>/<issue-key or description>
Use the Branch Naming Convention from @workflow.node_modules/ and/or Python deps. REPO_ROOT is already captured; CWD is inside the worktree. Warn on failure, never block.WORKTREE_PATH to the current working directory for use in session-state.md.Worktree exit prompt: Respect your agent's worktree exit behavior (see @git (worktree-create) and @git (worktree-delete)). In parallel workflows, prefer keeping the worktree until after merging. See Worktree Safety Rules in @workflow (references/parallel-worktrees.md).
WORKTREE_MODE=false)If not using worktree mode, create a working branch:
# Check current branch
current=$(git branch --show-current)
# If on main/master, create and switch to working branch
if [ "$current" = "main" ] || [ "$current" = "master" ]; then
git checkout -b <type>/<issue-key or description>
fi
Use the Branch Naming Convention from @workflow. The branch name MUST match what will be recorded in session-state.md.
./planning/[project]/implementation-plan.md — this remains the only executable plan artifact for execute/continue/swarm../planning/[project]/session-state.md — include the worktree: field set to WORKTREE_PATH when in worktree mode; omit it otherwise. Include visual_plan: when a visual surface was published or explicitly skipped (schema in templates / visual-approval reference).WORKTREE_MODE=true)Planning docs must be committed inside the worktree so they're available for execution:
git add ./planning/[project]/
git commit -m "docs: add planning for [project]"
Update PM tool if applicable (see §PM Tool Integration above).
Confirm paths written (implementation-plan.md, session-state.md), branch name, worktree path if any,
visual plan URL/dir or skip reason if recorded, and PM update summary if applicable.
Only when the plan has 2+ independent slices/stories, present the matching prompt from @workflow (planning/templates.md) › Parallel Execution Prompts (plan-time):
WORKTREE_MODE=true — docs already committed in this worktree: run /workflow:execute ./planning/[project]/ here (auto-detects the worktree), plus --worktree sessions in new terminals.WORKTREE_MODE=false — includes the parallel-groups table and the commit-planning-docs-first prerequisite before starting --worktree sessions.If the user chose "Approve & Save" (option 1) — stop here. The plan is saved and the user will decide when to start execution in their own time. Remind them:
If worktree exists:
When you're ready to implement, run `/workflow:execute ./planning/[project]/` from this worktree.
Execute will detect the worktree automatically — no `--worktree` flag needed.
If no worktree:
When you're ready to implement, run: `/workflow:execute ./planning/[project]/`
To execute in an isolated worktree, use: `/workflow:execute --worktree ./planning/[project]/`
If the user chose "Approve & Execute" (option 2) — proceed to the Execution Handoff below.
This section applies ONLY after the user has approved the plan AND explicitly requested execution (option 2 above, or a later request like "start implementation", "run /workflow:execute", "go ahead and build it").
Invoke /workflow:execute with the planning directory:
/workflow:execute ./planning/[project]/
If a worktree was created during planning, execute will detect it automatically from the worktree: field in session-state.md — no --worktree flag needed.
If continuing in the same conversation, follow the execution skill's own sections directly rather than re-deriving them here: display the Session Context (execute §Context Review), initialize TodoWrite from implementation-plan.md, run the Execution Loop (execute §Execution Loop), hold the Quality Gates (execute §Quality Gates), and commit per story/slice with issue reference + PM update (execute §Story / Slice / Sub-issue Completion Checkpoint). /workflow:execute is the source of truth for each step.
references/decomposition-modes.md)Before presenting plan for approval:
In file mode, refine produces ./planning/<project>/requirements.md — plan consumes it. In PM mode, refine updates the PM issue — plan fetches requirements from it. Run refine first for complex features; plan accepts the output directly in either mode.
Plan produces implementation-plan.md and session-state.md — execute consumes both. The Execution Handoff section provides the bridge. Execute does not read the visual plan.
Optional pre-approval presentation. Contract: @workflow (planning/references/visual-approval.md).
Continue routes to /workflow:plan as usual; no separate continue stage.
Plan creates/updates work items after user approval. See @workflow (planning/pm-integration.md) for tool-specific workflows.
Audit findings (P1 items) can feed into planning as requirements for the next cycle.