Fix: no longer overrides readme, package.json and gitignore but instead merges and/or adds to them if they already exist. Also bins the app into its own package. Can now call all functions using task-master instead of calling the dev.js script directly. Also adjusts readme and cursor rule to know about this.
This commit is contained in:
@@ -4,21 +4,33 @@ globs: **/*
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
- **Global CLI Commands**
|
||||
- Task Master now provides a global CLI through the `task-master` command
|
||||
- All functionality from `scripts/dev.js` is available through this interface
|
||||
- Install globally with `npm install -g claude-task-master` or use locally via `npx`
|
||||
- Use `task-master <command>` instead of `node scripts/dev.js <command>`
|
||||
- Examples:
|
||||
- `task-master list` instead of `node scripts/dev.js list`
|
||||
- `task-master next` instead of `node scripts/dev.js next`
|
||||
- `task-master expand --id=3` instead of `node scripts/dev.js expand --id=3`
|
||||
- All commands accept the same options as their script equivalents
|
||||
- The CLI provides additional commands like `task-master init` for project setup
|
||||
|
||||
- **Development Workflow Process**
|
||||
- Start new projects by running `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate initial tasks.json
|
||||
- Begin coding sessions with `node scripts/dev.js list` to see current tasks, status, and IDs
|
||||
- Analyze task complexity with `node scripts/dev.js analyze-complexity --research` before breaking down tasks
|
||||
- Start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate initial tasks.json
|
||||
- Begin coding sessions with `task-master list` to see current tasks, status, and IDs
|
||||
- Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks
|
||||
- Select tasks based on dependencies (all marked 'done'), priority level, and ID order
|
||||
- Clarify tasks by checking task files in tasks/ directory or asking for user input
|
||||
- View specific task details using `node scripts/dev.js show --id=<id>` to understand implementation requirements
|
||||
- Break down complex tasks using `node scripts/dev.js expand --id=<id>` with appropriate flags
|
||||
- Clear existing subtasks if needed using `node scripts/dev.js clear-subtasks --id=<id>` before regenerating
|
||||
- View specific task details using `task-master show <id>` to understand implementation requirements
|
||||
- Break down complex tasks using `task-master expand --id=<id>` with appropriate flags
|
||||
- Clear existing subtasks if needed using `task-master clear-subtasks --id=<id>` before regenerating
|
||||
- Implement code following task details, dependencies, and project standards
|
||||
- Verify tasks according to test strategies before marking as complete
|
||||
- Mark completed tasks with `node scripts/dev.js set-status --id=<id> --status=done`
|
||||
- Mark completed tasks with `task-master set-status --id=<id> --status=done`
|
||||
- Update dependent tasks when implementation differs from original plan
|
||||
- Generate task files with `node scripts/dev.js generate` after updating tasks.json
|
||||
- Maintain valid dependency structure with `node scripts/dev.js fix-dependencies` when needed
|
||||
- Generate task files with `task-master generate` after updating tasks.json
|
||||
- Maintain valid dependency structure with `task-master fix-dependencies` when needed
|
||||
- Respect dependency chains and task priorities when selecting work
|
||||
- Report progress regularly using the list command
|
||||
|
||||
@@ -67,47 +79,58 @@ alwaysApply: true
|
||||
```
|
||||
|
||||
- **Command Reference: parse-prd**
|
||||
- Syntax: `node scripts/dev.js parse-prd --input=<prd-file.txt>`
|
||||
- Legacy Syntax: `node scripts/dev.js parse-prd --input=<prd-file.txt>`
|
||||
- CLI Syntax: `task-master parse-prd --input=<prd-file.txt>`
|
||||
- Description: Parses a PRD document and generates a tasks.json file with structured tasks
|
||||
- Parameters:
|
||||
- `--input=<file>`: Path to the PRD text file (default: sample-prd.txt)
|
||||
- Example: `node scripts/dev.js parse-prd --input=requirements.txt`
|
||||
- Example: `task-master parse-prd --input=requirements.txt`
|
||||
- Notes: Will overwrite existing tasks.json file. Use with caution.
|
||||
|
||||
- **Command Reference: update**
|
||||
- Syntax: `node scripts/dev.js update --from=<id> --prompt="<prompt>"`
|
||||
- Legacy Syntax: `node scripts/dev.js update --from=<id> --prompt="<prompt>"`
|
||||
- CLI Syntax: `task-master update --from=<id> --prompt="<prompt>"`
|
||||
- Description: Updates tasks with ID >= specified ID based on the provided prompt
|
||||
- Parameters:
|
||||
- `--from=<id>`: Task ID from which to start updating (required)
|
||||
- `--prompt="<text>"`: Explanation of changes or new context (required)
|
||||
- Example: `node scripts/dev.js update --from=4 --prompt="Now we are using Express instead of Fastify."`
|
||||
- Example: `task-master update --from=4 --prompt="Now we are using Express instead of Fastify."`
|
||||
- Notes: Only updates tasks not marked as 'done'. Completed tasks remain unchanged.
|
||||
|
||||
- **Command Reference: generate**
|
||||
- Syntax: `node scripts/dev.js generate`
|
||||
- Legacy Syntax: `node scripts/dev.js generate`
|
||||
- CLI Syntax: `task-master generate`
|
||||
- Description: Generates individual task files in tasks/ directory based on tasks.json
|
||||
- Parameters: None
|
||||
- Example: `node scripts/dev.js generate`
|
||||
- Parameters:
|
||||
- `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
|
||||
- `--output=<dir>, -o`: Output directory (default: 'tasks')
|
||||
- Example: `task-master generate`
|
||||
- Notes: Overwrites existing task files. Creates tasks/ directory if needed.
|
||||
|
||||
- **Command Reference: set-status**
|
||||
- Syntax: `node scripts/dev.js set-status --id=<id> --status=<status>`
|
||||
- Legacy Syntax: `node scripts/dev.js set-status --id=<id> --status=<status>`
|
||||
- CLI Syntax: `task-master set-status --id=<id> --status=<status>`
|
||||
- Description: Updates the status of a specific task in tasks.json
|
||||
- Parameters:
|
||||
- `--id=<id>`: ID of the task to update (required)
|
||||
- `--status=<status>`: New status value (required)
|
||||
- Example: `node scripts/dev.js set-status --id=3 --status=done`
|
||||
- Example: `task-master set-status --id=3 --status=done`
|
||||
- Notes: Common values are 'done', 'pending', and 'deferred', but any string is accepted.
|
||||
|
||||
- **Command Reference: list**
|
||||
- Syntax: `node scripts/dev.js list`
|
||||
- Legacy Syntax: `node scripts/dev.js list`
|
||||
- CLI Syntax: `task-master list`
|
||||
- Description: Lists all tasks in tasks.json with IDs, titles, and status
|
||||
- Parameters: None
|
||||
- Example: `node scripts/dev.js list`
|
||||
- Parameters:
|
||||
- `--status=<status>, -s`: Filter by status
|
||||
- `--with-subtasks`: Show subtasks for each task
|
||||
- `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
|
||||
- Example: `task-master list`
|
||||
- Notes: Provides quick overview of project progress. Use at start of sessions.
|
||||
|
||||
- **Command Reference: expand**
|
||||
- Syntax: `node scripts/dev.js expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
|
||||
- Legacy Syntax: `node scripts/dev.js expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
|
||||
- CLI Syntax: `task-master expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]`
|
||||
- Description: Expands a task with subtasks for detailed implementation
|
||||
- Parameters:
|
||||
- `--id=<id>`: ID of task to expand (required unless using --all)
|
||||
@@ -116,11 +139,12 @@ alwaysApply: true
|
||||
- `--research`: Use Perplexity AI for research-backed generation
|
||||
- `--prompt="<text>"`: Additional context for subtask generation
|
||||
- `--force`: Regenerate subtasks even for tasks that already have them
|
||||
- Example: `node scripts/dev.js expand --id=3 --num=5 --research --prompt="Focus on security aspects"`
|
||||
- Example: `task-master expand --id=3 --num=5 --research --prompt="Focus on security aspects"`
|
||||
- Notes: Uses complexity report recommendations if available.
|
||||
|
||||
- **Command Reference: analyze-complexity**
|
||||
- Syntax: `node scripts/dev.js analyze-complexity [options]`
|
||||
- Legacy Syntax: `node scripts/dev.js analyze-complexity [options]`
|
||||
- CLI Syntax: `task-master analyze-complexity [options]`
|
||||
- Description: Analyzes task complexity and generates expansion recommendations
|
||||
- Parameters:
|
||||
- `--output=<file>, -o`: Output file path (default: scripts/task-complexity-report.json)
|
||||
@@ -128,19 +152,20 @@ alwaysApply: true
|
||||
- `--threshold=<number>, -t`: Minimum score for expansion recommendation (default: 5)
|
||||
- `--file=<path>, -f`: Use alternative tasks.json file
|
||||
- `--research, -r`: Use Perplexity AI for research-backed analysis
|
||||
- Example: `node scripts/dev.js analyze-complexity --research`
|
||||
- Example: `task-master analyze-complexity --research`
|
||||
- Notes: Report includes complexity scores, recommended subtasks, and tailored prompts.
|
||||
|
||||
- **Command Reference: clear-subtasks**
|
||||
- Syntax: `node scripts/dev.js clear-subtasks --id=<id>`
|
||||
- Legacy Syntax: `node scripts/dev.js clear-subtasks --id=<id>`
|
||||
- CLI Syntax: `task-master clear-subtasks --id=<id>`
|
||||
- Description: Removes subtasks from specified tasks to allow regeneration
|
||||
- Parameters:
|
||||
- `--id=<id>`: ID or comma-separated IDs of tasks to clear subtasks from
|
||||
- `--all`: Clear subtasks from all tasks
|
||||
- Examples:
|
||||
- `node scripts/dev.js clear-subtasks --id=3`
|
||||
- `node scripts/dev.js clear-subtasks --id=1,2,3`
|
||||
- `node scripts/dev.js clear-subtasks --all`
|
||||
- `task-master clear-subtasks --id=3`
|
||||
- `task-master clear-subtasks --id=1,2,3`
|
||||
- `task-master clear-subtasks --all`
|
||||
- Notes:
|
||||
- Task files are automatically regenerated after clearing subtasks
|
||||
- Can be combined with expand command to immediately generate new subtasks
|
||||
@@ -174,7 +199,7 @@ alwaysApply: true
|
||||
- **PERPLEXITY_MODEL** (Default: `"sonar-medium-online"`): Perplexity model (Example: `PERPLEXITY_MODEL=sonar-large-online`)
|
||||
|
||||
- **Determining the Next Task**
|
||||
- Run `node scripts/dev.js next` to show the next task to work on
|
||||
- Run `task-master next` to show the next task to work on
|
||||
- The next command identifies tasks with all dependencies satisfied
|
||||
- Tasks are prioritized by priority level, dependency count, and ID
|
||||
- The command shows comprehensive task information including:
|
||||
@@ -188,8 +213,8 @@ alwaysApply: true
|
||||
- Provides ready-to-use commands for common task actions
|
||||
|
||||
- **Viewing Specific Task Details**
|
||||
- Run `node scripts/dev.js show --id=<id>` or `node scripts/dev.js show <id>` to view a specific task
|
||||
- Use dot notation for subtasks: `node scripts/dev.js show 1.2` (shows subtask 2 of task 1)
|
||||
- Run `task-master show <id>` or `task-master show --id=<id>` to view a specific task
|
||||
- Use dot notation for subtasks: `task-master show 1.2` (shows subtask 2 of task 1)
|
||||
- Displays comprehensive information similar to the next command, but for a specific task
|
||||
- For parent tasks, shows all subtasks and their current status
|
||||
- For subtasks, shows parent task information and relationship
|
||||
@@ -197,48 +222,52 @@ alwaysApply: true
|
||||
- Useful for examining task details before implementation or checking status
|
||||
|
||||
- **Managing Task Dependencies**
|
||||
- Use `node scripts/dev.js add-dependency --id=<id> --depends-on=<id>` to add a dependency
|
||||
- Use `node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>` to remove a dependency
|
||||
- Use `task-master add-dependency --id=<id> --depends-on=<id>` to add a dependency
|
||||
- Use `task-master remove-dependency --id=<id> --depends-on=<id>` to remove a dependency
|
||||
- The system prevents circular dependencies and duplicate dependency entries
|
||||
- Dependencies are checked for existence before being added or removed
|
||||
- Task files are automatically regenerated after dependency changes
|
||||
- Dependencies are visualized with status indicators in task listings and files
|
||||
|
||||
- **Command Reference: add-dependency**
|
||||
- Syntax: `node scripts/dev.js add-dependency --id=<id> --depends-on=<id>`
|
||||
- Legacy Syntax: `node scripts/dev.js add-dependency --id=<id> --depends-on=<id>`
|
||||
- CLI Syntax: `task-master add-dependency --id=<id> --depends-on=<id>`
|
||||
- Description: Adds a dependency relationship between two tasks
|
||||
- Parameters:
|
||||
- `--id=<id>`: ID of task that will depend on another task (required)
|
||||
- `--depends-on=<id>`: ID of task that will become a dependency (required)
|
||||
- Example: `node scripts/dev.js add-dependency --id=22 --depends-on=21`
|
||||
- Example: `task-master add-dependency --id=22 --depends-on=21`
|
||||
- Notes: Prevents circular dependencies and duplicates; updates task files automatically
|
||||
|
||||
- **Command Reference: remove-dependency**
|
||||
- Syntax: `node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>`
|
||||
- Legacy Syntax: `node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>`
|
||||
- CLI Syntax: `task-master remove-dependency --id=<id> --depends-on=<id>`
|
||||
- Description: Removes a dependency relationship between two tasks
|
||||
- Parameters:
|
||||
- `--id=<id>`: ID of task to remove dependency from (required)
|
||||
- `--depends-on=<id>`: ID of task to remove as a dependency (required)
|
||||
- Example: `node scripts/dev.js remove-dependency --id=22 --depends-on=21`
|
||||
- Example: `task-master remove-dependency --id=22 --depends-on=21`
|
||||
- Notes: Checks if dependency actually exists; updates task files automatically
|
||||
|
||||
- **Command Reference: validate-dependencies**
|
||||
- Syntax: `node scripts/dev.js validate-dependencies [options]`
|
||||
- Legacy Syntax: `node scripts/dev.js validate-dependencies [options]`
|
||||
- CLI Syntax: `task-master validate-dependencies [options]`
|
||||
- Description: Checks for and identifies invalid dependencies in tasks.json and task files
|
||||
- Parameters:
|
||||
- `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
|
||||
- Example: `node scripts/dev.js validate-dependencies`
|
||||
- Example: `task-master validate-dependencies`
|
||||
- Notes:
|
||||
- Reports all non-existent dependencies and self-dependencies without modifying files
|
||||
- Provides detailed statistics on task dependency state
|
||||
- Use before fix-dependencies to audit your task structure
|
||||
|
||||
- **Command Reference: fix-dependencies**
|
||||
- Syntax: `node scripts/dev.js fix-dependencies [options]`
|
||||
- Legacy Syntax: `node scripts/dev.js fix-dependencies [options]`
|
||||
- CLI Syntax: `task-master fix-dependencies [options]`
|
||||
- Description: Finds and fixes all invalid dependencies in tasks.json and task files
|
||||
- Parameters:
|
||||
- `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json')
|
||||
- Example: `node scripts/dev.js fix-dependencies`
|
||||
- Example: `task-master fix-dependencies`
|
||||
- Notes:
|
||||
- Removes references to non-existent tasks and subtasks
|
||||
- Eliminates self-dependencies (tasks depending on themselves)
|
||||
@@ -246,13 +275,36 @@ alwaysApply: true
|
||||
- Provides detailed report of all fixes made
|
||||
|
||||
- **Command Reference: complexity-report**
|
||||
- Syntax: `node scripts/dev.js complexity-report [options]`
|
||||
- Legacy Syntax: `node scripts/dev.js complexity-report [options]`
|
||||
- CLI Syntax: `task-master complexity-report [options]`
|
||||
- Description: Displays the task complexity analysis report in a formatted, easy-to-read way
|
||||
- Parameters:
|
||||
- `--file=<path>, -f`: Path to the complexity report file (default: 'scripts/task-complexity-report.json')
|
||||
- Example: `node scripts/dev.js complexity-report`
|
||||
- Example: `task-master complexity-report`
|
||||
- Notes:
|
||||
- Shows tasks organized by complexity score with recommended actions
|
||||
- Provides complexity distribution statistics
|
||||
- Displays ready-to-use expansion commands for complex tasks
|
||||
- If no report exists, offers to generate one interactively
|
||||
|
||||
- **Command Reference: add-task**
|
||||
- CLI Syntax: `task-master add-task [options]`
|
||||
- Description: Add a new task to tasks.json using AI
|
||||
- Parameters:
|
||||
- `--file=<path>, -f`: Path to the tasks file (default: 'tasks/tasks.json')
|
||||
- `--prompt=<text>, -p`: Description of the task to add (required)
|
||||
- `--dependencies=<ids>, -d`: Comma-separated list of task IDs this task depends on
|
||||
- `--priority=<priority>`: Task priority (high, medium, low) (default: 'medium')
|
||||
- Example: `task-master add-task --prompt="Create user authentication using Auth0"`
|
||||
- Notes: Uses AI to convert description into structured task with appropriate details
|
||||
|
||||
- **Command Reference: init**
|
||||
- CLI Syntax: `task-master init`
|
||||
- Description: Initialize a new project with Task Master structure
|
||||
- Parameters: None
|
||||
- Example: `task-master init`
|
||||
- Notes:
|
||||
- Creates initial project structure with required files
|
||||
- Prompts for project settings if not provided
|
||||
- Merges with existing files when appropriate
|
||||
- Can be used to bootstrap a new Task Master project quickly
|
||||
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -21,12 +21,6 @@ lerna-debug.log*
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Compiled binary addons
|
||||
build/Release
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
@@ -62,7 +56,3 @@ dist
|
||||
*.debug
|
||||
init-debug.log
|
||||
dev-debug.log
|
||||
|
||||
# Project specific
|
||||
tasks.json
|
||||
tasks/
|
||||
@@ -33,13 +33,21 @@ The script can be configured through environment variables in a `.env` file at t
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Install globally
|
||||
npm install -g task-master-ai
|
||||
|
||||
# OR install locally within your project
|
||||
npm install task-master-ai
|
||||
```
|
||||
|
||||
### Initialize a new project
|
||||
|
||||
```bash
|
||||
npx task-master-ai
|
||||
# If installed globally
|
||||
task-master init
|
||||
|
||||
# If installed locally
|
||||
npx task-master-init
|
||||
```
|
||||
|
||||
This will prompt you for project details and set up a new project with the necessary files and structure.
|
||||
@@ -49,9 +57,30 @@ This will prompt you for project details and set up a new project with the neces
|
||||
1. This package uses ES modules. Your package.json should include `"type": "module"`.
|
||||
2. The Anthropic SDK version should be 0.39.0 or higher.
|
||||
|
||||
## Quick Start with Global Commands
|
||||
|
||||
After installing the package globally, you can use these CLI commands from any directory:
|
||||
|
||||
```bash
|
||||
# Initialize a new project
|
||||
task-master init
|
||||
|
||||
# Parse a PRD and generate tasks
|
||||
task-master parse-prd your-prd.txt
|
||||
|
||||
# List all tasks
|
||||
task-master list
|
||||
|
||||
# Show the next task to work on
|
||||
task-master next
|
||||
|
||||
# Generate task files
|
||||
task-master generate
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### If `npx task-master-ai` doesn't respond:
|
||||
### If `task-master init` doesn't respond:
|
||||
|
||||
Try running it with Node directly:
|
||||
|
||||
@@ -99,12 +128,12 @@ Claude Task Master is designed to work seamlessly with [Cursor AI](https://www.c
|
||||
In Cursor's AI chat, instruct the agent to generate tasks from your PRD:
|
||||
|
||||
```
|
||||
Please use the dev.js script to parse my PRD and generate tasks. The PRD is located at scripts/prd.txt.
|
||||
Please use the task-master parse-prd command to generate tasks from my PRD. The PRD is located at scripts/prd.txt.
|
||||
```
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js parse-prd --input=scripts/prd.txt
|
||||
task-master parse-prd scripts/prd.txt
|
||||
```
|
||||
|
||||
This will:
|
||||
@@ -122,7 +151,7 @@ Please generate individual task files from tasks.json
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js generate
|
||||
task-master generate
|
||||
```
|
||||
|
||||
This creates individual task files in the `tasks/` directory (e.g., `task_001.txt`, `task_002.txt`), making it easier to reference specific tasks.
|
||||
@@ -140,8 +169,8 @@ What tasks are available to work on next?
|
||||
```
|
||||
|
||||
The agent will:
|
||||
- Run `node scripts/dev.js list` to see all tasks
|
||||
- Run `node scripts/dev.js next` to determine the next task to work on
|
||||
- Run `task-master list` to see all tasks
|
||||
- Run `task-master next` to determine the next task to work on
|
||||
- Analyze dependencies to determine which tasks are ready to be worked on
|
||||
- Prioritize tasks based on priority level and ID order
|
||||
- Suggest the next task(s) to implement
|
||||
@@ -176,7 +205,7 @@ Task 3 is now complete. Please update its status.
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js set-status --id=3 --status=done
|
||||
task-master set-status --id=3 --status=done
|
||||
```
|
||||
|
||||
### 5. Handling Implementation Drift
|
||||
@@ -193,7 +222,7 @@ We've changed our approach. We're now using Express instead of Fastify. Please u
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js update --from=4 --prompt="Now we are using Express instead of Fastify."
|
||||
task-master update --from=4 --prompt="Now we are using Express instead of Fastify."
|
||||
```
|
||||
|
||||
This will rewrite or re-scope subsequent tasks in tasks.json while preserving completed work.
|
||||
@@ -208,7 +237,7 @@ Task 5 seems complex. Can you break it down into subtasks?
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js expand --id=5 --subtasks=3
|
||||
task-master expand --id=5 --num=3
|
||||
```
|
||||
|
||||
You can provide additional context:
|
||||
@@ -218,7 +247,7 @@ Please break down task 5 with a focus on security considerations.
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js expand --id=5 --prompt="Focus on security aspects"
|
||||
task-master expand --id=5 --prompt="Focus on security aspects"
|
||||
```
|
||||
|
||||
You can also expand all pending tasks:
|
||||
@@ -228,7 +257,7 @@ Please break down all pending tasks into subtasks.
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js expand --all
|
||||
task-master expand --all
|
||||
```
|
||||
|
||||
For research-backed subtask generation using Perplexity AI:
|
||||
@@ -238,7 +267,7 @@ Please break down task 5 using research-backed generation.
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js expand --id=5 --research
|
||||
task-master expand --id=5 --research
|
||||
```
|
||||
|
||||
## Command Reference
|
||||
@@ -248,66 +277,66 @@ Here's a comprehensive reference of all available commands:
|
||||
### Parse PRD
|
||||
```bash
|
||||
# Parse a PRD file and generate tasks
|
||||
npm run parse-prd -- --input=<prd-file.txt>
|
||||
task-master parse-prd <prd-file.txt>
|
||||
|
||||
# Limit the number of tasks generated
|
||||
npm run dev -- parse-prd --input=<prd-file.txt> --tasks=10
|
||||
task-master parse-prd <prd-file.txt> --num-tasks=10
|
||||
```
|
||||
|
||||
### List Tasks
|
||||
```bash
|
||||
# List all tasks
|
||||
npm run list
|
||||
task-master list
|
||||
|
||||
# List tasks with a specific status
|
||||
npm run dev -- list --status=<status>
|
||||
task-master list --status=<status>
|
||||
|
||||
# List tasks with subtasks
|
||||
npm run dev -- list --with-subtasks
|
||||
task-master list --with-subtasks
|
||||
|
||||
# List tasks with a specific status and include subtasks
|
||||
npm run dev -- list --status=<status> --with-subtasks
|
||||
task-master list --status=<status> --with-subtasks
|
||||
```
|
||||
|
||||
### Show Next Task
|
||||
```bash
|
||||
# Show the next task to work on based on dependencies and status
|
||||
npm run dev -- next
|
||||
task-master next
|
||||
```
|
||||
|
||||
### Show Specific Task
|
||||
```bash
|
||||
# Show details of a specific task
|
||||
npm run dev -- show <id>
|
||||
task-master show <id>
|
||||
# or
|
||||
npm run dev -- show --id=<id>
|
||||
task-master show --id=<id>
|
||||
|
||||
# View a specific subtask (e.g., subtask 2 of task 1)
|
||||
npm run dev -- show 1.2
|
||||
task-master show 1.2
|
||||
```
|
||||
|
||||
### Update Tasks
|
||||
```bash
|
||||
# Update tasks from a specific ID and provide context
|
||||
npm run dev -- update --from=<id> --prompt="<prompt>"
|
||||
task-master update --from=<id> --prompt="<prompt>"
|
||||
```
|
||||
|
||||
### Generate Task Files
|
||||
```bash
|
||||
# Generate individual task files from tasks.json
|
||||
npm run generate
|
||||
task-master generate
|
||||
```
|
||||
|
||||
### Set Task Status
|
||||
```bash
|
||||
# Set status of a single task
|
||||
npm run dev -- set-status --id=<id> --status=<status>
|
||||
task-master set-status --id=<id> --status=<status>
|
||||
|
||||
# Set status for multiple tasks
|
||||
npm run dev -- set-status --id=1,2,3 --status=<status>
|
||||
task-master set-status --id=1,2,3 --status=<status>
|
||||
|
||||
# Set status for subtasks
|
||||
npm run dev -- set-status --id=1.1,1.2 --status=<status>
|
||||
task-master set-status --id=1.1,1.2 --status=<status>
|
||||
```
|
||||
|
||||
When marking a task as "done", all of its subtasks will automatically be marked as "done" as well.
|
||||
@@ -315,79 +344,91 @@ When marking a task as "done", all of its subtasks will automatically be marked
|
||||
### Expand Tasks
|
||||
```bash
|
||||
# Expand a specific task with subtasks
|
||||
npm run dev -- expand --id=<id> --subtasks=<number>
|
||||
task-master expand --id=<id> --num=<number>
|
||||
|
||||
# Expand with additional context
|
||||
npm run dev -- expand --id=<id> --prompt="<context>"
|
||||
task-master expand --id=<id> --prompt="<context>"
|
||||
|
||||
# Expand all pending tasks
|
||||
npm run dev -- expand --all
|
||||
task-master expand --all
|
||||
|
||||
# Force regeneration of subtasks for tasks that already have them
|
||||
npm run dev -- expand --all --force
|
||||
task-master expand --all --force
|
||||
|
||||
# Research-backed subtask generation for a specific task
|
||||
npm run dev -- expand --id=<id> --research
|
||||
task-master expand --id=<id> --research
|
||||
|
||||
# Research-backed generation for all tasks
|
||||
npm run dev -- expand --all --research
|
||||
task-master expand --all --research
|
||||
```
|
||||
|
||||
### Clear Subtasks
|
||||
```bash
|
||||
# Clear subtasks from a specific task
|
||||
npm run dev -- clear-subtasks --id=<id>
|
||||
task-master clear-subtasks --id=<id>
|
||||
|
||||
# Clear subtasks from multiple tasks
|
||||
npm run dev -- clear-subtasks --id=1,2,3
|
||||
task-master clear-subtasks --id=1,2,3
|
||||
|
||||
# Clear subtasks from all tasks
|
||||
npm run dev -- clear-subtasks --all
|
||||
task-master clear-subtasks --all
|
||||
```
|
||||
|
||||
### Analyze Task Complexity
|
||||
```bash
|
||||
# Analyze complexity of all tasks
|
||||
npm run dev -- analyze-complexity
|
||||
task-master analyze-complexity
|
||||
|
||||
# Save report to a custom location
|
||||
npm run dev -- analyze-complexity --output=my-report.json
|
||||
task-master analyze-complexity --output=my-report.json
|
||||
|
||||
# Use a specific LLM model
|
||||
npm run dev -- analyze-complexity --model=claude-3-opus-20240229
|
||||
task-master analyze-complexity --model=claude-3-opus-20240229
|
||||
|
||||
# Set a custom complexity threshold (1-10)
|
||||
npm run dev -- analyze-complexity --threshold=6
|
||||
task-master analyze-complexity --threshold=6
|
||||
|
||||
# Use an alternative tasks file
|
||||
npm run dev -- analyze-complexity --file=custom-tasks.json
|
||||
task-master analyze-complexity --file=custom-tasks.json
|
||||
|
||||
# Use Perplexity AI for research-backed complexity analysis
|
||||
npm run dev -- analyze-complexity --research
|
||||
task-master analyze-complexity --research
|
||||
```
|
||||
|
||||
### View Complexity Report
|
||||
```bash
|
||||
# Display the task complexity analysis report
|
||||
npm run dev -- complexity-report
|
||||
task-master complexity-report
|
||||
|
||||
# View a report at a custom location
|
||||
npm run dev -- complexity-report --file=my-report.json
|
||||
task-master complexity-report --file=my-report.json
|
||||
```
|
||||
|
||||
### Managing Task Dependencies
|
||||
```bash
|
||||
# Add a dependency to a task
|
||||
npm run dev -- add-dependency --id=<id> --depends-on=<id>
|
||||
task-master add-dependency --id=<id> --depends-on=<id>
|
||||
|
||||
# Remove a dependency from a task
|
||||
npm run dev -- remove-dependency --id=<id> --depends-on=<id>
|
||||
task-master remove-dependency --id=<id> --depends-on=<id>
|
||||
|
||||
# Validate dependencies without fixing them
|
||||
npm run dev -- validate-dependencies
|
||||
task-master validate-dependencies
|
||||
|
||||
# Find and fix invalid dependencies automatically
|
||||
npm run dev -- fix-dependencies
|
||||
task-master fix-dependencies
|
||||
```
|
||||
|
||||
### Add a New Task
|
||||
```bash
|
||||
# Add a new task using AI
|
||||
task-master add-task --prompt="Description of the new task"
|
||||
|
||||
# Add a task with dependencies
|
||||
task-master add-task --prompt="Description" --dependencies=1,2,3
|
||||
|
||||
# Add a task with priority
|
||||
task-master add-task --prompt="Description" --priority=high
|
||||
```
|
||||
|
||||
## Feature Details
|
||||
@@ -430,15 +471,15 @@ When a complexity report exists:
|
||||
Example workflow:
|
||||
```bash
|
||||
# Generate the complexity analysis report with research capabilities
|
||||
npm run dev -- analyze-complexity --research
|
||||
task-master analyze-complexity --research
|
||||
|
||||
# Review the report in a readable format
|
||||
npm run dev -- complexity-report
|
||||
task-master complexity-report
|
||||
|
||||
# Expand tasks using the optimized recommendations
|
||||
npm run dev -- expand --id=8
|
||||
task-master expand --id=8
|
||||
# or expand all tasks
|
||||
npm run dev -- expand --all
|
||||
task-master expand --all
|
||||
```
|
||||
|
||||
### Finding the Next Task
|
||||
|
||||
147
README.md
147
README.md
@@ -33,13 +33,21 @@ The script can be configured through environment variables in a `.env` file at t
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Install globally
|
||||
npm install -g task-master-ai
|
||||
|
||||
# OR install locally within your project
|
||||
npm install task-master-ai
|
||||
```
|
||||
|
||||
### Initialize a new project
|
||||
|
||||
```bash
|
||||
npx task-master-ai
|
||||
# If installed globally
|
||||
task-master init
|
||||
|
||||
# If installed locally
|
||||
npx task-master-init
|
||||
```
|
||||
|
||||
This will prompt you for project details and set up a new project with the necessary files and structure.
|
||||
@@ -49,9 +57,30 @@ This will prompt you for project details and set up a new project with the neces
|
||||
1. This package uses ES modules. Your package.json should include `"type": "module"`.
|
||||
2. The Anthropic SDK version should be 0.39.0 or higher.
|
||||
|
||||
## Quick Start with Global Commands
|
||||
|
||||
After installing the package globally, you can use these CLI commands from any directory:
|
||||
|
||||
```bash
|
||||
# Initialize a new project
|
||||
task-master init
|
||||
|
||||
# Parse a PRD and generate tasks
|
||||
task-master parse-prd your-prd.txt
|
||||
|
||||
# List all tasks
|
||||
task-master list
|
||||
|
||||
# Show the next task to work on
|
||||
task-master next
|
||||
|
||||
# Generate task files
|
||||
task-master generate
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### If `npx task-master-ai` doesn't respond:
|
||||
### If `task-master init` doesn't respond:
|
||||
|
||||
Try running it with Node directly:
|
||||
|
||||
@@ -99,12 +128,12 @@ Claude Task Master is designed to work seamlessly with [Cursor AI](https://www.c
|
||||
In Cursor's AI chat, instruct the agent to generate tasks from your PRD:
|
||||
|
||||
```
|
||||
Please use the dev.js script to parse my PRD and generate tasks. The PRD is located at scripts/prd.txt.
|
||||
Please use the task-master parse-prd command to generate tasks from my PRD. The PRD is located at scripts/prd.txt.
|
||||
```
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js parse-prd --input=scripts/prd.txt
|
||||
task-master parse-prd scripts/prd.txt
|
||||
```
|
||||
|
||||
This will:
|
||||
@@ -122,7 +151,7 @@ Please generate individual task files from tasks.json
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js generate
|
||||
task-master generate
|
||||
```
|
||||
|
||||
This creates individual task files in the `tasks/` directory (e.g., `task_001.txt`, `task_002.txt`), making it easier to reference specific tasks.
|
||||
@@ -140,8 +169,8 @@ What tasks are available to work on next?
|
||||
```
|
||||
|
||||
The agent will:
|
||||
- Run `node scripts/dev.js list` to see all tasks
|
||||
- Run `node scripts/dev.js next` to determine the next task to work on
|
||||
- Run `task-master list` to see all tasks
|
||||
- Run `task-master next` to determine the next task to work on
|
||||
- Analyze dependencies to determine which tasks are ready to be worked on
|
||||
- Prioritize tasks based on priority level and ID order
|
||||
- Suggest the next task(s) to implement
|
||||
@@ -176,7 +205,7 @@ Task 3 is now complete. Please update its status.
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js set-status --id=3 --status=done
|
||||
task-master set-status --id=3 --status=done
|
||||
```
|
||||
|
||||
### 5. Handling Implementation Drift
|
||||
@@ -193,7 +222,7 @@ We've changed our approach. We're now using Express instead of Fastify. Please u
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js update --from=4 --prompt="Now we are using Express instead of Fastify."
|
||||
task-master update --from=4 --prompt="Now we are using Express instead of Fastify."
|
||||
```
|
||||
|
||||
This will rewrite or re-scope subsequent tasks in tasks.json while preserving completed work.
|
||||
@@ -208,7 +237,7 @@ Task 5 seems complex. Can you break it down into subtasks?
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js expand --id=5 --subtasks=3
|
||||
task-master expand --id=5 --num=3
|
||||
```
|
||||
|
||||
You can provide additional context:
|
||||
@@ -218,7 +247,7 @@ Please break down task 5 with a focus on security considerations.
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js expand --id=5 --prompt="Focus on security aspects"
|
||||
task-master expand --id=5 --prompt="Focus on security aspects"
|
||||
```
|
||||
|
||||
You can also expand all pending tasks:
|
||||
@@ -228,7 +257,7 @@ Please break down all pending tasks into subtasks.
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js expand --all
|
||||
task-master expand --all
|
||||
```
|
||||
|
||||
For research-backed subtask generation using Perplexity AI:
|
||||
@@ -238,7 +267,7 @@ Please break down task 5 using research-backed generation.
|
||||
|
||||
The agent will execute:
|
||||
```bash
|
||||
node scripts/dev.js expand --id=5 --research
|
||||
task-master expand --id=5 --research
|
||||
```
|
||||
|
||||
## Command Reference
|
||||
@@ -248,66 +277,66 @@ Here's a comprehensive reference of all available commands:
|
||||
### Parse PRD
|
||||
```bash
|
||||
# Parse a PRD file and generate tasks
|
||||
npm run parse-prd -- --input=<prd-file.txt>
|
||||
task-master parse-prd <prd-file.txt>
|
||||
|
||||
# Limit the number of tasks generated
|
||||
npm run dev -- parse-prd --input=<prd-file.txt> --tasks=10
|
||||
task-master parse-prd <prd-file.txt> --num-tasks=10
|
||||
```
|
||||
|
||||
### List Tasks
|
||||
```bash
|
||||
# List all tasks
|
||||
npm run list
|
||||
task-master list
|
||||
|
||||
# List tasks with a specific status
|
||||
npm run dev -- list --status=<status>
|
||||
task-master list --status=<status>
|
||||
|
||||
# List tasks with subtasks
|
||||
npm run dev -- list --with-subtasks
|
||||
task-master list --with-subtasks
|
||||
|
||||
# List tasks with a specific status and include subtasks
|
||||
npm run dev -- list --status=<status> --with-subtasks
|
||||
task-master list --status=<status> --with-subtasks
|
||||
```
|
||||
|
||||
### Show Next Task
|
||||
```bash
|
||||
# Show the next task to work on based on dependencies and status
|
||||
npm run dev -- next
|
||||
task-master next
|
||||
```
|
||||
|
||||
### Show Specific Task
|
||||
```bash
|
||||
# Show details of a specific task
|
||||
npm run dev -- show <id>
|
||||
task-master show <id>
|
||||
# or
|
||||
npm run dev -- show --id=<id>
|
||||
task-master show --id=<id>
|
||||
|
||||
# View a specific subtask (e.g., subtask 2 of task 1)
|
||||
npm run dev -- show 1.2
|
||||
task-master show 1.2
|
||||
```
|
||||
|
||||
### Update Tasks
|
||||
```bash
|
||||
# Update tasks from a specific ID and provide context
|
||||
npm run dev -- update --from=<id> --prompt="<prompt>"
|
||||
task-master update --from=<id> --prompt="<prompt>"
|
||||
```
|
||||
|
||||
### Generate Task Files
|
||||
```bash
|
||||
# Generate individual task files from tasks.json
|
||||
npm run generate
|
||||
task-master generate
|
||||
```
|
||||
|
||||
### Set Task Status
|
||||
```bash
|
||||
# Set status of a single task
|
||||
npm run dev -- set-status --id=<id> --status=<status>
|
||||
task-master set-status --id=<id> --status=<status>
|
||||
|
||||
# Set status for multiple tasks
|
||||
npm run dev -- set-status --id=1,2,3 --status=<status>
|
||||
task-master set-status --id=1,2,3 --status=<status>
|
||||
|
||||
# Set status for subtasks
|
||||
npm run dev -- set-status --id=1.1,1.2 --status=<status>
|
||||
task-master set-status --id=1.1,1.2 --status=<status>
|
||||
```
|
||||
|
||||
When marking a task as "done", all of its subtasks will automatically be marked as "done" as well.
|
||||
@@ -315,79 +344,91 @@ When marking a task as "done", all of its subtasks will automatically be marked
|
||||
### Expand Tasks
|
||||
```bash
|
||||
# Expand a specific task with subtasks
|
||||
npm run dev -- expand --id=<id> --subtasks=<number>
|
||||
task-master expand --id=<id> --num=<number>
|
||||
|
||||
# Expand with additional context
|
||||
npm run dev -- expand --id=<id> --prompt="<context>"
|
||||
task-master expand --id=<id> --prompt="<context>"
|
||||
|
||||
# Expand all pending tasks
|
||||
npm run dev -- expand --all
|
||||
task-master expand --all
|
||||
|
||||
# Force regeneration of subtasks for tasks that already have them
|
||||
npm run dev -- expand --all --force
|
||||
task-master expand --all --force
|
||||
|
||||
# Research-backed subtask generation for a specific task
|
||||
npm run dev -- expand --id=<id> --research
|
||||
task-master expand --id=<id> --research
|
||||
|
||||
# Research-backed generation for all tasks
|
||||
npm run dev -- expand --all --research
|
||||
task-master expand --all --research
|
||||
```
|
||||
|
||||
### Clear Subtasks
|
||||
```bash
|
||||
# Clear subtasks from a specific task
|
||||
npm run dev -- clear-subtasks --id=<id>
|
||||
task-master clear-subtasks --id=<id>
|
||||
|
||||
# Clear subtasks from multiple tasks
|
||||
npm run dev -- clear-subtasks --id=1,2,3
|
||||
task-master clear-subtasks --id=1,2,3
|
||||
|
||||
# Clear subtasks from all tasks
|
||||
npm run dev -- clear-subtasks --all
|
||||
task-master clear-subtasks --all
|
||||
```
|
||||
|
||||
### Analyze Task Complexity
|
||||
```bash
|
||||
# Analyze complexity of all tasks
|
||||
npm run dev -- analyze-complexity
|
||||
task-master analyze-complexity
|
||||
|
||||
# Save report to a custom location
|
||||
npm run dev -- analyze-complexity --output=my-report.json
|
||||
task-master analyze-complexity --output=my-report.json
|
||||
|
||||
# Use a specific LLM model
|
||||
npm run dev -- analyze-complexity --model=claude-3-opus-20240229
|
||||
task-master analyze-complexity --model=claude-3-opus-20240229
|
||||
|
||||
# Set a custom complexity threshold (1-10)
|
||||
npm run dev -- analyze-complexity --threshold=6
|
||||
task-master analyze-complexity --threshold=6
|
||||
|
||||
# Use an alternative tasks file
|
||||
npm run dev -- analyze-complexity --file=custom-tasks.json
|
||||
task-master analyze-complexity --file=custom-tasks.json
|
||||
|
||||
# Use Perplexity AI for research-backed complexity analysis
|
||||
npm run dev -- analyze-complexity --research
|
||||
task-master analyze-complexity --research
|
||||
```
|
||||
|
||||
### View Complexity Report
|
||||
```bash
|
||||
# Display the task complexity analysis report
|
||||
npm run dev -- complexity-report
|
||||
task-master complexity-report
|
||||
|
||||
# View a report at a custom location
|
||||
npm run dev -- complexity-report --file=my-report.json
|
||||
task-master complexity-report --file=my-report.json
|
||||
```
|
||||
|
||||
### Managing Task Dependencies
|
||||
```bash
|
||||
# Add a dependency to a task
|
||||
npm run dev -- add-dependency --id=<id> --depends-on=<id>
|
||||
task-master add-dependency --id=<id> --depends-on=<id>
|
||||
|
||||
# Remove a dependency from a task
|
||||
npm run dev -- remove-dependency --id=<id> --depends-on=<id>
|
||||
task-master remove-dependency --id=<id> --depends-on=<id>
|
||||
|
||||
# Validate dependencies without fixing them
|
||||
npm run dev -- validate-dependencies
|
||||
task-master validate-dependencies
|
||||
|
||||
# Find and fix invalid dependencies automatically
|
||||
npm run dev -- fix-dependencies
|
||||
task-master fix-dependencies
|
||||
```
|
||||
|
||||
### Add a New Task
|
||||
```bash
|
||||
# Add a new task using AI
|
||||
task-master add-task --prompt="Description of the new task"
|
||||
|
||||
# Add a task with dependencies
|
||||
task-master add-task --prompt="Description" --dependencies=1,2,3
|
||||
|
||||
# Add a task with priority
|
||||
task-master add-task --prompt="Description" --priority=high
|
||||
```
|
||||
|
||||
## Feature Details
|
||||
@@ -430,15 +471,15 @@ When a complexity report exists:
|
||||
Example workflow:
|
||||
```bash
|
||||
# Generate the complexity analysis report with research capabilities
|
||||
npm run dev -- analyze-complexity --research
|
||||
task-master analyze-complexity --research
|
||||
|
||||
# Review the report in a readable format
|
||||
npm run dev -- complexity-report
|
||||
task-master complexity-report
|
||||
|
||||
# Expand tasks using the optimized recommendations
|
||||
npm run dev -- expand --id=8
|
||||
task-master expand --id=8
|
||||
# or expand all tasks
|
||||
npm run dev -- expand --all
|
||||
task-master expand --all
|
||||
```
|
||||
|
||||
### Finding the Next Task
|
||||
|
||||
@@ -44,15 +44,20 @@ The script can be configured through environment variables in a `.env` file at t
|
||||
- Tasks can have `subtasks` for more detailed implementation steps.
|
||||
- Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending) to easily track progress.
|
||||
|
||||
2. **Script Commands**
|
||||
You can run the script via:
|
||||
2. **CLI Commands**
|
||||
You can run the commands via:
|
||||
|
||||
```bash
|
||||
# If installed globally
|
||||
task-master [command] [options]
|
||||
|
||||
# If using locally within the project
|
||||
node scripts/dev.js [command] [options]
|
||||
```
|
||||
|
||||
Available commands:
|
||||
|
||||
- `init`: Initialize a new project
|
||||
- `parse-prd`: Generate tasks from a PRD document
|
||||
- `list`: Display all tasks with their status
|
||||
- `update`: Update tasks based on new information
|
||||
@@ -62,8 +67,15 @@ The script can be configured through environment variables in a `.env` file at t
|
||||
- `clear-subtasks`: Remove subtasks from specified tasks
|
||||
- `next`: Determine the next task to work on based on dependencies
|
||||
- `show`: Display detailed information about a specific task
|
||||
- `analyze-complexity`: Analyze task complexity and generate recommendations
|
||||
- `complexity-report`: Display the complexity analysis in a readable format
|
||||
- `add-dependency`: Add a dependency between tasks
|
||||
- `remove-dependency`: Remove a dependency from a task
|
||||
- `validate-dependencies`: Check for invalid dependencies
|
||||
- `fix-dependencies`: Fix invalid dependencies automatically
|
||||
- `add-task`: Add a new task using AI
|
||||
|
||||
Run `node scripts/dev.js` without arguments to see detailed usage information.
|
||||
Run `task-master --help` or `node scripts/dev.js --help` to see detailed usage information.
|
||||
|
||||
## Listing Tasks
|
||||
|
||||
@@ -71,16 +83,16 @@ The `list` command allows you to view all tasks and their status:
|
||||
|
||||
```bash
|
||||
# List all tasks
|
||||
node scripts/dev.js list
|
||||
task-master list
|
||||
|
||||
# List tasks with a specific status
|
||||
node scripts/dev.js list --status=pending
|
||||
task-master list --status=pending
|
||||
|
||||
# List tasks and include their subtasks
|
||||
node scripts/dev.js list --with-subtasks
|
||||
task-master list --with-subtasks
|
||||
|
||||
# List tasks with a specific status and include their subtasks
|
||||
node scripts/dev.js list --status=pending --with-subtasks
|
||||
task-master list --status=pending --with-subtasks
|
||||
```
|
||||
|
||||
## Updating Tasks
|
||||
@@ -89,13 +101,13 @@ The `update` command allows you to update tasks based on new information or impl
|
||||
|
||||
```bash
|
||||
# Update tasks starting from ID 4 with a new prompt
|
||||
node scripts/dev.js update --from=4 --prompt="Refactor tasks from ID 4 onward to use Express instead of Fastify"
|
||||
task-master update --from=4 --prompt="Refactor tasks from ID 4 onward to use Express instead of Fastify"
|
||||
|
||||
# Update all tasks (default from=1)
|
||||
node scripts/dev.js update --prompt="Add authentication to all relevant tasks"
|
||||
task-master update --prompt="Add authentication to all relevant tasks"
|
||||
|
||||
# Specify a different tasks file
|
||||
node scripts/dev.js update --file=custom-tasks.json --from=5 --prompt="Change database from MongoDB to PostgreSQL"
|
||||
task-master update --file=custom-tasks.json --from=5 --prompt="Change database from MongoDB to PostgreSQL"
|
||||
```
|
||||
|
||||
Notes:
|
||||
@@ -109,16 +121,16 @@ The `set-status` command allows you to change a task's status:
|
||||
|
||||
```bash
|
||||
# Mark a task as done
|
||||
node scripts/dev.js set-status --id=3 --status=done
|
||||
task-master set-status --id=3 --status=done
|
||||
|
||||
# Mark a task as pending
|
||||
node scripts/dev.js set-status --id=4 --status=pending
|
||||
task-master set-status --id=4 --status=pending
|
||||
|
||||
# Mark a specific subtask as done
|
||||
node scripts/dev.js set-status --id=3.1 --status=done
|
||||
task-master set-status --id=3.1 --status=done
|
||||
|
||||
# Mark multiple tasks at once
|
||||
node scripts/dev.js set-status --id=1,2,3 --status=done
|
||||
task-master set-status --id=1,2,3 --status=done
|
||||
```
|
||||
|
||||
Notes:
|
||||
@@ -134,25 +146,25 @@ The `expand` command allows you to break down tasks into subtasks for more detai
|
||||
|
||||
```bash
|
||||
# Expand a specific task with 3 subtasks (default)
|
||||
node scripts/dev.js expand --id=3
|
||||
task-master expand --id=3
|
||||
|
||||
# Expand a specific task with 5 subtasks
|
||||
node scripts/dev.js expand --id=3 --num=5
|
||||
task-master expand --id=3 --num=5
|
||||
|
||||
# Expand a task with additional context
|
||||
node scripts/dev.js expand --id=3 --prompt="Focus on security aspects"
|
||||
task-master expand --id=3 --prompt="Focus on security aspects"
|
||||
|
||||
# Expand all pending tasks that don't have subtasks
|
||||
node scripts/dev.js expand --all
|
||||
task-master expand --all
|
||||
|
||||
# Force regeneration of subtasks for all pending tasks
|
||||
node scripts/dev.js expand --all --force
|
||||
task-master expand --all --force
|
||||
|
||||
# Use Perplexity AI for research-backed subtask generation
|
||||
node scripts/dev.js expand --id=3 --research
|
||||
task-master expand --id=3 --research
|
||||
|
||||
# Use Perplexity AI for research-backed generation on all pending tasks
|
||||
node scripts/dev.js expand --all --research
|
||||
task-master expand --all --research
|
||||
```
|
||||
|
||||
## Clearing Subtasks
|
||||
@@ -161,13 +173,13 @@ The `clear-subtasks` command allows you to remove subtasks from specified tasks:
|
||||
|
||||
```bash
|
||||
# Clear subtasks from a specific task
|
||||
node scripts/dev.js clear-subtasks --id=3
|
||||
task-master clear-subtasks --id=3
|
||||
|
||||
# Clear subtasks from multiple tasks
|
||||
node scripts/dev.js clear-subtasks --id=1,2,3
|
||||
task-master clear-subtasks --id=1,2,3
|
||||
|
||||
# Clear subtasks from all tasks
|
||||
node scripts/dev.js clear-subtasks --all
|
||||
task-master clear-subtasks --all
|
||||
```
|
||||
|
||||
Notes:
|
||||
@@ -207,10 +219,10 @@ The `add-dependency` and `remove-dependency` commands allow you to manage task d
|
||||
|
||||
```bash
|
||||
# Add a dependency to a task
|
||||
node scripts/dev.js add-dependency --id=<id> --depends-on=<id>
|
||||
task-master add-dependency --id=<id> --depends-on=<id>
|
||||
|
||||
# Remove a dependency from a task
|
||||
node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>
|
||||
task-master remove-dependency --id=<id> --depends-on=<id>
|
||||
```
|
||||
|
||||
These commands:
|
||||
@@ -244,10 +256,10 @@ The `validate-dependencies` command allows you to check for invalid dependencies
|
||||
|
||||
```bash
|
||||
# Check for invalid dependencies in tasks.json
|
||||
node scripts/dev.js validate-dependencies
|
||||
task-master validate-dependencies
|
||||
|
||||
# Specify a different tasks file
|
||||
node scripts/dev.js validate-dependencies --file=custom-tasks.json
|
||||
task-master validate-dependencies --file=custom-tasks.json
|
||||
```
|
||||
|
||||
This command:
|
||||
@@ -265,10 +277,10 @@ The `fix-dependencies` command proactively finds and fixes all invalid dependenc
|
||||
|
||||
```bash
|
||||
# Find and fix all invalid dependencies
|
||||
node scripts/dev.js fix-dependencies
|
||||
task-master fix-dependencies
|
||||
|
||||
# Specify a different tasks file
|
||||
node scripts/dev.js fix-dependencies --file=custom-tasks.json
|
||||
task-master fix-dependencies --file=custom-tasks.json
|
||||
```
|
||||
|
||||
This command:
|
||||
@@ -293,19 +305,19 @@ The `analyze-complexity` command allows you to automatically assess task complex
|
||||
|
||||
```bash
|
||||
# Analyze all tasks and generate expansion recommendations
|
||||
node scripts/dev.js analyze-complexity
|
||||
task-master analyze-complexity
|
||||
|
||||
# Specify a custom output file
|
||||
node scripts/dev.js analyze-complexity --output=custom-report.json
|
||||
task-master analyze-complexity --output=custom-report.json
|
||||
|
||||
# Override the model used for analysis
|
||||
node scripts/dev.js analyze-complexity --model=claude-3-opus-20240229
|
||||
task-master analyze-complexity --model=claude-3-opus-20240229
|
||||
|
||||
# Set a custom complexity threshold (1-10)
|
||||
node scripts/dev.js analyze-complexity --threshold=6
|
||||
task-master analyze-complexity --threshold=6
|
||||
|
||||
# Use Perplexity AI for research-backed complexity analysis
|
||||
node scripts/dev.js analyze-complexity --research
|
||||
task-master analyze-complexity --research
|
||||
```
|
||||
|
||||
Notes:
|
||||
@@ -323,13 +335,13 @@ The `expand` command automatically checks for and uses complexity analysis if av
|
||||
|
||||
```bash
|
||||
# Expand a task, using complexity report recommendations if available
|
||||
node scripts/dev.js expand --id=8
|
||||
task-master expand --id=8
|
||||
|
||||
# Expand all tasks, prioritizing by complexity score if a report exists
|
||||
node scripts/dev.js expand --all
|
||||
task-master expand --all
|
||||
|
||||
# Override recommendations with explicit values
|
||||
node scripts/dev.js expand --id=8 --num=5 --prompt="Custom prompt"
|
||||
task-master expand --id=8 --num=5 --prompt="Custom prompt"
|
||||
```
|
||||
|
||||
When a complexity report exists:
|
||||
@@ -356,7 +368,7 @@ The output report structure is:
|
||||
"recommendedSubtasks": 6,
|
||||
"expansionPrompt": "Create subtasks that handle detecting...",
|
||||
"reasoning": "This task requires sophisticated logic...",
|
||||
"expansionCommand": "node scripts/dev.js expand --id=8 --num=6 --prompt=\"Create subtasks...\" --research"
|
||||
"expansionCommand": "task-master expand --id=8 --num=6 --prompt=\"Create subtasks...\" --research"
|
||||
},
|
||||
// More tasks sorted by complexity score (highest first)
|
||||
]
|
||||
@@ -369,10 +381,10 @@ The `next` command helps you determine which task to work on next based on depen
|
||||
|
||||
```bash
|
||||
# Show the next task to work on
|
||||
node scripts/dev.js next
|
||||
task-master next
|
||||
|
||||
# Specify a different tasks file
|
||||
node scripts/dev.js next --file=custom-tasks.json
|
||||
task-master next --file=custom-tasks.json
|
||||
```
|
||||
|
||||
This command:
|
||||
@@ -399,16 +411,16 @@ The `show` command allows you to view detailed information about a specific task
|
||||
|
||||
```bash
|
||||
# Show details for a specific task
|
||||
node scripts/dev.js show 1
|
||||
task-master show 1
|
||||
|
||||
# Alternative syntax with --id option
|
||||
node scripts/dev.js show --id=1
|
||||
task-master show --id=1
|
||||
|
||||
# Show details for a subtask
|
||||
node scripts/dev.js show --id=1.2
|
||||
task-master show --id=1.2
|
||||
|
||||
# Specify a different tasks file
|
||||
node scripts/dev.js show 3 --file=custom-tasks.json
|
||||
task-master show 3 --file=custom-tasks.json
|
||||
```
|
||||
|
||||
This command:
|
||||
|
||||
30
bin/task-master-init.js
Executable file
30
bin/task-master-init.js
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Claude Task Master Init
|
||||
* Direct executable for the init command
|
||||
*/
|
||||
|
||||
import { spawn } from 'child_process';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname, resolve } from 'path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
// Get the path to the init script
|
||||
const initScriptPath = resolve(__dirname, '../scripts/init.js');
|
||||
|
||||
// Pass through all arguments
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
// Spawn the init script with all arguments
|
||||
const child = spawn('node', [initScriptPath, ...args], {
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd()
|
||||
});
|
||||
|
||||
// Handle exit
|
||||
child.on('close', (code) => {
|
||||
process.exit(code);
|
||||
});
|
||||
307
bin/task-master.js
Executable file
307
bin/task-master.js
Executable file
@@ -0,0 +1,307 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Claude Task Master CLI
|
||||
* Main entry point for globally installed package
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname, resolve } from 'path';
|
||||
import { createRequire } from 'module';
|
||||
import { spawn } from 'child_process';
|
||||
import { Command } from 'commander';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
// Get package information
|
||||
const packageJson = require('../package.json');
|
||||
const version = packageJson.version;
|
||||
|
||||
// Get paths to script files
|
||||
const devScriptPath = resolve(__dirname, '../scripts/dev.js');
|
||||
const initScriptPath = resolve(__dirname, '../scripts/init.js');
|
||||
|
||||
// Helper function to run dev.js with arguments
|
||||
function runDevScript(args) {
|
||||
const child = spawn('node', [devScriptPath, ...args], {
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd()
|
||||
});
|
||||
|
||||
child.on('close', (code) => {
|
||||
process.exit(code);
|
||||
});
|
||||
}
|
||||
|
||||
// Set up the command-line interface
|
||||
const program = new Command();
|
||||
|
||||
program
|
||||
.name('task-master')
|
||||
.description('Claude Task Master CLI')
|
||||
.version(version);
|
||||
|
||||
program
|
||||
.command('init')
|
||||
.description('Initialize a new project')
|
||||
.option('-y, --yes', 'Skip prompts and use default values')
|
||||
.option('-n, --name <name>', 'Project name')
|
||||
.option('-d, --description <description>', 'Project description')
|
||||
.option('-v, --version <version>', 'Project version')
|
||||
.option('-a, --author <author>', 'Author name')
|
||||
.option('--skip-install', 'Skip installing dependencies')
|
||||
.option('--dry-run', 'Show what would be done without making changes')
|
||||
.action((options) => {
|
||||
// Pass through any options to the init script
|
||||
const args = ['--yes', 'name', 'description', 'version', 'author', 'skip-install', 'dry-run']
|
||||
.filter(opt => options[opt])
|
||||
.map(opt => {
|
||||
if (opt === 'yes' || opt === 'skip-install' || opt === 'dry-run') {
|
||||
return `--${opt}`;
|
||||
}
|
||||
return `--${opt}=${options[opt]}`;
|
||||
});
|
||||
|
||||
const child = spawn('node', [initScriptPath, ...args], {
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd()
|
||||
});
|
||||
|
||||
child.on('close', (code) => {
|
||||
process.exit(code);
|
||||
});
|
||||
});
|
||||
|
||||
program
|
||||
.command('dev')
|
||||
.description('Run the dev.js script')
|
||||
.allowUnknownOption(true)
|
||||
.action(() => {
|
||||
const args = process.argv.slice(process.argv.indexOf('dev') + 1);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
// Add shortcuts for common dev.js commands
|
||||
program
|
||||
.command('list')
|
||||
.description('List all tasks')
|
||||
.option('-s, --status <status>', 'Filter by status')
|
||||
.option('--with-subtasks', 'Show subtasks for each task')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.action((options) => {
|
||||
const args = ['list'];
|
||||
if (options.status) args.push('--status', options.status);
|
||||
if (options.withSubtasks) args.push('--with-subtasks');
|
||||
if (options.file) args.push('--file', options.file);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('next')
|
||||
.description('Show the next task to work on')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.action((options) => {
|
||||
const args = ['next'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('generate')
|
||||
.description('Generate task files')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.option('-o, --output <dir>', 'Output directory', 'tasks')
|
||||
.action((options) => {
|
||||
const args = ['generate'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
if (options.output) args.push('--output', options.output);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
// Add all other commands from dev.js
|
||||
program
|
||||
.command('parse-prd')
|
||||
.description('Parse a PRD file and generate tasks')
|
||||
.argument('<file>', 'Path to the PRD file')
|
||||
.option('-o, --output <file>', 'Output file path', 'tasks/tasks.json')
|
||||
.option('-n, --num-tasks <number>', 'Number of tasks to generate', '10')
|
||||
.action((file, options) => {
|
||||
const args = ['parse-prd', file];
|
||||
if (options.output) args.push('--output', options.output);
|
||||
if (options.numTasks) args.push('--num-tasks', options.numTasks);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('update')
|
||||
.description('Update tasks based on new information or implementation changes')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.option('--from <id>', 'Task ID to start updating from', '1')
|
||||
.option('-p, --prompt <text>', 'Prompt explaining the changes or new context (required)')
|
||||
.action((options) => {
|
||||
const args = ['update'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
if (options.from) args.push('--from', options.from);
|
||||
if (options.prompt) args.push('--prompt', options.prompt);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('set-status')
|
||||
.description('Set the status of a task')
|
||||
.option('-i, --id <id>', 'Task ID (can be comma-separated for multiple tasks)')
|
||||
.option('-s, --status <status>', 'New status (todo, in-progress, review, done)')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.action((options) => {
|
||||
const args = ['set-status'];
|
||||
if (options.id) args.push('--id', options.id);
|
||||
if (options.status) args.push('--status', options.status);
|
||||
if (options.file) args.push('--file', options.file);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('expand')
|
||||
.description('Expand tasks with subtasks')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.option('-i, --id <id>', 'Task ID to expand')
|
||||
.option('-a, --all', 'Expand all tasks')
|
||||
.option('-n, --num <number>', 'Number of subtasks to generate')
|
||||
.option('-r, --no-research', 'Disable Perplexity AI for research-backed subtask generation')
|
||||
.option('-p, --prompt <text>', 'Additional context to guide subtask generation')
|
||||
.option('--force', 'Force regeneration of subtasks for tasks that already have them')
|
||||
.action((options) => {
|
||||
const args = ['expand'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
if (options.id) args.push('--id', options.id);
|
||||
if (options.all) args.push('--all');
|
||||
if (options.num) args.push('--num', options.num);
|
||||
if (!options.research) args.push('--no-research');
|
||||
if (options.prompt) args.push('--prompt', options.prompt);
|
||||
if (options.force) args.push('--force');
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('analyze-complexity')
|
||||
.description('Analyze tasks and generate complexity-based expansion recommendations')
|
||||
.option('-o, --output <file>', 'Output file path for the report', 'scripts/task-complexity-report.json')
|
||||
.option('-m, --model <model>', 'LLM model to use for analysis')
|
||||
.option('-t, --threshold <number>', 'Minimum complexity score to recommend expansion (1-10)', '5')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.option('-r, --research', 'Use Perplexity AI for research-backed complexity analysis')
|
||||
.action((options) => {
|
||||
const args = ['analyze-complexity'];
|
||||
if (options.output) args.push('--output', options.output);
|
||||
if (options.model) args.push('--model', options.model);
|
||||
if (options.threshold) args.push('--threshold', options.threshold);
|
||||
if (options.file) args.push('--file', options.file);
|
||||
if (options.research) args.push('--research');
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('clear-subtasks')
|
||||
.description('Clear subtasks from specified tasks')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.option('-i, --id <ids>', 'Task IDs (comma-separated) to clear subtasks from')
|
||||
.option('--all', 'Clear subtasks from all tasks')
|
||||
.action((options) => {
|
||||
const args = ['clear-subtasks'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
if (options.id) args.push('--id', options.id);
|
||||
if (options.all) args.push('--all');
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('add-task')
|
||||
.description('Add a new task to tasks.json using AI')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.option('-p, --prompt <text>', 'Description of the task to add (required)')
|
||||
.option('-d, --dependencies <ids>', 'Comma-separated list of task IDs this task depends on')
|
||||
.option('--priority <priority>', 'Task priority (high, medium, low)', 'medium')
|
||||
.action((options) => {
|
||||
const args = ['add-task'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
if (options.prompt) args.push('--prompt', options.prompt);
|
||||
if (options.dependencies) args.push('--dependencies', options.dependencies);
|
||||
if (options.priority) args.push('--priority', options.priority);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('show')
|
||||
.description('Show details of a specific task by ID')
|
||||
.argument('[id]', 'Task ID to show')
|
||||
.option('-i, --id <id>', 'Task ID to show (alternative to argument)')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.action((id, options) => {
|
||||
const args = ['show'];
|
||||
if (id) args.push(id);
|
||||
else if (options.id) args.push('--id', options.id);
|
||||
if (options.file) args.push('--file', options.file);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('add-dependency')
|
||||
.description('Add a dependency to a task')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.option('-i, --id <id>', 'ID of the task to add dependency to')
|
||||
.option('-d, --depends-on <id>', 'ID of the task to add as dependency')
|
||||
.action((options) => {
|
||||
const args = ['add-dependency'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
if (options.id) args.push('--id', options.id);
|
||||
if (options.dependsOn) args.push('--depends-on', options.dependsOn);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('remove-dependency')
|
||||
.description('Remove a dependency from a task')
|
||||
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||
.option('-i, --id <id>', 'ID of the task to remove dependency from')
|
||||
.option('-d, --depends-on <id>', 'ID of the task to remove as dependency')
|
||||
.action((options) => {
|
||||
const args = ['remove-dependency'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
if (options.id) args.push('--id', options.id);
|
||||
if (options.dependsOn) args.push('--depends-on', options.dependsOn);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('validate-dependencies')
|
||||
.description('Check for and identify invalid dependencies in tasks')
|
||||
.option('-f, --file <path>', 'Path to the tasks.json file', 'tasks/tasks.json')
|
||||
.action((options) => {
|
||||
const args = ['validate-dependencies'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('fix-dependencies')
|
||||
.description('Find and fix all invalid dependencies in tasks.json and task files')
|
||||
.option('-f, --file <path>', 'Path to the tasks.json file', 'tasks/tasks.json')
|
||||
.action((options) => {
|
||||
const args = ['fix-dependencies'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program
|
||||
.command('complexity-report')
|
||||
.description('Display the complexity analysis report')
|
||||
.option('-f, --file <path>', 'Path to the complexity report file', 'scripts/task-complexity-report.json')
|
||||
.action((options) => {
|
||||
const args = ['complexity-report'];
|
||||
if (options.file) args.push('--file', options.file);
|
||||
runDevScript(args);
|
||||
});
|
||||
|
||||
program.parse(process.argv);
|
||||
109
index.js
109
index.js
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Claude Task Master
|
||||
* A task management system for AI-driven development with Claude
|
||||
@@ -9,11 +11,16 @@
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname, resolve } from 'path';
|
||||
import { createRequire } from 'module';
|
||||
import { spawn } from 'child_process';
|
||||
import { Command } from 'commander';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
// Get package information
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
// Export the path to the dev.js script for programmatic usage
|
||||
export const devScriptPath = resolve(__dirname, './scripts/dev.js');
|
||||
|
||||
@@ -23,5 +30,105 @@ export const initProject = async (options = {}) => {
|
||||
return init.initializeProject(options);
|
||||
};
|
||||
|
||||
// Export a function to run init as a CLI command
|
||||
export const runInitCLI = async () => {
|
||||
// Using spawn to ensure proper handling of stdio and process exit
|
||||
const child = spawn('node', [resolve(__dirname, './scripts/init.js')], {
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd()
|
||||
});
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
child.on('close', (code) => {
|
||||
if (code === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error(`Init script exited with code ${code}`));
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// Export version information
|
||||
export const version = require('./package.json').version;
|
||||
export const version = packageJson.version;
|
||||
|
||||
// CLI implementation
|
||||
if (import.meta.url === `file://${process.argv[1]}`) {
|
||||
const program = new Command();
|
||||
|
||||
program
|
||||
.name('task-master')
|
||||
.description('Claude Task Master CLI')
|
||||
.version(version);
|
||||
|
||||
program
|
||||
.command('init')
|
||||
.description('Initialize a new project')
|
||||
.action(() => {
|
||||
runInitCLI().catch(err => {
|
||||
console.error('Init failed:', err.message);
|
||||
process.exit(1);
|
||||
});
|
||||
});
|
||||
|
||||
program
|
||||
.command('dev')
|
||||
.description('Run the dev.js script')
|
||||
.allowUnknownOption(true)
|
||||
.action(() => {
|
||||
const args = process.argv.slice(process.argv.indexOf('dev') + 1);
|
||||
const child = spawn('node', [devScriptPath, ...args], {
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd()
|
||||
});
|
||||
|
||||
child.on('close', (code) => {
|
||||
process.exit(code);
|
||||
});
|
||||
});
|
||||
|
||||
// Add shortcuts for common dev.js commands
|
||||
program
|
||||
.command('list')
|
||||
.description('List all tasks')
|
||||
.action(() => {
|
||||
const child = spawn('node', [devScriptPath, 'list'], {
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd()
|
||||
});
|
||||
|
||||
child.on('close', (code) => {
|
||||
process.exit(code);
|
||||
});
|
||||
});
|
||||
|
||||
program
|
||||
.command('next')
|
||||
.description('Show the next task to work on')
|
||||
.action(() => {
|
||||
const child = spawn('node', [devScriptPath, 'next'], {
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd()
|
||||
});
|
||||
|
||||
child.on('close', (code) => {
|
||||
process.exit(code);
|
||||
});
|
||||
});
|
||||
|
||||
program
|
||||
.command('generate')
|
||||
.description('Generate task files')
|
||||
.action(() => {
|
||||
const child = spawn('node', [devScriptPath, 'generate'], {
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd()
|
||||
});
|
||||
|
||||
child.on('close', (code) => {
|
||||
process.exit(code);
|
||||
});
|
||||
});
|
||||
|
||||
program.parse(process.argv);
|
||||
}
|
||||
11
package.json
11
package.json
@@ -1,16 +1,18 @@
|
||||
{
|
||||
"name": "task-master-ai",
|
||||
"version": "0.9.14",
|
||||
"version": "0.9.16",
|
||||
"description": "A task management system for ambitious AI-driven development that doesn't overwhelm and confuse Cursor.",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"task-master-init": "scripts/init.js"
|
||||
"task-master": "./bin/task-master.js",
|
||||
"task-master-init": "./bin/task-master-init.js"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"prepare-package": "node scripts/prepare-package.js",
|
||||
"prepublishOnly": "npm run prepare-package"
|
||||
"prepublishOnly": "npm run prepare-package",
|
||||
"prepare": "chmod +x bin/task-master.js bin/task-master-init.js"
|
||||
},
|
||||
"keywords": [
|
||||
"claude",
|
||||
@@ -53,7 +55,8 @@
|
||||
"assets/**",
|
||||
".cursor/**",
|
||||
"README-task-master.md",
|
||||
"index.js"
|
||||
"index.js",
|
||||
"bin/**"
|
||||
],
|
||||
"overrides": {
|
||||
"node-fetch": "^3.3.2",
|
||||
|
||||
239
scripts/init.js
239
scripts/init.js
@@ -12,6 +12,7 @@ import chalk from 'chalk';
|
||||
import figlet from 'figlet';
|
||||
import boxen from 'boxen';
|
||||
import gradient from 'gradient-string';
|
||||
import { Command } from 'commander';
|
||||
|
||||
// Debug information
|
||||
console.log('Node version:', process.version);
|
||||
@@ -21,6 +22,23 @@ console.log('Script path:', import.meta.url);
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
// Configure the CLI program
|
||||
const program = new Command();
|
||||
program
|
||||
.name('task-master-init')
|
||||
.description('Initialize a new Claude Task Master project')
|
||||
.version('1.0.0') // Will be replaced by prepare-package script
|
||||
.option('-y, --yes', 'Skip prompts and use default values')
|
||||
.option('-n, --name <name>', 'Project name')
|
||||
.option('-d, --description <description>', 'Project description')
|
||||
.option('-v, --version <version>', 'Project version')
|
||||
.option('-a, --author <author>', 'Author name')
|
||||
.option('--skip-install', 'Skip installing dependencies')
|
||||
.option('--dry-run', 'Show what would be done without making changes')
|
||||
.parse(process.argv);
|
||||
|
||||
const options = program.opts();
|
||||
|
||||
// Define log levels
|
||||
const LOG_LEVELS = {
|
||||
debug: 0,
|
||||
@@ -148,7 +166,90 @@ function copyTemplateFile(templateName, targetPath, replacements = {}) {
|
||||
content = content.replace(regex, value);
|
||||
});
|
||||
|
||||
// Write the content to the target path
|
||||
// Handle special files that should be merged instead of overwritten
|
||||
if (fs.existsSync(targetPath)) {
|
||||
const filename = path.basename(targetPath);
|
||||
|
||||
// Handle .gitignore - append lines that don't exist
|
||||
if (filename === '.gitignore') {
|
||||
log('info', `${targetPath} already exists, merging content...`);
|
||||
const existingContent = fs.readFileSync(targetPath, 'utf8');
|
||||
const existingLines = new Set(existingContent.split('\n').map(line => line.trim()));
|
||||
const newLines = content.split('\n').filter(line => !existingLines.has(line.trim()));
|
||||
|
||||
if (newLines.length > 0) {
|
||||
// Add a comment to separate the original content from our additions
|
||||
const updatedContent = existingContent.trim() +
|
||||
'\n\n# Added by Claude Task Master\n' +
|
||||
newLines.join('\n');
|
||||
fs.writeFileSync(targetPath, updatedContent);
|
||||
log('success', `Updated ${targetPath} with additional entries`);
|
||||
} else {
|
||||
log('info', `No new content to add to ${targetPath}`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle package.json - merge dependencies
|
||||
if (filename === 'package.json') {
|
||||
log('info', `${targetPath} already exists, merging dependencies...`);
|
||||
try {
|
||||
const existingPackageJson = JSON.parse(fs.readFileSync(targetPath, 'utf8'));
|
||||
const newPackageJson = JSON.parse(content);
|
||||
|
||||
// Merge dependencies, preferring existing versions in case of conflicts
|
||||
existingPackageJson.dependencies = {
|
||||
...newPackageJson.dependencies,
|
||||
...existingPackageJson.dependencies
|
||||
};
|
||||
|
||||
// Add our scripts if they don't already exist
|
||||
existingPackageJson.scripts = {
|
||||
...existingPackageJson.scripts,
|
||||
...Object.fromEntries(
|
||||
Object.entries(newPackageJson.scripts)
|
||||
.filter(([key]) => !existingPackageJson.scripts[key])
|
||||
)
|
||||
};
|
||||
|
||||
// Preserve existing type if present
|
||||
if (!existingPackageJson.type && newPackageJson.type) {
|
||||
existingPackageJson.type = newPackageJson.type;
|
||||
}
|
||||
|
||||
fs.writeFileSync(
|
||||
targetPath,
|
||||
JSON.stringify(existingPackageJson, null, 2)
|
||||
);
|
||||
log('success', `Updated ${targetPath} with required dependencies and scripts`);
|
||||
} catch (error) {
|
||||
log('error', `Failed to merge package.json: ${error.message}`);
|
||||
// Fallback to writing a backup of the existing file and creating a new one
|
||||
const backupPath = `${targetPath}.backup-${Date.now()}`;
|
||||
fs.copyFileSync(targetPath, backupPath);
|
||||
log('info', `Created backup of existing package.json at ${backupPath}`);
|
||||
fs.writeFileSync(targetPath, content);
|
||||
log('warn', `Replaced ${targetPath} with new content (due to JSON parsing error)`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle README.md - offer to preserve or create a different file
|
||||
if (filename === 'README.md') {
|
||||
log('info', `${targetPath} already exists`);
|
||||
// Create a separate README file specifically for this project
|
||||
const taskMasterReadmePath = path.join(path.dirname(targetPath), 'README-task-master.md');
|
||||
fs.writeFileSync(taskMasterReadmePath, content);
|
||||
log('success', `Created ${taskMasterReadmePath} (preserved original README.md)`);
|
||||
return;
|
||||
}
|
||||
|
||||
// For other files, warn and prompt before overwriting
|
||||
log('warn', `${targetPath} already exists. Skipping file creation to avoid overwriting existing content.`);
|
||||
return;
|
||||
}
|
||||
|
||||
// If the file doesn't exist, create it normally
|
||||
fs.writeFileSync(targetPath, content);
|
||||
log('info', `Created file: ${targetPath}`);
|
||||
}
|
||||
@@ -164,8 +265,28 @@ async function initializeProject(options = {}) {
|
||||
const projectDescription = options.projectDescription;
|
||||
const projectVersion = options.projectVersion || '1.0.0';
|
||||
const authorName = options.authorName || '';
|
||||
const dryRun = options.dryRun || false;
|
||||
const skipInstall = options.skipInstall || false;
|
||||
|
||||
createProjectStructure(projectName, projectDescription, projectVersion, authorName);
|
||||
if (dryRun) {
|
||||
log('info', 'DRY RUN MODE: No files will be modified');
|
||||
log('info', `Would initialize project: ${projectName} (${projectVersion})`);
|
||||
log('info', `Description: ${projectDescription}`);
|
||||
log('info', `Author: ${authorName || 'Not specified'}`);
|
||||
log('info', 'Would create/update necessary project files');
|
||||
if (!skipInstall) {
|
||||
log('info', 'Would install dependencies');
|
||||
}
|
||||
return {
|
||||
projectName,
|
||||
projectDescription,
|
||||
projectVersion,
|
||||
authorName,
|
||||
dryRun: true
|
||||
};
|
||||
}
|
||||
|
||||
createProjectStructure(projectName, projectDescription, projectVersion, authorName, skipInstall);
|
||||
return {
|
||||
projectName,
|
||||
projectDescription,
|
||||
@@ -190,11 +311,44 @@ async function initializeProject(options = {}) {
|
||||
// Set default version if not provided
|
||||
const projectVersion = projectVersionInput.trim() ? projectVersionInput : '1.0.0';
|
||||
|
||||
// Confirm settings
|
||||
console.log('\nProject settings:');
|
||||
console.log(chalk.blue('Name:'), chalk.white(projectName));
|
||||
console.log(chalk.blue('Description:'), chalk.white(projectDescription));
|
||||
console.log(chalk.blue('Version:'), chalk.white(projectVersion));
|
||||
console.log(chalk.blue('Author:'), chalk.white(authorName || 'Not specified'));
|
||||
|
||||
const confirmInput = await promptQuestion(rl, chalk.yellow('\nDo you want to continue with these settings? (Y/n): '));
|
||||
const shouldContinue = confirmInput.trim().toLowerCase() !== 'n';
|
||||
|
||||
// Close the readline interface
|
||||
rl.close();
|
||||
|
||||
if (!shouldContinue) {
|
||||
log('info', 'Project initialization cancelled by user');
|
||||
return null;
|
||||
}
|
||||
|
||||
const dryRun = options.dryRun || false;
|
||||
const skipInstall = options.skipInstall || false;
|
||||
|
||||
if (dryRun) {
|
||||
log('info', 'DRY RUN MODE: No files will be modified');
|
||||
log('info', 'Would create/update necessary project files');
|
||||
if (!skipInstall) {
|
||||
log('info', 'Would install dependencies');
|
||||
}
|
||||
return {
|
||||
projectName,
|
||||
projectDescription,
|
||||
projectVersion,
|
||||
authorName,
|
||||
dryRun: true
|
||||
};
|
||||
}
|
||||
|
||||
// Create the project structure
|
||||
createProjectStructure(projectName, projectDescription, projectVersion, authorName);
|
||||
createProjectStructure(projectName, projectDescription, projectVersion, authorName, skipInstall);
|
||||
|
||||
return {
|
||||
projectName,
|
||||
@@ -219,7 +373,7 @@ function promptQuestion(rl, question) {
|
||||
}
|
||||
|
||||
// Function to create the project structure
|
||||
function createProjectStructure(projectName, projectDescription, projectVersion, authorName) {
|
||||
function createProjectStructure(projectName, projectDescription, projectVersion, authorName, skipInstall) {
|
||||
const targetDir = process.cwd();
|
||||
log('info', `Initializing project in ${targetDir}`);
|
||||
|
||||
@@ -228,7 +382,7 @@ function createProjectStructure(projectName, projectDescription, projectVersion,
|
||||
ensureDirectoryExists(path.join(targetDir, 'scripts'));
|
||||
ensureDirectoryExists(path.join(targetDir, 'tasks'));
|
||||
|
||||
// Create package.json
|
||||
// Define our package.json content
|
||||
const packageJson = {
|
||||
name: projectName.toLowerCase().replace(/\s+/g, '-'),
|
||||
version: projectVersion,
|
||||
@@ -255,11 +409,53 @@ function createProjectStructure(projectName, projectDescription, projectVersion,
|
||||
}
|
||||
};
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(targetDir, 'package.json'),
|
||||
JSON.stringify(packageJson, null, 2)
|
||||
);
|
||||
// Check if package.json exists and merge if it does
|
||||
const packageJsonPath = path.join(targetDir, 'package.json');
|
||||
if (fs.existsSync(packageJsonPath)) {
|
||||
log('info', 'package.json already exists, merging content...');
|
||||
try {
|
||||
const existingPackageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
||||
|
||||
// Preserve existing fields but add our required ones
|
||||
const mergedPackageJson = {
|
||||
...existingPackageJson,
|
||||
scripts: {
|
||||
...existingPackageJson.scripts,
|
||||
...Object.fromEntries(
|
||||
Object.entries(packageJson.scripts)
|
||||
.filter(([key]) => !existingPackageJson.scripts || !existingPackageJson.scripts[key])
|
||||
)
|
||||
},
|
||||
dependencies: {
|
||||
...existingPackageJson.dependencies || {},
|
||||
...Object.fromEntries(
|
||||
Object.entries(packageJson.dependencies)
|
||||
.filter(([key]) => !existingPackageJson.dependencies || !existingPackageJson.dependencies[key])
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
// Ensure type is set if not already present
|
||||
if (!mergedPackageJson.type && packageJson.type) {
|
||||
mergedPackageJson.type = packageJson.type;
|
||||
}
|
||||
|
||||
fs.writeFileSync(packageJsonPath, JSON.stringify(mergedPackageJson, null, 2));
|
||||
log('success', 'Updated package.json with required fields');
|
||||
} catch (error) {
|
||||
log('error', `Failed to merge package.json: ${error.message}`);
|
||||
// Create a backup before potentially modifying
|
||||
const backupPath = `${packageJsonPath}.backup-${Date.now()}`;
|
||||
fs.copyFileSync(packageJsonPath, backupPath);
|
||||
log('info', `Created backup of existing package.json at ${backupPath}`);
|
||||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
||||
log('warn', 'Created new package.json (backup of original file was created)');
|
||||
}
|
||||
} else {
|
||||
// If package.json doesn't exist, create it
|
||||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
||||
log('success', 'Created package.json');
|
||||
}
|
||||
|
||||
// Copy template files with replacements
|
||||
const replacements = {
|
||||
@@ -317,8 +513,12 @@ function createProjectStructure(projectName, projectDescription, projectVersion,
|
||||
}));
|
||||
|
||||
try {
|
||||
if (!skipInstall) {
|
||||
execSync('npm install', { stdio: 'inherit', cwd: targetDir });
|
||||
log('success', 'Dependencies installed successfully!');
|
||||
} else {
|
||||
log('info', 'Dependencies installation skipped');
|
||||
}
|
||||
} catch (error) {
|
||||
log('error', 'Failed to install dependencies:', error.message);
|
||||
log('error', 'Please run npm install manually');
|
||||
@@ -374,7 +574,26 @@ console.log('process.argv:', process.argv);
|
||||
(async function main() {
|
||||
try {
|
||||
console.log('Starting initialization...');
|
||||
await initializeProject();
|
||||
|
||||
// Check if we should use the CLI options or prompt for input
|
||||
if (options.yes || (options.name && options.description)) {
|
||||
// When using --yes flag or providing name and description, use CLI options
|
||||
await initializeProject({
|
||||
projectName: options.name || 'task-master-project',
|
||||
projectDescription: options.description || 'A task management system for AI-driven development',
|
||||
projectVersion: options.version || '1.0.0',
|
||||
authorName: options.author || '',
|
||||
dryRun: options.dryRun || false,
|
||||
skipInstall: options.skipInstall || false
|
||||
});
|
||||
} else {
|
||||
// Otherwise, prompt for input normally
|
||||
await initializeProject({
|
||||
dryRun: options.dryRun || false,
|
||||
skipInstall: options.skipInstall || false
|
||||
});
|
||||
}
|
||||
|
||||
// Process should exit naturally after completion
|
||||
console.log('Initialization completed, exiting...');
|
||||
process.exit(0);
|
||||
|
||||
84
tasks/task_001.txt
Normal file
84
tasks/task_001.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
# Task ID: 1
|
||||
# Title: Implement Task Data Structure
|
||||
# Status: done
|
||||
# Dependencies: None
|
||||
# Priority: high
|
||||
# Description: Design and implement the core tasks.json structure that will serve as the single source of truth for the system.
|
||||
# Details:
|
||||
Create the foundational data structure including:
|
||||
- JSON schema for tasks.json
|
||||
- Task model with all required fields (id, title, description, status, dependencies, priority, details, testStrategy, subtasks)
|
||||
- Validation functions for the task model
|
||||
- Basic file system operations for reading/writing tasks.json
|
||||
- Error handling for file operations
|
||||
|
||||
# Test Strategy:
|
||||
Verify that the tasks.json structure can be created, read, and validated. Test with sample data to ensure all fields are properly handled and that validation correctly identifies invalid structures.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Design JSON Schema for tasks.json
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a formal JSON Schema definition that validates the structure of the tasks.json file. The schema should enforce the data model specified in the PRD, including the Task Model and Tasks Collection Model with all required fields (id, title, description, status, dependencies, priority, details, testStrategy, subtasks). Include type validation, required fields, and constraints on enumerated values (like status and priority options).
|
||||
## Acceptance Criteria:
|
||||
- JSON Schema file is created with proper validation for all fields in the Task and Tasks Collection models
|
||||
- Schema validates that task IDs are unique integers
|
||||
- Schema enforces valid status values ("pending", "done", "deferred")
|
||||
- Schema enforces valid priority values ("high", "medium", "low")
|
||||
- Schema validates the nested structure of subtasks
|
||||
- Schema includes validation for the meta object with projectName, version, timestamps, etc.
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement Task Model Classes
|
||||
## Status: done
|
||||
## Dependencies: 1.1 ✅
|
||||
## Description: Create JavaScript classes that represent the Task and Tasks Collection models. Implement constructor methods that validate input data, getter/setter methods for properties, and utility methods for common operations (like adding subtasks, changing status, etc.). These classes will serve as the programmatic interface to the task data structure.
|
||||
## Acceptance Criteria:
|
||||
- Task class with all required properties from the PRD
|
||||
- TasksCollection class that manages an array of Task objects
|
||||
- Methods for creating, retrieving, updating tasks
|
||||
- Methods for managing subtasks within a task
|
||||
- Input validation in constructors and setters
|
||||
- Proper TypeScript/JSDoc type definitions for all classes and methods
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Create File System Operations for tasks.json
|
||||
## Status: done
|
||||
## Dependencies: 1.1 ✅, 1.2 ✅
|
||||
## Description: Implement functions to read from and write to the tasks.json file. These functions should handle file system operations asynchronously, manage file locking to prevent corruption during concurrent operations, and ensure atomic writes (using temporary files and rename operations). Include initialization logic to create a default tasks.json file if one doesn't exist.
|
||||
## Acceptance Criteria:
|
||||
- Asynchronous read function that parses tasks.json into model objects
|
||||
- Asynchronous write function that serializes model objects to tasks.json
|
||||
- File locking mechanism to prevent concurrent write operations
|
||||
- Atomic write operations to prevent file corruption
|
||||
- Initialization function that creates default tasks.json if not present
|
||||
- Functions properly handle relative and absolute paths
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Implement Validation Functions
|
||||
## Status: done
|
||||
## Dependencies: 1.1 ✅, 1.2 ✅
|
||||
## Description: Create a comprehensive set of validation functions that can verify the integrity of the task data structure. These should include validation of individual tasks, validation of the entire tasks collection, dependency cycle detection, and validation of relationships between tasks. These functions will be used both when loading data and before saving to ensure data integrity.
|
||||
## Acceptance Criteria:
|
||||
- Functions to validate individual task objects against schema
|
||||
- Function to validate entire tasks collection
|
||||
- Dependency cycle detection algorithm
|
||||
- Validation of parent-child relationships in subtasks
|
||||
- Validation of task ID uniqueness
|
||||
- Functions return detailed error messages for invalid data
|
||||
- Unit tests covering various validation scenarios
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Error Handling System
|
||||
## Status: done
|
||||
## Dependencies: 1.1 ✅, 1.3 ✅, 1.4 ✅
|
||||
## Description: Create a robust error handling system for file operations and data validation. Implement custom error classes for different types of errors (file not found, permission denied, invalid data, etc.), error logging functionality, and recovery mechanisms where appropriate. This system should provide clear, actionable error messages to users while maintaining system stability.
|
||||
## Acceptance Criteria:
|
||||
- Custom error classes for different error types (FileError, ValidationError, etc.)
|
||||
- Consistent error format with error code, message, and details
|
||||
- Error logging functionality with configurable verbosity
|
||||
- Recovery mechanisms for common error scenarios
|
||||
- Graceful degradation when non-critical errors occur
|
||||
- User-friendly error messages that suggest solutions
|
||||
- Unit tests for error handling in various scenarios
|
||||
84
tasks/task_002.txt
Normal file
84
tasks/task_002.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
# Task ID: 2
|
||||
# Title: Develop Command Line Interface Foundation
|
||||
# Status: done
|
||||
# Dependencies: 1 ✅
|
||||
# Priority: high
|
||||
# Description: Create the basic CLI structure using Commander.js with command parsing and help documentation.
|
||||
# Details:
|
||||
Implement the CLI foundation including:
|
||||
- Set up Commander.js for command parsing
|
||||
- Create help documentation for all commands
|
||||
- Implement colorized console output for better readability
|
||||
- Add logging system with configurable levels
|
||||
- Handle global options (--help, --version, --file, --quiet, --debug, --json)
|
||||
|
||||
# Test Strategy:
|
||||
Test each command with various parameters to ensure proper parsing. Verify help documentation is comprehensive and accurate. Test logging at different verbosity levels.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Set up Commander.js Framework
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Initialize and configure Commander.js as the command-line parsing framework. Create the main CLI entry point file that will serve as the application's command-line interface. Set up the basic command structure with program name, version, and description from package.json. Implement the core program flow including command registration pattern and error handling.
|
||||
## Acceptance Criteria:
|
||||
- Commander.js is properly installed and configured in the project
|
||||
- CLI entry point file is created with proper Node.js shebang and permissions
|
||||
- Program metadata (name, version, description) is correctly loaded from package.json
|
||||
- Basic command registration pattern is established
|
||||
- Global error handling is implemented to catch and display unhandled exceptions
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement Global Options Handling
|
||||
## Status: done
|
||||
## Dependencies: 2.1 ✅
|
||||
## Description: Add support for all required global options including --help, --version, --file, --quiet, --debug, and --json. Implement the logic to process these options and modify program behavior accordingly. Create a configuration object that stores these settings and can be accessed by all commands. Ensure options can be combined and have appropriate precedence rules.
|
||||
## Acceptance Criteria:
|
||||
- All specified global options (--help, --version, --file, --quiet, --debug, --json) are implemented
|
||||
- Options correctly modify program behavior when specified
|
||||
- Alternative tasks.json file can be specified with --file option
|
||||
- Output verbosity is controlled by --quiet and --debug flags
|
||||
- JSON output format is supported with the --json flag
|
||||
- Help text is displayed when --help is specified
|
||||
- Version information is displayed when --version is specified
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Create Command Help Documentation System
|
||||
## Status: done
|
||||
## Dependencies: 2.1 ✅, 2.2 ✅
|
||||
## Description: Develop a comprehensive help documentation system that provides clear usage instructions for all commands and options. Implement both command-specific help and general program help. Ensure help text is well-formatted, consistent, and includes examples. Create a centralized system for managing help text to ensure consistency across the application.
|
||||
## Acceptance Criteria:
|
||||
- General program help shows all available commands and global options
|
||||
- Command-specific help shows detailed usage information for each command
|
||||
- Help text includes clear examples of command usage
|
||||
- Help formatting is consistent and readable across all commands
|
||||
- Help system handles both explicit help requests (--help) and invalid command syntax
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Implement Colorized Console Output
|
||||
## Status: done
|
||||
## Dependencies: 2.1 ✅
|
||||
## Description: Create a utility module for colorized console output to improve readability and user experience. Implement different color schemes for various message types (info, warning, error, success). Add support for text styling (bold, underline, etc.) and ensure colors are used consistently throughout the application. Make sure colors can be disabled in environments that don't support them.
|
||||
## Acceptance Criteria:
|
||||
- Utility module provides consistent API for colorized output
|
||||
- Different message types (info, warning, error, success) use appropriate colors
|
||||
- Text styling options (bold, underline, etc.) are available
|
||||
- Colors are disabled automatically in environments that don't support them
|
||||
- Color usage is consistent across the application
|
||||
- Output remains readable when colors are disabled
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Develop Configurable Logging System
|
||||
## Status: done
|
||||
## Dependencies: 2.1 ✅, 2.2 ✅, 2.4 ✅
|
||||
## Description: Create a logging system with configurable verbosity levels that integrates with the CLI. Implement different logging levels (error, warn, info, debug, trace) and ensure log output respects the verbosity settings specified by global options. Add support for log output redirection to files. Ensure logs include appropriate timestamps and context information.
|
||||
## Acceptance Criteria:
|
||||
- Logging system supports multiple verbosity levels (error, warn, info, debug, trace)
|
||||
- Log output respects verbosity settings from global options (--quiet, --debug)
|
||||
- Logs include timestamps and appropriate context information
|
||||
- Log messages use consistent formatting and appropriate colors
|
||||
- Logging can be redirected to files when needed
|
||||
- Debug logs provide detailed information useful for troubleshooting
|
||||
- Logging system has minimal performance impact when not in use
|
||||
|
||||
Each of these subtasks directly addresses a component of the CLI foundation as specified in the task description, and together they provide a complete implementation of the required functionality. The subtasks are ordered in a logical sequence that respects their dependencies.
|
||||
67
tasks/task_003.txt
Normal file
67
tasks/task_003.txt
Normal file
@@ -0,0 +1,67 @@
|
||||
# Task ID: 3
|
||||
# Title: Implement Basic Task Operations
|
||||
# Status: done
|
||||
# Dependencies: 1 ✅, 2 ✅
|
||||
# Priority: high
|
||||
# Description: Create core functionality for managing tasks including listing, creating, updating, and deleting tasks.
|
||||
# Details:
|
||||
Implement the following task operations:
|
||||
- List tasks with filtering options
|
||||
- Create new tasks with required fields
|
||||
- Update existing task properties
|
||||
- Delete tasks
|
||||
- Change task status (pending/done/deferred)
|
||||
- Handle dependencies between tasks
|
||||
- Manage task priorities
|
||||
|
||||
# Test Strategy:
|
||||
Test each operation with valid and invalid inputs. Verify that dependencies are properly tracked and that status changes are reflected correctly in the tasks.json file.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Implement Task Listing with Filtering
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a function that retrieves tasks from the tasks.json file and implements filtering options. Use the Commander.js CLI to add a 'list' command with various filter flags (e.g., --status, --priority, --dependency). Implement sorting options for the list output.
|
||||
## Acceptance Criteria:
|
||||
- 'list' command is available in the CLI with help documentation
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Develop Task Creation Functionality
|
||||
## Status: done
|
||||
## Dependencies: 3.1 ✅
|
||||
## Description: Implement a 'create' command in the CLI that allows users to add new tasks to the tasks.json file. Prompt for required fields (title, description, priority) and optional fields (dependencies, details, test strategy). Validate input and assign a unique ID to the new task.
|
||||
## Acceptance Criteria:
|
||||
- 'create' command is available with interactive prompts for task details
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement Task Update Operations
|
||||
## Status: done
|
||||
## Dependencies: 3.1 ✅, 3.2 ✅
|
||||
## Description: Create an 'update' command that allows modification of existing task properties. Implement options to update individual fields or enter an interactive mode for multiple updates. Ensure that updates maintain data integrity, especially for dependencies.
|
||||
## Acceptance Criteria:
|
||||
- 'update' command accepts a task ID and field-specific flags for quick updates
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Develop Task Deletion Functionality
|
||||
## Status: done
|
||||
## Dependencies: 3.1 ✅, 3.2 ✅, 3.3 ✅
|
||||
## Description: Implement a 'delete' command to remove tasks from tasks.json. Include safeguards against deleting tasks with dependencies and provide a force option to override. Update any tasks that had the deleted task as a dependency.
|
||||
## Acceptance Criteria:
|
||||
- 'delete' command removes the specified task from tasks.json
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Task Status Management
|
||||
## Status: done
|
||||
## Dependencies: 3.1 ✅, 3.2 ✅, 3.3 ✅
|
||||
## Description: Create a 'status' command to change the status of tasks (pending/done/deferred). Implement logic to handle status changes, including updating dependent tasks if necessary. Add a batch mode for updating multiple task statuses at once.
|
||||
## Acceptance Criteria:
|
||||
- 'status' command changes task status correctly in tasks.json
|
||||
|
||||
## Subtask ID: 6
|
||||
## Title: Develop Task Dependency and Priority Management
|
||||
## Status: done
|
||||
## Dependencies: 3.1 ✅, 3.2 ✅, 3.3 ✅
|
||||
## Description: Implement 'dependency' and 'priority' commands to manage task relationships and importance. Create functions to add/remove dependencies and change priorities. Ensure the system prevents circular dependencies and maintains consistent priority levels.
|
||||
## Acceptance Criteria:
|
||||
- 'dependency' command can add or remove task dependencies
|
||||
87
tasks/task_004.txt
Normal file
87
tasks/task_004.txt
Normal file
@@ -0,0 +1,87 @@
|
||||
# Task ID: 4
|
||||
# Title: Create Task File Generation System
|
||||
# Status: done
|
||||
# Dependencies: 1 ✅, 3 ✅
|
||||
# Priority: medium
|
||||
# Description: Implement the system for generating individual task files from the tasks.json data structure.
|
||||
# Details:
|
||||
Build the task file generation system including:
|
||||
- Create task file templates
|
||||
- Implement generation of task files from tasks.json
|
||||
- Add bi-directional synchronization between task files and tasks.json
|
||||
- Implement proper file naming and organization
|
||||
- Handle updates to task files reflecting back to tasks.json
|
||||
|
||||
# Test Strategy:
|
||||
Generate task files from sample tasks.json data and verify the content matches the expected format. Test synchronization by modifying task files and ensuring changes are reflected in tasks.json.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Design Task File Template Structure
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create the template structure for individual task files that will be generated from tasks.json. This includes defining the format with sections for task ID, title, status, dependencies, priority, description, details, test strategy, and subtasks. Implement a template engine or string formatting system that can populate these templates with task data. The template should follow the format specified in the PRD's Task File Format section.
|
||||
## Acceptance Criteria:
|
||||
- Template structure matches the specification in the PRD
|
||||
- Template includes all required sections (ID, title, status, dependencies, etc.)
|
||||
- Template supports proper formatting of multi-line content like details and test strategy
|
||||
- Template handles subtasks correctly, including proper indentation and formatting
|
||||
- Template system is modular and can be easily modified if requirements change
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement Task File Generation Logic
|
||||
## Status: done
|
||||
## Dependencies: 4.1 ✅
|
||||
## Description: Develop the core functionality to generate individual task files from the tasks.json data structure. This includes reading the tasks.json file, iterating through each task, applying the template to each task's data, and writing the resulting content to appropriately named files in the tasks directory. Ensure proper error handling for file operations and data validation.
|
||||
## Acceptance Criteria:
|
||||
- Successfully reads tasks from tasks.json
|
||||
- Correctly applies template to each task's data
|
||||
- Generates files with proper naming convention (e.g., task_001.txt)
|
||||
- Creates the tasks directory if it doesn't exist
|
||||
- Handles errors gracefully (file not found, permission issues, etc.)
|
||||
- Validates task data before generation to prevent errors
|
||||
- Logs generation process with appropriate verbosity levels
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement File Naming and Organization System
|
||||
## Status: done
|
||||
## Dependencies: 4.1 ✅
|
||||
## Description: Create a consistent system for naming and organizing task files. Implement a function that generates standardized filenames based on task IDs (e.g., task_001.txt for task ID 1). Design the directory structure for storing task files according to the PRD specification. Ensure the system handles task ID formatting consistently and prevents filename collisions.
|
||||
## Acceptance Criteria:
|
||||
- Generates consistent filenames based on task IDs with proper zero-padding
|
||||
- Creates and maintains the correct directory structure as specified in the PRD
|
||||
- Handles special characters or edge cases in task IDs appropriately
|
||||
- Prevents filename collisions between different tasks
|
||||
- Provides utility functions for converting between task IDs and filenames
|
||||
- Maintains backward compatibility if the naming scheme needs to evolve
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Implement Task File to JSON Synchronization
|
||||
## Status: done
|
||||
## Dependencies: 4.1 ✅, 4.3 ✅, 4.2 ✅
|
||||
## Description: Develop functionality to read modified task files and update the corresponding entries in tasks.json. This includes parsing the task file format, extracting structured data, validating the changes, and updating the tasks.json file accordingly. Ensure the system can handle concurrent modifications and resolve conflicts appropriately.
|
||||
## Acceptance Criteria:
|
||||
- Successfully parses task files to extract structured data
|
||||
- Validates parsed data against the task model schema
|
||||
- Updates tasks.json with changes from task files
|
||||
- Handles conflicts when the same task is modified in both places
|
||||
- Preserves task relationships and dependencies during synchronization
|
||||
- Provides clear error messages for parsing or validation failures
|
||||
- Updates the "updatedAt" timestamp in tasks.json metadata
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Change Detection and Update Handling
|
||||
## Status: done
|
||||
## Dependencies: 4.1 ✅, 4.3 ✅, 4.4 ✅, 4.2 ✅
|
||||
## Description: Create a system to detect changes in task files and tasks.json, and handle updates bidirectionally. This includes implementing file watching or comparison mechanisms, determining which version is newer, and applying changes in the appropriate direction. Ensure the system handles edge cases like deleted files, new tasks, and conflicting changes.
|
||||
## Acceptance Criteria:
|
||||
- Detects changes in both task files and tasks.json
|
||||
- Determines which version is newer based on modification timestamps or content
|
||||
- Applies changes in the appropriate direction (file to JSON or JSON to file)
|
||||
- Handles edge cases like deleted files, new tasks, and renamed tasks
|
||||
- Provides options for manual conflict resolution when necessary
|
||||
- Maintains data integrity during the synchronization process
|
||||
- Includes a command to force synchronization in either direction
|
||||
- Logs all synchronization activities for troubleshooting
|
||||
|
||||
Each of these subtasks addresses a specific component of the task file generation system, following a logical progression from template design to bidirectional synchronization. The dependencies ensure that prerequisites are completed before dependent work begins, and the acceptance criteria provide clear guidelines for verifying each subtask's completion.
|
||||
94
tasks/task_005.txt
Normal file
94
tasks/task_005.txt
Normal file
@@ -0,0 +1,94 @@
|
||||
# Task ID: 5
|
||||
# Title: Integrate Anthropic Claude API
|
||||
# Status: done
|
||||
# Dependencies: 1 ✅
|
||||
# Priority: high
|
||||
# Description: Set up the integration with Claude API for AI-powered task generation and expansion.
|
||||
# Details:
|
||||
Implement Claude API integration including:
|
||||
- API authentication using environment variables
|
||||
- Create prompt templates for various operations
|
||||
- Implement response handling and parsing
|
||||
- Add error management with retries and exponential backoff
|
||||
- Implement token usage tracking
|
||||
- Create configurable model parameters
|
||||
|
||||
# Test Strategy:
|
||||
Test API connectivity with sample prompts. Verify authentication works correctly with different API keys. Test error handling by simulating API failures.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Configure API Authentication System
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a dedicated module for Anthropic API authentication. Implement a secure system to load API keys from environment variables using dotenv. Include validation to ensure API keys are properly formatted and present. Create a configuration object that will store all Claude-related settings including API keys, base URLs, and default parameters.
|
||||
## Acceptance Criteria:
|
||||
- Environment variables are properly loaded from .env file
|
||||
- API key validation is implemented with appropriate error messages
|
||||
- Configuration object includes all necessary Claude API parameters
|
||||
- Authentication can be tested with a simple API call
|
||||
- Documentation is added for required environment variables
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Develop Prompt Template System
|
||||
## Status: done
|
||||
## Dependencies: 5.1 ✅
|
||||
## Description: Create a flexible prompt template system for Claude API interactions. Implement a PromptTemplate class that can handle variable substitution, system and user messages, and proper formatting according to Claude's requirements. Include templates for different operations (task generation, task expansion, etc.) with appropriate instructions and constraints for each use case.
|
||||
## Acceptance Criteria:
|
||||
- PromptTemplate class supports variable substitution
|
||||
- System and user message separation is properly implemented
|
||||
- Templates exist for all required operations (task generation, expansion, etc.)
|
||||
- Templates include appropriate constraints and formatting instructions
|
||||
- Template system is unit tested with various inputs
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement Response Handling and Parsing
|
||||
## Status: done
|
||||
## Dependencies: 5.1 ✅, 5.2 ✅
|
||||
## Description: Create a response handling system that processes Claude API responses. Implement JSON parsing for structured outputs, error detection in responses, and extraction of relevant information. Build utility functions to transform Claude's responses into the application's data structures. Include validation to ensure responses meet expected formats.
|
||||
## Acceptance Criteria:
|
||||
- Response parsing functions handle both JSON and text formats
|
||||
- Error detection identifies malformed or unexpected responses
|
||||
- Utility functions transform responses into task data structures
|
||||
- Validation ensures responses meet expected schemas
|
||||
- Edge cases like empty or partial responses are handled gracefully
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Build Error Management with Retry Logic
|
||||
## Status: done
|
||||
## Dependencies: 5.1 ✅, 5.3 ✅
|
||||
## Description: Implement a robust error handling system for Claude API interactions. Create middleware that catches API errors, network issues, and timeout problems. Implement exponential backoff retry logic that increases wait time between retries. Add configurable retry limits and timeout settings. Include detailed logging for troubleshooting API issues.
|
||||
## Acceptance Criteria:
|
||||
- All API errors are caught and handled appropriately
|
||||
- Exponential backoff retry logic is implemented
|
||||
- Retry limits and timeouts are configurable
|
||||
- Detailed error logging provides actionable information
|
||||
- System degrades gracefully when API is unavailable
|
||||
- Unit tests verify retry behavior with mocked API failures
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Token Usage Tracking
|
||||
## Status: done
|
||||
## Dependencies: 5.1 ✅, 5.3 ✅
|
||||
## Description: Create a token tracking system to monitor Claude API usage. Implement functions to count tokens in prompts and responses. Build a logging system that records token usage per operation. Add reporting capabilities to show token usage trends and costs. Implement configurable limits to prevent unexpected API costs.
|
||||
## Acceptance Criteria:
|
||||
- Token counting functions accurately estimate usage
|
||||
- Usage logging records tokens per operation type
|
||||
- Reporting functions show usage statistics and estimated costs
|
||||
- Configurable limits can prevent excessive API usage
|
||||
- Warning system alerts when approaching usage thresholds
|
||||
- Token tracking data is persisted between application runs
|
||||
|
||||
## Subtask ID: 6
|
||||
## Title: Create Model Parameter Configuration System
|
||||
## Status: done
|
||||
## Dependencies: 5.1 ✅, 5.5 ✅
|
||||
## Description: Implement a flexible system for configuring Claude model parameters. Create a configuration module that manages model selection, temperature, top_p, max_tokens, and other parameters. Build functions to customize parameters based on operation type. Add validation to ensure parameters are within acceptable ranges. Include preset configurations for different use cases (creative, precise, etc.).
|
||||
## Acceptance Criteria:
|
||||
- Configuration module manages all Claude model parameters
|
||||
- Parameter customization functions exist for different operations
|
||||
- Validation ensures parameters are within acceptable ranges
|
||||
- Preset configurations exist for different use cases
|
||||
- Parameters can be overridden at runtime when needed
|
||||
- Documentation explains parameter effects and recommended values
|
||||
- Unit tests verify parameter validation and configuration loading
|
||||
91
tasks/task_006.txt
Normal file
91
tasks/task_006.txt
Normal file
@@ -0,0 +1,91 @@
|
||||
# Task ID: 6
|
||||
# Title: Build PRD Parsing System
|
||||
# Status: done
|
||||
# Dependencies: 1 ✅, 5 ✅
|
||||
# Priority: high
|
||||
# Description: Create the system for parsing Product Requirements Documents into structured task lists.
|
||||
# Details:
|
||||
Implement PRD parsing functionality including:
|
||||
- PRD file reading from specified path
|
||||
- Prompt engineering for effective PRD parsing
|
||||
- Convert PRD content to task structure via Claude API
|
||||
- Implement intelligent dependency inference
|
||||
- Add priority assignment logic
|
||||
- Handle large PRDs by chunking if necessary
|
||||
|
||||
# Test Strategy:
|
||||
Test with sample PRDs of varying complexity. Verify that generated tasks accurately reflect the requirements in the PRD. Check that dependencies and priorities are logically assigned.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Implement PRD File Reading Module
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a module that can read PRD files from a specified file path. The module should handle different file formats (txt, md, docx) and extract the text content. Implement error handling for file not found, permission issues, and invalid file formats. Add support for encoding detection and proper text extraction to ensure the content is correctly processed regardless of the source format.
|
||||
## Acceptance Criteria:
|
||||
- Function accepts a file path and returns the PRD content as a string
|
||||
- Supports at least .txt and .md file formats (with extensibility for others)
|
||||
- Implements robust error handling with meaningful error messages
|
||||
- Successfully reads files of various sizes (up to 10MB)
|
||||
- Preserves formatting where relevant for parsing (headings, lists, code blocks)
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Design and Engineer Effective PRD Parsing Prompts
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a set of carefully engineered prompts for Claude API that effectively extract structured task information from PRD content. Design prompts that guide Claude to identify tasks, dependencies, priorities, and implementation details from unstructured PRD text. Include system prompts, few-shot examples, and output format specifications to ensure consistent results.
|
||||
## Acceptance Criteria:
|
||||
- At least 3 different prompt templates optimized for different PRD styles/formats
|
||||
- Prompts include clear instructions for identifying tasks, dependencies, and priorities
|
||||
- Output format specification ensures Claude returns structured, parseable data
|
||||
- Includes few-shot examples to guide Claude's understanding
|
||||
- Prompts are optimized for token efficiency while maintaining effectiveness
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement PRD to Task Conversion System
|
||||
## Status: done
|
||||
## Dependencies: 6.1 ✅
|
||||
## Description: Develop the core functionality that sends PRD content to Claude API and converts the response into the task data structure. This includes sending the engineered prompts with PRD content to Claude, parsing the structured response, and transforming it into valid task objects that conform to the task model. Implement validation to ensure the generated tasks meet all requirements.
|
||||
## Acceptance Criteria:
|
||||
- Successfully sends PRD content to Claude API with appropriate prompts
|
||||
- Parses Claude's response into structured task objects
|
||||
- Validates generated tasks against the task model schema
|
||||
- Handles API errors and response parsing failures gracefully
|
||||
- Generates unique and sequential task IDs
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Build Intelligent Dependency Inference System
|
||||
## Status: done
|
||||
## Dependencies: 6.1 ✅, 6.3 ✅
|
||||
## Description: Create an algorithm that analyzes the generated tasks and infers logical dependencies between them. The system should identify which tasks must be completed before others based on the content and context of each task. Implement both explicit dependency detection (from Claude's output) and implicit dependency inference (based on task relationships and logical ordering).
|
||||
## Acceptance Criteria:
|
||||
- Correctly identifies explicit dependencies mentioned in task descriptions
|
||||
- Infers implicit dependencies based on task context and relationships
|
||||
- Prevents circular dependencies in the task graph
|
||||
- Provides confidence scores for inferred dependencies
|
||||
- Allows for manual override/adjustment of detected dependencies
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Priority Assignment Logic
|
||||
## Status: done
|
||||
## Dependencies: 6.1 ✅, 6.3 ✅
|
||||
## Description: Develop a system that assigns appropriate priorities (high, medium, low) to tasks based on their content, dependencies, and position in the PRD. Create algorithms that analyze task descriptions, identify critical path tasks, and consider factors like technical risk and business value. Implement both automated priority assignment and manual override capabilities.
|
||||
## Acceptance Criteria:
|
||||
- Assigns priorities based on multiple factors (dependencies, critical path, risk)
|
||||
- Identifies foundation/infrastructure tasks as high priority
|
||||
- Balances priorities across the project (not everything is high priority)
|
||||
- Provides justification for priority assignments
|
||||
- Allows for manual adjustment of priorities
|
||||
|
||||
## Subtask ID: 6
|
||||
## Title: Implement PRD Chunking for Large Documents
|
||||
## Status: done
|
||||
## Dependencies: 6.1 ✅, 6.5 ✅, 6.3 ✅
|
||||
## Description: Create a system that can handle large PRDs by breaking them into manageable chunks for processing. Implement intelligent document segmentation that preserves context across chunks, tracks section relationships, and maintains coherence in the generated tasks. Develop a mechanism to reassemble and deduplicate tasks generated from different chunks into a unified task list.
|
||||
## Acceptance Criteria:
|
||||
- Successfully processes PRDs larger than Claude's context window
|
||||
- Intelligently splits documents at logical boundaries (sections, chapters)
|
||||
- Preserves context when processing individual chunks
|
||||
- Reassembles tasks from multiple chunks into a coherent task list
|
||||
- Detects and resolves duplicate or overlapping tasks
|
||||
- Maintains correct dependency relationships across chunks
|
||||
84
tasks/task_007.txt
Normal file
84
tasks/task_007.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
# Task ID: 7
|
||||
# Title: Implement Task Expansion with Claude
|
||||
# Status: done
|
||||
# Dependencies: 3 ✅, 5 ✅
|
||||
# Priority: medium
|
||||
# Description: Create functionality to expand tasks into subtasks using Claude's AI capabilities.
|
||||
# Details:
|
||||
Build task expansion functionality including:
|
||||
- Create subtask generation prompts
|
||||
- Implement workflow for expanding a task into subtasks
|
||||
- Add context-aware expansion capabilities
|
||||
- Implement parent-child relationship management
|
||||
- Allow specification of number of subtasks to generate
|
||||
- Provide mechanism to regenerate unsatisfactory subtasks
|
||||
|
||||
# Test Strategy:
|
||||
Test expanding various types of tasks into subtasks. Verify that subtasks are properly linked to parent tasks. Check that context is properly incorporated into generated subtasks.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Design and Implement Subtask Generation Prompts
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create optimized prompt templates for Claude to generate subtasks from parent tasks. Design the prompts to include task context, project information, and formatting instructions that ensure consistent, high-quality subtask generation. Implement a prompt template system that allows for dynamic insertion of task details, configurable number of subtasks, and additional context parameters.
|
||||
## Acceptance Criteria:
|
||||
- At least two prompt templates are created (standard and detailed)
|
||||
- Prompts include clear instructions for formatting subtask output
|
||||
- Prompts dynamically incorporate task title, description, details, and context
|
||||
- Prompts include parameters for specifying the number of subtasks to generate
|
||||
- Prompt system allows for easy modification and extension of templates
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Develop Task Expansion Workflow and UI
|
||||
## Status: done
|
||||
## Dependencies: 7.5 ✅
|
||||
## Description: Implement the command-line interface and workflow for expanding tasks into subtasks. Create a new command that allows users to select a task, specify the number of subtasks, and add optional context. Design the interaction flow to handle the API request, process the response, and update the tasks.json file with the newly generated subtasks.
|
||||
## Acceptance Criteria:
|
||||
- Command `node scripts/dev.js expand --id=<task_id> --count=<number>` is implemented
|
||||
- Optional parameters for additional context (`--context="..."`) are supported
|
||||
- User is shown progress indicators during API calls
|
||||
- Generated subtasks are displayed for review before saving
|
||||
- Command handles errors gracefully with helpful error messages
|
||||
- Help documentation for the expand command is comprehensive
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement Context-Aware Expansion Capabilities
|
||||
## Status: done
|
||||
## Dependencies: 7.1 ✅
|
||||
## Description: Enhance the task expansion functionality to incorporate project context when generating subtasks. Develop a system to gather relevant information from the project, such as related tasks, dependencies, and previously completed work. Implement logic to include this context in the Claude prompts to improve the relevance and quality of generated subtasks.
|
||||
## Acceptance Criteria:
|
||||
- System automatically gathers context from related tasks and dependencies
|
||||
- Project metadata is incorporated into expansion prompts
|
||||
- Implementation details from dependent tasks are included in context
|
||||
- Context gathering is configurable (amount and type of context)
|
||||
- Generated subtasks show awareness of existing project structure and patterns
|
||||
- Context gathering has reasonable performance even with large task collections
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Build Parent-Child Relationship Management
|
||||
## Status: done
|
||||
## Dependencies: 7.3 ✅
|
||||
## Description: Implement the data structure and operations for managing parent-child relationships between tasks and subtasks. Create functions to establish these relationships in the tasks.json file, update the task model to support subtask arrays, and develop utilities to navigate, filter, and display task hierarchies. Ensure all basic task operations (update, delete, etc.) properly handle subtask relationships.
|
||||
## Acceptance Criteria:
|
||||
- Task model is updated to include subtasks array
|
||||
- Subtasks have proper ID format (parent.sequence)
|
||||
- Parent tasks track their subtasks with proper references
|
||||
- Task listing command shows hierarchical structure
|
||||
- Completing all subtasks automatically updates parent task status
|
||||
- Deleting a parent task properly handles orphaned subtasks
|
||||
- Task file generation includes subtask information
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Subtask Regeneration Mechanism
|
||||
## Status: done
|
||||
## Dependencies: 7.1 ✅, 7.2 ✅, 7.4 ✅
|
||||
## Description: Create functionality that allows users to regenerate unsatisfactory subtasks. Implement a command that can target specific subtasks for regeneration, preserve satisfactory subtasks, and incorporate feedback to improve the new generation. Design the system to maintain proper parent-child relationships and task IDs during regeneration.
|
||||
## Acceptance Criteria:
|
||||
- Command `node scripts/dev.js regenerate --id=<subtask_id>` is implemented
|
||||
- Option to regenerate all subtasks for a parent (`--all`)
|
||||
- Feedback parameter allows user to guide regeneration (`--feedback="..."`)
|
||||
- Original subtask details are preserved in prompt context
|
||||
- Regenerated subtasks maintain proper ID sequence
|
||||
- Task relationships remain intact after regeneration
|
||||
- Command provides clear before/after comparison of subtasks
|
||||
84
tasks/task_008.txt
Normal file
84
tasks/task_008.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
# Task ID: 8
|
||||
# Title: Develop Implementation Drift Handling
|
||||
# Status: done
|
||||
# Dependencies: 3 ✅, 5 ✅, 7 ✅
|
||||
# Priority: medium
|
||||
# Description: Create system to handle changes in implementation that affect future tasks.
|
||||
# Details:
|
||||
Implement drift handling including:
|
||||
- Add capability to update future tasks based on completed work
|
||||
- Implement task rewriting based on new context
|
||||
- Create dependency chain updates when tasks change
|
||||
- Preserve completed work while updating future tasks
|
||||
- Add command to analyze and suggest updates to future tasks
|
||||
|
||||
# Test Strategy:
|
||||
Simulate implementation changes and test the system's ability to update future tasks appropriately. Verify that completed tasks remain unchanged while pending tasks are updated correctly.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Create Task Update Mechanism Based on Completed Work
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Implement a system that can identify pending tasks affected by recently completed tasks and update them accordingly. This requires analyzing the dependency chain and determining which future tasks need modification based on implementation decisions made in completed tasks. Create a function that takes a completed task ID as input, identifies dependent tasks, and prepares them for potential updates.
|
||||
## Acceptance Criteria:
|
||||
- Function implemented to identify all pending tasks that depend on a specified completed task
|
||||
- System can extract relevant implementation details from completed tasks
|
||||
- Mechanism to flag tasks that need updates based on implementation changes
|
||||
- Unit tests that verify the correct tasks are identified for updates
|
||||
- Command-line interface to trigger the update analysis process
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement AI-Powered Task Rewriting
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Develop functionality to use Claude API to rewrite pending tasks based on new implementation context. This involves creating specialized prompts that include the original task description, the implementation details of completed dependency tasks, and instructions to update the pending task to align with the actual implementation. The system should generate updated task descriptions, details, and test strategies.
|
||||
## Acceptance Criteria:
|
||||
- Specialized Claude prompt template for task rewriting
|
||||
- Function to gather relevant context from completed dependency tasks
|
||||
- Implementation of task rewriting logic that preserves task ID and dependencies
|
||||
- Proper error handling for API failures
|
||||
- Mechanism to preview changes before applying them
|
||||
- Unit tests with mock API responses
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Build Dependency Chain Update System
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a system to update task dependencies when task implementations change. This includes adding new dependencies that weren't initially identified, removing dependencies that are no longer relevant, and reordering dependencies based on implementation decisions. The system should maintain the integrity of the dependency graph while reflecting the actual implementation requirements.
|
||||
## Acceptance Criteria:
|
||||
- Function to analyze and update the dependency graph
|
||||
- Capability to add new dependencies to tasks
|
||||
- Capability to remove obsolete dependencies
|
||||
- Validation to prevent circular dependencies
|
||||
- Preservation of dependency chain integrity
|
||||
- CLI command to visualize dependency changes
|
||||
- Unit tests for dependency graph modifications
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Implement Completed Work Preservation
|
||||
## Status: done
|
||||
## Dependencies: 8.3 ✅
|
||||
## Description: Develop a mechanism to ensure that updates to future tasks don't affect completed work. This includes creating a versioning system for tasks, tracking task history, and implementing safeguards to prevent modifications to completed tasks. The system should maintain a record of task changes while ensuring that completed work remains stable.
|
||||
## Acceptance Criteria:
|
||||
- Implementation of task versioning to track changes
|
||||
- Safeguards that prevent modifications to tasks marked as "done"
|
||||
- System to store and retrieve task history
|
||||
- Clear visual indicators in the CLI for tasks that have been modified
|
||||
- Ability to view the original version of a modified task
|
||||
- Unit tests for completed work preservation
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Create Update Analysis and Suggestion Command
|
||||
## Status: done
|
||||
## Dependencies: 8.3 ✅
|
||||
## Description: Implement a CLI command that analyzes the current state of tasks, identifies potential drift between completed and pending tasks, and suggests updates. This command should provide a comprehensive report of potential inconsistencies and offer recommendations for task updates without automatically applying them. It should include options to apply all suggested changes, select specific changes to apply, or ignore suggestions.
|
||||
## Acceptance Criteria:
|
||||
- New CLI command "analyze-drift" implemented
|
||||
- Comprehensive analysis of potential implementation drift
|
||||
- Detailed report of suggested task updates
|
||||
- Interactive mode to select which suggestions to apply
|
||||
- Batch mode to apply all suggested changes
|
||||
- Option to export suggestions to a file for review
|
||||
- Documentation of the command usage and options
|
||||
- Integration tests that verify the end-to-end workflow
|
||||
83
tasks/task_009.txt
Normal file
83
tasks/task_009.txt
Normal file
@@ -0,0 +1,83 @@
|
||||
# Task ID: 9
|
||||
# Title: Integrate Perplexity API
|
||||
# Status: done
|
||||
# Dependencies: 5 ✅
|
||||
# Priority: low
|
||||
# Description: Add integration with Perplexity API for research-backed task generation.
|
||||
# Details:
|
||||
Implement Perplexity integration including:
|
||||
- API authentication via OpenAI client
|
||||
- Create research-oriented prompt templates
|
||||
- Implement response handling for Perplexity
|
||||
- Add fallback to Claude when Perplexity is unavailable
|
||||
- Implement response quality comparison logic
|
||||
- Add configuration for model selection
|
||||
|
||||
# Test Strategy:
|
||||
Test connectivity to Perplexity API. Verify research-oriented prompts return useful information. Test fallback mechanism by simulating Perplexity API unavailability.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Implement Perplexity API Authentication Module
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a dedicated module for authenticating with the Perplexity API using the OpenAI client library. This module should handle API key management, connection setup, and basic error handling. Implement environment variable support for the PERPLEXITY_API_KEY and PERPLEXITY_MODEL variables with appropriate defaults as specified in the PRD. Include a connection test function to verify API access.
|
||||
## Acceptance Criteria:
|
||||
- Authentication module successfully connects to Perplexity API using OpenAI client
|
||||
- Environment variables for API key and model selection are properly handled
|
||||
- Connection test function returns appropriate success/failure responses
|
||||
- Basic error handling for authentication failures is implemented
|
||||
- Documentation for required environment variables is added to .env.example
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Develop Research-Oriented Prompt Templates
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Design and implement specialized prompt templates optimized for research tasks with Perplexity. Create a template system that can generate contextually relevant research prompts based on task information. These templates should be structured to leverage Perplexity's online search capabilities and should follow the Research-Backed Expansion Prompt Structure defined in the PRD. Include mechanisms to control prompt length and focus.
|
||||
## Acceptance Criteria:
|
||||
- At least 3 different research-oriented prompt templates are implemented
|
||||
- Templates can be dynamically populated with task context and parameters
|
||||
- Prompts are optimized for Perplexity's capabilities and response format
|
||||
- Template system is extensible to allow for future additions
|
||||
- Templates include appropriate system instructions to guide Perplexity's responses
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Create Perplexity Response Handler
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Implement a specialized response handler for Perplexity API responses. This should parse and process the JSON responses from Perplexity, extract relevant information, and transform it into the task data structure format. Include validation to ensure responses meet quality standards and contain the expected information. Implement streaming response handling if supported by the API client.
|
||||
## Acceptance Criteria:
|
||||
- Response handler successfully parses Perplexity API responses
|
||||
- Handler extracts structured task information from free-text responses
|
||||
- Validation logic identifies and handles malformed or incomplete responses
|
||||
- Response streaming is properly implemented if supported
|
||||
- Handler includes appropriate error handling for various response scenarios
|
||||
- Unit tests verify correct parsing of sample responses
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Implement Claude Fallback Mechanism
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a fallback system that automatically switches to the Claude API when Perplexity is unavailable or returns errors. This system should detect API failures, rate limiting, or quality issues with Perplexity responses and seamlessly transition to using Claude with appropriate prompt modifications. Implement retry logic with exponential backoff before falling back to Claude. Log all fallback events for monitoring.
|
||||
## Acceptance Criteria:
|
||||
- System correctly detects Perplexity API failures and availability issues
|
||||
- Fallback to Claude is triggered automatically when needed
|
||||
- Prompts are appropriately modified when switching to Claude
|
||||
- Retry logic with exponential backoff is implemented before fallback
|
||||
- All fallback events are logged with relevant details
|
||||
- Configuration option allows setting the maximum number of retries
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Develop Response Quality Comparison and Model Selection
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Implement a system to compare response quality between Perplexity and Claude, and provide configuration options for model selection. Create metrics for evaluating response quality (e.g., specificity, relevance, actionability). Add configuration options that allow users to specify which model to use for different types of tasks. Implement a caching mechanism to reduce API calls and costs when appropriate.
|
||||
## Acceptance Criteria:
|
||||
- Quality comparison logic evaluates responses based on defined metrics
|
||||
- Configuration system allows selection of preferred models for different operations
|
||||
- Model selection can be controlled via environment variables and command-line options
|
||||
- Response caching mechanism reduces duplicate API calls
|
||||
- System logs quality metrics for later analysis
|
||||
- Documentation clearly explains model selection options and quality metrics
|
||||
|
||||
These subtasks provide a comprehensive breakdown of the Perplexity API integration task, covering all the required aspects mentioned in the original task description while ensuring each subtask is specific, actionable, and technically relevant.
|
||||
94
tasks/task_010.txt
Normal file
94
tasks/task_010.txt
Normal file
@@ -0,0 +1,94 @@
|
||||
# Task ID: 10
|
||||
# Title: Create Research-Backed Subtask Generation
|
||||
# Status: done
|
||||
# Dependencies: 7 ✅, 9 ✅
|
||||
# Priority: low
|
||||
# Description: Enhance subtask generation with research capabilities from Perplexity API.
|
||||
# Details:
|
||||
Implement research-backed generation including:
|
||||
- Create specialized research prompts for different domains
|
||||
- Implement context enrichment from research results
|
||||
- Add domain-specific knowledge incorporation
|
||||
- Create more detailed subtask generation with best practices
|
||||
- Include references to relevant libraries and tools
|
||||
|
||||
# Test Strategy:
|
||||
Compare subtasks generated with and without research backing. Verify that research-backed subtasks include more specific technical details and best practices.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Design Domain-Specific Research Prompt Templates
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a set of specialized prompt templates for different software development domains (e.g., web development, mobile, data science, DevOps). Each template should be structured to extract relevant best practices, libraries, tools, and implementation patterns from Perplexity API. Implement a prompt template selection mechanism based on the task context and domain.
|
||||
## Acceptance Criteria:
|
||||
- At least 5 domain-specific prompt templates are created and stored in a dedicated templates directory
|
||||
- Templates include specific sections for querying best practices, tools, libraries, and implementation patterns
|
||||
- A prompt selection function is implemented that can determine the appropriate template based on task metadata
|
||||
- Templates are parameterized to allow dynamic insertion of task details and context
|
||||
- Documentation is added explaining each template's purpose and structure
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement Research Query Execution and Response Processing
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Build a module that executes research queries using the Perplexity API integration. This should include sending the domain-specific prompts, handling the API responses, and parsing the results into a structured format that can be used for context enrichment. Implement error handling, rate limiting, and fallback to Claude when Perplexity is unavailable.
|
||||
## Acceptance Criteria:
|
||||
- Function to execute research queries with proper error handling and retries
|
||||
- Response parser that extracts structured data from Perplexity's responses
|
||||
- Fallback mechanism that uses Claude when Perplexity fails or is unavailable
|
||||
- Caching system to avoid redundant API calls for similar research queries
|
||||
- Logging system for tracking API usage and response quality
|
||||
- Unit tests verifying correct handling of successful and failed API calls
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Develop Context Enrichment Pipeline
|
||||
## Status: done
|
||||
## Dependencies: 10.2 ✅
|
||||
## Description: Create a pipeline that processes research results and enriches the task context with relevant information. This should include filtering irrelevant information, organizing research findings by category (tools, libraries, best practices, etc.), and formatting the enriched context for use in subtask generation. Implement a scoring mechanism to prioritize the most relevant research findings.
|
||||
## Acceptance Criteria:
|
||||
- Context enrichment function that takes raw research results and task details as input
|
||||
- Filtering system to remove irrelevant or low-quality information
|
||||
- Categorization of research findings into distinct sections (tools, libraries, patterns, etc.)
|
||||
- Relevance scoring algorithm to prioritize the most important findings
|
||||
- Formatted output that can be directly used in subtask generation prompts
|
||||
- Tests comparing enriched context quality against baseline
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Implement Domain-Specific Knowledge Incorporation
|
||||
## Status: done
|
||||
## Dependencies: 10.3 ✅
|
||||
## Description: Develop a system to incorporate domain-specific knowledge into the subtask generation process. This should include identifying key domain concepts, technical requirements, and industry standards from the research results. Create a knowledge base structure that organizes domain information and can be referenced during subtask generation.
|
||||
## Acceptance Criteria:
|
||||
- Domain knowledge extraction function that identifies key technical concepts
|
||||
- Knowledge base structure for organizing domain-specific information
|
||||
- Integration with the subtask generation prompt to incorporate relevant domain knowledge
|
||||
- Support for technical terminology and concept explanation in generated subtasks
|
||||
- Mechanism to link domain concepts to specific implementation recommendations
|
||||
- Tests verifying improved technical accuracy in generated subtasks
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Enhance Subtask Generation with Technical Details
|
||||
## Status: done
|
||||
## Dependencies: 10.3 ✅, 10.4 ✅
|
||||
## Description: Extend the existing subtask generation functionality to incorporate research findings and produce more technically detailed subtasks. This includes modifying the Claude prompt templates to leverage the enriched context, implementing specific sections for technical approach, implementation notes, and potential challenges. Ensure generated subtasks include concrete technical details rather than generic steps.
|
||||
## Acceptance Criteria:
|
||||
- Enhanced prompt templates for Claude that incorporate research-backed context
|
||||
- Generated subtasks include specific technical approaches and implementation details
|
||||
- Each subtask contains references to relevant tools, libraries, or frameworks
|
||||
- Implementation notes section with code patterns or architectural recommendations
|
||||
- Potential challenges and mitigation strategies are included where appropriate
|
||||
- Comparative tests showing improvement over baseline subtask generation
|
||||
|
||||
## Subtask ID: 6
|
||||
## Title: Implement Reference and Resource Inclusion
|
||||
## Status: done
|
||||
## Dependencies: 10.3 ✅, 10.5 ✅
|
||||
## Description: Create a system to include references to relevant libraries, tools, documentation, and other resources in generated subtasks. This should extract specific references from research results, validate their relevance, and format them as actionable links or citations within subtasks. Implement a verification step to ensure referenced resources are current and applicable.
|
||||
## Acceptance Criteria:
|
||||
- Reference extraction function that identifies tools, libraries, and resources from research
|
||||
- Validation mechanism to verify reference relevance and currency
|
||||
- Formatting system for including references in subtask descriptions
|
||||
- Support for different reference types (GitHub repos, documentation, articles, etc.)
|
||||
- Optional version specification for referenced libraries and tools
|
||||
- Tests verifying that included references are relevant and accessible
|
||||
91
tasks/task_011.txt
Normal file
91
tasks/task_011.txt
Normal file
@@ -0,0 +1,91 @@
|
||||
# Task ID: 11
|
||||
# Title: Implement Batch Operations
|
||||
# Status: done
|
||||
# Dependencies: 3 ✅
|
||||
# Priority: medium
|
||||
# Description: Add functionality for performing operations on multiple tasks simultaneously.
|
||||
# Details:
|
||||
Create batch operations including:
|
||||
- Implement multi-task status updates
|
||||
- Add bulk subtask generation
|
||||
- Create task filtering and querying capabilities
|
||||
- Implement advanced dependency management
|
||||
- Add batch prioritization
|
||||
- Create commands for operating on filtered task sets
|
||||
|
||||
# Test Strategy:
|
||||
Test batch operations with various filters and operations. Verify that operations are applied correctly to all matching tasks. Test with large task sets to ensure performance.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Implement Multi-Task Status Update Functionality
|
||||
## Status: done
|
||||
## Dependencies: 11.3 ✅
|
||||
## Description: Create a command-line interface command that allows users to update the status of multiple tasks simultaneously. Implement the backend logic to process batch status changes, validate the requested changes, and update the tasks.json file accordingly. The implementation should include options for filtering tasks by various criteria (ID ranges, status, priority, etc.) and applying status changes to the filtered set.
|
||||
## Acceptance Criteria:
|
||||
- Command accepts parameters for filtering tasks (e.g., `--status=pending`, `--priority=high`, `--id=1,2,3-5`)
|
||||
- Command accepts a parameter for the new status value (e.g., `--new-status=done`)
|
||||
- All matching tasks are updated in the tasks.json file
|
||||
- Command provides a summary of changes made (e.g., "Updated 5 tasks from 'pending' to 'done'")
|
||||
- Command handles errors gracefully (e.g., invalid status values, no matching tasks)
|
||||
- Changes are persisted correctly to tasks.json
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Develop Bulk Subtask Generation System
|
||||
## Status: done
|
||||
## Dependencies: 11.3 ✅, 11.4 ✅
|
||||
## Description: Create functionality to generate multiple subtasks across several parent tasks at once. This should include a command-line interface that accepts filtering parameters to select parent tasks and either a template for subtasks or an AI-assisted generation option. The system should validate parent tasks, generate appropriate subtasks with proper ID assignments, and update the tasks.json file.
|
||||
## Acceptance Criteria:
|
||||
- Command accepts parameters for filtering parent tasks
|
||||
- Command supports template-based subtask generation with variable substitution
|
||||
- Command supports AI-assisted subtask generation using Claude API
|
||||
- Generated subtasks have proper IDs following the parent.sequence format (e.g., 1.1, 1.2)
|
||||
- Subtasks inherit appropriate properties from parent tasks (e.g., dependencies)
|
||||
- Generated subtasks are added to the tasks.json file
|
||||
- Task files are regenerated to include the new subtasks
|
||||
- Command provides a summary of subtasks created
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement Advanced Task Filtering and Querying
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a robust filtering and querying system that can be used across all batch operations. Implement a query syntax that allows for complex filtering based on task properties, including status, priority, dependencies, ID ranges, and text search within titles and descriptions. Design the system to be reusable across different batch operation commands.
|
||||
## Acceptance Criteria:
|
||||
- Support for filtering by task properties (status, priority, dependencies)
|
||||
- Support for ID-based filtering (individual IDs, ranges, exclusions)
|
||||
- Support for text search within titles and descriptions
|
||||
- Support for logical operators (AND, OR, NOT) in filters
|
||||
- Query parser that converts command-line arguments to filter criteria
|
||||
- Reusable filtering module that can be imported by other commands
|
||||
- Comprehensive test cases covering various filtering scenarios
|
||||
- Documentation of the query syntax for users
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Create Advanced Dependency Management System
|
||||
## Status: done
|
||||
## Dependencies: 11.3 ✅
|
||||
## Description: Implement batch operations for managing dependencies between tasks. This includes commands for adding, removing, and updating dependencies across multiple tasks simultaneously. The system should validate dependency changes to prevent circular dependencies, update the tasks.json file, and regenerate task files to reflect the changes.
|
||||
## Acceptance Criteria:
|
||||
- Command for adding dependencies to multiple tasks at once
|
||||
- Command for removing dependencies from multiple tasks
|
||||
- Command for replacing dependencies across multiple tasks
|
||||
- Validation to prevent circular dependencies
|
||||
- Validation to ensure referenced tasks exist
|
||||
- Automatic update of affected task files
|
||||
- Summary report of dependency changes made
|
||||
- Error handling for invalid dependency operations
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Batch Task Prioritization and Command System
|
||||
## Status: done
|
||||
## Dependencies: 11.3 ✅
|
||||
## Description: Create a system for batch prioritization of tasks and a command framework for operating on filtered task sets. This includes commands for changing priorities of multiple tasks at once and a generic command execution system that can apply custom operations to filtered task sets. The implementation should include a plugin architecture that allows for extending the system with new batch operations.
|
||||
## Acceptance Criteria:
|
||||
- Command for changing priorities of multiple tasks at once
|
||||
- Support for relative priority changes (e.g., increase/decrease priority)
|
||||
- Generic command execution framework that works with the filtering system
|
||||
- Plugin architecture for registering new batch operations
|
||||
- At least three example plugins (e.g., batch tagging, batch assignment, batch export)
|
||||
- Command for executing arbitrary operations on filtered task sets
|
||||
- Documentation for creating new batch operation plugins
|
||||
- Performance testing with large task sets (100+ tasks)
|
||||
66
tasks/task_012.txt
Normal file
66
tasks/task_012.txt
Normal file
@@ -0,0 +1,66 @@
|
||||
# Task ID: 12
|
||||
# Title: Develop Project Initialization System
|
||||
# Status: done
|
||||
# Dependencies: 1 ✅, 2 ✅, 3 ✅, 4 ✅, 6 ✅
|
||||
# Priority: medium
|
||||
# Description: Create functionality for initializing new projects with task structure and configuration.
|
||||
# Details:
|
||||
Implement project initialization including:
|
||||
- Create project templating system
|
||||
- Implement interactive setup wizard
|
||||
- Add environment configuration generation
|
||||
- Create initial directory structure
|
||||
- Generate example tasks.json
|
||||
- Set up default configuration
|
||||
|
||||
# Test Strategy:
|
||||
Test project initialization in empty directories. Verify that all required files and directories are created correctly. Test the interactive setup with various inputs.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Create Project Template Structure
|
||||
## Status: done
|
||||
## Dependencies: 12.4 ✅
|
||||
## Description: Design and implement a flexible project template system that will serve as the foundation for new project initialization. This should include creating a base directory structure, template files (e.g., default tasks.json, .env.example), and a configuration file to define customizable aspects of the template.
|
||||
## Acceptance Criteria:
|
||||
- A `templates` directory is created with at least one default project template
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement Interactive Setup Wizard
|
||||
## Status: done
|
||||
## Dependencies: 12.3 ✅
|
||||
## Description: Develop an interactive command-line wizard using a library like Inquirer.js to guide users through the project initialization process. The wizard should prompt for project name, description, initial task structure, and other configurable options defined in the template configuration.
|
||||
## Acceptance Criteria:
|
||||
- Interactive wizard prompts for essential project information
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Generate Environment Configuration
|
||||
## Status: done
|
||||
## Dependencies: 12.2 ✅
|
||||
## Description: Create functionality to generate environment-specific configuration files based on user input and template defaults. This includes creating a .env file with necessary API keys and configuration values, and updating the tasks.json file with project-specific metadata.
|
||||
## Acceptance Criteria:
|
||||
- .env file is generated with placeholders for required API keys
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Implement Directory Structure Creation
|
||||
## Status: done
|
||||
## Dependencies: 12.1 ✅
|
||||
## Description: Develop the logic to create the initial directory structure for new projects based on the selected template and user inputs. This should include creating necessary subdirectories (e.g., tasks/, scripts/, .cursor/rules/) and copying template files to appropriate locations.
|
||||
## Acceptance Criteria:
|
||||
- Directory structure is created according to the template specification
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Generate Example Tasks.json
|
||||
## Status: done
|
||||
## Dependencies: 12.6 ✅
|
||||
## Description: Create functionality to generate an initial tasks.json file with example tasks based on the project template and user inputs from the setup wizard. This should include creating a set of starter tasks that demonstrate the task structure and provide a starting point for the project.
|
||||
## Acceptance Criteria:
|
||||
- An initial tasks.json file is generated with at least 3 example tasks
|
||||
|
||||
## Subtask ID: 6
|
||||
## Title: Implement Default Configuration Setup
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Develop the system for setting up default configurations for the project, including initializing the .cursor/rules/ directory with dev_workflow.mdc, cursor_rules.mdc, and self_improve.mdc files. Also, create a default package.json with necessary dependencies and scripts for the project.
|
||||
## Acceptance Criteria:
|
||||
- .cursor/rules/ directory is created with required .mdc files
|
||||
86
tasks/task_013.txt
Normal file
86
tasks/task_013.txt
Normal file
@@ -0,0 +1,86 @@
|
||||
# Task ID: 13
|
||||
# Title: Create Cursor Rules Implementation
|
||||
# Status: done
|
||||
# Dependencies: 1 ✅, 2 ✅, 3 ✅
|
||||
# Priority: medium
|
||||
# Description: Develop the Cursor AI integration rules and documentation.
|
||||
# Details:
|
||||
Implement Cursor rules including:
|
||||
- Create dev_workflow.mdc documentation
|
||||
- Implement cursor_rules.mdc
|
||||
- Add self_improve.mdc
|
||||
- Design rule integration documentation
|
||||
- Set up .cursor directory structure
|
||||
- Document how Cursor AI should interact with the system
|
||||
|
||||
# Test Strategy:
|
||||
Review rules documentation for clarity and completeness. Test with Cursor AI to verify the rules are properly interpreted and followed.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Set up .cursor Directory Structure
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create the required directory structure for Cursor AI integration, including the .cursor folder and rules subfolder. This provides the foundation for storing all Cursor-related configuration files and rule documentation. Ensure proper permissions and gitignore settings are configured to maintain these files correctly.
|
||||
## Acceptance Criteria:
|
||||
- .cursor directory created at the project root
|
||||
- .cursor/rules subdirectory created
|
||||
- Directory structure matches the specification in the PRD
|
||||
- Appropriate entries added to .gitignore to handle .cursor directory correctly
|
||||
- README documentation updated to mention the .cursor directory purpose
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Create dev_workflow.mdc Documentation
|
||||
## Status: done
|
||||
## Dependencies: 13.1 ✅
|
||||
## Description: Develop the dev_workflow.mdc file that documents the development workflow for Cursor AI. This file should outline how Cursor AI should assist with task discovery, implementation, and verification within the project. Include specific examples of commands and interactions that demonstrate the optimal workflow.
|
||||
## Acceptance Criteria:
|
||||
- dev_workflow.mdc file created in .cursor/rules directory
|
||||
- Document clearly explains the development workflow with Cursor AI
|
||||
- Workflow documentation includes task discovery process
|
||||
- Implementation guidance for Cursor AI is detailed
|
||||
- Verification procedures are documented
|
||||
- Examples of typical interactions are provided
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement cursor_rules.mdc
|
||||
## Status: done
|
||||
## Dependencies: 13.1 ✅
|
||||
## Description: Create the cursor_rules.mdc file that defines specific rules and guidelines for how Cursor AI should interact with the codebase. This should include code style preferences, architectural patterns to follow, documentation requirements, and any project-specific conventions that Cursor AI should adhere to when generating or modifying code.
|
||||
## Acceptance Criteria:
|
||||
- cursor_rules.mdc file created in .cursor/rules directory
|
||||
- Rules document clearly defines code style guidelines
|
||||
- Architectural patterns and principles are specified
|
||||
- Documentation requirements for generated code are outlined
|
||||
- Project-specific naming conventions are documented
|
||||
- Rules for handling dependencies and imports are defined
|
||||
- Guidelines for test implementation are included
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Add self_improve.mdc Documentation
|
||||
## Status: done
|
||||
## Dependencies: 13.1 ✅, 13.2 ✅, 13.3 ✅
|
||||
## Description: Develop the self_improve.mdc file that instructs Cursor AI on how to continuously improve its assistance capabilities within the project context. This document should outline how Cursor AI should learn from feedback, adapt to project evolution, and enhance its understanding of the codebase over time.
|
||||
## Acceptance Criteria:
|
||||
- self_improve.mdc file created in .cursor/rules directory
|
||||
- Document outlines feedback incorporation mechanisms
|
||||
- Guidelines for adapting to project evolution are included
|
||||
- Instructions for enhancing codebase understanding over time
|
||||
- Strategies for improving code suggestions based on past interactions
|
||||
- Methods for refining prompt responses based on user feedback
|
||||
- Approach for maintaining consistency with evolving project patterns
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Create Cursor AI Integration Documentation
|
||||
## Status: done
|
||||
## Dependencies: 13.1 ✅, 13.2 ✅, 13.3 ✅, 13.4 ✅
|
||||
## Description: Develop comprehensive documentation on how Cursor AI integrates with the task management system. This should include detailed instructions on how Cursor AI should interpret tasks.json, individual task files, and how it should assist with implementation. Document the specific commands and workflows that Cursor AI should understand and support.
|
||||
## Acceptance Criteria:
|
||||
- Integration documentation created and stored in an appropriate location
|
||||
- Documentation explains how Cursor AI should interpret tasks.json structure
|
||||
- Guidelines for Cursor AI to understand task dependencies and priorities
|
||||
- Instructions for Cursor AI to assist with task implementation
|
||||
- Documentation of specific commands Cursor AI should recognize
|
||||
- Examples of effective prompts for working with the task system
|
||||
- Troubleshooting section for common Cursor AI integration issues
|
||||
- Documentation references all created rule files and explains their purpose
|
||||
58
tasks/task_014.txt
Normal file
58
tasks/task_014.txt
Normal file
@@ -0,0 +1,58 @@
|
||||
# Task ID: 14
|
||||
# Title: Develop Agent Workflow Guidelines
|
||||
# Status: pending
|
||||
# Dependencies: 13 ✅
|
||||
# Priority: medium
|
||||
# Description: Create comprehensive guidelines for how AI agents should interact with the task system.
|
||||
# Details:
|
||||
Create agent workflow guidelines including:
|
||||
- Document task discovery workflow
|
||||
- Create task selection guidelines
|
||||
- Implement implementation guidance
|
||||
- Add verification procedures
|
||||
- Define how agents should prioritize work
|
||||
- Create guidelines for handling dependencies
|
||||
|
||||
# Test Strategy:
|
||||
Review guidelines with actual AI agents to verify they can follow the procedures. Test various scenarios to ensure the guidelines cover all common workflows.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Document Task Discovery Workflow
|
||||
## Status: pending
|
||||
## Dependencies: None
|
||||
## Description: Create a comprehensive document outlining how AI agents should discover and interpret new tasks within the system. This should include steps for parsing the tasks.json file, interpreting task metadata, and understanding the relationships between tasks and subtasks. Implement example code snippets in Node.js demonstrating how to traverse the task structure and extract relevant information.
|
||||
## Acceptance Criteria:
|
||||
- Detailed markdown document explaining the task discovery process
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement Task Selection Algorithm
|
||||
## Status: pending
|
||||
## Dependencies: 14.1 ⏱️
|
||||
## Description: Develop an algorithm for AI agents to select the most appropriate task to work on based on priority, dependencies, and current project status. This should include logic for evaluating task urgency, managing blocked tasks, and optimizing workflow efficiency. Implement the algorithm in JavaScript and integrate it with the existing task management system.
|
||||
## Acceptance Criteria:
|
||||
- JavaScript module implementing the task selection algorithm
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Create Implementation Guidance Generator
|
||||
## Status: pending
|
||||
## Dependencies: 14.5 ⏱️
|
||||
## Description: Develop a system that generates detailed implementation guidance for AI agents based on task descriptions and project context. This should leverage the Anthropic Claude API to create step-by-step instructions, suggest relevant libraries or tools, and provide code snippets or pseudocode where appropriate. Implement caching to reduce API calls and improve performance.
|
||||
## Acceptance Criteria:
|
||||
- Node.js module for generating implementation guidance using Claude API
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Develop Verification Procedure Framework
|
||||
## Status: pending
|
||||
## Dependencies: 14.1 ⏱️, 14.2 ⏱️
|
||||
## Description: Create a flexible framework for defining and executing verification procedures for completed tasks. This should include a DSL (Domain Specific Language) for specifying acceptance criteria, automated test generation where possible, and integration with popular testing frameworks. Implement hooks for both automated and manual verification steps.
|
||||
## Acceptance Criteria:
|
||||
- JavaScript module implementing the verification procedure framework
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Dynamic Task Prioritization System
|
||||
## Status: pending
|
||||
## Dependencies: 14.1 ⏱️, 14.2 ⏱️, 14.3 ⏱️
|
||||
## Description: Develop a system that dynamically adjusts task priorities based on project progress, dependencies, and external factors. This should include an algorithm for recalculating priorities, a mechanism for propagating priority changes through dependency chains, and an API for external systems to influence priorities. Implement this as a background process that periodically updates the tasks.json file.
|
||||
## Acceptance Criteria:
|
||||
- Node.js module implementing the dynamic prioritization system
|
||||
65
tasks/task_015.txt
Normal file
65
tasks/task_015.txt
Normal file
@@ -0,0 +1,65 @@
|
||||
# Task ID: 15
|
||||
# Title: Optimize Agent Integration with Cursor and dev.js Commands
|
||||
# Status: pending
|
||||
# Dependencies: 2 ✅, 14 ⏱️
|
||||
# Priority: medium
|
||||
# Description: Document and enhance existing agent interaction patterns through Cursor rules and dev.js commands.
|
||||
# Details:
|
||||
Optimize agent integration including:
|
||||
- Document and improve existing agent interaction patterns in Cursor rules
|
||||
- Enhance integration between Cursor agent capabilities and dev.js commands
|
||||
- Improve agent workflow documentation in cursor rules (dev_workflow.mdc, cursor_rules.mdc)
|
||||
- Add missing agent-specific features to existing commands
|
||||
- Leverage existing infrastructure rather than building a separate system
|
||||
|
||||
# Test Strategy:
|
||||
Test the enhanced commands with AI agents to verify they can correctly interpret and use them. Verify that agents can effectively interact with the task system using the documented patterns in Cursor rules.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Document Existing Agent Interaction Patterns
|
||||
## Status: pending
|
||||
## Dependencies: None
|
||||
## Description: Review and document the current agent interaction patterns in Cursor rules (dev_workflow.mdc, cursor_rules.mdc). Create comprehensive documentation that explains how agents should interact with the task system using existing commands and patterns.
|
||||
## Acceptance Criteria:
|
||||
- Comprehensive documentation of existing agent interaction patterns in Cursor rules
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Enhance Integration Between Cursor Agents and dev.js Commands
|
||||
## Status: pending
|
||||
## Dependencies: None
|
||||
## Description: Improve the integration between Cursor's built-in agent capabilities and the dev.js command system. Ensure that agents can effectively use all task management commands and that the command outputs are optimized for agent consumption.
|
||||
## Acceptance Criteria:
|
||||
- Enhanced integration between Cursor agents and dev.js commands
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Optimize Command Responses for Agent Consumption
|
||||
## Status: pending
|
||||
## Dependencies: 15.2 ⏱️
|
||||
## Description: Refine the output format of existing commands to ensure they are easily parseable by AI agents. Focus on consistent, structured outputs that agents can reliably interpret without requiring a separate parsing system.
|
||||
## Acceptance Criteria:
|
||||
- Command outputs optimized for agent consumption
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Improve Agent Workflow Documentation in Cursor Rules
|
||||
## Status: pending
|
||||
## Dependencies: 15.1 ⏱️, 15.3 ⏱️
|
||||
## Description: Enhance the agent workflow documentation in dev_workflow.mdc and cursor_rules.mdc to provide clear guidance on how agents should interact with the task system. Include example interactions and best practices for agents.
|
||||
## Acceptance Criteria:
|
||||
- Enhanced agent workflow documentation in Cursor rules
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Add Agent-Specific Features to Existing Commands
|
||||
## Status: pending
|
||||
## Dependencies: 15.2 ⏱️
|
||||
## Description: Identify and implement any missing agent-specific features in the existing command system. This may include additional flags, parameters, or output formats that are particularly useful for agent interactions.
|
||||
## Acceptance Criteria:
|
||||
- Agent-specific features added to existing commands
|
||||
|
||||
## Subtask ID: 6
|
||||
## Title: Create Agent Usage Examples and Patterns
|
||||
## Status: pending
|
||||
## Dependencies: 15.3 ⏱️, 15.4 ⏱️
|
||||
## Description: Develop a set of example interactions and usage patterns that demonstrate how agents should effectively use the task system. Include these examples in the documentation to guide future agent implementations.
|
||||
## Acceptance Criteria:
|
||||
- Comprehensive set of agent usage examples and patterns
|
||||
94
tasks/task_016.txt
Normal file
94
tasks/task_016.txt
Normal file
@@ -0,0 +1,94 @@
|
||||
# Task ID: 16
|
||||
# Title: Create Configuration Management System
|
||||
# Status: done
|
||||
# Dependencies: 1 ✅, 2 ✅
|
||||
# Priority: high
|
||||
# Description: Implement robust configuration handling with environment variables and .env files.
|
||||
# Details:
|
||||
Build configuration management including:
|
||||
- Environment variable handling
|
||||
- .env file support
|
||||
- Configuration validation
|
||||
- Sensible defaults with overrides
|
||||
- Create .env.example template
|
||||
- Add configuration documentation
|
||||
- Implement secure handling of API keys
|
||||
|
||||
# Test Strategy:
|
||||
Test configuration loading from various sources (environment variables, .env files). Verify that validation correctly identifies invalid configurations. Test that defaults are applied when values are missing.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Implement Environment Variable Loading
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a module that loads environment variables from process.env and makes them accessible throughout the application. Implement a hierarchical structure for configuration values with proper typing. Include support for required vs. optional variables and implement a validation mechanism to ensure critical environment variables are present.
|
||||
## Acceptance Criteria:
|
||||
- Function created to access environment variables with proper TypeScript typing
|
||||
- Support for required variables with validation
|
||||
- Default values provided for optional variables
|
||||
- Error handling for missing required variables
|
||||
- Unit tests verifying environment variable loading works correctly
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement .env File Support
|
||||
## Status: done
|
||||
## Dependencies: 16.1 ✅
|
||||
## Description: Add support for loading configuration from .env files using dotenv or a similar library. Implement file detection, parsing, and merging with existing environment variables. Handle multiple environments (.env.development, .env.production, etc.) and implement proper error handling for file reading issues.
|
||||
## Acceptance Criteria:
|
||||
- Integration with dotenv or equivalent library
|
||||
- Support for multiple environment-specific .env files (.env.development, .env.production)
|
||||
- Proper error handling for missing or malformed .env files
|
||||
- Priority order established (process.env overrides .env values)
|
||||
- Unit tests verifying .env file loading and overriding behavior
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement Configuration Validation
|
||||
## Status: done
|
||||
## Dependencies: 16.1 ✅, 16.2 ✅
|
||||
## Description: Create a validation system for configuration values using a schema validation library like Joi, Zod, or Ajv. Define schemas for all configuration categories (API keys, file paths, feature flags, etc.). Implement validation that runs at startup and provides clear error messages for invalid configurations.
|
||||
## Acceptance Criteria:
|
||||
- Schema validation implemented for all configuration values
|
||||
- Type checking and format validation for different value types
|
||||
- Comprehensive error messages that clearly identify validation failures
|
||||
- Support for custom validation rules for complex configuration requirements
|
||||
- Unit tests covering validation of valid and invalid configurations
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Create Configuration Defaults and Override System
|
||||
## Status: done
|
||||
## Dependencies: 16.1 ✅, 16.2 ✅, 16.3 ✅
|
||||
## Description: Implement a system of sensible defaults for all configuration values with the ability to override them via environment variables or .env files. Create a unified configuration object that combines defaults, .env values, and environment variables with proper precedence. Implement a caching mechanism to avoid repeated environment lookups.
|
||||
## Acceptance Criteria:
|
||||
- Default configuration values defined for all settings
|
||||
- Clear override precedence (env vars > .env files > defaults)
|
||||
- Configuration object accessible throughout the application
|
||||
- Caching mechanism to improve performance
|
||||
- Unit tests verifying override behavior works correctly
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Create .env.example Template
|
||||
## Status: done
|
||||
## Dependencies: 16.1 ✅, 16.2 ✅, 16.3 ✅, 16.4 ✅
|
||||
## Description: Generate a comprehensive .env.example file that documents all supported environment variables, their purpose, format, and default values. Include comments explaining the purpose of each variable and provide examples. Ensure sensitive values are not included but have clear placeholders.
|
||||
## Acceptance Criteria:
|
||||
- Complete .env.example file with all supported variables
|
||||
- Detailed comments explaining each variable's purpose and format
|
||||
- Clear placeholders for sensitive values (API_KEY=your-api-key-here)
|
||||
- Categorization of variables by function (API, logging, features, etc.)
|
||||
- Documentation on how to use the .env.example file
|
||||
|
||||
## Subtask ID: 6
|
||||
## Title: Implement Secure API Key Handling
|
||||
## Status: done
|
||||
## Dependencies: 16.1 ✅, 16.2 ✅, 16.3 ✅, 16.4 ✅
|
||||
## Description: Create a secure mechanism for handling sensitive configuration values like API keys. Implement masking of sensitive values in logs and error messages. Add validation for API key formats and implement a mechanism to detect and warn about insecure storage of API keys (e.g., committed to git). Add support for key rotation and refresh.
|
||||
## Acceptance Criteria:
|
||||
- Secure storage of API keys and sensitive configuration
|
||||
- Masking of sensitive values in logs and error messages
|
||||
- Validation of API key formats (length, character set, etc.)
|
||||
- Warning system for potentially insecure configuration practices
|
||||
- Support for key rotation without application restart
|
||||
- Unit tests verifying secure handling of sensitive configuration
|
||||
|
||||
These subtasks provide a comprehensive approach to implementing the configuration management system with a focus on security, validation, and developer experience. The tasks are sequenced to build upon each other logically, starting with basic environment variable support and progressing to more advanced features like secure API key handling.
|
||||
85
tasks/task_017.txt
Normal file
85
tasks/task_017.txt
Normal file
@@ -0,0 +1,85 @@
|
||||
# Task ID: 17
|
||||
# Title: Implement Comprehensive Logging System
|
||||
# Status: done
|
||||
# Dependencies: 2 ✅, 16 ✅
|
||||
# Priority: medium
|
||||
# Description: Create a flexible logging system with configurable levels and output formats.
|
||||
# Details:
|
||||
Implement logging system including:
|
||||
- Multiple log levels (debug, info, warn, error)
|
||||
- Configurable output destinations
|
||||
- Command execution logging
|
||||
- API interaction logging
|
||||
- Error tracking
|
||||
- Performance metrics
|
||||
- Log file rotation
|
||||
|
||||
# Test Strategy:
|
||||
Test logging at different verbosity levels. Verify that logs contain appropriate information for debugging. Test log file rotation with large volumes of logs.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Implement Core Logging Framework with Log Levels
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Create a modular logging framework that supports multiple log levels (debug, info, warn, error). Implement a Logger class that handles message formatting, timestamp addition, and log level filtering. The framework should allow for global log level configuration through the configuration system and provide a clean API for logging messages at different levels.
|
||||
## Acceptance Criteria:
|
||||
- Logger class with methods for each log level (debug, info, warn, error)
|
||||
- Log level filtering based on configuration settings
|
||||
- Consistent log message format including timestamp, level, and context
|
||||
- Unit tests for each log level and filtering functionality
|
||||
- Documentation for logger usage in different parts of the application
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement Configurable Output Destinations
|
||||
## Status: done
|
||||
## Dependencies: 17.1 ✅
|
||||
## Description: Extend the logging framework to support multiple output destinations simultaneously. Implement adapters for console output, file output, and potentially other destinations (like remote logging services). Create a configuration system that allows specifying which log levels go to which destinations. Ensure thread-safe writing to prevent log corruption.
|
||||
## Acceptance Criteria:
|
||||
- Abstract destination interface that can be implemented by different output types
|
||||
- Console output adapter with color-coding based on log level
|
||||
- File output adapter with proper file handling and path configuration
|
||||
- Configuration options to route specific log levels to specific destinations
|
||||
- Ability to add custom output destinations through the adapter pattern
|
||||
- Tests verifying logs are correctly routed to configured destinations
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement Command and API Interaction Logging
|
||||
## Status: done
|
||||
## Dependencies: 17.1 ✅, 17.2 ✅
|
||||
## Description: Create specialized logging functionality for command execution and API interactions. For commands, log the command name, arguments, options, and execution status. For API interactions, log request details (URL, method, headers), response status, and timing information. Implement sanitization to prevent logging sensitive data like API keys or passwords.
|
||||
## Acceptance Criteria:
|
||||
- Command logger that captures command execution details
|
||||
- API logger that records request/response details with timing information
|
||||
- Data sanitization to mask sensitive information in logs
|
||||
- Configuration options to control verbosity of command and API logs
|
||||
- Integration with existing command execution flow
|
||||
- Tests verifying proper logging of commands and API calls
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Implement Error Tracking and Performance Metrics
|
||||
## Status: done
|
||||
## Dependencies: 17.1 ✅
|
||||
## Description: Enhance the logging system to provide detailed error tracking and performance metrics. For errors, capture stack traces, error codes, and contextual information. For performance metrics, implement timing utilities to measure execution duration of key operations. Create a consistent format for these specialized log types to enable easier analysis.
|
||||
## Acceptance Criteria:
|
||||
- Error logging with full stack trace capture and error context
|
||||
- Performance timer utility for measuring operation duration
|
||||
- Standard format for error and performance log entries
|
||||
- Ability to track related errors through correlation IDs
|
||||
- Configuration options for performance logging thresholds
|
||||
- Unit tests for error tracking and performance measurement
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Log File Rotation and Management
|
||||
## Status: done
|
||||
## Dependencies: 17.2 ✅
|
||||
## Description: Create a log file management system that handles rotation based on file size or time intervals. Implement compression of rotated logs, automatic cleanup of old logs, and configurable retention policies. Ensure that log rotation happens without disrupting the application and that no log messages are lost during rotation.
|
||||
## Acceptance Criteria:
|
||||
- Log rotation based on configurable file size or time interval
|
||||
- Compressed archive creation for rotated logs
|
||||
- Configurable retention policy for log archives
|
||||
- Zero message loss during rotation operations
|
||||
- Proper file locking to prevent corruption during rotation
|
||||
- Configuration options for rotation settings
|
||||
- Tests verifying rotation functionality with large log volumes
|
||||
- Documentation for log file location and naming conventions
|
||||
98
tasks/task_018.txt
Normal file
98
tasks/task_018.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
# Task ID: 18
|
||||
# Title: Create Comprehensive User Documentation
|
||||
# Status: done
|
||||
# Dependencies: 1 ✅, 2 ✅, 3 ✅, 4 ✅, 5 ✅, 6 ✅, 7 ✅, 11 ✅, 12 ✅, 16 ✅
|
||||
# Priority: medium
|
||||
# Description: Develop complete user documentation including README, examples, and troubleshooting guides.
|
||||
# Details:
|
||||
Create user documentation including:
|
||||
- Detailed README with installation and usage instructions
|
||||
- Command reference documentation
|
||||
- Configuration guide
|
||||
- Example workflows
|
||||
- Troubleshooting guides
|
||||
- API integration documentation
|
||||
- Best practices
|
||||
- Advanced usage scenarios
|
||||
|
||||
# Test Strategy:
|
||||
Review documentation for clarity and completeness. Have users unfamiliar with the system attempt to follow the documentation and note any confusion or issues.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Create Detailed README with Installation and Usage Instructions
|
||||
## Status: done
|
||||
## Dependencies: 18.3 ✅
|
||||
## Description: Develop a comprehensive README.md file that serves as the primary documentation entry point. Include project overview, installation steps for different environments, basic usage examples, and links to other documentation sections. Structure the README with clear headings, code blocks for commands, and screenshots where helpful.
|
||||
## Acceptance Criteria:
|
||||
- README includes project overview, features list, and system requirements
|
||||
- Installation instructions cover all supported platforms with step-by-step commands
|
||||
- Basic usage examples demonstrate core functionality with command syntax
|
||||
- Configuration section explains environment variables and .env file usage
|
||||
- Documentation includes badges for version, license, and build status
|
||||
- All sections are properly formatted with Markdown for readability
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Develop Command Reference Documentation
|
||||
## Status: done
|
||||
## Dependencies: 18.3 ✅
|
||||
## Description: Create detailed documentation for all CLI commands, their options, arguments, and examples. Organize commands by functionality category, include syntax diagrams, and provide real-world examples for each command. Document all global options and environment variables that affect command behavior.
|
||||
## Acceptance Criteria:
|
||||
- All commands are documented with syntax, options, and arguments
|
||||
- Each command includes at least 2 practical usage examples
|
||||
- Commands are organized into logical categories (task management, AI integration, etc.)
|
||||
- Global options are documented with their effects on command execution
|
||||
- Exit codes and error messages are documented for troubleshooting
|
||||
- Documentation includes command output examples
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Create Configuration and Environment Setup Guide
|
||||
## Status: done
|
||||
## Dependencies: None
|
||||
## Description: Develop a comprehensive guide for configuring the application, including environment variables, .env file setup, API keys management, and configuration best practices. Include security considerations for API keys and sensitive information. Document all configuration options with their default values and effects.
|
||||
## Acceptance Criteria:
|
||||
- All environment variables are documented with purpose, format, and default values
|
||||
- Step-by-step guide for setting up .env file with examples
|
||||
- Security best practices for managing API keys
|
||||
- Configuration troubleshooting section with common issues and solutions
|
||||
- Documentation includes example configurations for different use cases
|
||||
- Validation rules for configuration values are clearly explained
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Develop Example Workflows and Use Cases
|
||||
## Status: done
|
||||
## Dependencies: 18.3 ✅, 18.6 ✅
|
||||
## Description: Create detailed documentation of common workflows and use cases, showing how to use the tool effectively for different scenarios. Include step-by-step guides with command sequences, expected outputs, and explanations. Cover basic to advanced workflows, including PRD parsing, task expansion, and implementation drift handling.
|
||||
## Acceptance Criteria:
|
||||
- At least 5 complete workflow examples from initialization to completion
|
||||
- Each workflow includes all commands in sequence with expected outputs
|
||||
- Screenshots or terminal recordings illustrate the workflows
|
||||
- Explanation of decision points and alternatives within workflows
|
||||
- Advanced use cases demonstrate integration with development processes
|
||||
- Examples show how to handle common edge cases and errors
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Create Troubleshooting Guide and FAQ
|
||||
## Status: done
|
||||
## Dependencies: 18.1 ✅, 18.2 ✅, 18.3 ✅
|
||||
## Description: Develop a comprehensive troubleshooting guide that addresses common issues, error messages, and their solutions. Include a FAQ section covering common questions about usage, configuration, and best practices. Document known limitations and workarounds for edge cases.
|
||||
## Acceptance Criteria:
|
||||
- All error messages are documented with causes and solutions
|
||||
- Common issues are organized by category (installation, configuration, execution)
|
||||
- FAQ covers at least 15 common questions with detailed answers
|
||||
- Troubleshooting decision trees help users diagnose complex issues
|
||||
- Known limitations and edge cases are clearly documented
|
||||
- Recovery procedures for data corruption or API failures are included
|
||||
|
||||
## Subtask ID: 6
|
||||
## Title: Develop API Integration and Extension Documentation
|
||||
## Status: done
|
||||
## Dependencies: 18.5 ✅
|
||||
## Description: Create technical documentation for API integrations (Claude, Perplexity) and extension points. Include details on prompt templates, response handling, token optimization, and custom integrations. Document the internal architecture to help developers extend the tool with new features or integrations.
|
||||
## Acceptance Criteria:
|
||||
- Detailed documentation of all API integrations with authentication requirements
|
||||
- Prompt templates are documented with variables and expected responses
|
||||
- Token usage optimization strategies are explained
|
||||
- Extension points are documented with examples
|
||||
- Internal architecture diagrams show component relationships
|
||||
- Custom integration guide includes step-by-step instructions and code examples
|
||||
67
tasks/task_019.txt
Normal file
67
tasks/task_019.txt
Normal file
@@ -0,0 +1,67 @@
|
||||
# Task ID: 19
|
||||
# Title: Implement Error Handling and Recovery
|
||||
# Status: pending
|
||||
# Dependencies: 1 ✅, 2 ✅, 3 ✅, 5 ✅, 9 ✅, 16 ✅, 17 ✅
|
||||
# Priority: high
|
||||
# Description: Create robust error handling throughout the system with helpful error messages and recovery options.
|
||||
# Details:
|
||||
Implement error handling including:
|
||||
- Consistent error message format
|
||||
- Helpful error messages with recovery suggestions
|
||||
- API error handling with retries
|
||||
- File system error recovery
|
||||
- Data validation errors with specific feedback
|
||||
- Command syntax error guidance
|
||||
- System state recovery after failures
|
||||
|
||||
# Test Strategy:
|
||||
Deliberately trigger various error conditions and verify that the system handles them gracefully. Check that error messages are helpful and provide clear guidance on how to resolve issues.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Define Error Message Format and Structure
|
||||
## Status: pending
|
||||
## Dependencies: None
|
||||
## Description: Create a standardized error message format that includes error codes, descriptive messages, and recovery suggestions. Implement a centralized ErrorMessage class or module that enforces this structure across the application. This should include methods for generating consistent error messages and translating error codes to user-friendly descriptions.
|
||||
## Acceptance Criteria:
|
||||
- ErrorMessage class/module is implemented with methods for creating structured error messages
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement API Error Handling with Retry Logic
|
||||
## Status: pending
|
||||
## Dependencies: None
|
||||
## Description: Develop a robust error handling system for API calls, including automatic retries with exponential backoff. Create a wrapper for API requests that catches common errors (e.g., network timeouts, rate limiting) and implements appropriate retry logic. This should be integrated with both the Claude and Perplexity API calls.
|
||||
## Acceptance Criteria:
|
||||
- API request wrapper is implemented with configurable retry logic
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Develop File System Error Recovery Mechanisms
|
||||
## Status: pending
|
||||
## Dependencies: 19.1 ⏱️
|
||||
## Description: Implement error handling and recovery mechanisms for file system operations, focusing on tasks.json and individual task files. This should include handling of file not found errors, permission issues, and data corruption scenarios. Implement automatic backups and recovery procedures to ensure data integrity.
|
||||
## Acceptance Criteria:
|
||||
- File system operations are wrapped with comprehensive error handling
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Enhance Data Validation with Detailed Error Feedback
|
||||
## Status: pending
|
||||
## Dependencies: 19.1 ⏱️, 19.3 ⏱️
|
||||
## Description: Improve the existing data validation system to provide more specific and actionable error messages. Implement detailed validation checks for all user inputs and task data, with clear error messages that pinpoint the exact issue and how to resolve it. This should cover task creation, updates, and any data imported from external sources.
|
||||
## Acceptance Criteria:
|
||||
- Enhanced validation checks are implemented for all task properties and user inputs
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Implement Command Syntax Error Handling and Guidance
|
||||
## Status: pending
|
||||
## Dependencies: 19.2 ⏱️
|
||||
## Description: Enhance the CLI to provide more helpful error messages and guidance when users input invalid commands or options. Implement a "did you mean?" feature for close matches to valid commands, and provide context-sensitive help for command syntax errors. This should integrate with the existing Commander.js setup.
|
||||
## Acceptance Criteria:
|
||||
- Invalid commands trigger helpful error messages with suggestions for valid alternatives
|
||||
|
||||
## Subtask ID: 6
|
||||
## Title: Develop System State Recovery After Critical Failures
|
||||
## Status: pending
|
||||
## Dependencies: 19.1 ⏱️, 19.3 ⏱️
|
||||
## Description: Implement a system state recovery mechanism to handle critical failures that could leave the task management system in an inconsistent state. This should include creating periodic snapshots of the system state, implementing a recovery procedure to restore from these snapshots, and providing tools for manual intervention if automatic recovery fails.
|
||||
## Acceptance Criteria:
|
||||
- Periodic snapshots of the tasks.json and related state are automatically created
|
||||
59
tasks/task_020.txt
Normal file
59
tasks/task_020.txt
Normal file
@@ -0,0 +1,59 @@
|
||||
# Task ID: 20
|
||||
# Title: Create Token Usage Tracking and Cost Management
|
||||
# Status: pending
|
||||
# Dependencies: 5 ✅, 9 ✅, 17 ✅
|
||||
# Priority: medium
|
||||
# Description: Implement system for tracking API token usage and managing costs.
|
||||
# Details:
|
||||
Implement token tracking including:
|
||||
- Track token usage for all API calls
|
||||
- Implement configurable usage limits
|
||||
- Add reporting on token consumption
|
||||
- Create cost estimation features
|
||||
- Implement caching to reduce API calls
|
||||
- Add token optimization for prompts
|
||||
- Create usage alerts when approaching limits
|
||||
|
||||
# Test Strategy:
|
||||
Track token usage across various operations and verify accuracy. Test that limits properly prevent excessive usage. Verify that caching reduces token consumption for repeated operations.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Implement Token Usage Tracking for API Calls
|
||||
## Status: pending
|
||||
## Dependencies: 20.5 ⏱️
|
||||
## Description: Create a middleware or wrapper function that intercepts all API calls to OpenAI, Anthropic, and Perplexity. This function should count the number of tokens used in both the request and response, storing this information in a persistent data store (e.g., SQLite database). Implement a caching mechanism to reduce redundant API calls and token usage.
|
||||
## Acceptance Criteria:
|
||||
- Token usage is accurately tracked for all API calls
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Develop Configurable Usage Limits
|
||||
## Status: pending
|
||||
## Dependencies: None
|
||||
## Description: Create a configuration system that allows setting token usage limits at the project, user, and API level. Implement a mechanism to enforce these limits by checking the current usage against the configured limits before making API calls. Add the ability to set different limit types (e.g., daily, weekly, monthly) and actions to take when limits are reached (e.g., block calls, send notifications).
|
||||
## Acceptance Criteria:
|
||||
- Configuration file or database table for storing usage limits
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement Token Usage Reporting and Cost Estimation
|
||||
## Status: pending
|
||||
## Dependencies: 20.1 ⏱️, 20.2 ⏱️
|
||||
## Description: Develop a reporting module that generates detailed token usage reports. Include breakdowns by API, user, and time period. Implement cost estimation features by integrating current pricing information for each API. Create both command-line and programmatic interfaces for generating reports and estimates.
|
||||
## Acceptance Criteria:
|
||||
- CLI command for generating usage reports with various filters
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Optimize Token Usage in Prompts
|
||||
## Status: pending
|
||||
## Dependencies: None
|
||||
## Description: Implement a prompt optimization system that analyzes and refines prompts to reduce token usage while maintaining effectiveness. Use techniques such as prompt compression, removing redundant information, and leveraging efficient prompting patterns. Integrate this system into the existing prompt generation and API call processes.
|
||||
## Acceptance Criteria:
|
||||
- Prompt optimization function reduces average token usage by at least 10%
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Develop Token Usage Alert System
|
||||
## Status: pending
|
||||
## Dependencies: 20.2 ⏱️, 20.3 ⏱️
|
||||
## Description: Create an alert system that monitors token usage in real-time and sends notifications when usage approaches or exceeds defined thresholds. Implement multiple notification channels (e.g., email, Slack, system logs) and allow for customizable alert rules. Integrate this system with the existing logging and reporting modules.
|
||||
## Acceptance Criteria:
|
||||
- Real-time monitoring of token usage against configured limits
|
||||
99
tasks/task_021.txt
Normal file
99
tasks/task_021.txt
Normal file
@@ -0,0 +1,99 @@
|
||||
# Task ID: 21
|
||||
# Title: Refactor dev.js into Modular Components
|
||||
# Status: pending
|
||||
# Dependencies: 3 ✅, 16 ✅, 17 ✅
|
||||
# Priority: high
|
||||
# Description: Restructure the monolithic dev.js file into separate modular components to improve code maintainability, readability, and testability while preserving all existing functionality.
|
||||
# Details:
|
||||
This task involves breaking down the current dev.js file into logical modules with clear responsibilities:
|
||||
|
||||
1. Create the following module files:
|
||||
- commands.js: Handle all CLI command definitions and execution logic
|
||||
- ai-services.js: Encapsulate all AI service interactions (OpenAI, etc.)
|
||||
- task-manager.js: Manage task operations (create, read, update, delete)
|
||||
- ui.js: Handle all console output formatting, colors, and user interaction
|
||||
- utils.js: Contain helper functions, utilities, and shared code
|
||||
|
||||
2. Refactor dev.js to serve as the entry point that:
|
||||
- Imports and initializes all modules
|
||||
- Handles command-line argument parsing
|
||||
- Sets up the execution environment
|
||||
- Orchestrates the flow between modules
|
||||
|
||||
3. Ensure proper dependency injection between modules to avoid circular dependencies
|
||||
|
||||
4. Maintain consistent error handling across modules
|
||||
|
||||
5. Update import/export statements throughout the codebase
|
||||
|
||||
6. Document each module with clear JSDoc comments explaining purpose and usage
|
||||
|
||||
7. Ensure configuration and logging systems are properly integrated into each module
|
||||
|
||||
The refactoring should not change any existing functionality - this is purely a code organization task.
|
||||
|
||||
# Test Strategy:
|
||||
Testing should verify that functionality remains identical after refactoring:
|
||||
|
||||
1. Automated Testing:
|
||||
- Create unit tests for each new module to verify individual functionality
|
||||
- Implement integration tests that verify modules work together correctly
|
||||
- Test each command to ensure it works exactly as before
|
||||
|
||||
2. Manual Testing:
|
||||
- Execute all existing CLI commands and verify outputs match pre-refactoring behavior
|
||||
- Test edge cases like error handling and invalid inputs
|
||||
- Verify that configuration options still work as expected
|
||||
|
||||
3. Code Quality Verification:
|
||||
- Run linting tools to ensure code quality standards are maintained
|
||||
- Check for any circular dependencies between modules
|
||||
- Verify that each module has a single, clear responsibility
|
||||
|
||||
4. Performance Testing:
|
||||
- Compare execution time before and after refactoring to ensure no performance regression
|
||||
|
||||
5. Documentation Check:
|
||||
- Verify that each module has proper documentation
|
||||
- Ensure README is updated if necessary to reflect architectural changes
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Analyze Current dev.js Structure and Plan Module Boundaries
|
||||
## Status: pending
|
||||
## Dependencies: None
|
||||
## Description: Perform a comprehensive analysis of the existing dev.js file to identify logical boundaries for the new modules. Create a detailed mapping document that outlines which functions, variables, and code blocks will move to which module files. Identify shared dependencies, potential circular references, and determine the appropriate interfaces between modules.
|
||||
## Acceptance Criteria:
|
||||
- Complete inventory of all functions, variables, and code blocks in dev.js
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Create Core Module Structure and Entry Point Refactoring
|
||||
## Status: pending
|
||||
## Dependencies: 21.1 ⏱️
|
||||
## Description: Create the skeleton structure for all module files (commands.js, ai-services.js, task-manager.js, ui.js, utils.js) with proper export statements. Refactor dev.js to serve as the entry point that imports and orchestrates these modules. Implement the basic initialization flow and command-line argument parsing in the new structure.
|
||||
## Acceptance Criteria:
|
||||
- All module files created with appropriate JSDoc headers explaining purpose
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Implement Core Module Functionality with Dependency Injection
|
||||
## Status: pending
|
||||
## Dependencies: 21.2 ⏱️
|
||||
## Description: Migrate the core functionality from dev.js into the appropriate modules following the mapping document. Implement proper dependency injection to avoid circular dependencies. Ensure each module has a clear API and properly encapsulates its internal state. Focus on the critical path functionality first.
|
||||
## Acceptance Criteria:
|
||||
- All core functionality migrated to appropriate modules
|
||||
|
||||
## Subtask ID: 4
|
||||
## Title: Implement Error Handling and Complete Module Migration
|
||||
## Status: pending
|
||||
## Dependencies: 21.3 ⏱️
|
||||
## Description: Establish a consistent error handling pattern across all modules. Complete the migration of remaining functionality from dev.js to the appropriate modules. Ensure all edge cases, error scenarios, and helper functions are properly moved and integrated. Update all import/export statements throughout the codebase to reference the new module structure.
|
||||
## Acceptance Criteria:
|
||||
- Consistent error handling pattern implemented across all modules
|
||||
|
||||
## Subtask ID: 5
|
||||
## Title: Test, Document, and Finalize Modular Structure
|
||||
## Status: pending
|
||||
## Dependencies: 21.4 ⏱️
|
||||
## Description: Perform comprehensive testing of the refactored codebase to ensure all functionality works as expected. Add detailed JSDoc comments to all modules, functions, and significant code blocks. Create or update developer documentation explaining the new modular structure, module responsibilities, and how they interact. Perform a final code review to ensure code quality, consistency, and adherence to best practices.
|
||||
## Acceptance Criteria:
|
||||
- All existing functionality works exactly as before
|
||||
82
tasks/task_022.txt
Normal file
82
tasks/task_022.txt
Normal file
@@ -0,0 +1,82 @@
|
||||
# Task ID: 22
|
||||
# Title: Create Comprehensive Test Suite for Claude Task Master CLI
|
||||
# Status: pending
|
||||
# Dependencies: 21 ⏱️
|
||||
# Priority: high
|
||||
# Description: Develop a complete testing infrastructure for the Claude Task Master CLI that includes unit, integration, and end-to-end tests to verify all core functionality and error handling.
|
||||
# Details:
|
||||
Implement a comprehensive test suite using Jest as the testing framework. The test suite should be organized into three main categories:
|
||||
|
||||
1. Unit Tests:
|
||||
- Create tests for all utility functions and core logic components
|
||||
- Test task creation, parsing, and manipulation functions
|
||||
- Test data storage and retrieval functions
|
||||
- Test formatting and display functions
|
||||
|
||||
2. Integration Tests:
|
||||
- Test all CLI commands (create, expand, update, list, etc.)
|
||||
- Verify command options and parameters work correctly
|
||||
- Test interactions between different components
|
||||
- Test configuration loading and application settings
|
||||
|
||||
3. End-to-End Tests:
|
||||
- Test complete workflows (e.g., creating a task, expanding it, updating status)
|
||||
- Test error scenarios and recovery
|
||||
- Test edge cases like handling large numbers of tasks
|
||||
|
||||
Implement proper mocking for:
|
||||
- Claude API interactions (using Jest mock functions)
|
||||
- File system operations (using mock-fs or similar)
|
||||
- User input/output (using mock stdin/stdout)
|
||||
|
||||
Ensure tests cover both successful operations and error handling paths. Set up continuous integration to run tests automatically. Create fixtures for common test data and scenarios. Include test coverage reporting to identify untested code paths.
|
||||
|
||||
# Test Strategy:
|
||||
Verification will involve:
|
||||
|
||||
1. Code Review:
|
||||
- Verify test organization follows the unit/integration/end-to-end structure
|
||||
- Check that all major functions have corresponding tests
|
||||
- Verify mocks are properly implemented for external dependencies
|
||||
|
||||
2. Test Coverage Analysis:
|
||||
- Run test coverage tools to ensure at least 80% code coverage
|
||||
- Verify critical paths have 100% coverage
|
||||
- Identify any untested code paths
|
||||
|
||||
3. Test Quality Verification:
|
||||
- Manually review test cases to ensure they test meaningful behavior
|
||||
- Verify both positive and negative test cases exist
|
||||
- Check that tests are deterministic and don't have false positives/negatives
|
||||
|
||||
4. CI Integration:
|
||||
- Verify tests run successfully in the CI environment
|
||||
- Ensure tests run in a reasonable amount of time
|
||||
- Check that test failures provide clear, actionable information
|
||||
|
||||
The task will be considered complete when all tests pass consistently, coverage meets targets, and the test suite can detect intentionally introduced bugs.
|
||||
|
||||
# Subtasks:
|
||||
## Subtask ID: 1
|
||||
## Title: Set Up Jest Testing Environment
|
||||
## Status: pending
|
||||
## Dependencies: None
|
||||
## Description: Configure Jest for the project, including setting up the jest.config.js file, adding necessary dependencies, and creating the initial test directory structure. Implement proper mocking for Claude API interactions, file system operations, and user input/output. Set up test coverage reporting and configure it to run in the CI pipeline.
|
||||
## Acceptance Criteria:
|
||||
- jest.config.js is properly configured for the project
|
||||
|
||||
## Subtask ID: 2
|
||||
## Title: Implement Unit Tests for Core Components
|
||||
## Status: pending
|
||||
## Dependencies: 22.1 ⏱️
|
||||
## Description: Create a comprehensive set of unit tests for all utility functions, core logic components, and individual modules of the Claude Task Master CLI. This includes tests for task creation, parsing, manipulation, data storage, retrieval, and formatting functions. Ensure all edge cases and error scenarios are covered.
|
||||
## Acceptance Criteria:
|
||||
- Unit tests are implemented for all utility functions in the project
|
||||
|
||||
## Subtask ID: 3
|
||||
## Title: Develop Integration and End-to-End Tests
|
||||
## Status: pending
|
||||
## Dependencies: 22.1 ⏱️, 22.2 ⏱️
|
||||
## Description: Create integration tests that verify the correct interaction between different components of the CLI, including command execution, option parsing, and data flow. Implement end-to-end tests that simulate complete user workflows, such as creating a task, expanding it, and updating its status. Include tests for error scenarios, recovery processes, and handling large numbers of tasks.
|
||||
## Acceptance Criteria:
|
||||
- Integration tests cover all CLI commands (create, expand, update, list, etc.)
|
||||
1517
tasks/tasks.json
Normal file
1517
tasks/tasks.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user