Skip to content

commandWorkflow

Plan Feature

Plans a feature before any code is written: files to touch, ordered steps, risks and the exact checks that prove it works.

npx workspacetemplates add plan-feature --tool claude-code

Writes 1 file to .claude/commands/

.claude/commands/plan-feature.md18 lines · 1.1 KBFile
---
description: "Plans a feature before any code is written: files to touch, ordered steps, risks and the exact checks that prove it works."
argument-hint: "<feature description>"
---

Plan this feature without writing code: $ARGUMENTS

1. Restate the goal in two sentences and list what is out of scope. If the request is ambiguous, ask up to three questions first and wait.
2. Explore: find the closest existing feature, read its entry points, data model, tests and routes. Note naming and layering conventions.
3. Produce the plan:
   - **Files**: each file to create or change, with one line on why.
   - **Steps**: ordered, each small enough for one commit, each leaving the build green.
   - **Data and API changes**: schema, migrations, contracts, feature flags.
   - **Risks**: what could break, who depends on it, what is irreversible.
   - **Verification**: tests to add, commands to run, and a manual check.
4. Name one simpler alternative and why you did not pick it.

Keep the plan under one page. End with "Approve this plan, or what should change?" Do not edit any file or run migrations before approval.

What it does

Starting to code before the shape is clear leads to rewrites. This command reads the relevant parts of the repository first and then lays out a plan grounded in the code that actually exists.

The plan is a short document you can edit or approve. No files change until you say go.

Example

you › /plan-feature let users export their invoices as CSV

agent › Goal: authenticated export of one account's invoices. Files: routes/invoices.ts, services/exportCsv.ts (new), tests/exportCsv.test.ts. Steps: 1 service with streaming, 2 route and auth, 3 tests. Risk: large accounts, so stream rows. Approve this plan?

Questions

Does it write any code?
Not before you approve. The output is a plan only.
How long is the plan?
About a page, with steps small enough to become individual commits.
  • Debug Error

    CommandWorkflow

    Free
  • Estimate Task

    CommandWorkflow

    Free
  • Explain Code

    CommandWorkflow

    Free
  • Reproduce Bug

    CommandWorkflow

    Free