Refactor: Modularize Task Master CLI into Modules Directory
Simplified the Task Master CLI by organizing code into modules within the directory. **Why:** - **Better Organization:** Code is now grouped by function (AI, commands, dependencies, tasks, UI, utilities). - **Easier to Maintain:** Smaller modules are simpler to update and fix. - **Scalable:** New features can be added more easily in a structured way. **What Changed:** - Moved code from single _____ _ __ __ _ |_ _|_ _ ___| | __ | \/ | __ _ ___| |_ ___ _ __ | |/ _` / __| |/ / | |\/| |/ _` / __| __/ _ \ '__| | | (_| \__ \ < | | | | (_| \__ \ || __/ | |_|\__,_|___/_|\_\ |_| |_|\__,_|___/\__\___|_| by https://x.com/eyaltoledano ╭────────────────────────────────────────────╮ │ │ │ Version: 0.9.16 Project: Task Master │ │ │ ╰────────────────────────────────────────────╯ ╭─────────────────────╮ │ │ │ Task Master CLI │ │ │ ╰─────────────────────╯ ╭───────────────────╮ │ Task Generation │ ╰───────────────────╯ parse-prd --input=<file.txt> [--tasks=10] Generate tasks from a PRD document generate Create individual task files from tasks… ╭───────────────────╮ │ Task Management │ ╰───────────────────╯ list [--status=<status>] [--with-subtas… List all tasks with their status set-status --id=<id> --status=<status> Update task status (done, pending, etc.) update --from=<id> --prompt="<context>" Update tasks based on new requirements add-task --prompt="<text>" [--dependencies=… Add a new task using AI add-dependency --id=<id> --depends-on=<id> Add a dependency to a task remove-dependency --id=<id> --depends-on=<id> Remove a dependency from a task ╭──────────────────────────╮ │ Task Analysis & Detail │ ╰──────────────────────────╯ analyze-complexity [--research] [--threshold=5] Analyze tasks and generate expansion re… complexity-report [--file=<path>] Display the complexity analysis report expand --id=<id> [--num=5] [--research] [… Break down tasks into detailed subtasks expand --all [--force] [--research] Expand all pending tasks with subtasks clear-subtasks --id=<id> Remove subtasks from specified tasks ╭─────────────────────────────╮ │ Task Navigation & Viewing │ ╰─────────────────────────────╯ next Show the next task to work on based on … show <id> Display detailed information about a sp… ╭─────────────────────────╮ │ Dependency Management │ ╰─────────────────────────╯ validate-dependenci… Identify invalid dependencies without f… fix-dependencies Fix invalid dependencies automatically ╭─────────────────────────╮ │ Environment Variables │ ╰─────────────────────────╯ ANTHROPIC_API_KEY Your Anthropic API key Required MODEL Claude model to use Default: claude-3-7-sonn… MAX_TOKENS Maximum tokens for responses Default: 4000 TEMPERATURE Temperature for model responses Default: 0.7 PERPLEXITY_API_KEY Perplexity API key for research Optional PERPLEXITY_MODEL Perplexity model to use Default: sonar-small-onl… DEBUG Enable debug logging Default: false LOG_LEVEL Console output level (debug,info,warn,error) Default: info DEFAULT_SUBTASKS Default number of subtasks to generate Default: 3 DEFAULT_PRIORITY Default task priority Default: medium PROJECT_NAME Project name displayed in UI Default: Task Master file into these new modules: - : AI interactions (Claude, Perplexity) - : CLI command definitions (Commander.js) - : Task dependency handling - : Core task operations (create, list, update, etc.) - : User interface elements (display, formatting) - : Utility functions and configuration - : Exports all modules - Replaced direct use of _____ _ __ __ _ |_ _|_ _ ___| | __ | \/ | __ _ ___| |_ ___ _ __ | |/ _` / __| |/ / | |\/| |/ _` / __| __/ _ \ '__| | | (_| \__ \ < | | | | (_| \__ \ || __/ | |_|\__,_|___/_|\_\ |_| |_|\__,_|___/\__\___|_| by https://x.com/eyaltoledano ╭────────────────────────────────────────────╮ │ │ │ Version: 0.9.16 Project: Task Master │ │ │ ╰────────────────────────────────────────────╯ ╭─────────────────────╮ │ │ │ Task Master CLI │ │ │ ╰─────────────────────╯ ╭───────────────────╮ │ Task Generation │ ╰───────────────────╯ parse-prd --input=<file.txt> [--tasks=10] Generate tasks from a PRD document generate Create individual task files from tasks… ╭───────────────────╮ │ Task Management │ ╰───────────────────╯ list [--status=<status>] [--with-subtas… List all tasks with their status set-status --id=<id> --status=<status> Update task status (done, pending, etc.) update --from=<id> --prompt="<context>" Update tasks based on new requirements add-task --prompt="<text>" [--dependencies=… Add a new task using AI add-dependency --id=<id> --depends-on=<id> Add a dependency to a task remove-dependency --id=<id> --depends-on=<id> Remove a dependency from a task ╭──────────────────────────╮ │ Task Analysis & Detail │ ╰──────────────────────────╯ analyze-complexity [--research] [--threshold=5] Analyze tasks and generate expansion re… complexity-report [--file=<path>] Display the complexity analysis report expand --id=<id> [--num=5] [--research] [… Break down tasks into detailed subtasks expand --all [--force] [--research] Expand all pending tasks with subtasks clear-subtasks --id=<id> Remove subtasks from specified tasks ╭─────────────────────────────╮ │ Task Navigation & Viewing │ ╰─────────────────────────────╯ next Show the next task to work on based on … show <id> Display detailed information about a sp… ╭─────────────────────────╮ │ Dependency Management │ ╰─────────────────────────╯ validate-dependenci… Identify invalid dependencies without f… fix-dependencies Fix invalid dependencies automatically ╭─────────────────────────╮ │ Environment Variables │ ╰─────────────────────────╯ ANTHROPIC_API_KEY Your Anthropic API key Required MODEL Claude model to use Default: claude-3-7-sonn… MAX_TOKENS Maximum tokens for responses Default: 4000 TEMPERATURE Temperature for model responses Default: 0.7 PERPLEXITY_API_KEY Perplexity API key for research Optional PERPLEXITY_MODEL Perplexity model to use Default: sonar-small-onl… DEBUG Enable debug logging Default: false LOG_LEVEL Console output level (debug,info,warn,error) Default: info DEFAULT_SUBTASKS Default number of subtasks to generate Default: 3 DEFAULT_PRIORITY Default task priority Default: medium PROJECT_NAME Project name displayed in UI Default: Task Master with the global command (see ). - Updated documentation () to reflect the new command. **Benefits:** Code is now cleaner, easier to work with, and ready for future growth. Use the command (or ) to run the CLI. See for command details.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Task ID: 11
|
||||
# Title: Implement Batch Operations
|
||||
# Status: done
|
||||
# Dependencies: 3 ✅
|
||||
# Dependencies: ✅ 3 (done)
|
||||
# Priority: medium
|
||||
# Description: Add functionality for performing operations on multiple tasks simultaneously.
|
||||
# Details:
|
||||
@@ -17,75 +17,33 @@ Create batch operations including:
|
||||
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
|
||||
## 1. Implement Multi-Task Status Update Functionality [done]
|
||||
### Dependencies: 3 (done)
|
||||
### 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.
|
||||
### Details:
|
||||
|
||||
## 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
|
||||
## 2. Develop Bulk Subtask Generation System [done]
|
||||
### Dependencies: 3 (done), 4 (done)
|
||||
### 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.
|
||||
### Details:
|
||||
|
||||
|
||||
## 3. Implement Advanced Task Filtering and Querying [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.
|
||||
### Details:
|
||||
|
||||
|
||||
## 4. Create Advanced Dependency Management System [done]
|
||||
### Dependencies: 3 (done)
|
||||
### 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.
|
||||
### Details:
|
||||
|
||||
|
||||
## 5. Implement Batch Task Prioritization and Command System [done]
|
||||
### Dependencies: 3 (done)
|
||||
### 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.
|
||||
### Details:
|
||||
|
||||
## 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)
|
||||
|
||||
Reference in New Issue
Block a user