Implement Feature
Implement a feature following the PRD-driven workflow.
Workflow
1. Read Specifications
- Read
docs/specs/[feature-name].mdfor requirements - Read
docs/tasks/[feature-name]-tasks.mdfor task breakdown - Understand acceptance criteria
2. Check Current Progress
- Identify the next uncompleted task
- Review any blockers or dependencies
- Understand the implementation context
3. Implement Current Task
- Follow the task description
- Reference the architecture documentation
- Use project patterns and conventions
4. Write Tests
- Write unit tests for new code
- Ensure critical paths are covered
- Follow Swift Testing patterns:
@Test func testFeatureBehavior() async throws {
// Arrange
let viewModel = FeatureViewModel(service: MockService())
// Act
await viewModel.performAction()
// Assert
#expect(viewModel.result == expectedValue)
}
5. Build and Verify
xcodebuild -scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15' \
build
xcodebuild test \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15'
6. Update Progress
- Mark task as complete in
docs/tasks/[feature-name]-tasks.md - Document any deviations or decisions
7. Wait for Approval
Stop after completing each task and wait for user approval before proceeding to the next.
Guidelines
- Implement incrementally
- Test as you go
- Follow project architecture
- Document decisions
- Don't skip ahead