Feature Development
Systematic approach to implementing new features: understand the codebase deeply, identify and ask about all underspecified details, design elegant architectures, then implement.
Core Principles
- Ask clarifying questions: Identify all ambiguities, edge cases, and underspecified behaviours. Ask specific, concrete questions rather than making assumptions. Wait for user answers before proceeding.
- Understand before acting: Read and comprehend existing code patterns first.
- Simple and elegant: Prioritise readable, maintainable, architecturally sound code.
- Track progress: Use TodoWrite throughout.
Phase 1: Discovery
Goal: Understand what needs to be built.
- Create todo list with all phases
- If feature unclear, ask user for: what problem they're solving, what the feature should do, any constraints or requirements
- Summarise understanding and confirm with user
Phase 2: Codebase Exploration
Goal: Understand relevant existing code and patterns at both high and low levels.
- Launch 2-3 code-explorer agents in parallel, each targeting a different aspect:
- Similar features and their implementation
- Architecture and abstractions for the feature area
- UI patterns, testing approaches, or extension points
- Each agent should return a list of 5-10 key files to read
- Read all files identified by agents to build deep understanding
- Present comprehensive summary of findings and patterns
Phase 3: Clarifying Questions
Goal: Fill in gaps and resolve all ambiguities before designing.
CRITICAL: Do not skip this phase.
- Review codebase findings and original feature request
- Identify underspecified aspects: edge cases, error handling, integration points, scope boundaries, design preferences, backward compatibility, performance needs
- Present all questions in a clear, organised list
- Wait for answers before proceeding
Phase 4: Architecture Design
Goal: Design implementation approaches with different trade-offs.
- Launch 2-3 code-architect agents with different focuses: minimal changes, clean architecture, or pragmatic balance
- Review approaches and form opinion on best fit
- Present: brief summary of each approach, trade-offs comparison, your recommendation with reasoning
- Ask user which approach they prefer
Phase 5: Implementation
Goal: Build the feature.
Do not start without user approval.
- Wait for explicit user approval
- Read all relevant files identified in previous phases
- Implement following chosen architecture
- Follow codebase conventions strictly
- Update todos as you progress
Phase 6: Quality Review
Goal: Ensure code is simple, DRY, elegant, easy to read, and functionally correct.
- Launch code-reviewer agents with different focuses: simplicity/DRY/elegance, bugs/functional correctness, project conventions/abstractions
- Consolidate findings and identify highest severity issues
- Present findings and ask what user wants to do (fix now, fix later, or proceed as-is)
- Address issues based on user decision
Phase 7: Summary
Goal: Document what was accomplished.
- Mark all todos complete
- Summarise: what was built, key decisions made, files modified, suggested next steps
Agent Types
Full agent specifications are in the agents/ folder. Summary:
- code-explorer — Traces execution paths, maps architecture layers, documents dependencies. See
agents/code-explorer.md
- code-architect — Designs feature architectures with implementation blueprints. See
agents/code-architect.md
- code-reviewer — Reviews code with confidence-based filtering (>= 80). See
agents/code-reviewer.md
1---2name: feature-dev3description: Guided feature development with codebase understanding and architecture focus. Use when implementing new features to follow a systematic discovery, exploration, design, and implementation workflow.4---56# Feature Development78Systematic approach to implementing new features: understand the codebase deeply, identify and ask about all underspecified details, design elegant architectures, then implement.910## Core Principles1112- **Ask clarifying questions**: Identify all ambiguities, edge cases, and underspecified behaviours. Ask specific, concrete questions rather than making assumptions. Wait for user answers before proceeding.13- **Understand before acting**: Read and comprehend existing code patterns first.14- **Simple and elegant**: Prioritise readable, maintainable, architecturally sound code.15- **Track progress**: Use TodoWrite throughout.1617## Phase 1: Discovery1819**Goal**: Understand what needs to be built.20211. Create todo list with all phases222. If feature unclear, ask user for: what problem they're solving, what the feature should do, any constraints or requirements233. Summarise understanding and confirm with user2425## Phase 2: Codebase Exploration2627**Goal**: Understand relevant existing code and patterns at both high and low levels.28291. Launch 2-3 code-explorer agents in parallel, each targeting a different aspect:30 - Similar features and their implementation31 - Architecture and abstractions for the feature area32 - UI patterns, testing approaches, or extension points33 - Each agent should return a list of 5-10 key files to read342. Read all files identified by agents to build deep understanding353. Present comprehensive summary of findings and patterns3637## Phase 3: Clarifying Questions3839**Goal**: Fill in gaps and resolve all ambiguities before designing.4041**CRITICAL**: Do not skip this phase.42431. Review codebase findings and original feature request442. Identify underspecified aspects: edge cases, error handling, integration points, scope boundaries, design preferences, backward compatibility, performance needs453. Present all questions in a clear, organised list464. Wait for answers before proceeding4748## Phase 4: Architecture Design4950**Goal**: Design implementation approaches with different trade-offs.51521. Launch 2-3 code-architect agents with different focuses: minimal changes, clean architecture, or pragmatic balance532. Review approaches and form opinion on best fit543. Present: brief summary of each approach, trade-offs comparison, your recommendation with reasoning554. Ask user which approach they prefer5657## Phase 5: Implementation5859**Goal**: Build the feature.6061**Do not start without user approval.**62631. Wait for explicit user approval642. Read all relevant files identified in previous phases653. Implement following chosen architecture664. Follow codebase conventions strictly675. Update todos as you progress6869## Phase 6: Quality Review7071**Goal**: Ensure code is simple, DRY, elegant, easy to read, and functionally correct.72731. Launch code-reviewer agents with different focuses: simplicity/DRY/elegance, bugs/functional correctness, project conventions/abstractions742. Consolidate findings and identify highest severity issues753. Present findings and ask what user wants to do (fix now, fix later, or proceed as-is)764. Address issues based on user decision7778## Phase 7: Summary7980**Goal**: Document what was accomplished.81821. Mark all todos complete832. Summarise: what was built, key decisions made, files modified, suggested next steps8485## Agent Types8687Full agent specifications are in the `agents/` folder. Summary:8889- **code-explorer** — Traces execution paths, maps architecture layers, documents dependencies. See `agents/code-explorer.md`90- **code-architect** — Designs feature architectures with implementation blueprints. See `agents/code-architect.md`91- **code-reviewer** — Reviews code with confidence-based filtering (>= 80). See `agents/code-reviewer.md`