Back to Discover

🚀 Generate Task List (TDD)

Generate Task List (TDD) description placeholder

Prompt

Generate a Markdown task list file following Test-Driven Development (TDD) principles. The purpose of this task list is to outline the implementation steps for a project or a specific feature using a test-first approach. **File Naming:** * If the task list covers a system-wide implementation (referencing the general PRD and system-wide DESIGN document), name the output file `TASKS.md`. * If the task list is for a specific, identifiable task or feature (referencing a task-specific section of the PRD or a task-specific DESIGN document), name the output file `TASKS-[task_identifier].md`, replacing `[task_identifier]` with a concise, relevant identifier for that task (e.g., `TASKS-user-authentication.md`). **Content and Structure Requirements:** 1. **Source Documents:** * The tasks and their breakdown must be derived directly from the project's **PRD (Product Requirements Document)** and the relevant **DESIGN document(s)**. * Ensure that the generated tasks accurately reflect the requirements and design specifications while following TDD methodology. 2. **TDD Methodology Integration:** * All implementation tasks must follow the **Red-Green-Refactor** cycle: * **Red Phase:** Write failing tests first * **Green Phase:** Write minimal code to make tests pass * **Refactor Phase:** Improve code quality while maintaining test coverage * Tasks must be ordered to ensure tests are written before corresponding implementation * Include explicit refactoring tasks after each implementation cycle * Emphasize unit tests, integration tests, and end-to-end tests as separate phases 3. **Overall Document Structure:** * **Main Title:** Start with a descriptive main title for the checklist, e.g., `# [Project/Feature Name] Implementation Checklist (TDD)`. * **Table of Contents (TOC):** * For GitHub-flavored Markdown, you can rely on automatic TOC generation based on headings * Alternatively, you can use a TOC generator tool or extension for your Markdown editor * **Task Status Legend:** * Include a section titled `## Task Status Legend`. * Define the following status markers within this section: ```markdown * ⬜ = Pending task * ✅ = Completed task * ⭕ = Pending Approval * ❌ = Failed task * ❓ = Needs clarification * 🔴 = Red Phase (failing test) * 🟢 = Green Phase (passing test) * 🔄 = Refactor Phase ``` * **TDD Cycle Reference:** * Include a section titled `## TDD Cycle Reference`. * Provide a brief reminder of the TDD process: ```markdown 1. **Red:** Write a failing test that defines the desired functionality 2. **Green:** Write the minimal code necessary to make the test pass 3. **Refactor:** Improve the code while ensuring all tests remain green ``` 4. **Task Breakdown and Grouping:** * Divide the overall implementation into logical, high-level sections following TDD phases: * `## Test Setup and Configuration` * `## Unit Tests (Red Phase)` * `## Core Implementation (Green Phase)` * `## Refactoring and Optimization` * `## Integration Tests` * `## End-to-End Tests` * `## Performance and Load Testing` * Under each high-level section, list specific, actionable subtasks as bullet points. * Each subtask must begin with a status marker, defaulting to `⬜` for pending tasks. Example: ```markdown ## Unit Tests (Red Phase) * ⬜ 🔴 Write failing test for user authentication validation * ⬜ 🔴 Write failing test for password hashing functionality * ⬜ 🔴 Write failing test for JWT token generation ## Core Implementation (Green Phase) * ⬜ 🟢 Implement user authentication validation (make test pass) * ⬜ 🟢 Implement password hashing functionality (make test pass) * ⬜ 🟢 Implement JWT token generation (make test pass) ## Refactoring and Optimization * ⬜ 🔄 Refactor authentication service for better separation of concerns * ⬜ 🔄 Optimize password hashing performance * ⬜ 🔄 Extract common JWT utilities into reusable functions ``` 5. **TDD-Specific Task Requirements:** * **Test Dependencies:** Clearly indicate when tests depend on other tests or implementations * **Test Coverage:** Include tasks for measuring and maintaining test coverage (aim for 90%+) * **Test Categories:** Distinguish between unit tests, integration tests, and end-to-end tests * **Mock and Stub Setup:** Include tasks for setting up test doubles when external dependencies are involved * **Test Data Management:** Include tasks for creating test fixtures and factories * **Continuous Testing:** Include tasks for setting up automated test execution 6. **Testing Framework Integration:** * Reference specific testing frameworks mentioned in the DESIGN document (e.g., pytest, Jest, JUnit) * Include tasks for test configuration and setup * Add tasks for test reporting and coverage analysis * Include performance benchmarking tests where applicable 7. **Syntax:** * The entire output must strictly adhere to Markdown syntax. * Use TDD phase indicators (🔴, 🟢, 🔄) alongside traditional status markers * Ensure clear dependency relationships between test and implementation tasks **Additional TDD Guidelines:** * **Test First:** Every implementation task should have a corresponding failing test written first * **Minimal Implementation:** Green phase tasks should focus on making tests pass with minimal code * **Refactor Regularly:** Include refactoring tasks after every few implementation cycles * **Test Quality:** Ensure tests are readable, maintainable, and test one thing at a time * **Integration Points:** Clearly identify where unit tests transition to integration tests **Contextual Information (to be provided by you when using this prompt):** * Specify whether this is a system-wise implementation or for a specific task. * Clearly state the `[Project/Feature Name]` and `[task_identifier]` if applicable. * Provide the relevant PRD and DESIGN document(s) or sufficient excerpts/summaries for the AI to derive the tasks. * Specify the testing framework(s) and tools to be used. * Indicate any existing test infrastructure or patterns to follow.