Generate Feature Specification
Create a detailed feature specification from PRD requirements.
Workflow
1. Read PRD
- Read
docs/PRD.md - Identify the specific feature to spec
- Understand user stories and acceptance criteria
2. Create Specification
Output: docs/specs/[feature-name].md
# Feature Specification: [Feature Name]
## Metadata
- **Status**: Draft | In Review | Approved | In Development | Complete
- **Priority**: P0 | P1 | P2
- **PRD Reference**: [Section in PRD.md]
- **Author**: [Name]
- **Last Updated**: [Date]
## Overview
[2-3 sentences describing what this feature does]
## User Stories
1. As a [user type], I want to [action] so that [benefit]
2. As a [user type], I want to [action] so that [benefit]
## Acceptance Criteria
- [ ] AC1: [Specific, testable criterion]
- [ ] AC2: [Specific, testable criterion]
- [ ] AC3: [Specific, testable criterion]
## Technical Design
### Architecture
[How this fits into the MVVM architecture]
### Data Models
```swift
struct FeatureModel: Identifiable, Codable {
let id: UUID
var name: String
var createdAt: Date
}
API Endpoints (if applicable)
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/resource | Fetch resources |
| POST | /api/v1/resource | Create resource |
Dependencies
- [Service/module this depends on]
- [External library if any]
UI/UX Design
Key Screens
- [Screen Name]: [Description]
- [Screen Name]: [Description]
User Flow
[Screen A] -> [Action] -> [Screen B] -> [Action] -> [Screen C]
Wireframes
[Link to Figma or description]
Edge Cases
| Scenario | Expected Behavior |
|---|---|
| No network | Show cached data with offline indicator |
| Empty state | Show helpful message with action |
| Error | Show error with retry option |
Testing Plan
- Unit tests for ViewModel logic
- Integration tests for service layer
- UI tests for critical flows
Rollout Plan
- Feature flag:
feature_[name]_enabled - A/B testing considerations
- Rollback plan
Open Questions
- Question 1
- Question 2
### 3. Review and Refine
- Ensure alignment with PRD
- Verify technical feasibility
- Get stakeholder approval