Generate a feature specification document for implementing new functionality in an existing project
Generates comprehensive feature specification documents for planning new functionality in existing projects.
/plugin marketplace add Linaqruf/cc-plugins/plugin install project-spec@cc-plugins[feature-name]Generate a focused feature_spec.md for planning and implementing new features in existing projects.
First, gather project context:
project_spec.md if it existsIf a feature name was provided, use it as the starting point. If not, ask the user what feature they want to build.
Use AskUserQuestion to gather feature requirements. Ask 2-4 questions per interaction.
Phase 1: Feature Definition
Feature overview:
1. What does this feature do? (one sentence)
2. What problem does it solve for users?
3. What is the expected user interaction?
Phase 2: Scope & Requirements
Feature scope:
1. What are the must-have requirements for this feature?
2. What is explicitly out of scope?
3. Are there any dependencies on other features?
Phase 3: Technical Approach
Implementation questions:
1. Which existing components/patterns should this follow?
2. Does this require new API endpoints?
3. Does this require database changes?
4. Are there any third-party integrations needed?
Phase 4: Edge Cases & Testing
Quality considerations:
1. What are the key edge cases to handle?
2. What error states need to be designed?
3. How should this feature be tested?
Use Glob and Grep to understand:
Write the feature specification:
# Feature Specification: [Feature Name]
## Overview
- Description
- Problem Statement
- User Story
## Requirements
- Must Have
- Nice to Have
- Out of Scope
## Technical Design
- Affected Components
- New Components
- API Changes
- Database Changes
## Implementation Plan
- Step-by-step tasks
- Dependencies between steps
## UI/UX (if applicable)
- User flow
- Component designs
- States and interactions
## Edge Cases
- Error handling
- Boundary conditions
## Testing Strategy
- Unit tests
- Integration tests
- E2E scenarios
## Open Questions
After generating, offer:
Feature spec created! Next steps:
1. Review and refine requirements
2. Use feature-dev skill to explore codebase patterns
3. Start implementation following the plan
The generated feature_spec.md works with the feature-dev skill:
Suggest using these agents after the spec is created.
If no project_spec.md or recognizable project structure:
If user requirements are vague:
If the feature seems too large:
For feature interview questions:
${CLAUDE_PLUGIN_ROOT}/skills/spec-writing/references/interview-questions.md (Feature section)For example feature specifications:
${CLAUDE_PLUGIN_ROOT}/skills/spec-writing/examples/feature-spec.md