# Generating a Task List
## Goal
To guide an AI assistant in creating a detailed, step-by-step task list in Markdown format based on user provided requirements. The task list should guide a junior developer through implementation.
## Output
- **Format:** Markdown (`.md`)
- **Location:** `doc/tasks/` (or any other directory that user specifies)
- **Filename:** `tasks-[requirements-file-name].md` (e.g., `tasks-prd-user-profile-editing.md`)
## Process
1. **Receive Requirements Reference:** The user points the AI to a specific requirements either in chat or file
2. **Analyze Requirements:** The AI reads and analyzes the functional requirements, user stories, and other sections of the specified requirements. The AI also analyzes all the referenced documents (such as PRDs, best practices, e.t.c)
3. **Phase 1: Generate Parent Tasks:** Based on the requirements analysis, 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 from 3 to 7 (fewer is better). Present these tasks to the user in the specified format (without sub-tasks yet).
4. **Wait for Confirmation:** Pause and wait for the user to respond with "Go".
5. **Phase 2: Generate Sub-Tasks:** Once the user confirms, break down each parent task into smaller, actionable sub-tasks necessary to complete the parent task. Ensure sub-tasks logically follow from the parent task and cover the implementation details implied by the requirements. Make sure each sub-task is atomic and self-contained.
7. **Important** Do not create tasks to add tests. Tests will be part of each sub-task, however they should not be mentioned in the sub-task. Separate instruction to process task list will be provided that will explicitly mention tests.
6. **Identify Relevant Files:** Based on the tasks and requirements, identify potential files that will need to be created or modified. List these under the `Relevant Files` section, including corresponding test files if applicable.
7. **Generate Final Output:** Combine the parent tasks, sub-tasks, relevant files, and notes into the final Markdown structure.
8. **Save Task List:** Save the generated document in the required directory with the filename `tasks-[requirements-file-name].md`, where `[requirements-file-name]` matches the base name of the input requirements file (e.g., if the input was `prd-user-profile-editing.md`, the output is `tasks-prd-user-profile-editing.md`).
## Output Format
The generated task list _must_ follow this structure:
```markdown
# Process task list based on the requirements
## Requirements
_include this if user provided file(s)_
Please read referenced files to understand the problem:
- `requirements/file/path1`
- `requirements/file/path2`
- `requirements/file/path3`
_include this if user provided verbal description. In this case include as is from the user_
Please review user provided requirements:
_Implement feature XYZ..._
## Relevant Files
Example of relevant files:
### Source Files
- `internal/app/bitbucket.go` - Application layer component related to Bitbucket integration
- `internal/services/bitbucket/create_pr.go` - Service layer component (API client) for creating pull requests
- `internal/api/mcp/controllers/bitbucket.go` - MCP controller for Bitbucket integration
### Test Files
- `internal/app/bitbucket_test.go` - Unit tests for Bitbucket integration
- `internal/services/bitbucket/create_pr_test.go` - Unit tests for Bitbucket integration
- `internal/api/mcp/controllers/bitbucket_test.go` - Unit tests for MCP controller for Bitbucket integration
## Tasks
- [ ] 1.0 Parent Task Title
- [ ] 1.1 [Sub-task description 1.1]
- [ ] 1.2 [Sub-task description 1.2]
- [ ] 1.3 [Sub-task description 1.3]
- ..... repeat 1.1...1.3 as needed
- [ ] 2.0 Parent Task Title (follows same approach as 1.1)
- [ ] 2.1 [Sub-task description 2.1]
- [ ] 3.0 Parent Task Title (may not require sub-tasks if purely structural or configuration)
```
## 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** or LLM model with small context window who will implement the feature.
## Writing Tasks
Sub-tasks should be granular enough to complete in 15-30 minute cycles by junior developer or LLM model with small context window.
**DO NOT** explicitly create tasks for tests. This is out of scope of task list. But mention relevant test files.
**DO NOT** start any implementation. This is out of scope of this instruction.