/feature
/feature - Feature Development Workflow
Section titled “/feature - Feature Development Workflow”Purpose
Section titled “Purpose”Complete end-to-end feature development workflow that orchestrates planning, implementation guidance, testing, and code review. This command guides you through the entire lifecycle of building a new feature from requirements to merge-ready code.
/feature [feature description or issue reference]Arguments
Section titled “Arguments”[feature description]- Natural language description of the feature to build[issue reference]- GitHub issue number or ticket ID
How It Works
Section titled “How It Works”The /feature command executes a comprehensive 6-phase workflow:
Phase 1: Planning
Section titled “Phase 1: Planning”First, the command analyzes your feature request and creates an implementation plan:
-
Understand Requirements
- Parses the feature description thoroughly
- Identifies acceptance criteria
- Lists assumptions that need validation
- Clarifies any ambiguous requirements with you
-
Explore Codebase
- Finds related existing implementations
- Identifies patterns and conventions to follow
- Locates integration points
- Notes dependencies
-
Create Task Breakdown
- Decomposes into atomic, verifiable tasks
- Orders tasks by dependencies
- Includes testing requirements
- Estimates complexity (S/M/L)
-
Track with TodoWrite - All tasks are tracked for progress
Phase 2: Research (If Needed)
Section titled “Phase 2: Research (If Needed)”If the feature involves unfamiliar technology:
- Research best practices and patterns
- Find examples in the codebase or documentation
- Identify potential pitfalls
- Document key decisions
Phase 3: Implementation Guidance
Section titled “Phase 3: Implementation Guidance”For each implementation task:
-
Identify Target Files
- Existing files to modify
- New files to create
- Tests to add/update
-
Provide Implementation Direction
- Code structure recommendations
- Patterns to follow
- Edge cases to handle
- Error handling approach
-
Review Progress
- Mark tasks complete as you go
- Identify blockers early
- Adjust plan if needed
Phase 4: Testing
Section titled “Phase 4: Testing”After implementation:
-
Generate Tests
- Unit tests for new functions
- Integration tests for workflows
- Edge case coverage
-
Run Test Suite
Terminal window # Pythonpytest -v --cov=src# TypeScriptpnpm test -
Verify Coverage
- Ensure new code is tested
- Coverage should not decrease
Phase 5: Code Review
Section titled “Phase 5: Code Review”Before completion:
-
Self-Review Checklist
- Code follows project conventions
- No security vulnerabilities
- Error handling is complete
- Documentation updated
- Tests are passing
-
Review Staged Changes
Terminal window git diff --staged -
Address Any Issues
- Fix critical issues immediately
- Note recommendations for future
Phase 6: Completion
Section titled “Phase 6: Completion”-
Verify All Tasks Complete
- All TodoWrite items done
- All tests passing
- Documentation updated
-
Prepare for Commit
- Stage appropriate files
- Generate commit message
- Create PR if requested
| Flag | Description | Example |
|---|---|---|
--mode=[mode] | Use specific behavioral mode | --mode=implementation |
--depth=[1-5] | Planning thoroughness level (1=quick, 5=exhaustive) | --depth=3 |
--checkpoint | Create checkpoint before starting | --checkpoint |
--skip-tests | Skip test generation phase | --skip-tests |
--skip-review | Skip code review phase | --skip-review |
--format=[fmt] | Output format (concise/detailed) | --format=concise |
Flag Examples
Section titled “Flag Examples”# Implementation-focused mode with minimal prose/feature --mode=implementation "add user profile page"
# Thorough planning with session checkpoint/feature --depth=5 --checkpoint "implement payment flow"
# Quick feature with concise output/feature --format=concise "add logging utility"Examples
Section titled “Examples”Basic Feature
Section titled “Basic Feature”Input:
/feature Add password reset functionality with email verificationOutput:
- Implementation plan with 8 tasks covering model, service, routes, email, tests
- Step-by-step implementation of password reset flow
- Tests for happy path and error cases
- Updated API documentation
- Commit message and PR description ready
Feature with Issue Reference
Section titled “Feature with Issue Reference”Input:
/feature #142 - Add dark mode toggleOutput:
- Fetches context from GitHub issue #142
- Creates plan based on acceptance criteria
- Implements theme switching logic
- Adds tests for theme persistence
- Updates component documentation
Deliverables
Section titled “Deliverables”After running /feature, you receive:
- Implementation Plan - Structured task breakdown with estimates
- Code Changes - Complete feature implementation
- Tests - Comprehensive test coverage
- Documentation - Updated docs and comments
- Commit/PR - Ready for code review and merge