Feature Plan
Plan a feature implementation by understanding the project architecture, decomposing work into service-level and role-level packages, and producing an actionable plan. This is the planning phase — no code is written here. Output feeds into /feature-dev for execution.
1. Receive Feature Requirements
Gather the feature specification from the user:
- Accepted formats: PRD, ARD, design doc, implementation plan, ticket/issue, verbal description
- Read every provided document thoroughly
- Extract and organize:
- Goal: What the feature does (1–2 sentences)
- Requirements: Functional (what it does) and non-functional (performance, security, compliance)
- Acceptance criteria: How to verify the feature works
- Constraints: Deadlines, compatibility, dependencies on other teams/services
- Out of scope: What this feature explicitly does NOT cover
If the specification is ambiguous or incomplete — ask before proceeding. Do not assume missing requirements.
2. Understand Project Architecture
Read and internalize the project's structure to plan correctly:
2a. Read Architecture Documentation
Read the following files (if they exist):
ARCHITECTURE.md — system overview, component boundaries, data flow, service map
CLAUDE.md (root) — tech stack declaration, project structure, conventions
- Subdirectory
CLAUDE.md files — per-service/module context and stack info
Extract:
- Service/module boundaries (monolith modules, microservices, frontend/backend split)
- Tech stack per service (language, framework, database, messaging)
- Communication patterns (REST, gRPC, events, shared DB)
- Data flow relevant to the feature
- Deployment topology (monorepo vs polyrepo, shared vs independent deploys)
2b. Scan Project Structure
If documentation is incomplete or absent, scan the filesystem:
// turbo
ls -la (or dir for Windows)
Look for:
- Monorepo signals:
packages/, services/, apps/, root package.json with workspaces, Nx/Turborepo config
- Polyrepo signals: Single service, one
CLAUDE.md, one tech stack
- Infrastructure:
terraform/, infra/, k8s/, helm/, docker-compose.yml
- Dependency files:
package.json, pom.xml, requirements.txt, go.mod, *.csproj per service
2c. Build Service Map
Create a map of services/modules the feature touches:
## Service Map
| Service/Module | Tech Stack | Role | Affected by Feature |
|---|---|---|---|
| [name] | [lang + framework] | @[role] | [yes/no — how] |
| [name] | [lang + framework] | @[role] | [yes/no — how] |
| infrastructure | Terraform / K8s | Agent(devops-engineer) | [yes/no — how] |
3. Decompose into Work Packages
Break the feature into work packages — each package is a self-contained unit of work scoped to one service/module and one role.
3a. Identify Work Streams
Group changes by responsibility:
| Work Stream |
Role |
Scope |
| Frontend |
Agent(frontend-engineer) |
UI components, pages, client-side logic, API integration |
| Backend API |
Agent(java-engineer) / Agent(python-engineer) |
Endpoints, business logic, data access, validation |
| Data Layer |
Agent(db-engineer) |
Database schema, migrations, queries, indexing, optimization |
| Infrastructure |
Agent(devops-engineer) |
Terraform, Docker, K8s, config, secrets |
| Cloud Architecture |
Agent(cloud-architect) |
Cloud platform design, landing zones, networking, cost optimization |
| CI/CD Architecture |
Agent(devops-architect) |
Pipeline design, deployment strategy, GitHub org governance, platform engineering |
| ML / Data |
Agent(ml-engineer) |
Models, pipelines, feature engineering. For LLM/RAG/agent features also consult context-engineering skill |
| Data Pipelines |
Agent(data-engineer) |
ETL/ELT, data warehousing, Spark, dbt, Airflow |
| Mobile |
Agent(mobile-engineer) |
React Native, Flutter, iOS, Android apps |
| Marketing Content |
Agent(marketing-strategist) |
Positioning, messaging, GTM, landing pages |
| Architecture |
Agent(system-architect) |
System design, ARCHITECTURE.md, component boundaries, tech selection |
| Cross-cutting |
Agent(software-engineer) |
Shared libraries, contracts, API specs |
Only include work streams that the feature actually requires. Do not add empty streams.
3b. Define Work Packages
For each work stream, create ordered work packages:
### [Work Stream]: [Service Name] — @[role]
#### WP-[N]: [Title]
- **Description**: What to implement
- **Files**: Expected files to create/modify
- **Dependencies**: Which WPs must complete first
- **Acceptance criteria**: How to verify this WP is done
- **Complexity**: S (hours) / M (day) / L (days) / XL (week+)
Rules for decomposition:
- Each WP is independently testable
- WPs within a stream are ordered by dependency (foundations first)
- Cross-service dependencies are explicitly marked
- Database migrations always come before code that uses them
- API contracts defined before consumer implementation
3c. Define Integration Points
For features spanning multiple services, explicitly document:
4. Dependency Graph
Visualize the execution order:
## Dependency Graph
WP-1: [DB migration]
└─► WP-2: [Backend API]
├─► WP-3: [Frontend integration]
└─► WP-4: [Infrastructure/config]
WP-5: [Tests] ← depends on WP-2, WP-3
Identify:
- Critical path: Longest chain of dependent WPs — determines minimum timeline
- Parallelizable: WPs that can be worked on simultaneously by different roles
- Blockers: External dependencies (other teams, third-party APIs, approvals)
5. Risk Assessment
Evaluate risks for each work stream:
| Risk |
Impact |
Likelihood |
Mitigation |
| [risk description] |
High/Med/Low |
High/Med/Low |
[mitigation strategy] |
Common risks to evaluate:
- Breaking changes to existing APIs (backward compatibility)
- Database migration on large tables (performance, downtime)
- Cross-service coordination (deployment order matters)
- New dependencies or services (operational complexity)
- Security implications (new auth flows, data exposure)
6. Present the Plan
Compile the full plan and present to the user:
# Feature Plan: [Feature Name]
## Goal
[1–2 sentences]
## Architecture Impact
- Services affected: [list]
- New services: [if any]
- Database changes: [yes/no — summary]
- Infrastructure changes: [yes/no — summary]
## Work Packages
### Stream 1: [name] — @[role]
| WP | Title | Complexity | Dependencies | Status |
|----|-------|------------|--------------|--------|
| WP-1 | [title] | M | — | planned |
| WP-2 | [title] | S | WP-1 | planned |
### Stream 2: [name] — @[role]
| WP | Title | Complexity | Dependencies | Status |
|----|-------|------------|--------------|--------|
| WP-3 | [title] | L | WP-1 | planned |
## Critical Path
WP-1 → WP-2 → WP-5 (estimated: [timeframe])
## Risks
[table from Step 5]
## Next Step
Run `/feature-dev` per work package, applying the designated role.
Wait for user approval. The user may reorder, split, merge, or remove work packages.
7. Update FEATURES.md
After the plan is approved, apply Agent(product-manager) and update FEATURES.md:
- If
FEATURES.md does not exist — create it at the project root
- Add or update the feature entry with status
planned
- If the feature has a PRD or spec — save it in
features/ directory and link from FEATURES.md
8. Handoff to Implementation
After approval, guide execution:
- Sequential (single developer): Execute WPs in dependency order using
/feature-dev for each
- Parallel (multiple developers/sessions): Assign independent WPs to separate sessions, each applying the appropriate role
- Track WP status:
planned → in_progress → done
- Update the plan if scope changes during implementation
Integration
- Input: PRD, ARD, design doc, or user request
- Preceded by:
/feature-design (produces PRD), /architecture (produces ARD, design docs, API contracts, engineering estimates)
- Followed by:
/feature-dev (implementation per work package)
- Roles:
Agent(product-manager) (requirements), Agent(solution-architect) / Agent(system-architect) (architecture), Agent(cloud-architect) (cloud platform), Agent(devops-architect) (CI/CD architecture), stack-specific roles (work packages)
- Skills:
context-engineering skill (context pipeline design, RAG, memory, agent harness — for AI/LLM feature work packages)
1---2name: feature-plan-53description: Plan feature implementation across services and roles — parse requirements, understand project architecture (ARCHITECTURE.md, CLAUDE.md), decompose into work packages per service/role, estimate complexity, produce an actionable implementation plan. Part of the umbrella feature workflow.4---5
6# Feature Plan
7
8Plan a feature implementation by understanding the project architecture, decomposing work into service-level and role-level packages, and producing an actionable plan. This is the **planning phase** — no code is written here. Output feeds into `/feature-dev` for execution.
9
10## 1. Receive Feature Requirements
11
12Gather the feature specification from the user:
13
14- **Accepted formats**: PRD, ARD, design doc, implementation plan, ticket/issue, verbal description
15- Read every provided document thoroughly
16- Extract and organize:
17 - **Goal**: What the feature does (1–2 sentences)
18 - **Requirements**: Functional (what it does) and non-functional (performance, security, compliance)
19 - **Acceptance criteria**: How to verify the feature works
20 - **Constraints**: Deadlines, compatibility, dependencies on other teams/services
21 - **Out of scope**: What this feature explicitly does NOT cover
22
23If the specification is ambiguous or incomplete — ask before proceeding. Do not assume missing requirements.
24
25## 2. Understand Project Architecture
26
27Read and internalize the project's structure to plan correctly:
28
29### 2a. Read Architecture Documentation
30
31Read the following files (if they exist):
32
331. **`ARCHITECTURE.md`** — system overview, component boundaries, data flow, service map
342. **`CLAUDE.md`** (root) — tech stack declaration, project structure, conventions
353. **Subdirectory `CLAUDE.md` files** — per-service/module context and stack info
36
37**Extract**:
38- Service/module boundaries (monolith modules, microservices, frontend/backend split)
39- Tech stack per service (language, framework, database, messaging)
40- Communication patterns (REST, gRPC, events, shared DB)
41- Data flow relevant to the feature
42- Deployment topology (monorepo vs polyrepo, shared vs independent deploys)
43
44### 2b. Scan Project Structure
45
46If documentation is incomplete or absent, scan the filesystem:
47
48```
49// turbo
50ls -la (or dir for Windows)
51```
52
53Look for:
54- **Monorepo signals**: `packages/`, `services/`, `apps/`, root `package.json` with workspaces, Nx/Turborepo config
55- **Polyrepo signals**: Single service, one `CLAUDE.md`, one tech stack
56- **Infrastructure**: `terraform/`, `infra/`, `k8s/`, `helm/`, `docker-compose.yml`
57- **Dependency files**: `package.json`, `pom.xml`, `requirements.txt`, `go.mod`, `*.csproj` per service
58
59### 2c. Build Service Map
60
61Create a map of services/modules the feature touches:
62
63```
64## Service Map
65
66| Service/Module | Tech Stack | Role | Affected by Feature |
67|---|---|---|---|
68| [name] | [lang + framework] | @[role] | [yes/no — how] |
69| [name] | [lang + framework] | @[role] | [yes/no — how] |
70| infrastructure | Terraform / K8s | Agent(devops-engineer) | [yes/no — how] |
71```
72
73## 3. Decompose into Work Packages
74
75Break the feature into **work packages** — each package is a self-contained unit of work scoped to one service/module and one role.
76
77### 3a. Identify Work Streams
78
79Group changes by responsibility:
80
81| Work Stream | Role | Scope |
82|---|---|---|
83| **Frontend** | `Agent(frontend-engineer)` | UI components, pages, client-side logic, API integration |
84| **Backend API** | `Agent(java-engineer)` / `Agent(python-engineer)` | Endpoints, business logic, data access, validation |
85| **Data Layer** | `Agent(db-engineer)` | Database schema, migrations, queries, indexing, optimization |
86| **Infrastructure** | `Agent(devops-engineer)` | Terraform, Docker, K8s, config, secrets |
87| **Cloud Architecture** | `Agent(cloud-architect)` | Cloud platform design, landing zones, networking, cost optimization |
88| **CI/CD Architecture** | `Agent(devops-architect)` | Pipeline design, deployment strategy, GitHub org governance, platform engineering |
89| **ML / Data** | `Agent(ml-engineer)` | Models, pipelines, feature engineering. For LLM/RAG/agent features also consult `context-engineering` skill |
90| **Data Pipelines** | `Agent(data-engineer)` | ETL/ELT, data warehousing, Spark, dbt, Airflow |
91| **Mobile** | `Agent(mobile-engineer)` | React Native, Flutter, iOS, Android apps |
92| **Marketing Content** | `Agent(marketing-strategist)` | Positioning, messaging, GTM, landing pages |
93| **Architecture** | `Agent(system-architect)` | System design, ARCHITECTURE.md, component boundaries, tech selection |
94| **Cross-cutting** | `Agent(software-engineer)` | Shared libraries, contracts, API specs |
95
96Only include work streams that the feature actually requires. Do not add empty streams.
97
98### 3b. Define Work Packages
99
100For each work stream, create ordered work packages:
101
102```
103### [Work Stream]: [Service Name] — @[role]
104
105#### WP-[N]: [Title]
106- **Description**: What to implement
107- **Files**: Expected files to create/modify
108- **Dependencies**: Which WPs must complete first
109- **Acceptance criteria**: How to verify this WP is done
110- **Complexity**: S (hours) / M (day) / L (days) / XL (week+)
111```
112
113**Rules for decomposition**:
114- Each WP is independently testable
115- WPs within a stream are ordered by dependency (foundations first)
116- Cross-service dependencies are explicitly marked
117- Database migrations always come before code that uses them
118- API contracts defined before consumer implementation
119
120### 3c. Define Integration Points
121
122For features spanning multiple services, explicitly document:
123
124<integration_points>
125- **API contracts**: Request/response schemas for new or modified endpoints
126- **Events/messages**: New event types, payload schemas, producers, consumers
127- **Shared types**: DTOs, enums, or constants shared across services
128- **Database changes**: Schema migrations, new tables/columns, index requirements
129- **Configuration**: New env vars, feature flags, secrets needed
130</integration_points>
131
132## 4. Dependency Graph
133
134Visualize the execution order:
135
136```
137## Dependency Graph
138
139WP-1: [DB migration]
140 └─► WP-2: [Backend API]
141 ├─► WP-3: [Frontend integration]
142 └─► WP-4: [Infrastructure/config]
143WP-5: [Tests] ← depends on WP-2, WP-3
144```
145
146Identify:
147- **Critical path**: Longest chain of dependent WPs — determines minimum timeline
148- **Parallelizable**: WPs that can be worked on simultaneously by different roles
149- **Blockers**: External dependencies (other teams, third-party APIs, approvals)
150
151## 5. Risk Assessment
152
153Evaluate risks for each work stream:
154
155| Risk | Impact | Likelihood | Mitigation |
156|---|---|---|---|
157| [risk description] | High/Med/Low | High/Med/Low | [mitigation strategy] |
158
159**Common risks to evaluate**:
160- Breaking changes to existing APIs (backward compatibility)
161- Database migration on large tables (performance, downtime)
162- Cross-service coordination (deployment order matters)
163- New dependencies or services (operational complexity)
164- Security implications (new auth flows, data exposure)
165
166## 6. Present the Plan
167
168Compile the full plan and present to the user:
169
170```
171# Feature Plan: [Feature Name]
172
173## Goal
174[1–2 sentences]
175
176## Architecture Impact
177- Services affected: [list]
178- New services: [if any]
179- Database changes: [yes/no — summary]
180- Infrastructure changes: [yes/no — summary]
181
182## Work Packages
183
184### Stream 1: [name] — @[role]
185| WP | Title | Complexity | Dependencies | Status |
186|----|-------|------------|--------------|--------|
187| WP-1 | [title] | M | — | planned |
188| WP-2 | [title] | S | WP-1 | planned |
189
190### Stream 2: [name] — @[role]
191| WP | Title | Complexity | Dependencies | Status |
192|----|-------|------------|--------------|--------|
193| WP-3 | [title] | L | WP-1 | planned |
194
195## Critical Path
196WP-1 → WP-2 → WP-5 (estimated: [timeframe])
197
198## Risks
199[table from Step 5]
200
201## Next Step
202Run `/feature-dev` per work package, applying the designated role.
203```
204
205Wait for user approval. The user may reorder, split, merge, or remove work packages.
206
207## 7. Update FEATURES.md
208
209After the plan is approved, **apply `Agent(product-manager)`** and update `FEATURES.md`:
210
2111. If `FEATURES.md` does not exist — create it at the project root
2122. Add or update the feature entry with status `planned`
2133. If the feature has a PRD or spec — save it in `features/` directory and link from `FEATURES.md`
214
215## 8. Handoff to Implementation
216
217After approval, guide execution:
218
219- **Sequential** (single developer): Execute WPs in dependency order using `/feature-dev` for each
220- **Parallel** (multiple developers/sessions): Assign independent WPs to separate sessions, each applying the appropriate role
221- Track WP status: `planned` → `in_progress` → `done`
222- Update the plan if scope changes during implementation
223
224## Integration
225
226- **Input**: PRD, ARD, design doc, or user request
227- **Preceded by**: `/feature-design` (produces PRD), `/architecture` (produces ARD, design docs, API contracts, engineering estimates)
228- **Followed by**: `/feature-dev` (implementation per work package)
229- **Roles**: `Agent(product-manager)` (requirements), `Agent(solution-architect)` / `Agent(system-architect)` (architecture), `Agent(cloud-architect)` (cloud platform), `Agent(devops-architect)` (CI/CD architecture), stack-specific roles (work packages)
230- **Skills**: `context-engineering` skill (context pipeline design, RAG, memory, agent harness — for AI/LLM feature work packages)