Plan a new feature by creating a feature plan document. Use when the user says "Plan a new feature " followed by a description. Creates a branch from main...
Creates a detailed feature plan document through an interactive process of clarifying questions and iterative refinement.
feature/plan-<feature-name> branchplans/features/<feature-name>.mdPlan a new feature:
<feature description>
First, ensure the repository is up to date and create a feature planning branch:
git checkout main
git fetch origin main
git pull origin main
git checkout -b feature/plan-<feature-name>
The branch name should be derived from the feature description (e.g., "add inventory sorting" becomes feature/plan-inventory-sorting).
Read and analyze the feature description provided by the user. Consider:
Before writing the plan, ask the user clarifying questions to ensure the plan is accurate and complete. Questions should cover:
Functional Requirements:
Integration:
Scope:
Technical Considerations:
Wait for the user to answer these questions before proceeding.
After receiving answers to clarifying questions, create the feature plan document at plans/features/<feature-name>.md.
# Feature - <Feature Name>
**Goal**: <One-sentence summary of the feature's purpose>
---
## Overview
<2-3 paragraph description of what the feature does and why it's valuable>
---
## Core Mechanics
<Detailed description of how the feature works>
### <Subsystem 1>
<Details about this component>
### <Subsystem 2>
<Details about this component>
---
## Data Structures
<JSON schemas and GDScript class definitions>
---
## Implementation Plan
### Phase 1: <First Phase Name>
1. <Task 1>
2. <Task 2>
### Phase 2: <Second Phase Name>
1. <Task 1>
2. <Task 2>
---
## New Files Required
### Data Files
data/
└──
### Code Files
<file1> - <file2> - | Key | Action | Description |
|---|
### 5. Present the Plan for Review
After creating the plan document, inform the user:
1. The plan has been created at `plans/features/<feature-name>.md`
2. Summarize the key points of the plan
3. Ask if they would like to make any changes
### 6. Handle Change Requests
If the user requests changes:
1. Ask clarifying questions about the requested changes if needed
2. Update the plan document with the changes
3. Present the updated plan to the user
4. Repeat until the user is satisfied
### 7. Commit the Plan and STOP
Once the user approves the plan:
```bash
git add plans/features/<feature-name>.md
git commit -m "docs: Add <feature-name> feature plan"
YOUR TASK IS NOW COMPLETE.
Tell the user:
plans/features/<feature-name>.md/implement-feature <feature-name>DO NOT:
User: Plan a new feature:
I want to add a companion system where the player can recruit NPCs to follow them and help in combat.
Claude will:
1. Update from main and create feature/plan-companion-system branch
2. Ask clarifying questions:
- How are companions recruited? (dialogue, payment, quest completion?)
- How many companions can the player have at once?
- How do companions behave in combat? (AI controlled, commands?)
- Do companions have their own inventory/equipment?
- Can companions die permanently?
- How do companions affect game balance?
3. Create plans/features/companion-system.md based on answers
4. Present the plan for review
5. Make any requested changes
6. Commit the approved plan
7. STOP - Tell user the plan is at plans/features/companion-system.md
and they can run /implement-feature companion-system later