Task-Driven Development
Complete workflow for turning feature ideas into executed code using Cursor Agent with automated PRD generation, task breakdown, and progress tracking.
🎯 Workflow Overview
The Task-Driven Development Process
Key Benefits:
- Structured approach from idea to implementation
- AI-guided development with context-aware assistance
- Automatic documentation generation and maintenance
- Progress tracking with clear completion criteria
- Junior developer friendly with detailed, actionable steps
📋 Phase 1: PRD Generation
Triggering PRD Creation
Use Cursor Agent to activate the PRD generation rule:
// User provides initial feature idea
'I want to add a user profile editing feature';
// AI activates: saaskit-create-prd.mdc
// → Asks clarifying questions
// → Generates structured PRD
// → Saves to /product/wiki/prd-[feature-name].md
PRD Generation Process
1. Initial Feature Request
User Input: "Add user profile editing functionality"
2. AI Clarifying Questions
The AI must ask clarifying questions before writing the PRD:
Typical Questions:
- What problem does this feature solve for the user?
- Who is the primary user of this feature?
- What key actions should users be able to perform?
- Can you provide user stories? (As a [user], I want to [action] so that [benefit])
- How will we know when this feature is successfully implemented?
- What should this feature NOT do (non-goals)?
- What data does this feature need to display or manipulate?
- Are there any design mockups or UI guidelines to follow?
- What edge cases or error conditions should we consider?
3. Generated PRD Structure
# PRD: [Feature Name]
## Introduction/Overview
Brief description of the feature and problem it solves
## Goals
Specific, measurable objectives for this feature
## User Stories
Detailed user narratives describing feature usage and benefits
## Functional Requirements
1. The system must allow users to upload a profile picture
2. The system must validate email format before saving
3. The system must provide real-time form validation
[Numbered, specific requirements]
## Non-Goals (Out of Scope)
Clear statements of what this feature will NOT include
## Design Considerations (Optional)
UI/UX requirements, component references, style guidelines
## Technical Considerations (Optional)
Known constraints, dependencies, integration requirements
## Success Metrics
How success will be measured (engagement, user adoption, etc.)
## Open Questions
Remaining questions or areas needing clarification
4. PRD Storage
# Saved to:
/product/wiki/prd-[feature-name].md
# Example:
/product/wiki/prd-user-profile-editing.md
📝 Phase 2: Task List Generation
From PRD to Tasks
Once the PRD is complete, generate actionable tasks:
// User triggers task generation
'Generate tasks from the user profile editing PRD';
// AI activates: saaskit-generate-tasks.mdc
// → Analyzes PRD functional requirements
// → Creates high-level parent tasks
// → Waits for user confirmation
// → Breaks down into detailed sub-tasks
// → Identifies relevant files
// → Saves to /product/tasks/
Task Generation Process
1. PRD Analysis
AI reads and analyzes the PRD:
- Functional requirements
- User stories
- Technical considerations
- Success metrics
2. Phase 1: Parent Tasks
Generated Output:
## Tasks
- [ ] 1.0 Set up database schema for user profiles
- [ ] 2.0 Create backend mutations for profile updates
- [ ] 3.0 Build profile editing UI components
- [ ] 4.0 Implement file upload for profile pictures
- [ ] 5.0 Add form validation and error handling
AI Message: "I have generated the high-level tasks based on the PRD.
Ready to generate the sub-tasks? Respond with 'Go' to proceed."
3. User Confirmation
User: 'Go';
// AI proceeds to generate detailed sub-tasks
4. Phase 2: Detailed Sub-Tasks
## Tasks
- [ ] 1.0 Set up database schema for user profiles
- [ ] 1.1 Update users table schema with profile fields
- [ ] 1.2 Add profile picture storage field
- [ ] 1.3 Create validators for profile data
- [ ] 1.4 Add database indexes for profile queries
- [ ] 2.0 Create backend mutations for profile updates
- [ ] 2.1 Implement updateProfile mutation
- [ ] 2.2 Add profile picture upload mutation
- [ ] 2.3 Create profile validation helpers
- [ ] 2.4 Add error handling for profile updates
- [ ] 3.0 Build profile editing UI components
- [ ] 3.1 Create ProfileEditForm component
- [ ] 3.2 Build ProfilePictureUpload component
- [ ] 3.3 Add form validation UI feedback
- [ ] 3.4 Implement loading states and error displays
5. Relevant Files Identification
## Relevant Files
- `convex/schema/core.ts` - Update user table schema with profile fields
- `convex/core/users.mutations.ts` - Profile update and validation mutations
- `convex/core/users.validators.ts` - Profile data validation schemas
- `app/(authenticated)/profile/edit/page.tsx` - Main profile editing page
- `app/(authenticated)/profile/edit/_components/ProfileEditForm.tsx` - Form component
- `app/(authenticated)/profile/edit/_components/ProfilePictureUpload.tsx` - File upload component
- `hooks/useProfileUpdate.tsx` - Custom hook for profile updates
- `app/(authenticated)/profile/edit/_components/ProfileEditForm.test.tsx` - Unit tests for form
### Notes
- Unit tests should be placed alongside the code files they test
- Use `npx jest [optional/path/to/test/file]` to run tests
- All profile updates should go through proper validation
6. Task List Storage
# Saved to:
/product/tasks/tasks-[prd-file-name].md
# Example:
/product/tasks/tasks-prd-user-profile-editing.md
⚡ Phase 3: Task Execution
Execution Protocol
The task execution follows strict protocols to ensure quality and tracking:
// AI activates: saaskit-process-task-list.mdc
// → One sub-task at a time
// → Update task list after each completion
// → Wait for user approval between tasks
// → Track all file changes
Execution Rules
1. Sequential Execution
CRITICAL RULE: Execute ONE sub-task at a time
Process:
1. Identify next uncompleted sub-task
2. Implement the sub-task completely
3. Update task list: [ ] → [x]
4. Update "Relevant Files" section
5. Wait for user approval: "Continue to next task?"
6. User responds: "yes" or "y"
7. Proceed to next sub-task
DO NOT start the next sub-task without user permission
2. Completion Protocol
Sub-Task Completion:
- Mark completed sub-task: [x] 1.1 Update users table schema with profile fields
Parent Task Completion:
- When ALL sub-tasks are [x], mark parent task as [x]
- [x] 1.0 Set up database schema for user profiles
- [x] 1.1 Update users table schema with profile fields
- [x] 1.2 Add profile picture storage field
- [x] 1.3 Create validators for profile data
- [x] 1.4 Add database indexes for profile queries
3. Progress Tracking Example
## Current Progress: User Profile Editing Feature
### Completed Tasks
- [x] 1.0 Set up database schema for user profiles
- [x] 1.1 Update users table schema with profile fields
- [x] 1.2 Add profile picture storage field
- [x] 1.3 Create validators for profile data
- [x] 1.4 Add database indexes for profile queries
- [ ] 2.0 Create backend mutations for profile updates
- [x] 2.1 Implement updateProfile mutation
- [x] 2.2 Add profile picture upload mutation
- [ ] 2.3 Create profile validation helpers ← NEXT TASK
- [ ] 2.4 Add error handling for profile updates
### Recently Modified Files
- `convex/schema/core.ts` - Added profile fields to users table
- `convex/core/users.mutations.ts` - Added updateProfile and uploadProfilePicture mutations
- `convex/core/users.validators.ts` - Added profile validation schemas
### Next Action
Implement sub-task 2.3: Create profile validation helpers
📊 Phase 4: Progress Tracking & Maintenance
Continuous Updates
The task list serves as a living document that’s continuously updated:
During Execution:
✅ Mark completed tasks and sub-tasks
✅ Add newly discovered tasks as they emerge
✅ Update "Relevant Files" with all modifications
✅ Maintain accurate progress indicators
✅ Document any blockers or issues encountered
File Tracking Example
## Relevant Files (Updated During Development)
### Created Files
- `app/(authenticated)/profile/edit/page.tsx` - Main profile editing page
- `app/(authenticated)/profile/edit/_components/ProfileEditForm.tsx` - Form component
- `app/(authenticated)/profile/edit/_components/ProfilePictureUpload.tsx` - Upload component
- `hooks/useProfileUpdate.tsx` - Custom profile update hook
### Modified Files
- `convex/schema/core.ts` - Added profile fields to users table
- `convex/core/users.mutations.ts` - Added profile update mutations
- `convex/core/users.validators.ts` - Added profile validation schemas
- `app/(authenticated)/layout.tsx` - Added profile route to navigation
### Test Files
- `app/(authenticated)/profile/edit/_components/ProfileEditForm.test.tsx` - Form component tests
- `hooks/useProfileUpdate.test.tsx` - Hook functionality tests
Dynamic Task Addition
## Tasks (Updated During Development)
### Original Tasks
- [x] 1.0 Set up database schema for user profiles
- [x] 2.0 Create backend mutations for profile updates
- [ ] 3.0 Build profile editing UI components
### Discovered Tasks (Added During Development)
- [ ] 4.0 Add profile edit link to user dropdown menu
- [ ] 5.0 Create profile edit confirmation toast
- [ ] 6.0 Add profile completion progress indicator
- [ ] 7.0 Implement profile edit permission checks
### Reason for Addition
During implementation, we discovered that users need:
1. Easy navigation to profile editing
2. Feedback when profile updates succeed
3. Visual progress for incomplete profiles
4. Proper authorization for profile modifications
🔧 Cursor Agent Integration
Rule Activation Commands
# Generate PRD
"Create a PRD for [feature description]"
→ Activates: saaskit-create-prd.mdc
# Generate Tasks
"Generate tasks from [PRD file name]"
→ Activates: saaskit-generate-tasks.mdc
# Execute Tasks
"Start implementing tasks from [task file name]"
→ Activates: saaskit-process-task-list.mdc
# Check Progress
"Show progress on [feature name] tasks"
→ Reviews current task list and completion status
AI Workflow Integration
// Complete AI-guided workflow:
1. Feature Ideation
User: "I want to add user profile editing"
AI: → Asks clarifying questions
AI: → Generates comprehensive PRD
2. Task Planning
User: "Generate tasks from the profile editing PRD"
AI: → Analyzes PRD requirements
AI: → Creates parent tasks, waits for confirmation
User: "Go"
AI: → Generates detailed sub-tasks and file list
3. Implementation
User: "Start implementing the profile editing tasks"
AI: → Implements first sub-task
AI: → Updates task list and file tracking
AI: → Waits for approval: "Continue to next task?"
User: "yes"
AI: → Continues to next sub-task
4. Completion
AI: → All tasks marked [x]
AI: → Feature implementation complete
AI: → Documentation updated automatically
🚀 Benefits of Task-Driven Development
Structured Development
- Clear progression from idea to implementation
- Comprehensive planning before coding begins
- Predictable outcomes with defined success criteria
Quality Assurance
- Thorough requirements gathering through PRD process
- Step-by-step validation during task execution
- Complete documentation maintained throughout
Team Collaboration
- Junior developer friendly with detailed, actionable tasks
- Clear handoff points between team members
- Transparent progress tracking for stakeholders
AI Efficiency
- Context-aware assistance through specialized rules
- Consistent patterns across all feature development
- Reduced cognitive load with automated task breakdown
Continuous Improvement
- Task refinement based on implementation discoveries
- Pattern recognition for better future planning
- Knowledge preservation in PRDs and task lists
This task-driven development workflow transforms feature ideas into production code with AI guidance, ensuring consistent quality and comprehensive documentation throughout the development process. # Task Driven Development
Coming soon…
This section is currently under development.