AI Dev Tasks

repository·main·Indexed 27 days ago

https://github.com/snarktank/ai-dev-tasks

A structured markdown-based workflow for building complex features using AI-powered IDEs and CLIs. It provides a systematic process for moving from monolithic prompts to iterative implementation via PRD creation and task decomposition, utilizing specific prompt files like create-prd.md and generate-tasks.md to guide AI assistants in drafting blueprints and granular, step-by-step implementation plans.

Tokens
2.3K
Snippets
5
Records
10
Agent score
93%

What's inside ai-dev-tasks

  1. Install AI Dev Tasks

    main

    To use the structured prompts in your development workflow, clone the repository to a location accessible by your AI coding assistant (e.g., Amp, Claude Code, Windsurf).

    git clone https://github.com/snarktank/ai-dev-tasks.git
  2. Execute tasks iteratively with your AI assistant

    main

    To maintain control and ensure quality, do not ask the AI to complete the entire list at once. Instead, instruct it to work through the generated task list one sub-task at a time (e.g., task 1.1). This allows you to review and approve changes at each small step.

    Please start on task 1.1 from the generated task list.
  3. Create a Product Requirement Document (PRD)

    main

    Use the create-prd.md file to guide your AI assistant in drafting a blueprint for your new feature. This clarifies the scope, audience, and purpose before implementation begins.

    Use @create-prd.md
    Here's the feature I want to build: [Describe your feature in detail]
    Reference these files to help you: [Optional: @file1.py @file2.ts]
  4. Generate a task list from user requirements

    main

    To implement a new feature using this workflow, provide your feature request, task description, or existing documentation to the AI assistant. The assistant will follow a two-phase process to create a structured implementation guide.

    Workflow Steps

    1. Phase 1 (High-Level): The AI analyzes requirements and generates high-level parent tasks. It will always include task 0.0 Create feature branch unless instructed otherwise.
    2. Confirmation: The AI will pause and ask: "I have generated the high-level tasks based on your requirements. Ready to generate the sub-tasks? Respond with 'Go' to proceed."
    3. Phase 2 (Detailed): Upon receiving the command Go, the AI breaks each parent task into actionable sub-tasks, identifies relevant files, and generates the final Markdown file.

    Output Details

    • File Location: /tasks/
    • Naming Convention: tasks-[feature-name].md (e.g., tasks-user-profile-editing.md)
  5. Generate a Product Requirements Document (PRD)

    main

    To initiate a new feature development workflow, provide an AI assistant with a brief description of the desired functionality. The AI will follow a specific process to ensure the resulting PRD is actionable for a junior developer.

    Workflow Process

    1. Initial Prompt: Provide your feature request.
    2. Clarifying Questions: The AI will ask 3-5 critical questions to resolve ambiguities. Respond using the provided letter/number options (e.g., 1A, 2C).
    3. PRD Generation: The AI generates a detailed Markdown document based on your input.
    4. File Storage: The resulting file is saved to the /tasks directory with the naming convention prd-[feature-name].md.
  6. Generate an implementation task list from a PRD

    main

    Once you have a PRD (e.g., MyFeature-PRD.md), use the generate-tasks.md file to instruct the AI to break the requirements down into a granular, step-by-step implementation plan.

    Now take @MyFeature-PRD.md and create tasks using @generate-tasks.md
  7. PRD Structure and Requirements

    main

    Every generated PRD must follow this specific Markdown structure to ensure clarity for developers:

    1. Introduction/Overview: Feature description and problem statement.
    2. Goals: Specific, measurable objectives.
    3. User Stories: Narratives describing usage and benefits.
    4. Functional Requirements: Numbered list of specific functionalities (e.g., "The system must allow users to upload a profile picture.").
    5. Non-Goals (Out of Scope): Explicitly stated exclusions to manage scope.
    6. Design Considerations (Optional): UI/UX requirements or mockup links.
    7. Technical Considerations (Optional): Constraints, dependencies, or integration suggestions.
    8. Success Metrics: How success is measured (e.g., engagement percentages).
    9. Open Questions: Remaining areas needing clarification.
  8. Task list Markdown format and structure

    main

    The generated task list follows a specific Markdown structure designed for developers to track progress. It includes a section for relevant files, implementation notes, and a hierarchical task list.

    Required Structure

    Relevant Files

    A list of files that need to be created or modified, including their test counterparts.

    ## Relevant Files
    
    - `path/to/potential/file1.ts` - Brief description of why this file is relevant.
    - `path/to/file1.test.ts` - Unit tests for `file1.ts`.

    Notes

    General implementation guidance, such as testing patterns or command usage.

    ### Notes
    
    - Unit tests should typically be placed alongside the code files they are testing.
    - Use `npx jest [optional/path/to/test/file]` to run tests.

    Tasks

    A nested list of parent tasks and sub-tasks using Markdown checkboxes.

    ## Instructions for Completing Tasks
    
    **IMPORTANT:** As you complete each task, you must check it off in this markdown file by changing `- [ ]` to `- [x]`.
    
    ## Tasks
    
    - [ ] 0.0 Create feature branch
      - [ ] 0.1 Create and checkout a new branch for this feature (e.g., `git checkout -b feature/[feature-name]`)
    - [ ] 1.0 Parent Task Title
      - [ ] 1.1 [Sub-task description 1.1]
    - [ ] 2.0 Parent Task Title
    ## Relevant Files
    
    - `path/to/potential/file1.ts` - Brief description of why this file is relevant (e.g., Contains the main component for this feature).
    - `path/to/file1.test.ts` - Unit tests for `file1.ts`.
    - `path/to/another/file.tsx` - Brief description (e.g., API route handler for data submission).
    - `path/to/another/file.test.tsx` - Unit tests for `another/file.tsx`.
    - `lib/utils/helpers.ts` - Brief description (e.g., Utility functions needed for calculations).
    - `lib/utils/helpers.test.ts` - Unit tests for `helpers.ts`.
    
    ### Notes
    
    - Unit tests should typically be placed alongside the code files they are testing (e.g., `MyComponent.tsx` and `MyComponent.test.tsx` in the same directory).
    - Use `npx jest [optional/path/to/test/file]` to run tests. Running without a path executes all tests found in the Jest configuration.
    
    ## Instructions for Completing Tasks
    
    **IMPORTANT:** As you complete each task, you must check it off in this markdown file by changing `- [ ]` to `- [x]`. This helps track progress and ensures you don't skip any steps.
    
    Example:
    - `- [ ] 1.1 Read file` → `- [x] 1.1 Read file` (after completing)
    
    Update the file after completing each sub-task, not just after completing an entire parent task.
    
    ## Tasks
    
    - [ ] 0.0 Create feature branch
      - [ ] 0.1 Create and checkout a new branch for this feature (e.g., `git checkout -b feature/[feature-name]`)
    - [ ] 1.0 Parent Task Title
      - [ ] 1.1 [Sub-task description 1.1]
      - [ ] 1.2 [Sub-task description 1.2]
    - [ ] 2.0 Parent Task Title
      - [ ] 2.1 [Sub-task description 2.1]
    - [ ] 3.0 Parent Task Title (may not require sub-tasks if purely structural or configuration)
  9. Reference the AI Dev Tasks prompt files

    main

    The repository contains two primary prompt files used to drive the workflow:

    • create-prd.md: Guides the AI in generating a Product Requirement Document.
    • generate-tasks.md: Converts a PRD markdown file into a detailed, step-by-step implementation task list.