feature
/feature - Feature Development Workflow
Section titled “/feature - Feature Development Workflow”Purpose
Section titled “Purpose”End-to-end feature development workflow that orchestrates planning, implementation guidance, testing, and code review.
/feature [feature description or issue reference]Arguments
Section titled “Arguments”$ARGUMENTS: Feature description, issue number, or requirement specification
Implement a complete feature development workflow for: $ARGUMENTS
Workflow
Section titled “Workflow”Phase 1: Planning
Section titled “Phase 1: Planning”First, analyze the feature request and create an implementation plan:
-
Understand Requirements
- Parse the feature description thoroughly
- Identify acceptance criteria
- List assumptions that need validation
- Clarify any ambiguous requirements with the user
-
Explore Codebase
- Find related existing implementations
- Identify patterns and conventions to follow
- Locate integration points
- Note dependencies
-
Create Task Breakdown
- Decompose into atomic, verifiable tasks
- Order tasks by dependencies
- Include testing requirements
- Estimate complexity (S/M/L)
-
Use TodoWrite to track all tasks
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
Output
Section titled “Output”Deliverables
Section titled “Deliverables”- Implementation Plan - Structured task breakdown
- Code Changes - Feature implementation
- Tests - Comprehensive test coverage
- Documentation - Updated docs if needed
- Commit/PR - Ready for merge
Summary Format
Section titled “Summary Format”## Feature Implementation Complete
### Feature[Feature description]
### Changes Made- `path/to/file.ts` - [What was added/modified]- `path/to/file.test.ts` - [Tests added]
### Tests- [x] Unit tests passing- [x] Integration tests passing- [x] Coverage: XX%
### Documentation- [x] Code comments added- [x] README updated (if applicable)
### Ready for Review```bashgit statusgit diff --stagedNext Steps
Section titled “Next Steps”- Review changes
- Run full test suite
- Create PR
## Example
**Input**: `/feature Add password reset functionality with email verification`
**Output**:1. Plan with 8 tasks covering model, service, routes, email, tests2. Implementation of password reset flow3. Tests for happy path and error cases4. Updated API documentation5. Commit message and PR description
## Flags
| Flag | Description | Example ||------|-------------|---------|| `--mode=[mode]` | Use specific behavioral mode | `--mode=implementation` || `--depth=[1-5]` | Planning thoroughness level | `--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 Usage Examples
```bash/feature --mode=implementation "add user profile page"/feature --depth=5 --checkpoint "implement payment flow"/feature --format=concise "add logging utility"MCP Integration
Section titled “MCP Integration”This command leverages MCP servers for enhanced capabilities:
Web Search - Library Documentation
Section titled “Web Search - Library Documentation”When researching unfamiliar libraries or frameworks:
Use web search and get-library-docs tools to fetchcurrent documentation for any libraries involved in the feature.Reasoning - Structured Planning
Section titled “Reasoning - Structured Planning”For complex feature breakdowns:
Use reasoning for step-by-stepanalysis when decomposing requirements or designing architecture.Memory - Context Persistence
Section titled “Memory - Context Persistence”Store and recall project context:
- Store architectural decisions made during planning- Recall user preferences from previous sessions- Remember patterns used in similar featuresFilesystem - File Operations
Section titled “Filesystem - File Operations”For creating and modifying files:
- Use list_dir to understand project structure- Use grep_search to find related implementations- Use view_file and write_to_file for file operationsBrowser tools - E2E Testing
Section titled “Browser tools - E2E Testing”For features with UI components:
Use Browser tools for browser testing of the implemented feature.Validate user flows and interactions in real browser environment.Variations
Section titled “Variations”Modify behavior via CLAUDE.md:
- Set minimum test coverage requirements
- Define required documentation updates
- Configure branch naming conventions
- Set PR template requirements
Gap Analysis Rule
Section titled “Gap Analysis Rule”Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.