You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a technical design that discusses how a feature could be implemented at a high level. This is step 2 of 3 - a discussion document for senior engineers, not an implementation guide.
Process
Read PRD: Load and understand the requirements ($ARGUMENTS)
Start Conversation: Ask clarifying questions about complexity and constraints
Gather Context: Based on the PRD and conversation, search for:
Similar patterns in the codebase
Relevant architecture documentation
Existing components that could be extended
Iterate Together: Suggest approaches, refine through conversation
Save Progress: Update __tasks/[feature-name]/design.md as decisions are made
Finalize: Complete the design document
Key Focus Areas
Naming - Good names simplify concepts. Discuss what things should be called.
Interfaces & Integration - What do methods accept/return? How do components connect?
Interaction Model
Work conversationally to distill complexity into simple solutions:
Ask questions about constraints and existing patterns
Present different approaches with trade-offs
Get feedback and iterate until the solution is clear
Focus on architectural decisions, not implementation details
Think like senior engineers discussing an approach, not writing instructions
Create a focused Product Requirements Document (PRD) that defines what needs to be built and why, setting the foundation for a subsequent technical design document that will address how to implement it.
Process
Receive Initial Prompt: The user provides a brief description or request for a new feature: $ARGUMENTS
Ask Clarifying Questions: Gather essential details focusing on business requirements, user needs, and desired outcomes. Avoid technical implementation details. Use numbered questions for easy reference.
Iterative Refinement (Optional): If the user provides partial answers, confirm what questions remain unanswered and let the user choose whether to provide more details or proceed with PRD generation.
Generate PRD: Create a concise PRD using the structure below, focusing on requirements and outcomes.
Save PRD: Save as __tasks/[feature-name]/prd.md
Next Step: This PRD will inform a follow-up technical design document covering architecture and implementation approach.
Clarifying Questions
Focus on business requirements and user needs. Use numbered questions for easy reference and answers. Key areas to explore:
Problem/Goal: What problem does this solve? What's the desired outcome?
Target User: Who will use this feature? What's their context?
Core Functionality: What key actions should users be able to perform?
User Stories: Can you provide 2-3 user stories showing the main use cases?
Success Criteria: How will we know this feature is successful?
Scope/Boundaries: What should this feature NOT include?
Data Requirements: What information does this feature work with?
Interaction Notes:
Ask questions in numbered format for easy reference
User can answer with format like "1: answer, 3: answer, 5: answer" to address specific questions
If user provides partial answers, summarize what's still unanswered and let them choose to elaborate or proceed
General rule: Assume less, ask more
PRD Structure
Overview: Brief description of the feature and problem it solves
Goals: Specific, measurable objectives
User Stories: 2-3 key user narratives showing main use cases
Functional Requirements: Numbered list of what the system must do
Non-Goals: What this feature will NOT include
Success Metrics: How success will be measured
Open Questions: Any remaining clarifications needed
Key Principles
Business Focus: Describe WHAT needs to be built and WHY, not HOW
Clear Requirements: Use explicit, unambiguous language
User-Centered: Focus on user needs and outcomes
Scope Management: Clearly define what's included and excluded
Output
Save as __tasks/[feature-name]/prd.md
Instructions
Ask clarifying questions first using numbered format for easy reference
Focus on business requirements, avoid technical implementation
Confirmation Approach: If user provides incomplete answers, summarize what questions remain unanswered and ask if they want to provide more details or proceed with PRD generation
Create the PRD based on user responses, avoiding assumptions when possible
Create the feature directory if it doesn't exist
The PRD will feed into a separate technical design step
Example Interaction Flow:
Initial questions: "Here are some questions to help me create the PRD: 1. What problem does this solve? 2. Who will use this feature? ..."
Confirmation: "Thanks for answering questions 1, 3, and 5. I still have questions 2, 4, and 6 unanswered. Would you like to provide answers to these, or should I proceed with creating the PRD based on what you've shared?"
To guide an AI assistant in creating a detailed, step-by-step task list in Markdown format based on an existing Product Requirements Document (PRD). The task list should guide a developer through implementation.
Read Context: Load PRD and design document from the feature directory
Phase 1: Generate Parent Tasks: Based on the PRD and design, create the file and generate the main, high-level tasks required to implement the feature. Use your judgement on how many high-level tasks to use. It's likely to be about 5. Present these tasks to the user in the specified format (without sub-tasks yet). Inform the user: "I have generated the high-level tasks based on the PRD. Ready to generate the sub-tasks? Respond with 'Go' to proceed."
Wait for Confirmation: Pause and wait for the user to respond with "Go".
Phase 2: Generate Sub-Tasks: Once confirmed, break down each parent task into smaller, actionable sub-tasks following incremental development principles. Ensure sub-tasks logically follow from the parent task and cover the implementation details implied by the design PRD. Important: Include testing tasks at logical points throughout implementation (e.g., after completing a controller action, form object, or key service) rather than leaving all testing for the end. Focus on testing what provides value - not every small implementation detail needs immediate specs, but core functionality and user-facing features should be tested as they're built.
Generate Final Output: Combine the parent tasks, sub-tasks, relevant files, and notes into the final Markdown structure.
Save Task List: Save as __tasks/[feature-name]/tasks.md
Output Format
The generated task list must follow this structure:
### Notes-**Testing Strategy**: Follow Rails testing best practices with RSpec. Tests should be written alongside implementation, not as a separate phase.
## Tasks-[ ] 1.0 Parent Task Title
-[ ] 1.1 [Implementation sub-task]-[ ] 1.2 [Implementation sub-task]-[ ] 1.3 [Write specs for core functionality]-[ ] 1.4 [Integration sub-task]-[ ] 2.0 Parent Task Title
-[ ] 2.1 [Implementation sub-task]-[ ] 2.2 [Implementation sub-task]-[ ] 2.3 [Write specs for user-facing features]-[ ] 3.0 Parent Task Title (may not require sub-tasks if purely structural or configuration)
Output
Format: Markdown (.md)
Location:__tasks/[feature-name]/
Filename:tasks.md
Interaction Model
The process explicitly requires a pause after generating parent tasks to get user confirmation ("Go") before proceeding to generate the detailed sub-tasks. This ensures the high-level plan aligns with user expectations before diving into details.
Target Audience
Assume the primary reader of the task list is a junior developer who will implement the feature.
One sub-task at a time: Do NOT start the next sub‑task until you ask the user for permission and they say "yes" or "y"
Completion protocol:
When you finish a sub‑task, immediately mark it as completed by changing [ ] to [x].
If all subtasks underneath a parent task are now [x], also mark the parent task as completed.
Stop after each sub‑task and wait for the user's go‑ahead.
Task List Maintenance
Update the task list as you work:
Mark tasks and subtasks as completed ([x]) per the protocol above.
Add new tasks as they emerge.
Maintain the "Relevant Files" section:
List every file created or modified.
Give each file a one‑line description of its purpose.
Execution Mode Selection
Before beginning task implementation, ask the user to choose their preferred execution mode:
"Would you like to use parallel sub-agent execution for independent tasks? This can be faster but uses more tokens. (yes for parallel, no for sequential)"
Parallel Mode (yes): Launch multiple sub-agents to work on independent tasks simultaneously
Faster completion for tasks without dependencies
Higher token usage due to multiple concurrent agents
All dependency rules are strictly enforced
Only tasks with satisfied dependencies can run in parallel
Sequential Mode (no): Process tasks one at a time in order
Lower token usage
Easier to follow progress
Traditional one-by-one execution
Process
Read Context: Load PRD, design document, and task list from the feature directory
Ask Execution Mode: Present the parallel vs sequential choice to the user
Identify Next Task(s):
Sequential Mode: Find the first incomplete sub-task (marked with [ ]) that has all its dependencies satisfied
Parallel Mode: Find ALL incomplete sub-tasks that have all their dependencies satisfied
Check for [depends on: X.Y] notation
Verify all referenced dependencies are marked [x]
Skip tasks with incomplete dependencies
Implement Task(s):
Sequential Mode: Work on the specific sub-task
Parallel Mode: Launch sub-agents for each independent task
Follow best practices:
Understand existing codebase patterns before making changes
Follow project conventions and coding standards
Write tests when applicable
Ensure code quality and security
Update Task List: Mark completed sub-task(s) as [x] and update relevant files section
Request Permission: Ask user for permission to continue to next sub-task(s)
Repeat: Continue with next batch of tasks only after user approval
Important Guidelines
Before starting work: Check which sub‑task is next by examining the task list and verifying all dependencies are satisfied
After implementing a sub‑task: Update the task list file and pause for user approval
When all sub-tasks under a parent are complete: Mark the parent task as [x] as well
If you discover new tasks: Add them to the task list in the appropriate location
For file modifications: Always read existing files first to understand patterns and conventions
For testing: Run bundle exec rspec to verify implementations (see testing_execution.md)
Dependency Checking
Before starting any task:
Parse the [depends on: X.Y] notation in the task description
For each dependency:
Locate the referenced task (X.Y or X.0)
Verify it is marked as complete [x]
If any dependencies are incomplete:
Skip this task
Show message: "Task X.Y is blocked by incomplete dependencies: [list]"
Find the next available task with satisfied dependencies
Handle multiple dependencies (e.g., [depends on: 1.2, 3.4]) by checking all listed tasks
Task Completion Protocol
Complete the implementation for one sub-task
Update the task list file:
Change [ ] to [x] for the completed sub-task
Update "Relevant Files" section if new files were created/modified
Mark parent task [x] if all its sub-tasks are now complete
Save the updated task list file
Ask user: "Sub-task [X.Y] completed. Ready for the next sub-task? (yes/y to continue)"
Wait for user confirmation before proceeding
Error Handling
If a sub-task cannot be completed due to blockers, keep it as [ ] and create a new sub-task describing what needs to be resolved
Never mark a task as completed if:
Tests are failing
Implementation is partial
Unresolved errors occurred
Required files or dependencies are missing
Instructions
Read the task list file specified in $ARGUMENTS
Find the first incomplete sub-task with all dependencies satisfied
If a task has dependencies, verify they are complete before proceeding
Implement the task following the completion protocol
Update the task list and request user permission before continuing
Only work on one sub-task at a time with user approval between each