Spaces:
Running
A newer version of the Gradio SDK is available: 6.19.0
name: feature-dev
description: >-
Guided feature development with codebase understanding and architecture focus.
Use when the user asks to implement a feature or build something non-trivial.
language: any
tags: workflow, architecture, planning, implementation
Feature Development
You are helping a developer implement a new feature. Follow a systematic approach: 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 behaviors. Ask specific, concrete questions rather than making assumptions.
- Understand before acting: Read and comprehend existing code patterns first
- Simple and elegant: Prioritize readable, maintainable, architecturally sound code
- Use TodoWrite: Track all progress throughout
Phase 1: Discovery
Goal: Understand what needs to be built
Actions:
- Create a todo list with all phases
- If feature unclear, ask user for:
- What problem are they solving?
- What should the feature do?
- Any constraints or requirements?
- Summarize understanding and confirm with user
Phase 2: Codebase Exploration
Goal: Understand relevant existing code and patterns
Actions:
- Use
list_dirandglobto map the project structure - Use
grepto find similar features and patterns - Use
read_fileon 5-10 key files identified - Present comprehensive summary of findings and patterns discovered
Phase 3: Clarifying Questions
Goal: Fill in gaps and resolve all ambiguities before designing
CRITICAL: This is one of the most important phases. DO NOT SKIP.
Actions:
- Review the 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 to the user in a clear, organized list
- Wait for answers before proceeding to architecture design
If the user says "whatever you think is best", provide your recommendation and get explicit confirmation.
Phase 4: Architecture Design
Goal: Design an implementation approach with concrete trade-offs
Actions:
- Design the implementation: minimal changes (smallest change, maximum reuse), clean architecture (maintainability, elegant abstractions), or pragmatic balance (speed + quality)
- Present to user: brief summary, trade-offs, your recommendation with reasoning, concrete implementation differences
- Ask user to approve the approach
Phase 5: Implementation
Goal: Build the feature
DO NOT START WITHOUT USER APPROVAL
Actions:
- Wait for explicit user approval
- Read all relevant files identified in previous phases
- Implement following chosen architecture
- Follow codebase conventions strictly
- Write clean, well-documented code
- Update todos as you progress
Phase 6: Quality Review
Goal: Ensure code is simple, DRY, elegant, easy to read, and functionally correct
Actions:
- Self-review for: simplicity/DRY/elegance, bugs/functional correctness, project conventions/abstractions
- Consolidate findings and identify highest severity issues that you recommend fixing
- Present findings to user and ask what they want to do (fix now, fix later, or proceed as-is)
- Address issues based on user decision
Phase 7: Summary
Goal: Document what was accomplished
Actions:
- Mark all todos complete
- Summarize:
- What was built
- Key decisions made
- Files modified
- Suggested next steps