mirror of
https://github.com/duthaho/claudekit.git
synced 2026-06-10 12:14:57 +03:00
4.7 KiB
4.7 KiB
/feature - Feature Development Workflow
Purpose
End-to-end feature development workflow that orchestrates planning, implementation guidance, testing, and code review.
Usage
/feature [feature description or issue reference]
Arguments
$ARGUMENTS: Feature description, issue number, or requirement specification
Implement a complete feature development workflow for: $ARGUMENTS
Workflow
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)
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
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
After implementation:
-
Generate Tests
- Unit tests for new functions
- Integration tests for workflows
- Edge case coverage
-
Run Test Suite
# Python pytest -v --cov=src # TypeScript pnpm test -
Verify Coverage
- Ensure new code is tested
- Coverage should not decrease
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
git diff --staged -
Address Any Issues
- Fix critical issues immediately
- Note recommendations for future
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
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
## 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
```bash
git status
git diff --staged
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, tests
2. Implementation of password reset flow
3. Tests for happy path and error cases
4. Updated API documentation
5. 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"
Variations
Modify behavior via CLAUDE.md:
- Set minimum test coverage requirements
- Define required documentation updates
- Configure branch naming conventions
- Set PR template requirements