Feature Development Workflow
Execute a structured 7-phase feature development workflow. This workflow guides you through understanding, exploring, designing, implementing, and reviewing a feature.
CRITICAL: Complete ALL 7 phases. The workflow is not complete until Phase 7: Summary is finished. After completing each phase, immediately proceed to the next phase without waiting for user prompts.
Phase Overview
Execute these phases in order, completing ALL of them:
- Discovery - Understand the feature requirements
- Codebase Exploration - Map relevant code areas
- Clarifying Questions - Resolve ambiguities
- Architecture Design - Design the implementation approach
- Implementation - Build the feature
- Quality Review - Review for issues
- Summary - Document accomplishments
Phase 1: Discovery
Goal: Understand what the user wants to build.
Analyze the feature description from $ARGUMENTS:
- What is the core functionality?
- What are the expected inputs and outputs?
- Are there any constraints mentioned?
- What success criteria can you infer?
Summarize your understanding to the user. Use AskUserQuestion to confirm if your understanding is correct before proceeding.
Phase 2: Codebase Exploration
Goal: Understand the relevant parts of the codebase.
Load skills for this phase:
- Read
${CLAUDE_PLUGIN_ROOT}/skills/project-conventions/SKILL.md and apply its guidance
- Read
${CLAUDE_PLUGIN_ROOT}/skills/language-patterns/SKILL.md and apply its guidance
Launch code-explorer agents:
Launch 2-3 code-explorer agents in parallel with different focus areas:
Agent 1: Explore entry points and user-facing code related to the feature
Agent 2: Explore data models, schemas, and storage related to the feature
Agent 3: Explore utilities, helpers, and shared infrastructure (if applicable)
Use the Task tool with subagent_type: "dev-tools:code-explorer":
Feature: [feature description]
Focus area: [specific focus for this agent]
Find and analyze:
- Relevant files and their purposes
- Key functions/classes that would be modified or extended
- Existing patterns to follow
- Potential integration points
Return a structured report of your findings.
Synthesize findings:
Launch a codebase-synthesizer agent to merge and analyze the exploration results.
Use the Task tool with subagent_type: "dev-tools:codebase-synthesizer" and model: "opus":
Analysis context: [feature description]
Codebase path: [current working directory]
Exploration findings from [N] agents:
--- Agent 1: [Focus Area] ---
[Full report from agent 1]
--- Agent 2: [Focus Area] ---
[Full report from agent 2]
--- Agent 3: [Focus Area] (if applicable) ---
[Full report from agent 3]
Synthesize these findings into a unified analysis. Merge duplicates,
read critical files in depth, map relationships between components,
identify patterns, and assess challenges.
Present the synthesized analysis to the user.
Phase 3: Clarifying Questions
Goal: Resolve any ambiguities before designing.
Review the feature requirements and exploration findings.
Identify underspecified aspects:
- Edge cases not covered
- Technical decisions that could go multiple ways
- Integration points that need clarification
- Performance or scale requirements
Ask clarifying questions:
Use AskUserQuestion to get answers for critical unknowns. Only ask questions that would significantly impact the implementation.
If no clarifying questions are needed, inform the user and proceed.
Phase 4: Architecture Design
Goal: Design the implementation approach.
Load skills for this phase:
- Read
${CLAUDE_PLUGIN_ROOT}/skills/architecture-patterns/SKILL.md and apply its guidance
- Read
${CLAUDE_PLUGIN_ROOT}/skills/language-patterns/SKILL.md and apply its guidance
Launch code-architect agents:
Launch 2-3 code-architect agents (Opus) with different approaches:
Agent 1: Design a minimal, focused approach prioritizing simplicity
Agent 2: Design a flexible, extensible approach prioritizing future changes
Agent 3: Design an approach optimized for the project's existing patterns (if applicable)
Use the Task tool with subagent_type: "dev-tools:code-architect":
Feature: [feature description]
Design approach: [specific approach for this agent]
Based on the codebase exploration:
[Summary of relevant files and patterns]
Design an implementation that:
- Lists files to create/modify
- Describes the changes needed in each file
- Explains the data flow
- Identifies risks and mitigations
Return a detailed implementation blueprint.
Present approaches:
- Summarize each approach
- Compare trade-offs (simplicity, flexibility, performance, maintainability)
- Make a recommendation with justification
User chooses approach:
Use AskUserQuestion to let the user select an approach or request modifications.
Generate ADR artifact:
- Read the ADR template from
${CLAUDE_PLUGIN_ROOT}/skills/feature-dev/references/adr-template.md
- Create an ADR documenting:
- Context: Why this feature is needed
- Decision: The chosen approach
- Consequences: Trade-offs and implications
- Alternatives: Other approaches considered
- Determine the next ADR number by checking existing files in
internal/docs/adr/
- Save to
internal/docs/adr/NNNN-[feature-slug].md (create internal/docs/adr/ if needed)
- Inform the user of the saved ADR location
Phase 5: Implementation
Goal: Build the feature.
Require explicit approval:
Ask the user: "Ready to begin implementation of [feature] using [chosen approach]?"
Wait for confirmation before proceeding.
Read all relevant files:
Before making any changes, read the complete content of every file you'll modify.
Implement the feature:
- Follow the chosen architecture design
- Match existing code patterns and conventions
- Create new files as needed
- Update existing files using Edit tool
- Add appropriate error handling
- Include inline comments only where logic isn't obvious
Test if applicable:
- If the project has tests, add tests for the new functionality
- Run existing tests to ensure nothing broke
IMPORTANT: Proceed immediately to Phase 6.
Do NOT stop here. Do NOT wait for user input. Implementation is complete, but the workflow requires Quality Review and Summary phases. Continue directly to Phase 6 now.
Phase 6: Quality Review
Goal: Review the implementation for issues.
Load skills for this phase:
- Read
${CLAUDE_PLUGIN_ROOT}/skills/code-quality/SKILL.md and apply its guidance
Launch code-reviewer agents:
Launch 3 code-reviewer agents (Opus) with different focuses:
Agent 1: Review for correctness and edge cases
Agent 2: Review for security and error handling
Agent 3: Review for maintainability and code quality
Use the Task tool with subagent_type: "dev-tools:code-reviewer":
Review focus: [specific focus for this agent]
Files to review:
[List of files modified/created]
Review the implementation and report:
- Issues found with confidence scores (0-100)
- Suggestions for improvement
- Positive observations
Only report issues with confidence >= 80.
Aggregate findings:
- Collect results from all reviewers
- Deduplicate similar issues
- Prioritize by severity and confidence
Present findings:
Show the user:
- Critical issues (must fix)
- Moderate issues (should fix)
- Minor suggestions (nice to have)
User decides:
Use AskUserQuestion:
- "Fix all issues now"
- "Fix critical issues only"
- "Proceed without fixes"
- "I'll fix manually later"
If fixing: make the changes and re-review if needed.
IMPORTANT: Proceed immediately to Phase 7.
Do NOT stop here. The workflow requires a Summary phase to document accomplishments and update the CHANGELOG. Continue directly to Phase 7 now.
Phase 7: Summary
Goal: Document and celebrate accomplishments.
Summarize accomplishments:
Present to the user:
- What was built
- Key files created/modified
- Architecture decisions made
- Any known limitations or future work
Update CHANGELOG.md:
- Read the entry template from
${CLAUDE_PLUGIN_ROOT}/skills/feature-dev/references/changelog-entry-template.md
- Load the
changelog-format skill for Keep a Changelog guidelines
- Create an entry under the
[Unreleased] section with:
- Appropriate category (Added, Changed, Fixed, etc.)
- Concise description of the feature
- If
CHANGELOG.md doesn't exist, create it with proper header
- Add the entry to the appropriate section under
[Unreleased]
- Inform the user of the update
Final message:
Congratulate the user and offer next steps:
- Commit the changes
- Create a PR
- Additional testing suggestions
Error Handling
If any phase fails:
- Explain what went wrong
- Ask the user how to proceed:
- Retry the phase
- Skip to next phase
- Abort the workflow
Agent Coordination
When launching parallel agents:
- Give each agent a distinct focus area
- Wait for all agents to complete before synthesizing
- Handle agent failures gracefully (continue with partial results)
When calling Task tool for agents:
- Use
model: "opus" for codebase-synthesizer, code-architect, and code-reviewer agents
- Use default model (sonnet) for code-explorer agents
Additional Resources
- For ADR template, see references/adr-template.md
- For changelog entry format, see references/changelog-entry-template.md
1---2name: feature-dev-143description: Feature development workflow with exploration, architecture, implementation, and review phases. Use for implementing new features or significant changes.4---5
6# Feature Development Workflow
7
8Execute a structured 7-phase feature development workflow. This workflow guides you through understanding, exploring, designing, implementing, and reviewing a feature.
9
10**CRITICAL: Complete ALL 7 phases.** The workflow is not complete until Phase 7: Summary is finished. After completing each phase, immediately proceed to the next phase without waiting for user prompts.
11
12## Phase Overview
13
14Execute these phases in order, completing ALL of them:
15
161. **Discovery** - Understand the feature requirements
172. **Codebase Exploration** - Map relevant code areas
183. **Clarifying Questions** - Resolve ambiguities
194. **Architecture Design** - Design the implementation approach
205. **Implementation** - Build the feature
216. **Quality Review** - Review for issues
227. **Summary** - Document accomplishments
23
24---
25
26## Phase 1: Discovery
27
28**Goal:** Understand what the user wants to build.
29
301. Analyze the feature description from `$ARGUMENTS`:
31 - What is the core functionality?
32 - What are the expected inputs and outputs?
33 - Are there any constraints mentioned?
34 - What success criteria can you infer?
35
362. Summarize your understanding to the user. Use AskUserQuestion to confirm if your understanding is correct before proceeding.
37
38---
39
40## Phase 2: Codebase Exploration
41
42**Goal:** Understand the relevant parts of the codebase.
43
441. **Load skills for this phase:**
45 - Read `${CLAUDE_PLUGIN_ROOT}/skills/project-conventions/SKILL.md` and apply its guidance
46 - Read `${CLAUDE_PLUGIN_ROOT}/skills/language-patterns/SKILL.md` and apply its guidance
47
482. **Launch code-explorer agents:**
49
50 Launch 2-3 code-explorer agents in parallel with different focus areas:
51 ```
52 Agent 1: Explore entry points and user-facing code related to the feature
53 Agent 2: Explore data models, schemas, and storage related to the feature
54 Agent 3: Explore utilities, helpers, and shared infrastructure (if applicable)
55 ```
56
57 Use the Task tool with `subagent_type: "dev-tools:code-explorer"`:
58 ```
59 Feature: [feature description]
60 Focus area: [specific focus for this agent]
61
62 Find and analyze:
63 - Relevant files and their purposes
64 - Key functions/classes that would be modified or extended
65 - Existing patterns to follow
66 - Potential integration points
67
68 Return a structured report of your findings.
69 ```
70
713. **Synthesize findings:**
72
73 Launch a codebase-synthesizer agent to merge and analyze the exploration results.
74
75 Use the Task tool with `subagent_type: "dev-tools:codebase-synthesizer"` and `model: "opus"`:
76 ```
77 Analysis context: [feature description]
78 Codebase path: [current working directory]
79
80 Exploration findings from [N] agents:
81
82 --- Agent 1: [Focus Area] ---
83 [Full report from agent 1]
84
85 --- Agent 2: [Focus Area] ---
86 [Full report from agent 2]
87
88 --- Agent 3: [Focus Area] (if applicable) ---
89 [Full report from agent 3]
90
91 Synthesize these findings into a unified analysis. Merge duplicates,
92 read critical files in depth, map relationships between components,
93 identify patterns, and assess challenges.
94 ```
95
964. Present the synthesized analysis to the user.
97
98---
99
100## Phase 3: Clarifying Questions
101
102**Goal:** Resolve any ambiguities before designing.
103
1041. Review the feature requirements and exploration findings.
105
1062. Identify underspecified aspects:
107 - Edge cases not covered
108 - Technical decisions that could go multiple ways
109 - Integration points that need clarification
110 - Performance or scale requirements
111
1123. **Ask clarifying questions:**
113 Use AskUserQuestion to get answers for critical unknowns. Only ask questions that would significantly impact the implementation.
114
115 If no clarifying questions are needed, inform the user and proceed.
116
117---
118
119## Phase 4: Architecture Design
120
121**Goal:** Design the implementation approach.
122
1231. **Load skills for this phase:**
124 - Read `${CLAUDE_PLUGIN_ROOT}/skills/architecture-patterns/SKILL.md` and apply its guidance
125 - Read `${CLAUDE_PLUGIN_ROOT}/skills/language-patterns/SKILL.md` and apply its guidance
126
1272. **Launch code-architect agents:**
128
129 Launch 2-3 code-architect agents (Opus) with different approaches:
130 ```
131 Agent 1: Design a minimal, focused approach prioritizing simplicity
132 Agent 2: Design a flexible, extensible approach prioritizing future changes
133 Agent 3: Design an approach optimized for the project's existing patterns (if applicable)
134 ```
135
136 Use the Task tool with `subagent_type: "dev-tools:code-architect"`:
137 ```
138 Feature: [feature description]
139 Design approach: [specific approach for this agent]
140
141 Based on the codebase exploration:
142 [Summary of relevant files and patterns]
143
144 Design an implementation that:
145 - Lists files to create/modify
146 - Describes the changes needed in each file
147 - Explains the data flow
148 - Identifies risks and mitigations
149
150 Return a detailed implementation blueprint.
151 ```
152
1533. **Present approaches:**
154 - Summarize each approach
155 - Compare trade-offs (simplicity, flexibility, performance, maintainability)
156 - Make a recommendation with justification
157
1584. **User chooses approach:**
159 Use AskUserQuestion to let the user select an approach or request modifications.
160
1615. **Generate ADR artifact:**
162 - Read the ADR template from `${CLAUDE_PLUGIN_ROOT}/skills/feature-dev/references/adr-template.md`
163 - Create an ADR documenting:
164 - Context: Why this feature is needed
165 - Decision: The chosen approach
166 - Consequences: Trade-offs and implications
167 - Alternatives: Other approaches considered
168 - Determine the next ADR number by checking existing files in `internal/docs/adr/`
169 - Save to `internal/docs/adr/NNNN-[feature-slug].md` (create `internal/docs/adr/` if needed)
170 - Inform the user of the saved ADR location
171
172---
173
174## Phase 5: Implementation
175
176**Goal:** Build the feature.
177
1781. **Require explicit approval:**
179 Ask the user: "Ready to begin implementation of [feature] using [chosen approach]?"
180 Wait for confirmation before proceeding.
181
1822. **Read all relevant files:**
183 Before making any changes, read the complete content of every file you'll modify.
184
1853. **Implement the feature:**
186 - Follow the chosen architecture design
187 - Match existing code patterns and conventions
188 - Create new files as needed
189 - Update existing files using Edit tool
190 - Add appropriate error handling
191 - Include inline comments only where logic isn't obvious
192
1934. **Test if applicable:**
194 - If the project has tests, add tests for the new functionality
195 - Run existing tests to ensure nothing broke
196
1975. **IMPORTANT: Proceed immediately to Phase 6.**
198 Do NOT stop here. Do NOT wait for user input. Implementation is complete, but the workflow requires Quality Review and Summary phases. Continue directly to Phase 6 now.
199
200---
201
202## Phase 6: Quality Review
203
204**Goal:** Review the implementation for issues.
205
2061. **Load skills for this phase:**
207 - Read `${CLAUDE_PLUGIN_ROOT}/skills/code-quality/SKILL.md` and apply its guidance
208
2092. **Launch code-reviewer agents:**
210
211 Launch 3 code-reviewer agents (Opus) with different focuses:
212 ```
213 Agent 1: Review for correctness and edge cases
214 Agent 2: Review for security and error handling
215 Agent 3: Review for maintainability and code quality
216 ```
217
218 Use the Task tool with `subagent_type: "dev-tools:code-reviewer"`:
219 ```
220 Review focus: [specific focus for this agent]
221
222 Files to review:
223 [List of files modified/created]
224
225 Review the implementation and report:
226 - Issues found with confidence scores (0-100)
227 - Suggestions for improvement
228 - Positive observations
229
230 Only report issues with confidence >= 80.
231 ```
232
2333. **Aggregate findings:**
234 - Collect results from all reviewers
235 - Deduplicate similar issues
236 - Prioritize by severity and confidence
237
2384. **Present findings:**
239 Show the user:
240 - Critical issues (must fix)
241 - Moderate issues (should fix)
242 - Minor suggestions (nice to have)
243
2445. **User decides:**
245 Use AskUserQuestion:
246 - "Fix all issues now"
247 - "Fix critical issues only"
248 - "Proceed without fixes"
249 - "I'll fix manually later"
250
2516. If fixing: make the changes and re-review if needed.
252
2537. **IMPORTANT: Proceed immediately to Phase 7.**
254 Do NOT stop here. The workflow requires a Summary phase to document accomplishments and update the CHANGELOG. Continue directly to Phase 7 now.
255
256---
257
258## Phase 7: Summary
259
260**Goal:** Document and celebrate accomplishments.
261
2621. **Summarize accomplishments:**
263 Present to the user:
264 - What was built
265 - Key files created/modified
266 - Architecture decisions made
267 - Any known limitations or future work
268
2692. **Update CHANGELOG.md:**
270 - Read the entry template from `${CLAUDE_PLUGIN_ROOT}/skills/feature-dev/references/changelog-entry-template.md`
271 - Load the `changelog-format` skill for Keep a Changelog guidelines
272 - Create an entry under the `[Unreleased]` section with:
273 - Appropriate category (Added, Changed, Fixed, etc.)
274 - Concise description of the feature
275 - If `CHANGELOG.md` doesn't exist, create it with proper header
276 - Add the entry to the appropriate section under `[Unreleased]`
277 - Inform the user of the update
278
2793. **Final message:**
280 Congratulate the user and offer next steps:
281 - Commit the changes
282 - Create a PR
283 - Additional testing suggestions
284
285---
286
287## Error Handling
288
289If any phase fails:
2901. Explain what went wrong
2912. Ask the user how to proceed:
292 - Retry the phase
293 - Skip to next phase
294 - Abort the workflow
295
296---
297
298## Agent Coordination
299
300When launching parallel agents:
301- Give each agent a distinct focus area
302- Wait for all agents to complete before synthesizing
303- Handle agent failures gracefully (continue with partial results)
304
305When calling Task tool for agents:
306- Use `model: "opus"` for codebase-synthesizer, code-architect, and code-reviewer agents
307- Use default model (sonnet) for code-explorer agents
308
309## Additional Resources
310
311- For ADR template, see [references/adr-template.md](references/adr-template.md)
312- For changelog entry format, see [references/changelog-entry-template.md](references/changelog-entry-template.md)