name: plan description: Turns a request into a typed, sized plan and a handoff file before any code is written. Picks the life-cycle phases the task needs. argument-hint: "" disable-model-invocation: true
Plan $ARGUMENTS. Do not write product code in this step. With no argument, take the first
task not yet planned from the spec list in <workflowDir>/specs/ and say which.
- Read the project's CLAUDE.md rules,
.claude/dev-workflow.jsonand<workflowDir>/lessons.mdif present. Find the relevant code with Grep and read only the line ranges you need. A wide search goes to thedev-workflow:scoutagent, started with thescoutmodel (python3 <plugin folder>/hooks/dw.py models --project <project root>, the plugin folder being two levels above this file). - Pick the task's
Typefromtracks.mdbeside this file:chore,bug,feature,refactor,dependency,data,hotfixorspike. The type decides which phases the task goes through and so which headings the handoff file gets. If the request is a feature too large for one sitting, stop and suggest/dev-workflow:specinstead. - Write
<handoffDir>/<slug>.md(handoffDirfrom.claude/dev-workflow.json, defaultdocs/handoff), a few lines per heading:Type,Departments(from../../departments/index.md, only those in the project'sdepartmentslist in.claude/dev-workflow.jsonwhen it has one: the ones the task needs,engineeringwhen none fits better),Goal(the outcome of what was asked, not the steps: "fix this crash" becomes "this crash no longer happens, proved by a test that reproduced it"), then the headings the track asks for fromAcceptance criteria(checkable, each with how it will be proved),Out of scope,Design,Standards,Files(the only paths the work may touch; in a workspace of several repositories, grouped by repository, provider before consumer),Tests first,Rollback,Size,Risks; then alwaysStatus(planned) andNext step. Every type exceptchoreandspikegetsStandards: read the sections of~/.claude/dev-workflow/standards.mdthe change touches, then write the data model, RBAC rules, validation schema and edge cases, and each applicable rule with how it will be met (or why it cannot apply here). Rules that need a test become acceptance criteria. Leave out headings the track skips. Except for achoreor aspike, run an expert check before settling the criteria, in your head, not in the file: what raw evidence would the best practitioner of this work start from (logs, real data, a reproduction); what outside the model proves the result (a test, a measurement, a tool's output); and what would they do that the request does not ask for. The first two shape the criteria and their proof. Anything beyond the request is never a criterion on your own say: ask the user in step 6, recommended option first, or list it underOut of scopeas a suggestion. A result is never judged by a model's own opinion of it. - Set
Sizeto one of three, with a one-line reason. It picks the model that builds the task (build.<size>in the project'smodels; the defaults are below):straightforward: the change is fully specified, follows a pattern already in the code, touches a few files in one module, and is in the lowest risk tier (no authentication, money, personal data, migrations or public interfaces). Built on Sonnet.standard: everything else that has a clear plan. Built on Opus.hard: unclear design, several modules, or a bug with no known cause. Get the advisor's advice first (the architect only when the Design heading records a decision that crosses modules), then build on Opus. When unsure between two, take the larger. Then runpython3 ../../hooks/dw.py estimate --type <Type> --size <Size> --exclude <slug>from this file's folder and write the line it prints into the handoff file as is, underSize(Expected cost: ..., ornone yetuntil there are enough past tasks). The line itself says it is for the user, not a limit: keep that wording.
- If the track asks for a design and it is a real trade-off or crosses module boundaries, run
/dev-workflow:adviseon it before going further. If the change touches a path insensitivePaths, say so underRisks: the review will include a security review. - Ask the user only for decisions that are theirs (AskUserQuestion, recommended option
first). Then report the file path, the type and size, and the next step
(
/dev-workflow:build <slug>) in 3 lines.