Feature planning in Claude Code: from a one-line request to a verified plan
PLFeature planning in Claude Code turns a vague request into a plan that can be verified before any code changes. Plan mode lets Claude read the codebase while edits stay blocked. Claude then runs a requirements interview, drafts acceptance criteria, and writes a phased plan. A fresh session then audits the plan against the code before anyone approves it.
Your product manager posts one line in Slack: “Workspace admins should be able to invite teammates by email.” There is no spec. Nobody has said what happens when the invitee already has an account, when the workspace is out of seats, or when an invitation link is forwarded. This page is for the developer who owns that feature, and for the tech lead who signs off on the plan before an agent builds it.
What this workflow gives you
Section titled “What this workflow gives you”- A plan-mode session setup, with the effort level and model chosen on purpose rather than by habit.
- Six copy-paste prompts: explore the code, run the requirements interview, write acceptance criteria, write the phased plan, audit the plan in a fresh session, and research scope with subagents.
- A sign-off table that says which check proves each part of the plan and who approves it, so nobody has to re-read the whole plan line by line.
- Recovery steps for the ways planning sessions go wrong: plans that are too vague, invented file paths, interviews that loop, and context that runs out.
How do you start a feature-planning session in Claude Code?
Section titled “How do you start a feature-planning session in Claude Code?”Plan mode is the plan permission mode. Claude can read files and run the commands that are approved for it, but it cannot edit project files until you approve a plan. That is the property you want while the requirements are still wrong.
-
Start a named session in plan mode. In your terminal, run:
Terminal window claude --permission-mode plan -n invites-planning-n(--name) sets the display name that the/resumepicker shows, so you can find the session again next week. In a session that is already running, pressShift+Tabuntil the mode indicator shows plan mode, or type/planfollowed by the request. From v2.1.283, interactive sessions start in auto mode on supported models, soShift+Tabcycles through more modes than before. -
Keep the default model and tune effort first. Claude Opus 5.5 is the Claude Code default on every paid plan from v2.1.280, and it runs at
mediumeffort by default. For a feature with real ambiguity, such as invitations that touch auth, billing, and email, raise effort with/effort highbefore you consider changing model. Switch to Claude Fable 5.1 (/model fable) only when your own comparison shows Opus at higher effort falls short. Theopusplanalias uses Opus in plan mode and Sonnet for execution if you want a cheaper build phase. Versions and prices live on the models hub, and deep reasoning and effort levels explains the effort trade-off. -
Decide where plans are saved. By default Claude Code writes plan files under
~/.claude/plans/, outside your repository. To keep plans next to the code, where they can be reviewed in a pull request, setplansDirectoryin.claude/settings.json:{"plansDirectory": "docs/plans"}The path is relative to the project root and must stay inside it (checked against the v2.1.283 settings schema).
-
Pull in the ticket, if it lives in a tracker. An MCP server saves you from pasting requirements by hand. For Jira and Confluence, the Atlassian remote server is added from your terminal:
Terminal window claude mcp add --transport http atlassian https://mcp.atlassian.com/v2/mcpThen run
/mcpin the session to sign in. Other trackers and the security trade-offs are in MCP setup for Claude Code.
Explore the code before you plan anything
Section titled “Explore the code before you plan anything”The most common planning failure is a plan written against an imagined codebase. Start by making Claude show you what exists, with evidence you can spot-check in seconds.
Open two or three of the cited lines yourself. If a citation is wrong, stop and correct the session before planning. Every later step inherits the error.
Let Claude interview you about the requirements
Section titled “Let Claude interview you about the requirements”You do not know every question to ask, and the ones you miss become production bugs. Ask Claude to interview you with the AskUserQuestion tool, which presents questions with selectable answers in the terminal instead of a wall of text.
A good interview produces questions like these, each tied to a line of your code:
- “
membershipshas a unique index on(user_id, workspace_id). Should inviting an existing member be a no-op, an error, or a resend?” - “Seats are counted in
billing/seats.tsat checkout only. Should a pending invitation reserve a seat?” - “Magic-link tokens in
auth/tokens.tsnever expire. Should invitation tokens reuse that code, or have their own expiry?”
Answer in the terminal. When you answer “not sure”, tell Claude to record the question under open questions rather than invent an answer.
Turn the answers into acceptance criteria before the plan
Section titled “Turn the answers into acceptance criteria before the plan”Acceptance criteria are the part of the plan a human approves instead of the diff. Write them before the implementation plan. Otherwise the plan quietly decides the behaviour for you.
The product owner or the feature’s owner approves this list. The full practice, including turning each scenario into a failing test that the implementing agent cannot edit, is in executable acceptance criteria.
Write a phased plan that ships in slices
Section titled “Write a phased plan that ships in slices”Now ask for the plan itself. The prompt forces the three properties that make a plan executable by an agent and checkable by you: named files, independent phases, and a verification command for every phase.
When Claude presents the plan, you can approve it, keep planning, or edit it. Press Ctrl+G to open the plan in your default text editor. Cut scope you want to defer, reorder phases, and add notes, then save and close the editor. Claude continues from your edited version.
Plan files get a generated name. The audit and resume prompts below read docs/plans/team-invitations.md, so give the plan that stable path before you approve it, as the caution below shows, or rename the file yourself afterwards.
How do you verify the plan without reading every line?
Section titled “How do you verify the plan without reading every line?”A plan is a set of claims about your codebase: “this file exists”, “this function is the only place seats are checked”, “phase 2 does not depend on phase 3”. Each claim has a cheap check. Run the checks in a fresh session, because a session that wrote a claim tends to confirm it.
Start it with claude --permission-mode plan in a new terminal. Send WRONG and MISSING rows back to the planning session, and repeat until the audit is clean. Then use this table to decide who signs off on what:
| Part of the plan | How it is checked | Who signs off |
|---|---|---|
| Acceptance criteria | Read in full; they are short by design | Product owner or feature owner |
| File paths and cited code | Fresh-session audit, rows 1 and 5 | Nobody, if the audit is clean |
| Coverage of criteria by tests | Audit row 2, then failing tests written before phase 1 | Developer |
| Phase order and rollback | Audit rows 3 and 4 | Tech lead, for plans with more than one migration |
| Completeness of scope | Subagent search, audit row 6 | Developer spot-checks two findings |
The human reading is concentrated on the acceptance criteria and the open questions. Everything else is checked by a tool or by an independent session, and during implementation by the tests and gates each phase names. The wider practice is described in reading evidence instead of code.
Research scope with subagents
Section titled “Research scope with subagents”On a large codebase the planning session fills up with exploration output. Delegate the searches to subagents, which run in their own context and return only a summary. Explore and Plan are built-in subagents; for your own instructions and tool limits, see custom subagents.
Plan across several sessions without losing decisions
Section titled “Plan across several sessions without losing decisions”Large features take more than one sitting. Resume the named session later with claude --resume invites-planning, which opens the session picker filtered by that search term. Rename a running session with /rename.
If the session has become heavy with exploration output, run /compact Keep the decisions, acceptance criteria and open questions or start fresh from the saved files:
Read docs/plans/team-invitations.md. It holds the acceptance criteria,the phased plan and the open questions from earlier planning sessions.List the open questions first, then tell me which phase is ready tostart and which failing tests must exist before it does.The plan file, not the conversation, is the source of truth. If you keep specs as long-lived documents that every pull request updates, follow spec-driven development. For the lighter PRD-to-todo-list flow, see PRD to plan to todo.
What breaks when you plan features with Claude Code?
Section titled “What breaks when you plan features with Claude Code?”The plan is too high-level to act on. Phases read like “add invitation logic”. Recovery: “For each phase, name the exact files and describe each change in one sentence. If you cannot name the file, say which search you need to run.” A plan that cannot name files was written before the code was explored; go back to the exploration prompt.
The plan cites files or functions that do not exist. Claude filled a gap with a plausible name. Recovery: the fresh-session audit catches this. Treat any WRONG path as a sign that the surrounding section is also unverified, and re-run exploration for that area.
The interview loops or asks what the code already answers. Recovery: “You already asked about X. The code answers Y at path:line. Move on to the areas we have not covered: seat limits and token reuse.”
The plan invents a new pattern. It proposes a new queue library or a new permissions model when the codebase already has one. Recovery: “Follow how we implemented <closest feature>. List every place your plan departs from it, and justify each one or remove it.”
Effort is too low for the ambiguity, or too high for the task. At medium, a plan for a cross-cutting feature can skip edge cases; at xhigh, a small change burns time and usage. Recovery: raise effort with /effort high for the interview and the plan, and drop back with /effort medium for small, well-understood features. Change model only when your own comparison says so.
The session approves the plan and starts coding before you are ready. Recovery: press Esc to stop, then /rewind (or Esc twice on an empty prompt) to return to the point before the edits. Next time, choose the keep-planning option and ask Claude to write the plan and stop, instead of approving.
Context runs out halfway through planning. Recovery: save the plan file, run /compact with an instruction to keep decisions and open questions, or start a fresh session from the plan file.
Where to go next after the plan is approved
Section titled “Where to go next after the plan is approved”Working in another tool? The planning stage for Codex is in planning with Codex, and for Cursor in planning with Cursor. The rest of this stage is in the Claude Code planning overview.