Feature Development
End-to-end feature implementation from documentation to working code. Automatically detects and applies the appropriate engineering role based on the project's tech stack.
1. Receive and Parse Documentation
Gather all input documentation provided by the user:
- Accepted formats: PRD, ARD (Architecture Decision Record), design doc, implementation plan, ticket/issue, or any structured feature specification
- Read every provided document thoroughly
- Extract and organize:
- Goal: what the feature does (1–2 sentences)
- Requirements: functional and non-functional
- Acceptance criteria: how to verify the feature works
- Implementation plan: ordered steps, architecture decisions, data models, API contracts
- Constraints: performance, security, compatibility, dependencies
- Out of scope: what this feature explicitly does NOT cover
If the documentation is ambiguous or incomplete, ask the user before proceeding.
2. Detect Tech Stack and Apply Role
Determine the project's tech stack and apply the appropriate engineering role:
- Read project's
CLAUDE.md — look for tech stack declaration (language, framework, runtime)
- Scan project files — check
package.json, pom.xml, *.csproj, requirements.txt, go.mod, Cargo.toml, or equivalent to confirm
- Role matching — Claude Code's (agent) trigger auto-matches roles whose
description matches the detected stack:
- If multiple specializations match (e.g., fullstack) — apply all relevant roles
- If no specialization role exists — fall back to base engineering principles
- Announce the detected stack and applied role(s) to the user for confirmation
Examples:
- Next.js + TypeScript →
Agent(frontend-engineer) applies
- Spring Boot →
Agent(java-engineer) applies
- Python + FastAPI →
Agent(python-engineer) applies
- Terraform / Docker / K8s →
Agent(devops-engineer) applies
- Cloud architecture / landing zones / networking / multi-cloud →
Agent(cloud-architect) applies
- GitHub Actions / CI/CD pipelines / deployment strategy →
Agent(devops-architect) applies
- React Native / Flutter / iOS / Android →
Agent(mobile-engineer) applies
- ETL / Spark / dbt / Airflow / data pipelines →
Agent(data-engineer) applies
- SQL / database schema / migrations / query optimization →
Agent(db-engineer) applies
- ARCHITECTURE.md / system design / component boundaries →
Agent(system-architect) applies
- LLM / RAG / agents / memory / multi-agent / AI pipelines →
Agent(ml-engineer) applies + consult context-engineering skill for context pipeline design
3. Analyze Codebase Context
Before writing any code, understand the existing codebase:
- Project structure — directory layout, module boundaries, entry points
- Existing patterns — naming conventions, error handling, logging, testing approach
- Dependencies — installed packages, available libraries, version constraints
- Related code — files and modules the new feature will interact with, extend, or modify
- Test infrastructure — test framework, test file locations, existing test patterns
Map how the new feature fits into the existing architecture. Identify:
- Files to create (new modules, components, tests)
- Files to modify (integration points, routes, configs)
- Files to not touch (unrelated code — minimize blast radius)
4. Create Implementation Plan
Break the feature into ordered, atomic implementation steps:
- Number each step sequentially
- Each step = one logical unit of work (one file or one cohesive change across tightly coupled files)
- Order by dependency — implement foundations before consumers
- Interleave test steps with implementation (do not defer all tests to the end)
Present the plan to the user:
Feature: [name]
Stack: [detected] | Role: [applied]
Steps:
1. [description] → [file(s)]
2. [description] → [file(s)]
...
N. [description] → [file(s)]
Wait for user approval before proceeding. The user may reorder, add, remove, or modify steps.
5. Implement
Execute the approved plan step by step.
For each step:
- State what you are about to do (step number, file, change summary)
- Write code following:
- Project's existing patterns and conventions
- Active role's guidelines (stack-specific best practices)
- Documentation's architecture decisions and constraints
- Verify the code compiles/parses without errors after each step
- If a step introduces a new dependency — install it immediately
Rules:
- Minimal, focused changes — do not refactor unrelated code
- Follow existing code style (indentation, naming, imports)
- Add imports at the top of files
- Production-quality code — no TODOs, no placeholders, no stubs (unless the plan explicitly calls for them)
- If you encounter an unexpected issue — stop and consult the user
6. Write Tests
For each implemented component, write tests following the project's test infrastructure:
- Unit tests — business logic, utilities, data transformations
- Integration tests — API endpoints, database queries, service interactions
- Component tests (frontend) — UI components with user interactions
- Cover both happy path and edge cases (error handling, boundary values, empty states)
- Run the tests and verify they pass
If the documentation specifies acceptance criteria, write tests that directly verify each criterion.
7. Verify
Run the full verification sequence:
- Build/compile — project builds without errors or warnings
- Lint — run the project's linter if configured
- Test — run the full test suite (new + existing) to catch regressions
- Acceptance check — review implementation against documentation's acceptance criteria
Checklist:
If any check fails — fix the issue and re-verify.
8. Summary
Present the completed work:
- Feature: what was implemented
- Stack / Role: detected tech stack and applied role(s)
- Files changed: list of created and modified files with brief descriptions
- Tests: number of tests added, pass status
- Acceptance criteria: status of each criterion (met / partially met / not met)
- Notes: deviations from original plan, trade-offs, follow-up items
Integration
- Precedes:
/run-tests, /pre-commit, /create-pr
- Planning:
/feature-plan (produces the implementation plan this workflow executes)
- Skills:
testing-procedures skill (test strategy), code-review skill (review standards), context-engineering skill (context pipelines, RAG, agent harness, production checklists — for AI/LLM features)
1---2name: feature-dev-53description: Develop a feature from documentation (PRD, ARD, design doc, implementation plan) with automatic role detection based on project tech stack4---5
6# Feature Development
7
8End-to-end feature implementation from documentation to working code. Automatically detects and applies the appropriate engineering role based on the project's tech stack.
9
10## 1. Receive and Parse Documentation
11
12Gather all input documentation provided by the user:
13
14- **Accepted formats**: PRD, ARD (Architecture Decision Record), design doc, implementation plan, ticket/issue, or any structured feature specification
15- Read every provided document thoroughly
16- Extract and organize:
17 - **Goal**: what the feature does (1–2 sentences)
18 - **Requirements**: functional and non-functional
19 - **Acceptance criteria**: how to verify the feature works
20 - **Implementation plan**: ordered steps, architecture decisions, data models, API contracts
21 - **Constraints**: performance, security, compatibility, dependencies
22 - **Out of scope**: what this feature explicitly does NOT cover
23
24If the documentation is ambiguous or incomplete, ask the user before proceeding.
25
26## 2. Detect Tech Stack and Apply Role
27
28Determine the project's tech stack and apply the appropriate engineering role:
29
301. **Read project's `CLAUDE.md`** — look for tech stack declaration (language, framework, runtime)
312. **Scan project files** — check `package.json`, `pom.xml`, `*.csproj`, `requirements.txt`, `go.mod`, `Cargo.toml`, or equivalent to confirm
323. **Role matching** — Claude Code's (agent) trigger auto-matches roles whose `description` matches the detected stack:
33 - If multiple specializations match (e.g., fullstack) — apply all relevant roles
34 - If no specialization role exists — fall back to base engineering principles
354. **Announce** the detected stack and applied role(s) to the user for confirmation
36
37**Examples:**
38- Next.js + TypeScript → `Agent(frontend-engineer)` applies
39- Spring Boot → `Agent(java-engineer)` applies
40- Python + FastAPI → `Agent(python-engineer)` applies
41- Terraform / Docker / K8s → `Agent(devops-engineer)` applies
42- Cloud architecture / landing zones / networking / multi-cloud → `Agent(cloud-architect)` applies
43- GitHub Actions / CI/CD pipelines / deployment strategy → `Agent(devops-architect)` applies
44- React Native / Flutter / iOS / Android → `Agent(mobile-engineer)` applies
45- ETL / Spark / dbt / Airflow / data pipelines → `Agent(data-engineer)` applies
46- SQL / database schema / migrations / query optimization → `Agent(db-engineer)` applies
47- ARCHITECTURE.md / system design / component boundaries → `Agent(system-architect)` applies
48- LLM / RAG / agents / memory / multi-agent / AI pipelines → `Agent(ml-engineer)` applies + consult `context-engineering` skill for context pipeline design
49
50## 3. Analyze Codebase Context
51
52Before writing any code, understand the existing codebase:
53
541. **Project structure** — directory layout, module boundaries, entry points
552. **Existing patterns** — naming conventions, error handling, logging, testing approach
563. **Dependencies** — installed packages, available libraries, version constraints
574. **Related code** — files and modules the new feature will interact with, extend, or modify
585. **Test infrastructure** — test framework, test file locations, existing test patterns
59
60Map how the new feature fits into the existing architecture. Identify:
61- Files to **create** (new modules, components, tests)
62- Files to **modify** (integration points, routes, configs)
63- Files to **not touch** (unrelated code — minimize blast radius)
64
65## 4. Create Implementation Plan
66
67Break the feature into ordered, atomic implementation steps:
68
691. Number each step sequentially
702. Each step = one logical unit of work (one file or one cohesive change across tightly coupled files)
713. Order by dependency — implement foundations before consumers
724. Interleave test steps with implementation (do not defer all tests to the end)
73
74Present the plan to the user:
75
76```
77Feature: [name]
78Stack: [detected] | Role: [applied]
79Steps:
80 1. [description] → [file(s)]
81 2. [description] → [file(s)]
82 ...
83 N. [description] → [file(s)]
84```
85
86Wait for user approval before proceeding. The user may reorder, add, remove, or modify steps.
87
88## 5. Implement
89
90Execute the approved plan step by step.
91
92**For each step:**
931. State what you are about to do (step number, file, change summary)
942. Write code following:
95 - Project's existing patterns and conventions
96 - Active role's guidelines (stack-specific best practices)
97 - Documentation's architecture decisions and constraints
983. Verify the code compiles/parses without errors after each step
994. If a step introduces a new dependency — install it immediately
100
101**Rules:**
102- Minimal, focused changes — do not refactor unrelated code
103- Follow existing code style (indentation, naming, imports)
104- Add imports at the top of files
105- Production-quality code — no TODOs, no placeholders, no stubs (unless the plan explicitly calls for them)
106- If you encounter an unexpected issue — stop and consult the user
107
108## 6. Write Tests
109
110For each implemented component, write tests following the project's test infrastructure:
111
1121. **Unit tests** — business logic, utilities, data transformations
1132. **Integration tests** — API endpoints, database queries, service interactions
1143. **Component tests** (frontend) — UI components with user interactions
1154. Cover both **happy path** and **edge cases** (error handling, boundary values, empty states)
1165. Run the tests and verify they pass
117
118If the documentation specifies acceptance criteria, write tests that directly verify each criterion.
119
120## 7. Verify
121
122Run the full verification sequence:
123
1241. **Build/compile** — project builds without errors or warnings
1252. **Lint** — run the project's linter if configured
1263. **Test** — run the full test suite (new + existing) to catch regressions
1274. **Acceptance check** — review implementation against documentation's acceptance criteria
128
129**Checklist:**
130- [ ] All acceptance criteria from the documentation are met
131- [ ] No new warnings or errors in build output
132- [ ] All tests pass (new and existing)
133- [ ] No unrelated files were modified
134- [ ] Code follows project conventions and active role's guidelines
135
136If any check fails — fix the issue and re-verify.
137
138## 8. Summary
139
140Present the completed work:
141
142- **Feature**: what was implemented
143- **Stack / Role**: detected tech stack and applied role(s)
144- **Files changed**: list of created and modified files with brief descriptions
145- **Tests**: number of tests added, pass status
146- **Acceptance criteria**: status of each criterion (met / partially met / not met)
147- **Notes**: deviations from original plan, trade-offs, follow-up items
148
149## Integration
150
151- **Precedes**: `/run-tests`, `/pre-commit`, `/create-pr`
152- **Planning**: `/feature-plan` (produces the implementation plan this workflow executes)
153- **Skills**: `testing-procedures` skill (test strategy), `code-review` skill (review standards), `context-engineering` skill (context pipelines, RAG, agent harness, production checklists — for AI/LLM features)