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 /develop 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 (cross-platform via Glob / Read, or use one of):
// turbo
ls -la 2>/dev/null || dir
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–9. Dependency Graph → Risk → Present → Multi-Reviewer → FEATURES.md → Handoff
Steps 4 through 9 — the dependency-graph and risk-table formats, the
plan-presentation template, the mandatory multi-reviewer feedback loop
(product-manager + solution-architect + system-architect, loop until all three
approved, max 5 cycles), the FEATURES.md update, and the implementation
handoff — are binding and unchanged. Read
planning-mechanics.md and apply Steps 4–9
verbatim. The plan MUST NOT hand off to /develop or update FEATURES.md
until the Step 7 multi-reviewer cycle returns approved from all three
reviewers with zero remaining critical/major findings.
Failure modes
- Ambiguous / incomplete spec — do NOT assume missing requirements; stop and ask the user (Step 1).
- Absent architecture docs —
ARCHITECTURE.md/CLAUDE.md missing → fall back to filesystem scan (Step 2b) to infer service map; never plan blind.
- Empty work streams — include only streams the feature actually requires; do not add placeholder streams (Step 3a).
- Missing dependency ordering — DB migrations before consuming code, API contracts before consumers; an unordered WP set is a defect (Step 3b).
- Reviewer divergence — findings not shrinking or mutually-exclusive asks across cycles → pause and ask the user to arbitrate; hard cap 5 cycles before escalation (Step 7, in
planning-mechanics.md).
Agent unavailable — apply the three Step 7 reviewer roles sequentially in the main thread and record the degraded fan-out in the Review History (planning-mechanics.md).
- Scope drift during build — update the plan and re-run the affected Step 7 cycle; never let
/develop proceed against a stale plan (Step 9).
Integration
- Input: PRD, ARD, design doc, or user request
- Preceded by:
/feature-design (produces design pack: PRD + ARD + UX + impl plan), /architecture (produces ARD, design docs, API contracts, engineering estimates)
- Followed by:
/develop (implementation per work package)
- Roles:
Agent(product-manager) (requirements; Step 7 reviewer), Agent(solution-architect) + Agent(system-architect) (architecture; Step 7 reviewers), 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), @team-protocols (reviewer spawning primitives, Step 7)
- Companions:
planning-mechanics.md — Steps 4–9 binding detail (dependency graph, risk table, plan template, multi-reviewer cycle, FEATURES.md, handoff) — Read + apply verbatim
1---2name: plan3description: Use this skill when the user has a PRD or feature brief and needs an executable plan before code is written — to plan feature implementation across services and roles by parsing the PRD/feature brief, reading project architecture (ARCHITECTURE.md, CLAUDE.md), decomposing into work packages per service/role with complexity estimates, and running a multi-reviewer feedback loop (product-manager + solution-architect + system-architect).4---56# Feature Plan78Plan 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 `/develop` for execution.910## 1. Receive Feature Requirements1112Gather the feature specification from the user:1314- **Accepted formats**: PRD, ARD, design doc, implementation plan, ticket/issue, verbal description15- Read every provided document thoroughly16- 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 works20 - **Constraints**: Deadlines, compatibility, dependencies on other teams/services21 - **Out of scope**: What this feature explicitly does NOT cover2223If the specification is ambiguous or incomplete — ask before proceeding. Do not assume missing requirements.2425## 2. Understand Project Architecture2627Read and internalize the project's structure to plan correctly:2829### 2a. Read Architecture Documentation3031Read the following files (if they exist):32331. **`ARCHITECTURE.md`** — system overview, component boundaries, data flow, service map342. **`CLAUDE.md`** (root) — tech stack declaration, project structure, conventions353. **Subdirectory `CLAUDE.md` files** — per-service/module context and stack info3637**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 feature42- Deployment topology (monorepo vs polyrepo, shared vs independent deploys)4344### 2b. Scan Project Structure4546If documentation is incomplete or absent, scan the filesystem (cross-platform via `Glob` / `Read`, or use one of):4748```49// turbo50ls -la 2>/dev/null || dir51```5253Look for:54- **Monorepo signals**: `packages/`, `services/`, `apps/`, root `package.json` with workspaces, Nx/Turborepo config55- **Polyrepo signals**: Single service, one `CLAUDE.md`, one tech stack56- **Infrastructure**: `terraform/`, `infra/`, `k8s/`, `helm/`, `docker-compose.yml`57- **Dependency files**: `package.json`, `pom.xml`, `requirements.txt`, `go.mod`, `*.csproj` per service5859### 2c. Build Service Map6061Create a map of services/modules the feature touches:6263```64## Service Map6566| 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```7273## 3. Decompose into Work Packages7475Break the feature into **work packages** — each package is a self-contained unit of work scoped to one service/module and one role.7677### 3a. Identify Work Streams7879Group changes by responsibility:8081| 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 |9596Only include work streams that the feature actually requires. Do not add empty streams.9798### 3b. Define Work Packages99100For each work stream, create ordered work packages:101102```103### [Work Stream]: [Service Name] — @[role]104105#### WP-[N]: [Title]106- **Description**: What to implement107- **Files**: Expected files to create/modify108- **Dependencies**: Which WPs must complete first109- **Acceptance criteria**: How to verify this WP is done110- **Complexity**: S (hours) / M (day) / L (days) / XL (week+)111```112113**Rules for decomposition**:114- Each WP is independently testable115- WPs within a stream are ordered by dependency (foundations first)116- Cross-service dependencies are explicitly marked117- Database migrations always come before code that uses them118- API contracts defined before consumer implementation119120### 3c. Define Integration Points121122For features spanning multiple services, explicitly document:123124<integration_points>125- **API contracts**: Request/response schemas for new or modified endpoints126- **Events/messages**: New event types, payload schemas, producers, consumers127- **Shared types**: DTOs, enums, or constants shared across services128- **Database changes**: Schema migrations, new tables/columns, index requirements129- **Configuration**: New env vars, feature flags, secrets needed130</integration_points>131132## 4–9. Dependency Graph → Risk → Present → Multi-Reviewer → FEATURES.md → Handoff133134Steps 4 through 9 — the dependency-graph and risk-table formats, the135plan-presentation template, the **mandatory** multi-reviewer feedback loop136(product-manager + solution-architect + system-architect, loop until all three137`approved`, max 5 cycles), the `FEATURES.md` update, and the implementation138handoff — are binding and unchanged. **Read139[`planning-mechanics.md`](./planning-mechanics.md) and apply Steps 4–9140verbatim.** The plan MUST NOT hand off to `/develop` or update `FEATURES.md`141until the Step 7 multi-reviewer cycle returns `approved` from all three142reviewers with zero remaining critical/major findings.143144## Failure modes145146- **Ambiguous / incomplete spec** — do NOT assume missing requirements; stop and ask the user (Step 1).147- **Absent architecture docs** — `ARCHITECTURE.md`/`CLAUDE.md` missing → fall back to filesystem scan (Step 2b) to infer service map; never plan blind.148- **Empty work streams** — include only streams the feature actually requires; do not add placeholder streams (Step 3a).149- **Missing dependency ordering** — DB migrations before consuming code, API contracts before consumers; an unordered WP set is a defect (Step 3b).150- **Reviewer divergence** — findings not shrinking or mutually-exclusive asks across cycles → pause and ask the user to arbitrate; hard cap 5 cycles before escalation (Step 7, in `planning-mechanics.md`).151- **`Agent` unavailable** — apply the three Step 7 reviewer roles sequentially in the main thread and record the degraded fan-out in the Review History (`planning-mechanics.md`).152- **Scope drift during build** — update the plan and re-run the affected Step 7 cycle; never let `/develop` proceed against a stale plan (Step 9).153154## Integration155156- **Input**: PRD, ARD, design doc, or user request157- **Preceded by**: `/feature-design` (produces design pack: PRD + ARD + UX + impl plan), `/architecture` (produces ARD, design docs, API contracts, engineering estimates)158- **Followed by**: `/develop` (implementation per work package)159- **Roles**: `Agent(product-manager)` (requirements; Step 7 reviewer), `Agent(solution-architect)` + `Agent(system-architect)` (architecture; Step 7 reviewers), `Agent(cloud-architect)` (cloud platform), `Agent(devops-architect)` (CI/CD architecture), stack-specific roles (work packages)160- **Skills**: `context-engineering` skill (context pipeline design, RAG, memory, agent harness — for AI/LLM feature work packages), `@team-protocols` (reviewer spawning primitives, Step 7)161- **Companions**: `planning-mechanics.md` — Steps 4–9 binding detail (dependency graph, risk table, plan template, multi-reviewer cycle, FEATURES.md, handoff) — Read + apply verbatim