Plan Feature
Explore the codebase and produce an implementation plan for a feature.
Explores the codebase read-only and writes an implementation plan for a feature. It restates the request, maps the affected files and the closest existing pattern with Read, Grep, and Glob, then delivers a plan covering assumptions, approach, trade-offs, risks, ordered steps, and a test plan, citing real paths.
Install to ~/.claude/commands/plan-feature.md
npx agentscamp add commands/plan-featureScope
Treat $ARGUMENTS as the feature request — what the user wants to build (add CSV export to the reports page, support OAuth login, rate-limit the public API). Restate it in one sentence to confirm you understood it before planning.
If $ARGUMENTS is empty, ask one focused question: "What feature should I plan?" Do not guess a feature out of thin air.
WARNING
Read-only mode. Do not modify the repository, run migrations, install packages, or scaffold code. Your only output is the written plan. If the user wants you to start building, that is a separate follow-up.
NOTE
Where the request is ambiguous (auth provider, storage backend, UI placement, scope boundaries), state your assumptions explicitly and plan against them rather than stalling. Flag each assumption so the user can correct it.
When to use
- Before building a feature that touches more than one or two files, when you want the approach reviewed before any code exists.
- When you are new to the codebase and need to know where a change belongs.
- Not for a change you can already describe file by file: just make it. Not for splitting an agreed plan into tickets: use /breakdown-task.
Step 1 — Understand the request
Break the feature into concrete capabilities and acceptance criteria before touching the code.
- What is the user-facing behavior when this is done? What is the smallest version that ships value?
- What is explicitly out of scope? Name it so the plan stays bounded.
- What existing behavior must not break?
Step 2 — Explore the code to ground the plan
A plan written without reading the code is a guess. Map the feature onto the real structure before proposing anything. You only have Read, Grep, and Glob here — explore with those, not the shell:
- Orient first:
ReadREADME.md,package.json, andCLAUDE.mdfor project type, scripts, conventions, and the test/lint/typecheck commands. UseGlob(e.g.src/**/*.ts,**/routes/**) to see how the tree is laid out. - Find the area the feature touches:
Grepfor terms drawn from$ARGUMENTS(e.g.export|report|download) to locate the relevant files. Map the entry points, data flow, and layers the feature crosses (routes, services, models, UI). - Find a pattern to mirror:
Grepfor the shape of similar existing features (e.g.router\.|app\.(get|post)|export function), thenReadthe closest existing feature end to end. The cleanest plan usually copies an established pattern rather than inventing one.
Step 3 — Write the plan
Output the plan in this structure. Be specific — cite real file paths and symbols you found in Step 2, not placeholders.
## Plan — <one-line feature summary>
### Assumptions
- <each ambiguity you resolved, and how>
### Affected files & modules
- `path/to/file.ts` — <what changes and why>
- `path/to/other.ts` — <new function / modified signature>
### Proposed approach
<2-4 paragraphs describing the design: data flow, where new code lives,
how it hooks into existing patterns, and the public interface.>
### Trade-offs & alternatives
- **Chosen:** <approach> — <why it wins here>
- **Alternative:** <other option> — <why rejected / when it would be better>
### Risks & unknowns
- <thing that could break, perf concern, migration risk, or open question>
### Implementation steps
1. <smallest first, each independently reviewable>
2. ...
### Test plan
- <unit / integration tests to add, key cases & edge cases>
- <how to verify manually; commands to run>Report
Deliver the plan as your message — it is the whole deliverable. Keep it tight enough to read in one pass, specific enough to start coding from immediately, and end with the single recommended first step. Remember: no files were changed; this is a plan to act on, not the action. When the feature needs a spec an agent can execute, with testable acceptance criteria and a traced task list, use /spec instead.
Filed under
Related
- CommandBreakdown TaskDecompose a task into an ordered checklist of small, verifiable steps.
- AgentSystem ArchitectUse this agent for high-level system design — service boundaries, data flow, scaling, trade-offs. Examples — designing a new system, evaluating a monolith-to-services split, a scalability review.
- CommandEstimate EffortProduce a grounded effort and complexity estimate for a task by exploring the codebase read-only.
- CommandWrite Design DocExplore the codebase and write a decision-oriented design doc / RFC for a feature or system change.
- GuideBest Spec-Driven Development Tools in 2026GitHub Spec Kit, Kiro, OpenSpec, Taskmaster, BMAD Method, Agent OS and cc-sdd compared on workflow, artifacts, agent support and how much process each adds.
- GuideBuilding Multi-Step Agent WorkflowsPatterns for building multi-step agent workflows in Claude Code: decompose tasks, fan-out to parallel subagents, verify every step, and orchestrate.
- SkillMvp Scope CutterCut a feature list or PRD down to a ruthless version one: a keep / cut / later table with a one-line reason per row, plus the single smallest thing you could build to test the riskiest assumption. Use when first-release scope keeps growing, when an AI app builder session has produced more features than you can validate, or before you commit money or engineering time to a build.
- ToolSpec KitGitHub's open-source toolkit for spec-driven development — a specify CLI and /speckit slash commands that walk any coding agent from spec to implementation.