* chore: add a bunch of automations
* chore: run format
* Update .github/scripts/auto-close-duplicates.mjs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* chore: run format
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit introduces a new GitHub Actions workflow that automatically updates documentation based on changes pushed to the 'next' branch. The workflow checks for modified files, creates a new branch for documentation updates, and utilizes the Claude Code Action to analyze changes and suggest necessary documentation revisions. If updates are made, a pull request is created for review.
* initial cutover
* update log to debug
* update tracker to pass units
* update test to match new base tracker format
* add streamTextService mocks
* remove unused imports
* Ensure the CLI waits for async main() completion
* refactor to reduce code duplication
* update comment
* reuse function
* ensure targetTag is defined in streaming mode
* avoid throwing inside process.exit spy
* check for null
* remove reference to generate
* fix formatting
* fix textStream assignment
* ensure no division by 0
* fix jest chalk mocks
* refactor for maintainability
* Improve bar chart calculation logic for consistent visual representation
* use custom streaming error types; fix mocks
* Update streamText extraction in parse-prd.js to match actual service response
* remove check - doesn't belong here
* update mocks
* remove streaming test that wasn't really doing anything
* add comment
* make parsing logic more DRY
* fix formatting
* Fix textStream extraction to match actual service response
* fix mock
* Add a cleanup method to ensure proper resource disposal and prevent memory leaks
* debounce progress updates to reduce UI flicker during rapid updates
* Implement timeout protection for streaming operations (60-second timeout) with automatic fallback to non-streaming mode.
* clear timeout properly
* Add a maximum buffer size limit (1MB) to prevent unbounded memory growth with very large streaming responses.
* fix formatting
* remove duplicate mock
* better docs
* fix formatting
* sanitize the dynamic property name
* Fix incorrect remaining progress calculation
* Use onError callback instead of console.warn
* Remove unused chalk import
* Add missing custom validator in fallback parsing configuration
* add custom validator parameter in fallback parsing
* chore: fix package-lock.json
* chore: large code refactor
* chore: increase timeout from 1 minute to 3 minutes
* fix: refactor and fix streaming
* Merge remote-tracking branch 'origin/next' into joedanz/parse-prd-progress
* fix: cleanup and fix unit tests
* chore: fix unit tests
* chore: fix format
* chore: run format
* chore: fix weird CI unit test error
* chore: fix format
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* feat: Add Kilo Code integration to TaskMaster
* feat: Add Kilo profile configuration to rule transformer tests
* refactor: Improve code formatting and consistency in Kilo profile and tests
* fix: Correct formatting of workspaces in package.json
* chore: add changeset for Kilo Code integration
* feat: add Kilo Code rules and mode configurations
- Add comprehensive rule sets for all modes (architect, ask, code, debug, orchestrator, test)
- Update .kilocodemodes configuration with mode-specific settings
- Configure MCP integration for Kilo Code profile
- Establish consistent rule structure across all modes
* refactor(kilo): simplify profile to reuse roo rules with replacements
Remove duplicate Kilo-specific rule files and assets in favor of reusing roo rules with dynamic replacements, eliminating 900+ lines of duplicated code while maintaining full Kilo functionality.
The profile now:
- Reuses ROO_MODES constant instead of maintaining separate KILO_MODES
- Applies text replacements to convert roo references to kilo
- Maps roo rule files to kilo equivalents via fileMap
- Removes all duplicate rule files from assets/kilocode directory
* refactor(kilo): restructure object literals for consistency and remove duplicate customReplacements array based on CodeRabbit's suggestion
* chore: remove disabled .mcp.json by mistake
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* feat: enhance move command with cross-tag functionality
- Updated the `move` command to allow moving tasks between different tags, including options for handling dependencies.
- Added new options: `--from-tag`, `--to-tag`, `--with-dependencies`, `--ignore-dependencies`, and `--force`.
- Implemented validation for cross-tag moves and dependency checks.
- Introduced helper functions in the dependency manager for validating and resolving cross-tag dependencies.
- Added integration and unit tests to cover new functionality and edge cases.
* fix: refactor cross-tag move logic and enhance validation
- Moved the import of `moveTasksBetweenTags` to the correct location in `commands.js` for better clarity.
- Added new helper functions in `dependency-manager.js` to improve validation and error handling for cross-tag moves.
- Enhanced existing functions to ensure proper handling of task dependencies and conflicts.
- Updated tests to cover new validation scenarios and ensure robust error messaging for invalid task IDs and tags.
* fix: improve task ID handling and error messaging in cross-tag moves
- Refactored `moveTasksBetweenTags` to normalize task IDs for comparison, ensuring consistent handling of string and numeric IDs.
- Enhanced error messages for cases where source and target tags are the same but no destination is specified.
- Updated tests to validate new behavior, including handling string dependencies correctly during cross-tag moves.
- Cleaned up existing code for better readability and maintainability.
* test: add comprehensive tests for cross-tag move and dependency validation
- Introduced new test files for `move-cross-tag` and `cross-tag-dependencies` to cover various scenarios in cross-tag task movement.
- Implemented tests for handling task movement with and without dependencies, including edge cases for error handling.
- Enhanced existing tests in `fix-dependencies-command` and `move-task` to ensure robust validation of task IDs and dependencies.
- Mocked necessary modules and functions to isolate tests and improve reliability.
- Ensured coverage for both successful and failed cross-tag move operations, validating expected outcomes and error messages.
* test: refactor cross-tag move tests for better clarity and reusability
- Introduced a helper function `simulateCrossTagMove` to streamline cross-tag move test cases, reducing redundancy and improving readability.
- Updated existing tests to utilize the new helper function, ensuring consistent handling of expected messages and options.
- Enhanced test coverage for various scenarios, including handling of dependencies and flags.
* feat: add cross-tag task movement functionality
- Introduced new commands for moving tasks between different tags, enhancing project organization capabilities.
- Updated README with usage examples for cross-tag movement, including options for handling dependencies.
- Created comprehensive documentation for cross-tag task movement, detailing usage, error handling, and best practices.
- Implemented core logic for cross-tag moves, including validation for dependencies and error handling.
- Added integration and unit tests to ensure robust functionality and coverage for various scenarios, including edge cases.
* fix: enhance error handling and logging in cross-tag task movement
- Improved logging in `moveTaskCrossTagDirect` to include detailed arguments for better traceability.
- Refactored error handling to utilize structured error objects, providing clearer suggestions for resolving cross-tag dependency conflicts and subtask movement restrictions.
- Updated documentation to reflect changes in error handling and provide clearer guidance on task movement options.
- Added integration tests for cross-tag movement scenarios, ensuring robust validation of error handling and task movement logic.
- Cleaned up existing tests for clarity and reusability, enhancing overall test coverage.
* feat: enhance dependency resolution and error handling in task movement
- Added recursive dependency resolution for tasks in `moveTasksBetweenTags`, improving handling of complex task relationships.
- Introduced helper functions to find all dependencies and reverse dependencies, ensuring comprehensive coverage during task moves.
- Enhanced error messages in `validateSubtaskMove` and `displaySubtaskMoveError` for better clarity on movement restrictions.
- Updated tests to cover new functionality, including integration tests for complex cross-tag movement scenarios and edge cases.
- Refactored existing code for improved readability and maintainability, ensuring consistent handling of task IDs and dependencies.
* feat: unify dependency traversal and enhance task management utilities
- Introduced `traverseDependencies` utility for unified forward and reverse dependency traversal, improving code reusability and clarity.
- Refactored `findAllDependenciesRecursively` to leverage the new utility, streamlining dependency resolution in task management.
- Added `formatTaskIdForDisplay` helper for better task ID formatting in UI, enhancing user experience during error displays.
- Updated tests to cover new utility functions and ensure robust validation of dependency handling across various scenarios.
- Improved overall code organization and readability, ensuring consistent handling of task dependencies and IDs.
* fix: improve validation for dependency parameters in `findAllDependenciesRecursively`
- Added checks to ensure `sourceTasks` and `allTasks` are arrays, throwing errors if not, to prevent runtime issues.
- Updated documentation comment for clarity on the function's purpose and parameters.
* fix: remove `force` option from task movement parameters
- Eliminated the `force` parameter from the `moveTaskCrossTagDirect` function and related tools, simplifying the task movement logic.
- Updated documentation and tests to reflect the removal of the `force` option, ensuring clarity and consistency across the codebase.
- Adjusted related functions and tests to focus on `ignoreDependencies` as the primary control for handling dependency conflicts during task moves.
* Add cross-tag task movement functionality
- Introduced functionality for organizing tasks across different contexts by enabling cross-tag movement.
- Added `formatTaskIdForDisplay` helper to improve task ID formatting in UI error messages.
- Updated relevant tests to incorporate new functionality and ensure accurate error displays during task movements.
* Update scripts/modules/dependency-manager.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* refactor(dependency-manager): Fix subtask resolution and extract helper functions
1. Fix subtask finding logic (lines 1315-1330):
- Correctly locate parent task by numeric ID
- Search within parent's subtasks array instead of top-level tasks
- Properly handle relative subtask references
2. Extract helper functions from getDependentTaskIds (lines 1440-1636):
- Move findTasksThatDependOn as module-level function
- Move taskDependsOnSource as module-level function
- Move subtasksDependOnSource as module-level function
- Improves readability, maintainability, and testability
Both fixes address architectural issues and improve code organization.
* refactor(dependency-manager): Enhance subtask resolution and dependency validation
- Improved subtask resolution logic to correctly find parent tasks and their subtasks, ensuring accurate identification of dependencies.
- Filtered out null/undefined dependencies before processing, enhancing robustness in dependency checks.
- Updated comments for clarity on the logic flow and purpose of changes, improving code maintainability.
* refactor(move-task): clarify destination ID description and improve skipped task handling
- Updated the description for the destination ID to clarify its usage in cross-tag moves.
- Simplified the handling of skipped tasks during multiple task movements, improving readability and logging.
- Enhanced the API result response to include detailed information about moved and skipped tasks, ensuring better feedback for users.
* refactor(commands): remove redundant tag validation logic
- Eliminated the check for identical source and target tags in the task movement logic, simplifying the code.
- This change streamlines the flow for within-tag moves, enhancing readability and maintainability.
* refactor(commands): enhance move command logic and error handling
- Introduced helper functions for better organization of cross-tag and within-tag move logic, improving code readability and maintainability.
- Enhanced error handling with structured error objects, providing clearer feedback for dependency conflicts and invalid tag combinations.
- Updated move command help output to include best practices and error resolution tips, ensuring users have comprehensive guidance during task movements.
- Streamlined task movement logic to handle multiple tasks more effectively, including detailed logging of successful and failed moves.
* test(dependency-manager): add subtasks to task structure and mock dependency traversal
- Updated `circular-dependencies.test.js` to include subtasks in task definitions, enhancing test coverage for task structures with nested dependencies.
- Mocked `traverseDependencies` in `fix-dependencies-command.test.js` to ensure consistent behavior during tests, improving reliability of dependency-related tests.
* refactor(dependency-manager): extract subtask finding logic into helper function
- Added `findSubtaskInParent` function to encapsulate subtask resolution within a parent task's subtasks array, improving code organization and readability.
- Updated `findDependencyTask` to utilize the new helper function, streamlining the logic for finding subtasks and enhancing maintainability.
- Enhanced comments for clarity on the purpose and functionality of the new subtask finding logic.
* refactor(ui): enhance subtask ID validation and improve error handling
- Added validation for subtask ID format in `formatDependenciesWithStatus` and `taskExists`, ensuring proper handling of invalid formats.
- Updated error logging in `displaySubtaskMoveError` to provide warnings for unexpected task ID formats, improving user feedback.
- Converted hints to a Set in `displayDependencyValidationHints` to ensure unique hints are displayed, enhancing clarity in the UI.
* test(cli): remove redundant timing check in complex cross-tag scenarios
- Eliminated the timing check for task completion within 5 seconds in `complex-cross-tag-scenarios.test.js`, streamlining the test logic.
- This change focuses on verifying task success without unnecessary timing constraints, enhancing test clarity and maintainability.
* test(integration): enhance task movement tests with mock file system
- Added integration tests for moving tasks within the same tag and between different tags using the actual `moveTask` and `moveTasksBetweenTags` functions.
- Implemented `mock-fs` to simulate file system interactions, improving test isolation and reliability.
- Verified task movement success and ensured proper handling of subtasks and dependencies, enhancing overall test coverage for task management functionality.
- Included error handling tests for missing tags and task IDs to ensure robustness in task movement operations.
* test(unit): add comprehensive tests for moveTaskCrossTagDirect functionality
- Introduced new test cases to verify mock functionality, ensuring that mocks for `findTasksPath` and `readJSON` are working as expected.
- Added tests for parameter validation, error handling, and function call flow, including scenarios for missing project roots and identical source/target tags.
- Enhanced coverage for ID parsing and move options, ensuring robust handling of various input conditions and improving overall test reliability.
* test(integration): skip tests for dependency conflict handling and withDependencies option
- Marked tests for handling dependency conflicts and the withDependencies option as skipped due to issues with the mock setup.
- Added TODOs to address the mock-fs setup for complex dependency scenarios, ensuring future improvements in test reliability.
* test(unit): expand cross-tag move command tests with comprehensive mocks
- Added extensive mocks for various modules to enhance the testing of the cross-tag move functionality in `move-cross-tag.test.js`.
- Implemented detailed test cases for handling cross-tag moves, including validation for missing parameters and identical source/target tags.
- Improved error handling tests to ensure robust feedback for invalid operations, enhancing overall test reliability and coverage.
* test(integration): add complex dependency scenarios to task movement tests
- Introduced new integration tests for handling complex dependency scenarios in task movement, utilizing the actual `moveTasksBetweenTags` function.
- Added tests for circular dependencies, nested dependency chains, and cross-tag dependency resolution, enhancing coverage and reliability.
- Documented limitations of the mock-fs setup for complex scenarios and provided warnings in the test output to guide future improvements.
- Skipped tests for dependency conflicts and the withDependencies option due to mock setup issues, with TODOs for resolution.
* test(unit): refactor move-cross-tag tests with focused mock system
- Simplified mocking in `move-cross-tag.test.js` by implementing a configuration-driven mock system, reducing the number of mocked modules from 20+ to 5 core functionalities.
- Introduced a reusable mock factory to streamline the creation of mocks based on configuration, enhancing maintainability and clarity.
- Added documentation for the new mock system, detailing usage examples and benefits, including reduced complexity and improved test focus.
- Implemented tests to validate the mock configuration, ensuring flexibility in enabling/disabling specific mocks.
* test(unit): clean up mocks and improve isEmpty function in fix-dependencies-command tests
- Removed the mock for `traverseDependencies` as it was unnecessary, simplifying the test setup.
- Updated the `isEmpty` function to clarify its behavior regarding null and undefined values, enhancing code readability and maintainability.
* test(unit): update traverseDependencies mock for consistency across tests
- Standardized the mock implementation of `traverseDependencies` in both `fix-dependencies-command.test.js` and `complexity-report-tag-isolation.test.js` to accept `sourceTasks`, `allTasks`, and `options` parameters, ensuring uniformity in test setups.
- This change enhances clarity and maintainability of the tests by aligning the mock behavior across different test files.
* fix(core): improve task movement error handling and ID normalization
- Wrapped task movement logic in a try-finally block to ensure console output is restored even on errors, enhancing reliability.
- Normalized source IDs to handle mixed string/number comparisons, preventing potential issues in dependency checks.
- Added tests for ID type consistency to verify that the normalization fix works correctly across various scenarios, improving test coverage and robustness.
* refactor(task-manager): restructure task movement logic for improved validation and execution
- Renamed and refactored `moveTasksBetweenTags` to streamline the task movement process into distinct phases: validation, data preparation, dependency resolution, execution, and finalization.
- Introduced `validateMove`, `prepareTaskData`, `resolveDependencies`, `executeMoveOperation`, and `finalizeMove` functions to enhance modularity and clarity.
- Updated documentation comments to reflect changes in function responsibilities and parameters.
- Added comprehensive unit tests for the new structure, ensuring robust validation and error handling across various scenarios.
- Improved handling of dependencies and task existence checks during the move operation, enhancing overall reliability.
* fix(move-task): streamline task movement logic and improve error handling
- Refactored the task movement process to enhance clarity and maintainability by replacing `forEach` with a `for...of` loop for better async handling.
- Consolidated error handling and result logging to ensure consistent feedback during task moves.
- Updated the logic for generating files only on the last move, improving performance and reducing unnecessary operations.
- Enhanced validation for skipped tasks, ensuring accurate reporting of moved and skipped tasks in the final result.
* fix(docs): update error message formatting and enhance clarity in task movement documentation
- Changed code block syntax from generic to `text` for better readability in error messages related to task movement and dependency conflicts.
- Ensured consistent formatting across all error message examples to improve user understanding of task movement restrictions and resolutions.
- Added a newline at the end of the file for proper formatting.
* Update .changeset/crazy-meals-hope.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* chore: improve changeset
* chore: improve changeset
* fix referenced bug in docs and remove docs
* chore: fix format
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
- Fixed bug where expand task generated generic authentication subtasks
- The complexity-report prompt variant now includes parent task details
- Added comprehensive unit tests to prevent regression
- Added debug logging to help diagnose similar issues
Previously, when using a complexity report with expansionPrompt, only the
expansion guidance was sent to the AI, missing the actual task context.
This caused the AI to generate unrelated generic subtasks.
Fixes the issue where all tasks would get the same generic auth-related
subtasks regardless of their actual purpose (AWS infrastructure, Docker
containerization, etc.)
Co-authored-by: Sadaqat Ali <32377500+sadaqat12@users.noreply.github.com>
* Version Packages
* chore: add eyal instead of crunchyman to eyal's feature
* chore: run format
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* fix: fix mcp tool call in extension
- fix console.log directly being used in scope-adjutment.js breaking mcp
* chore: run format and fix tests
* chore: format
* feat(task-104): Complete task 104 - Implement scope-up and scope-down CLI Commands
- Added new CLI commands 'scope-up' and 'scope-down' with comma-separated ID support
- Implemented strength levels (light/regular/heavy) and custom prompt functionality
- Created core complexity adjustment logic with AI integration
- Added MCP tool equivalents for integrated environments
- Comprehensive error handling and task validation
- Full test coverage with TDD approach
- Updated task manager core and UI components
Task 104: Implement 'scope-up' and 'scope-down' CLI Commands for Dynamic Task Complexity Adjustment - Complete implementation with CLI, MCP integration, and testing
* chore: Add changeset for scope-up and scope-down features
- Comprehensive user-facing description with usage examples
- Key features and benefits explanation
- CLI and MCP integration details
- Real-world use cases for agile workflows
* feat(extension): Add scope-up and scope-down to VS Code extension task details
- Added useScopeUpTask and useScopeDownTask hooks in useTaskQueries.ts
- Enhanced AIActionsSection with Task Complexity Adjustment section
- Added strength selection (light/regular/heavy) and custom prompt support
- Integrated scope buttons with proper loading states and error handling
- Uses existing mcpRequest handler for scope_up_task and scope_down_task tools
- Maintains consistent UI patterns with existing AI actions
Extension now supports dynamic task complexity adjustment directly from task details view.
* fix: normalize task IDs to numbers on load to fix comparison issues
When tasks.json contains string IDs (e.g., "5" instead of 5), task lookups
fail because the code uses parseInt() and strict equality (===) for comparisons.
This fix normalizes all task and subtask IDs to numbers when loading the JSON,
ensuring consistent comparisons throughout the codebase without requiring
changes to multiple comparison locations.
Fixes task not found errors when using string IDs in tasks.json.
* Added test
* Don't mess up formatting
* Fix formatting once and for all
* Update scripts/modules/utils.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Update scripts/modules/utils.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Update scripts/modules/utils.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix: normalize task IDs to numbers on load to fix comparison issues
- Added normalizeTaskIds function to convert string IDs to numbers
- Applied normalization in readJSON for all code paths
- Fixed set-task-status, add-task, and move-task to normalize IDs when working with raw data
- Exported normalizeTaskIds function for use in other modules
- Added test case for string ID normalization
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Simplified implementation
* refactor: normalize IDs once when loading JSON instead of scattered calls
- Normalize all tags' data when creating _rawTaggedData in readJSON
- Add support for handling malformed dotted subtask IDs (e.g., "5.1" -> 1)
- Remove redundant normalizeTaskIds calls from set-task-status, add-task, and move-task
- Add comprehensive test for mixed ID formats (string IDs and dotted notation)
- Cleaner, more maintainable solution that normalizes IDs at load time
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: run format to resolve CI issues
---------
Co-authored-by: Carl Mercier <carl@carlmercier.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Removes the default empty array value from the complexity report option to properly detect when tags are explicitly provided vs when no tags are provided, fixing the expand --all command behavior with tagged tasks.
Co-authored-by: Ben Vargas <ben@example.com>
* Version Packages
* chore: fix release 0.22
todo: fix CI
* chore: run format
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* chore: improve pre-release CI to be able to release more than one release candidate
* chore: implement requested changes from coderabbit
* chore: apply requested changes
* feat: Add Kiro hooks and configuration for Taskmaster integration
- Introduced multiple Kiro hooks to automate task management workflows, including:
- Code Change Task Tracker
- Complexity Analyzer
- Daily Standup Assistant
- Git Commit Task Linker
- Import Cleanup on Delete
- New File Boilerplate
- PR Readiness Checker
- Task Dependency Auto-Progression
- Test Success Task Completer
- Added .mcp.json configuration for Taskmaster AI integration.
- Updated development workflow documentation to reflect new hook-driven processes and best practices.
This commit enhances the automation capabilities of Taskmaster, streamlining task management and improving developer efficiency.
* chore: run format
* chore: improve unit tests on kiro rules
* chore: run format
* chore: run format
* feat: improve PR and add changeset
* fix: bump ai-sdk-provider-gemini-cli to v0.1.1
Updates ai-sdk-provider-gemini-cli from v0.0.4 to v0.1.1 to fix a breaking change
introduced in @google/gemini-cli-core v0.1.12+ where createContentGeneratorConfig
signature changed, causing "config.getModel is not a function" errors.
The new version includes:
- Fixed compatibility with @google/gemini-cli-core ^0.1.13
- Added proxy support via configuration
- Resolved the breaking API change
Fixes compatibility issues when using newer versions of gemini-cli-core.
See: https://github.com/ben-vargas/ai-sdk-provider-gemini-cli/releases/tag/v0.1.1
* chore: fix package-lock.json being too big
---------
Co-authored-by: Ben Vargas <ben@example.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* fix(profiles): fix vscode profile generation
- Add .instructions.md extension for VSCode Copilot instructions file.
- Add customReplacement to remove unsupported property `alwaysApply` from YAML front-matter in VSCode instructions files.
- Add missing property `targetExtension` to the base profile object to
support the change to file extension.
* chore: run format
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* Don't generate task files unless requested
* add changeset
* switch to optional generate flag instead of skip-generate based on new default
* switch generate default to false and update flags and docs
* revert DO/DON'T section
* use simpler non ANSI-C quoting
* fix: prevent CLAUDE.md overwrite by using imports (#949)
* fix: prevent CLAUDE.md overwrite by using imports
- Copy Task Master instructions to .taskmaster/CLAUDE.md
- Add import section to user's CLAUDE.md instead of overwriting
- Preserve existing user content
- Clean removal of Task Master content on uninstall
Closes#929
* chore: add changeset for Claude import fix
* fix: task master (tm) custom slash commands w/ proper syntax (#968)
* feat: add task master (tm) custom slash commands
Add comprehensive task management system integration via custom slash commands.
Includes commands for:
- Project initialization and setup
- Task parsing from PRD documents
- Task creation, update, and removal
- Subtask management
- Dependency tracking and validation
- Complexity analysis and task expansion
- Project status and reporting
- Workflow automation
This provides a complete task management workflow directly within Claude Code.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: add changeset
---------
Co-authored-by: neno-is-ooo <204701868+neno-is-ooo@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
* chore: create extension scaffolding (#989)
* chore: create extension scaffolding
* chore: fix workspace for changeset
* chore: fix package-lock
* feat(profiles): Add MCP configuration to Claude Code rules (#980)
* add .mcp.json with claude profile
* add changeset
* update changeset
* update test
* fix: show command no longer requires complexity report to exist (#979)
Co-authored-by: Ben Vargas <ben@example.com>
* feat: complete Groq provider integration and add Kimi K2 model (#978)
* feat: complete Groq provider integration and add Kimi K2 model
- Add missing getRequiredApiKeyName() method to GroqProvider class
- Register GroqProvider in ai-services-unified.js PROVIDERS object
- Add Groq API key handling to config-manager.js (isApiKeySet and getMcpApiKeyStatus)
- Add GROQ_API_KEY to env.example with format hint
- Add moonshotai/kimi-k2-instruct model to Groq provider ($1/$3 per 1M tokens, 16k max)
- Fix import sorting for linting compliance
- Add GroqProvider mock to ai-services-unified tests
Fixes missing implementation pieces that prevented Groq provider from working.
* chore: improve changeset
---------
Co-authored-by: Ben Vargas <ben@example.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* docs: Auto-update and format models.md
* feat: Add Amp rule profile with AGENT.md and MCP config (#973)
* Amp profile + tests
* generatlize to Agent instead of Claude Code to support any agent
* add changeset
* unnecessary tab formatting
* fix exports
* fix formatting
* feat: Add Zed editor rule profile with agent rules and MCP config (#974)
* zed profile
* add changeset
* update changeset
* fix: Add missing API keys to .env.example and README.md (#972)
* add OLLAMA_API_KEY
* add missing API keys
* add changeset
* update keys and fix OpenAI comment
* chore: create extension scaffolding (#989)
* chore: create extension scaffolding
* chore: fix workspace for changeset
* chore: fix package-lock
* feat(profiles): Add MCP configuration to Claude Code rules (#980)
* add .mcp.json with claude profile
* add changeset
* update changeset
* update test
* fix: show command no longer requires complexity report to exist (#979)
Co-authored-by: Ben Vargas <ben@example.com>
* feat: complete Groq provider integration and add Kimi K2 model (#978)
* feat: complete Groq provider integration and add Kimi K2 model
- Add missing getRequiredApiKeyName() method to GroqProvider class
- Register GroqProvider in ai-services-unified.js PROVIDERS object
- Add Groq API key handling to config-manager.js (isApiKeySet and getMcpApiKeyStatus)
- Add GROQ_API_KEY to env.example with format hint
- Add moonshotai/kimi-k2-instruct model to Groq provider ($1/$3 per 1M tokens, 16k max)
- Fix import sorting for linting compliance
- Add GroqProvider mock to ai-services-unified tests
Fixes missing implementation pieces that prevented Groq provider from working.
* chore: improve changeset
---------
Co-authored-by: Ben Vargas <ben@example.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* docs: Auto-update and format models.md
* feat: Add Amp rule profile with AGENT.md and MCP config (#973)
* Amp profile + tests
* generatlize to Agent instead of Claude Code to support any agent
* add changeset
* unnecessary tab formatting
* fix exports
* fix formatting
* feat: Add Zed editor rule profile with agent rules and MCP config (#974)
* zed profile
* add changeset
* update changeset
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: Ben Vargas <ben@vargas.com>
Co-authored-by: Ben Vargas <ben@example.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat: Add OpenCode rule profile with AGENTS.md and MCP config (#970)
* add opencode to profile lists
* add opencode profile / modify mcp config after add
* add changeset
* not necessary; main config being updated
* add issue link
* add/fix tests
* fix url and docsUrl
* update test for new urls
* fix formatting
* update/fix tests
* chore: add coderabbit configuration (#992)
* chore: add coderabbit configuration
* chore: fix coderabbit config
* chore: improve coderabbit config
* chore: more coderabbit reviews
* chore: remove all defaults
* docs: Update MCP server name for consistency and use 'Add to Cursor' button (#995)
* update MCP server name to task-master-ai for consistency
* add changeset
* update cursor link & switch to https
* switch back to Add to Cursor button (https link)
* update changeset
* update changeset
* update changeset
* update changeset
* use GitHub markdown format
* fix(ai-validation): comprehensive fixes for AI response validation issues (#1000)
* fix(ai-validation): comprehensive fixes for AI response validation issues
- Fix update command validation when AI omits subtasks/status/dependencies
- Fix add-task command when AI returns non-string details field
- Fix update-task command when AI subtasks miss required fields
- Add preprocessing to ensure proper field types before validation
- Prevent split() errors on non-string fields
- Set proper defaults for missing required fields
* chore: run format
* chore: implement coderabbit suggestions
* feat: add kiro profile (#1001)
* feat: add kiro profile
* chore: fix format
* chore: implement requested changes
* chore: fix CI
* refactor: remove unused resource and resource template initialization (#1002)
* refactor: remove unused resource and resource template initialization
* chore: implement requested changes
* fix(core): Implement Boundary-First Tag Resolution (#943)
* refactor(context): Standardize tag and projectRoot handling across all task tools
This commit unifies context management by adopting a boundary-first resolution strategy. All task-scoped tools now resolve `tag` and `projectRoot` at their entry point and forward these values to the underlying direct functions.
This approach centralizes context logic, ensuring consistent behavior and enhanced flexibility in multi-tag environments.
* fix(tag): Clean up tag handling in task functions and sync process
This commit refines the handling of the `tag` parameter across multiple functions, ensuring consistent context management. The `tag` is now passed more efficiently in `listTasksDirect`, `setTaskStatusDirect`, and `syncTasksToReadme`, improving clarity and reducing redundancy. Additionally, a TODO comment has been added in `sync-readme.js` to address future tag support enhancements.
* feat(tag): Implement Boundary-First Tag Resolution for consistent tag handling
This commit introduces Boundary-First Tag Resolution in the task manager, ensuring consistent and deterministic tag handling across CLI and MCP. This change resolves potential race conditions and improves the reliability of tag-specific operations.
Additionally, the `expandTask` function has been updated to use the resolved tag when writing JSON, enhancing data integrity during task updates.
* chore(biome): formatting
* fix(expand-task): Update writeJSON call to use tag instead of resolvedTag
* fix(commands): Enhance complexity report path resolution and task initialization
`resolveComplexityReportPath` function to streamline output path generation based on tag context and user-defined output.
- Improved clarity and maintainability of command handling by centralizing path resolution logic.
* Fix: unknown currentTag
* fix(task-manager): Update generateTaskFiles calls to include tag and projectRoot parameters
This commit modifies the `moveTask` and `updateSubtaskById` functions to pass the `tag` and `projectRoot` parameters to the `generateTaskFiles` function. This ensures that task files are generated with the correct context when requested, enhancing consistency in task management operations.
* fix(commands): Refactor tag handling and complexity report path resolution
This commit updates the `registerCommands` function to utilize `taskMaster.getCurrentTag()` for consistent tag retrieval across command actions. It also enhances the initialization of `TaskMaster` by passing the tag directly, improving clarity and maintainability. The complexity report path resolution is streamlined to ensure correct file naming based on the current tag context.
* fix(task-master): Update complexity report path expectations in tests
This commit modifies the `initTaskMaster` test to expect a valid string for the complexity report path, ensuring it matches the expected file naming convention. This change enhances test reliability by verifying the correct output format when the path is generated.
* fix(set-task-status): Enhance logging and tag resolution in task status updates
This commit improves the logging output in the `registerSetTaskStatusTool` function to include the tag context when setting task statuses. It also updates the tag handling by resolving the tag using the `resolveTag` utility, ensuring that the correct tag is used when updating task statuses. Additionally, the `setTaskStatus` function is modified to remove the tag parameter from the `readJSON` and `writeJSON` calls, streamlining the data handling process.
* fix(commands, expand-task, task-manager): Add complexity report option and enhance path handling
This commit introduces a new `--complexity-report` option in the `registerCommands` function, allowing users to specify a custom path for the complexity report. The `expandTask` function is updated to accept the `complexityReportPath` from the context, ensuring it is utilized correctly during task expansion. Additionally, the `setTaskStatus` function now includes the `tag` parameter in the `readJSON` and `writeJSON` calls, improving task status updates with proper context. The `initTaskMaster` function is also modified to create parent directories for output paths, enhancing file handling robustness.
* fix(expand-task): Add complexityReportPath to context for task expansion tests
This commit updates the test for the `expandTask` function by adding the `complexityReportPath` to the context object. This change ensures that the complexity report path is correctly utilized in the test, aligning with recent enhancements to complexity report handling in the task manager.
* chore: implement suggested changes
* fix(parse-prd): Clarify tag parameter description for task organization
Updated the documentation for the `tag` parameter in the `parse-prd.js` file to provide a clearer context on its purpose for organizing tasks into separate task lists.
* Fix Inconsistent tag resolution pattern.
* fix: Enhance complexity report path handling with tag support
This commit updates various functions to incorporate the `tag` parameter when resolving complexity report paths. The `expandTaskDirect`, `resolveComplexityReportPath`, and related tools now utilize the current tag context, improving consistency in task management. Additionally, the complexity report path is now correctly passed through the context in the `expand-task` and `set-task-status` tools, ensuring accurate report retrieval based on the active tag.
* Updated the JSDoc for the `tag` parameter in the `show-task.js` file.
* Remove redundant comment on tag parameter in readJSON call
* Remove unused import for getTagAwareFilePath
* Add missed complexityReportPath to args for task expansion
* fix(tests): Enhance research tests with tag-aware functionality
This commit updates the `research.test.js` file to improve the testing of the `performResearch` function by incorporating tag-aware functionality. Key changes include mocking the `findProjectRoot` to return a valid path, enhancing the `ContextGatherer` and `FuzzyTaskSearch` mocks, and adding comprehensive tests for tag parameter handling in various scenarios. The tests now cover passing different tag values, ensuring correct behavior when tags are provided, undefined, or null, and validating the integration of tags in task discovery and context gathering processes.
* Remove unused import for
* fix: Refactor complexity report path handling and improve argument destructuring
This commit enhances the `expandTaskDirect` function by improving the destructuring of arguments for better readability. It also updates the `analyze.js` and `analyze-task-complexity.js` files to utilize the new `resolveComplexityReportOutputPath` function, ensuring tag-aware resolution of output paths. Additionally, logging has been added to provide clarity on the report path being used.
* test: Add complexity report tag isolation tests and improve path handling
This commit introduces a new test file for complexity report tag isolation, ensuring that different tags maintain separate complexity reports. It enhances the existing tests in `analyze-task-complexity.test.js` by updating expectations to use `expect.stringContaining` for file paths, improving robustness against path changes. The new tests cover various scenarios, including path resolution and report generation for both master and feature tags, ensuring no cross-tag contamination occurs.
* Update scripts/modules/task-manager/list-tasks.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Update scripts/modules/task-manager/list-tasks.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* test(complexity-report): Fix tag slugification in filename expectations
- Update mocks to use slugifyTagForFilePath for cross-platform compatibility
- Replace raw tag values with slugified versions in expected filenames
- Fix test expecting 'feature/user-auth-v2' to expect 'feature-user-auth-v2'
- Align test with actual filename generation logic that sanitizes special chars
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix: Update VS Code profile with MCP config transformation (#971)
* remove dash in server name
* add OLLAMA_API_KEY to VS Code MCP instructions
* transform vscode mcp to correct format
* add changeset
* switch back to task-master-ai
* use task-master-ai
* Batch fixes before release (#1011)
* fix: improve projectRoot
* fix: improve task-master lang command
* feat: add documentation to the readme so more people can access it
* fix: expand command subtask dependency validation
* fix: update command more reliable with perplexity and other models
* chore: fix CI
* chore: implement requested changes
* chore: fix CI
* chore: fix changeset release for extension package (#1012)
* chore: fix changeset release for extension package
* chore: fix CI
* chore: rc version bump
* chore: adjust kimi k2 max tokens (#1014)
* docs: Auto-update and format models.md
---------
Co-authored-by: Ben Vargas <ben@vargas.com>
Co-authored-by: neno-is-ooo <204701868+neno-is-ooo@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Joe Danziger <joe@ticc.net>
Co-authored-by: Ben Vargas <ben@example.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Parthy <52548018+mm-parthy@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix: improve projectRoot
* fix: improve task-master lang command
* feat: add documentation to the readme so more people can access it
* fix: expand command subtask dependency validation
* fix: update command more reliable with perplexity and other models
* chore: fix CI
* chore: implement requested changes
* chore: fix CI
* remove dash in server name
* add OLLAMA_API_KEY to VS Code MCP instructions
* transform vscode mcp to correct format
* add changeset
* switch back to task-master-ai
* use task-master-ai
* refactor(context): Standardize tag and projectRoot handling across all task tools
This commit unifies context management by adopting a boundary-first resolution strategy. All task-scoped tools now resolve `tag` and `projectRoot` at their entry point and forward these values to the underlying direct functions.
This approach centralizes context logic, ensuring consistent behavior and enhanced flexibility in multi-tag environments.
* fix(tag): Clean up tag handling in task functions and sync process
This commit refines the handling of the `tag` parameter across multiple functions, ensuring consistent context management. The `tag` is now passed more efficiently in `listTasksDirect`, `setTaskStatusDirect`, and `syncTasksToReadme`, improving clarity and reducing redundancy. Additionally, a TODO comment has been added in `sync-readme.js` to address future tag support enhancements.
* feat(tag): Implement Boundary-First Tag Resolution for consistent tag handling
This commit introduces Boundary-First Tag Resolution in the task manager, ensuring consistent and deterministic tag handling across CLI and MCP. This change resolves potential race conditions and improves the reliability of tag-specific operations.
Additionally, the `expandTask` function has been updated to use the resolved tag when writing JSON, enhancing data integrity during task updates.
* chore(biome): formatting
* fix(expand-task): Update writeJSON call to use tag instead of resolvedTag
* fix(commands): Enhance complexity report path resolution and task initialization
`resolveComplexityReportPath` function to streamline output path generation based on tag context and user-defined output.
- Improved clarity and maintainability of command handling by centralizing path resolution logic.
* Fix: unknown currentTag
* fix(task-manager): Update generateTaskFiles calls to include tag and projectRoot parameters
This commit modifies the `moveTask` and `updateSubtaskById` functions to pass the `tag` and `projectRoot` parameters to the `generateTaskFiles` function. This ensures that task files are generated with the correct context when requested, enhancing consistency in task management operations.
* fix(commands): Refactor tag handling and complexity report path resolution
This commit updates the `registerCommands` function to utilize `taskMaster.getCurrentTag()` for consistent tag retrieval across command actions. It also enhances the initialization of `TaskMaster` by passing the tag directly, improving clarity and maintainability. The complexity report path resolution is streamlined to ensure correct file naming based on the current tag context.
* fix(task-master): Update complexity report path expectations in tests
This commit modifies the `initTaskMaster` test to expect a valid string for the complexity report path, ensuring it matches the expected file naming convention. This change enhances test reliability by verifying the correct output format when the path is generated.
* fix(set-task-status): Enhance logging and tag resolution in task status updates
This commit improves the logging output in the `registerSetTaskStatusTool` function to include the tag context when setting task statuses. It also updates the tag handling by resolving the tag using the `resolveTag` utility, ensuring that the correct tag is used when updating task statuses. Additionally, the `setTaskStatus` function is modified to remove the tag parameter from the `readJSON` and `writeJSON` calls, streamlining the data handling process.
* fix(commands, expand-task, task-manager): Add complexity report option and enhance path handling
This commit introduces a new `--complexity-report` option in the `registerCommands` function, allowing users to specify a custom path for the complexity report. The `expandTask` function is updated to accept the `complexityReportPath` from the context, ensuring it is utilized correctly during task expansion. Additionally, the `setTaskStatus` function now includes the `tag` parameter in the `readJSON` and `writeJSON` calls, improving task status updates with proper context. The `initTaskMaster` function is also modified to create parent directories for output paths, enhancing file handling robustness.
* fix(expand-task): Add complexityReportPath to context for task expansion tests
This commit updates the test for the `expandTask` function by adding the `complexityReportPath` to the context object. This change ensures that the complexity report path is correctly utilized in the test, aligning with recent enhancements to complexity report handling in the task manager.
* chore: implement suggested changes
* fix(parse-prd): Clarify tag parameter description for task organization
Updated the documentation for the `tag` parameter in the `parse-prd.js` file to provide a clearer context on its purpose for organizing tasks into separate task lists.
* Fix Inconsistent tag resolution pattern.
* fix: Enhance complexity report path handling with tag support
This commit updates various functions to incorporate the `tag` parameter when resolving complexity report paths. The `expandTaskDirect`, `resolveComplexityReportPath`, and related tools now utilize the current tag context, improving consistency in task management. Additionally, the complexity report path is now correctly passed through the context in the `expand-task` and `set-task-status` tools, ensuring accurate report retrieval based on the active tag.
* Updated the JSDoc for the `tag` parameter in the `show-task.js` file.
* Remove redundant comment on tag parameter in readJSON call
* Remove unused import for getTagAwareFilePath
* Add missed complexityReportPath to args for task expansion
* fix(tests): Enhance research tests with tag-aware functionality
This commit updates the `research.test.js` file to improve the testing of the `performResearch` function by incorporating tag-aware functionality. Key changes include mocking the `findProjectRoot` to return a valid path, enhancing the `ContextGatherer` and `FuzzyTaskSearch` mocks, and adding comprehensive tests for tag parameter handling in various scenarios. The tests now cover passing different tag values, ensuring correct behavior when tags are provided, undefined, or null, and validating the integration of tags in task discovery and context gathering processes.
* Remove unused import for
* fix: Refactor complexity report path handling and improve argument destructuring
This commit enhances the `expandTaskDirect` function by improving the destructuring of arguments for better readability. It also updates the `analyze.js` and `analyze-task-complexity.js` files to utilize the new `resolveComplexityReportOutputPath` function, ensuring tag-aware resolution of output paths. Additionally, logging has been added to provide clarity on the report path being used.
* test: Add complexity report tag isolation tests and improve path handling
This commit introduces a new test file for complexity report tag isolation, ensuring that different tags maintain separate complexity reports. It enhances the existing tests in `analyze-task-complexity.test.js` by updating expectations to use `expect.stringContaining` for file paths, improving robustness against path changes. The new tests cover various scenarios, including path resolution and report generation for both master and feature tags, ensuring no cross-tag contamination occurs.
* Update scripts/modules/task-manager/list-tasks.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Update scripts/modules/task-manager/list-tasks.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* test(complexity-report): Fix tag slugification in filename expectations
- Update mocks to use slugifyTagForFilePath for cross-platform compatibility
- Replace raw tag values with slugified versions in expected filenames
- Fix test expecting 'feature/user-auth-v2' to expect 'feature-user-auth-v2'
- Align test with actual filename generation logic that sanitizes special chars
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix(ai-validation): comprehensive fixes for AI response validation issues
- Fix update command validation when AI omits subtasks/status/dependencies
- Fix add-task command when AI returns non-string details field
- Fix update-task command when AI subtasks miss required fields
- Add preprocessing to ensure proper field types before validation
- Prevent split() errors on non-string fields
- Set proper defaults for missing required fields
* chore: run format
* chore: implement coderabbit suggestions
* update MCP server name to task-master-ai for consistency
* add changeset
* update cursor link & switch to https
* switch back to Add to Cursor button (https link)
* update changeset
* update changeset
* update changeset
* update changeset
* use GitHub markdown format
* add opencode to profile lists
* add opencode profile / modify mcp config after add
* add changeset
* not necessary; main config being updated
* add issue link
* add/fix tests
* fix url and docsUrl
* update test for new urls
* fix formatting
* update/fix tests
* Amp profile + tests
* generatlize to Agent instead of Claude Code to support any agent
* add changeset
* unnecessary tab formatting
* fix exports
* fix formatting
* feat: complete Groq provider integration and add Kimi K2 model
- Add missing getRequiredApiKeyName() method to GroqProvider class
- Register GroqProvider in ai-services-unified.js PROVIDERS object
- Add Groq API key handling to config-manager.js (isApiKeySet and getMcpApiKeyStatus)
- Add GROQ_API_KEY to env.example with format hint
- Add moonshotai/kimi-k2-instruct model to Groq provider ($1/$3 per 1M tokens, 16k max)
- Fix import sorting for linting compliance
- Add GroqProvider mock to ai-services-unified tests
Fixes missing implementation pieces that prevented Groq provider from working.
* chore: improve changeset
---------
Co-authored-by: Ben Vargas <ben@example.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* fix: prevent CLAUDE.md overwrite by using imports
- Copy Task Master instructions to .taskmaster/CLAUDE.md
- Add import section to user's CLAUDE.md instead of overwriting
- Preserve existing user content
- Clean removal of Task Master content on uninstall
Closes#929
* chore: add changeset for Claude import fix
* fix: resolve path resolution issues in parse-prd and analyze-complexity commands
This commit fixes critical path resolution regressions where commands were requiring files they create to already exist.
## Changes Made:
### 1. parse-prd Command (Lines 808, 828-835, 919-921)
**Problem**: Command required tasks.json to exist before it could create it (catch-22)
**Root Cause**: Default value in option definition meant options.output was always set
**Fixes**:
- Removed default value from --output option definition (line 808)
- Modified initTaskMaster to only include tasksPath when explicitly specified
- Added null handling for output path with fallback to default location
### 2. analyze-complexity Command (Lines 1637-1640, 1673-1680, 1695-1696)
**Problem**: Command required complexity report file to exist before creating it
**Root Cause**: Default value in option definition meant options.output was always set
**Fixes**:
- Removed default value from --output option definition (lines 1637-1640)
- Modified initTaskMaster to only include complexityReportPath when explicitly specified
- Added null handling for report path with fallback to default location
## Technical Details:
The core issue was that Commander.js option definitions with default values always populate the options object, making conditional checks like `if (options.output)` always true. By removing default values from option definitions, we ensure paths are only included in initTaskMaster when users explicitly provide them.
This approach is cleaner than using boolean flags (true/false) for required/optional, as it eliminates the path entirely when not needed, letting initTaskMaster use its default behavior.
## Testing:
- parse-prd now works on fresh projects without existing tasks.json
- analyze-complexity creates report file without requiring it to exist
- Commands maintain backward compatibility when paths are explicitly provided
Fixes issues reported in PATH-FIXES.md and extends the solution to other affected commands.
* fix: update expand-task test to match context gathering fix
The test was expecting gatheredContext to be a string, but the actual
implementation returns an object with a context property. Updated the
ContextGatherer mock to return the correct format and added missing
FuzzyTaskSearch mock.
---------
Co-authored-by: Ben Vargas <ben@example.com>
- Replaced local `tasksPath` variable assignments with direct calls to `taskMaster.getTasksPath()` for consistency and clarity across multiple command functions.
- This change enhances maintainability by ensuring a single source of truth for task paths, reducing redundancy in path handling logic.
- Add grok-4 to supported models with $3/$15 per 1M token pricing
- Enable main, fallback, and research roles for grok-4
- Update models.md documentation to include grok-4 in all tables
* move claude rules and commands to assets/claude
* update claude profile to copy assets/claude to .claude
* fix formatting
* feat(profiles): Implement unified profile system
- Convert Claude and Codex profiles to use createProfile() factory
- Remove simple vs complex profile distinction in rule transformer
- Unify convertAllRulesToProfileRules() to handle all profiles consistently
- Fix mcpConfigPath construction in base-profile.js for null mcpConfigName
- Update terminology from 'simpleProfiles' to 'assetOnlyProfiles' throughout
- Ensure Claude .claude directory copying works in both CLI and MCP contexts
- All profiles now follow same execution flow with proper lifecycle functions
Changes:
- src/profiles/claude.js: Convert to createProfile() factory pattern
- src/profiles/codex.js: Convert to createProfile() factory pattern
- src/utils/rule-transformer.js: Unified profile handling logic
- src/utils/profiles.js: Remove simple profile categorization
- src/profiles/base-profile.js: Fix mcpConfigPath construction
- scripts/modules/commands.js: Update variable naming
- tests/: Update all tests for unified system and terminology
Fixes Claude profile asset copying issue in MCP context.
All tests passing (617 passed, 11 skipped).
* re-checkin claude files
* fix formatting
* chore: clean up test Claude rules files
* chore: add changeset for unified profile system
* add claude files back
* add changeset
* restore proper gitignore
* remove claude agents file from root
* remove incorrect doc
* simplify profiles and update tests
* update changeset
* update changeset
* remove profile specific code
* streamline profiles with defaults and update tests
* update changeset
* add newline at end of gitignore
* restore changes
* streamline profiles with defaults; update tests and add vscode test
* update rule profile tests
* update wording for clearer profile management
* refactor and clarify terminology
* use original projectRoot var name
* revert param desc
* use updated claude assets from neno
* add "YOUR_" before api key here
* streamline codex profile
* add gemini profile
* update gemini profile
* update tests
* relocate function
* update rules interactive setup Gemini desc
* remove duplicative code
* add comma
* feat: support MCP sampling
* support provider registry
* use standard config options for MCP provider
* update fastmcp to support passing params to requestSampling
* move key name definition to base provider
* moved check for required api key to provider class
* remove unused code
* more cleanup
* more cleanup
* refactor provider
* remove not needed files
* more cleanup
* more cleanup
* more cleanup
* update docs
* fix tests
* add tests
* format fix
* clean files
* merge fixes
* format fix
* feat: add support for MCP Sampling as AI provider
* initial mcp ai sdk
* fix references to old provider
* update models
* lint
* fix gemini-cli conflicts
* ran format
* Update src/provider-registry/index.js
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* fix circular dependency
Circular Dependency Issue ✅ FIXED
Root Cause: BaseAIProvider was importing from index.js, which includes commands.js and other modules that eventually import back to AI providers
Solution: Changed imports to use direct paths to avoid circular dependencies:
Updated base-provider.js to import log directly from utils.js
Updated gemini-cli.js to import log directly from utils.js
Result: Fixed 11 failing tests in mcp-provider.test.js
* fix gemini test
* fix(claude-code): recover from CLI JSON truncation bug (#913) (#920)
Gracefully handle SyntaxError thrown by @anthropic-ai/claude-code when the CLI truncates large JSON outputs (4–16 kB cut-offs).\n\nKey points:\n• Detect JSON parse error + existing buffered text in both doGenerate() and doStream() code paths.\n• Convert the failure into a recoverable 'truncated' finish state and push a provider-warning.\n• Allows Task Master to continue parsing long PRDs / expand-task operations instead of crashing.\n\nA patch changeset (.changeset/claude-code-json-truncation.md) is included for the next release.\n\nRef: eyaltoledano/claude-task-master#913
* docs: fix gemini-cli authentication documentation (#923)
Remove erroneous 'gemini auth login' command references and replace with correct 'gemini' command authentication flow. Update documentation to reflect proper OAuth setup process via the gemini CLI interactive interface.
* fix tests
* fix: update ai-sdk-provider-gemini-cli to 0.0.4 for improved authentication (#932)
- Fixed authentication compatibility issues with Google auth
- Added support for 'api-key' auth type alongside 'gemini-api-key'
- Resolved "Unsupported authType: undefined" runtime errors
- Updated @google/gemini-cli-core dependency to 0.1.9
- Improved documentation and removed invalid auth references
- Maintained backward compatibility while enhancing type validation
* call logging directly
Need to patch upstream fastmcp to allow easier access and bootstrap the TM mcp logger to use the fastmcp logger which today is only exposed in the tools handler
* fix tests
* removing logs until we figure out how to pass mcp logger
* format
* fix tests
* format
* clean up
* cleanup
* readme fix
---------
Co-authored-by: Oren Melamed <oren.m@gloat.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: Ben Vargas <ben@vargas.com>
* feat: implement centralized path management system with initTaskMaster
This commit introduces a comprehensive refactoring of the TaskMaster CLI's path handling system, consolidating all path resolution logic into a centralized initTaskMaster function and TaskMaster class. This architectural change eliminates circular dependencies and provides consistent path management across all CLI commands.
Key changes:
• **Created new TaskMaster class and initTaskMaster factory function** in src/task-master.js
- Centralized path resolution with boolean override logic (string = explicit path, true = required search, false/undefined = optional)
- Built-in error handling with automatic process.exit() for missing required paths
- Immutable path objects with getter methods for safe access
• **Replaced findProjectRoot() calls throughout CLI** in scripts/modules/commands.js
- Updated all 25+ CLI commands to use initTaskMaster() instead of scattered path handling
- Eliminated hundreds of lines of redundant path resolution and error handling code
- Consistent project root validation and path discovery across all commands
• **Added comprehensive test suite** in tests/unit/task-master.test.js
- 22 test cases covering project root detection, path resolution, override validation, and edge cases
- Tests use temporary directories with proper cleanup and mock process.exit/console.error
- Validates both successful scenarios and error conditions with proper exit codes
* bring Usage for Parse PRD back, and revamp initTaskMaster to throw errors not error/exit.
* fix(claude-code): recover from CLI JSON truncation bug (#913) (#920)
Gracefully handle SyntaxError thrown by @anthropic-ai/claude-code when the CLI truncates large JSON outputs (4–16 kB cut-offs).\n\nKey points:\n• Detect JSON parse error + existing buffered text in both doGenerate() and doStream() code paths.\n• Convert the failure into a recoverable 'truncated' finish state and push a provider-warning.\n• Allows Task Master to continue parsing long PRDs / expand-task operations instead of crashing.\n\nA patch changeset (.changeset/claude-code-json-truncation.md) is included for the next release.\n\nRef: eyaltoledano/claude-task-master#913
* docs: fix gemini-cli authentication documentation (#923)
Remove erroneous 'gemini auth login' command references and replace with correct 'gemini' command authentication flow. Update documentation to reflect proper OAuth setup process via the gemini CLI interactive interface.
* fix: .gitignore missing trailing newline during project initialization (#855)
* Support for Additional Anthropic Models on Bedrock (#870)
* Add additional Anthropic Models for Bedrock
* Update Models Docs from `scripts/modules/supported-models.json`
* feat(models): add additional Bedrock supported models
* docs: Auto-update and format models.md
* fix: Ensure projectRoot is a string (potential WSL fix) (#892)
* ensure projectRoot is a string
* add changeset
* Fix/spelling mistakes (#876)
* docs: Auto-update and format models.md
* fix: correct typos in documentation for parse-prd and taskmaster commands
- Updated the `parse-prd` documentation to fix the spelling of "multiple."
- Clarified the description of the `id` parameter in the `taskmaster` documentation to ensure proper syntax and readability.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix `rules` command to use reliable project root detection like other commands (#908)
* update/fix projectRoot call for consistency
* internal naming consistency
* add changeset
* fix: Subtask generation fails on gemini-2.5-pro (#852)
* fix: clarify details format in task expansion prompt
* chore: add changeset
* fix: use tag-specific complexity reports (#857)
* fix(expand-task): Use tag-specific complexity reports
- Add getTagAwareFilePath utility function to resolve tag-specific file paths
- Update expandTask to use tag-aware complexity report paths
- Fix issue where expand-task always used default complexity report
- Add comprehensive tests for getTagAwareFilePath utility
- Ensure proper handling of file extensions and directory structures
Fixes#850: Expanding tasks not using tag-specific complexity reports
The expandTask function now correctly uses complexity reports specific
to the current tag context (e.g., task-complexity-report_feature-branch.json)
instead of always using the default task-complexity-report.json file.
This enables proper task expansion behavior when working with multiple
tag contexts, ensuring complexity analysis is tag-specific and accurate.
* chore: Add changeset for tag-specific complexity reports fix
* test(expand-task): Add tests for tag-specific complexity report integration
- Introduced a new test suite for verifying the integration of tag-specific complexity reports in the expandTask function.
- Added a test case to ensure the correct complexity report is used when available for a specific tag.
- Mocked file system interactions to simulate the presence of tag-specific complexity reports.
This enhances the test coverage for task expansion behavior, ensuring it accurately reflects the complexity analysis based on the current tag context.
* refactor(task-manager): unify and simplify tag-aware file path logic and tests
- Reformatted imports and cleaned up comments in test files for readability
- Centralized mocks: moved getTagAwareFilePath & slugifyTagForFilePath
mocks to setup.js for consistency and maintainability
- Simplified utils/getTagAwareFilePath: replaced manual parsing with
path.parse() & path.format(); improved extension handling
- Enhanced test mocks for path.parse, path.format & reset path.join
in beforeEach to avoid interference
- All tests now pass consistently; no change in functionality
* fix: prevent tag corruption in bulk updates (#856)
* fix(task-manager): prevent tag corruption in bulk updates and add tag preservation test
- Fix writeJSON call in scripts/modules/task-manager/update-tasks.js (line 469) to include projectRoot and tag parameters.
- Ensure tagged task lists maintain data integrity during bulk updates, preventing task disappearance in tagged contexts.
- Update MCP tools to properly pass tag context through the call chain.
- Introduce a comprehensive test case to verify that all tags are preserved when updating tasks, covering both master and feature-branch scenarios.
Addresses an issue where bulk updates could corrupt tasks.json in tagged task list structures, reinforcing task management robustness.
* style(tests): format task data in update-tasks test
* fix: Critical writeJSON Context Fixes - Prevent Tag Corruption (#910)
* feat(tasks): Fix critical tag corruption bug in task management
- Fixed missing context parameters in writeJSON calls across add-task, remove-task, and add-subtask functions
- Added projectRoot and tag parameters to prevent data corruption in multi-tag environments
- Re-enabled generateTaskFiles calls to ensure markdown files are updated after operations
- Enhanced add_subtask MCP tool with tag parameter support
- Refactored addSubtaskDirect function to properly pass context to core logic
- Streamlined codebase by removing deprecated functionality
This resolves the critical bug where task operations in one tag context would corrupt or delete tasks from other tags in tasks.json.
* feat(task-manager): Enhance addSubtask with current tag support
- Added `getCurrentTag` utility to retrieve the current tag context for task operations.
- Updated `addSubtask` to use the current tag when reading and writing tasks, ensuring proper context handling.
- Refactored tests to accommodate changes in the `addSubtask` function, ensuring accurate mock implementations and expectations.
- Cleaned up test cases for better readability and maintainability.
This improves task management by preventing tag-related data corruption and enhances the overall functionality of the task manager.
* feat(remove-task): Add tag support for task removal and enhance error handling
- Introduced `tag` parameter in `removeTaskDirect` to specify context for task operations, improving multi-tag support.
- Updated logging to include tag context in messages for better traceability.
- Refactored task removal logic to streamline the process and improve error reporting.
- Added comprehensive unit tests to validate tag handling and ensure robust error management.
This enhancement prevents task data corruption across different tags and improves the overall reliability of the task management system.
* feat(add-task): Add projectRoot and tag parameters to addTask tests
- Updated `addTask` unit tests to include `projectRoot` and `tag` parameters for better context handling.
- Enhanced test cases to ensure accurate expectations and improve overall test coverage.
This change aligns with recent enhancements in task management, ensuring consistency across task operations.
* feat(set-task-status): Add tag parameter support and enhance task status handling
- Introduced `tag` parameter in `setTaskStatusDirect` and related functions to improve context management in multi-tag environments.
- Updated `writeJSON` calls to ensure task data integrity across different tags.
- Enhanced unit tests to validate tag preservation during task status updates, ensuring robust functionality.
This change aligns with recent improvements in task management, preventing data corruption and enhancing overall reliability.
* feat(tag-management): Enhance writeJSON calls to preserve tag context
- Updated `writeJSON` calls in `createTag`, `deleteTag`, `renameTag`, `copyTag`, and `enhanceTagsWithMetadata` to include `projectRoot` for better context management and to prevent tag corruption.
- Added comprehensive unit tests for tag management functions to ensure data integrity and proper tag handling during operations.
This change improves the reliability of tag management by ensuring that operations do not corrupt existing tags and maintains the overall structure of the task data.
* feat(expand-task): Update writeJSON to include projectRoot and tag context
- Modified `writeJSON` call in `expandTaskDirect` to pass `projectRoot` and `tag` parameters, ensuring proper context management when saving tasks.json.
- This change aligns with recent enhancements in task management, preventing potential data corruption and improving overall reliability.
* feat(fix-dependencies): Add projectRoot and tag parameters for enhanced context management
- Updated `fixDependenciesDirect` and `registerFixDependenciesTool` to include `projectRoot` and `tag` parameters, improving context handling during dependency fixes.
- Introduced a new unit test for `fixDependenciesCommand` to ensure proper preservation of projectRoot and tag data in JSON outputs.
This change enhances the reliability of dependency management by ensuring that context is maintained across operations, preventing potential data issues.
* fix(context): propagate projectRoot and tag through dependency, expansion, status-update and tag-management commands to prevent cross-tag data corruption
* test(fix-dependencies): Enhance unit tests for fixDependenciesCommand
- Refactored tests to use unstable mocks for utils, ui, and task-manager modules, improving isolation and reliability.
- Added checks for process.exit to ensure proper handling of invalid data scenarios.
- Updated test cases to verify writeJSON calls with projectRoot and tag parameters, ensuring accurate context preservation during dependency fixes.
This change strengthens the test suite for dependency management, ensuring robust functionality and preventing potential data issues.
* chore(plan): remove outdated fix plan for `writeJSON` context parameters
* feat: Add gemini-cli provider integration for Task Master (#897)
* feat: Add gemini-cli provider integration for Task Master
This commit adds comprehensive support for the Gemini CLI provider, enabling users
to leverage Google's Gemini models through OAuth authentication via the gemini CLI
tool. This integration provides a seamless experience for users who prefer using
their existing Google account authentication rather than managing API keys.
## Implementation Details
### Provider Class (`src/ai-providers/gemini-cli.js`)
- Created GeminiCliProvider extending BaseAIProvider
- Implements dual authentication support:
- Primary: OAuth authentication via `gemini auth login` (authType: 'oauth-personal')
- Secondary: API key authentication for compatibility (authType: 'api-key')
- Uses the npm package `ai-sdk-provider-gemini-cli` (v0.0.3) for SDK integration
- Properly handles authentication validation without console output
### Model Configuration (`scripts/modules/supported-models.json`)
- Added two Gemini models with accurate specifications:
- gemini-2.5-pro: 72% SWE score, 65,536 max output tokens
- gemini-2.5-flash: 71% SWE score, 65,536 max output tokens
- Both models support main, fallback, and research roles
- Configured with zero cost (free tier)
### System Integration
- Registered provider in PROVIDERS map (`scripts/modules/ai-services-unified.js`)
- Added to OPTIONAL_AUTH_PROVIDERS set for flexible authentication
- Added GEMINI_CLI constant to provider constants (`src/constants/providers.js`)
- Exported GeminiCliProvider from index (`src/ai-providers/index.js`)
### Command Line Support (`scripts/modules/commands.js`)
- Added --gemini-cli flag to models command for provider hint
- Integrated into model selection logic (setModel function)
- Updated error messages to include gemini-cli in provider list
- Removed unrelated azure/vertex changes to maintain PR focus
### Documentation (`docs/providers/gemini-cli.md`)
- Comprehensive provider documentation emphasizing OAuth-first approach
- Clear explanation of why users would choose gemini-cli over standard google provider
- Detailed installation, authentication, and configuration instructions
- Troubleshooting section with common issues and solutions
### Testing (`tests/unit/ai-providers/gemini-cli.test.js`)
- Complete test suite with 12 tests covering all functionality
- Tests for both OAuth and API key authentication paths
- Error handling and edge case coverage
- Updated mocks in ai-services-unified.test.js for integration testing
## Key Design Decisions
1. **OAuth-First Design**: The provider assumes users want to leverage their existing
`gemini auth login` credentials, making this the default authentication method.
2. **Authentication Type Mapping**: Discovered through testing that the SDK expects:
- 'oauth-personal' for OAuth/CLI authentication (not 'gemini-cli' or 'oauth')
- 'api-key' for API key authentication (not 'gemini-api-key')
3. **Silent Operation**: Removed console.log statements from validateAuth to match
the pattern used by other providers like claude-code.
4. **Limited Model Support**: Only gemini-2.5-pro and gemini-2.5-flash are available
through the CLI, as confirmed by the package author.
## Usage
```bash
# Install gemini CLI globally
npm install -g @google/gemini-cli
# Authenticate with Google account
gemini auth login
# Configure Task Master to use gemini-cli
task-master models --set-main gemini-2.5-pro --gemini-cli
# Use Task Master normally
task-master new "Create a REST API endpoint"
```
## Dependencies
- Added `ai-sdk-provider-gemini-cli@^0.0.3` to package.json
- This package wraps the Google Gemini CLI Core functionality for Vercel AI SDK
## Testing
All tests pass (613 total), including the new gemini-cli provider tests.
Code has been formatted with biome to maintain consistency.
This implementation provides a clean, well-tested integration that follows Task Master's
existing patterns while offering users a convenient way to use Gemini models with their
existing Google authentication.
* feat: implement lazy loading for gemini-cli provider
- Move ai-sdk-provider-gemini-cli to optionalDependencies
- Implement dynamic import with loadGeminiCliModule() function
- Make getClient() async to support lazy loading
- Update base-provider to handle async getClient() calls
- Update tests to handle async getClient() method
This allows the application to start without the gemini-cli package
installed, only loading it when actually needed.
* feat(gemini-cli): replace regex-based JSON extraction with jsonc-parser
- Add jsonc-parser dependency for robust JSON parsing
- Replace simple regex approach with progressive parsing strategy:
1. Direct parsing after cleanup
2. Smart boundary detection with single-pass analysis
3. Limited fallback for edge cases
- Optimize performance with early termination and strategic sampling
- Add comprehensive tests for variable declarations, trailing commas,
escaped quotes, nested objects, and performance edge cases
- Improve reliability for complex JSON structures that Gemini commonly produces
- Fix code formatting with biome
This addresses JSON parsing failures in generateObject operations while
maintaining backward compatibility and significantly improving performance
for large responses.
* fix: update package-lock.json and fix formatting for CI/CD
- Add jsonc-parser to package-lock.json for proper npm ci compatibility
- Fix biome formatting issues in gemini-cli provider and tests
- Ensure all CI/CD checks pass
* feat(gemini-cli): implement comprehensive JSON output reliability system
- Add automatic JSON request detection via content analysis patterns
- Implement task-specific prompt simplification for improved AI compliance
- Add strict JSON enforcement through enhanced system prompts
- Implement response interception with intelligent JSON extraction fallback
- Add comprehensive test coverage for all new JSON handling methods
- Move debug logging to appropriate level for clean user experience
This multi-layered approach addresses gemini-cli's conversational response
tendencies, ensuring reliable structured JSON output for task expansion
operations. Achieves 100% success rate in end-to-end testing while
maintaining full backward compatibility with existing functionality.
Technical implementation includes:
• JSON detection via user message content analysis
• Expand-task prompt simplification with cleaner instructions
• System prompt enhancement with strict JSON enforcement
• Response processing with jsonc-parser-based extraction
• Comprehensive unit test coverage for edge cases
• Debug-level logging to prevent user interface clutter
Resolves: gemini-cli JSON formatting inconsistencies
Tested: All 46 test suites pass, formatting verified
* chore: add changeset for gemini-cli provider implementation
Adds minor version bump for comprehensive gemini-cli provider with:
- Lazy loading and optional dependency management
- Advanced JSON parsing with jsonc-parser
- Multi-layer reliability system for structured output
- Complete test coverage and CI/CD compliance
* refactor: consolidate optional auth provider logic
- Add gemini-cli to existing providersWithoutApiKeys array in config-manager
- Export providersWithoutApiKeys for reuse across modules
- Remove duplicate OPTIONAL_AUTH_PROVIDERS Set from ai-services-unified
- Update ai-services-unified to import and use centralized array
- Fix Jest mock to include new providersWithoutApiKeys export
This eliminates code duplication and provides a single source of truth
for which providers support optional authentication, addressing PR
reviewer feedback about existing similar functionality in src/constants.
* docs: Auto-update and format models.md
* Feat: Added automatic determination of task number based on complexity (#884)
- Added 'defaultNumTasks: 10' to default config, now used in 'parse-prd'
- Adjusted 'parse-prd' and 'expand-task' to:
- Accept a 'numTasks' value of 0
- Updated tool and command descriptions
- Updated prompts to 'an appropriate number of' when value is 0
- Updated 'README-task-master.md' and 'command-reference.md' docs
- Added more tests for: 'parse-prd', 'expand-task' and 'config-manager'
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* feat: Support custom response language (#510)
* feat: Support custom response language
* fix: Add default values for response language in config-manager.js
* chore: Update configuration file and add default response language settings
* feat: Support MCP/CLI custom response language
* chore: Update test comments to English for consistency
* docs: Auto-update and format models.md
* chore: fix format
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* Feat: Implemented advanced settings for Claude Code AI provider (#872)
* Feat: Implemented advanced settings for Claude Code AI provider
- Added new 'claudeCode' property to default config
- Added getters and validation functions to 'config-manager.js'
- Added new 'isEmpty' utility to 'utils.js'
- Added new constants file 'commands.js' for AI_COMMAND_NAMES
- Updated Claude Code AI provider to use new config functions
- Updated 'claude-code-usage.md' documentation
- Added 'config-manager.test.js' tests to cover new settings
* chore: run format
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* fix: issues with release (#915)
Fix remove-task bug with mcp
Fix response-language using old config file .taskmaster
* fix(claude-code): recover from CLI JSON truncation bug (#913) (#920)
Gracefully handle SyntaxError thrown by @anthropic-ai/claude-code when the CLI truncates large JSON outputs (4–16 kB cut-offs).\n\nKey points:\n• Detect JSON parse error + existing buffered text in both doGenerate() and doStream() code paths.\n• Convert the failure into a recoverable 'truncated' finish state and push a provider-warning.\n• Allows Task Master to continue parsing long PRDs / expand-task operations instead of crashing.\n\nA patch changeset (.changeset/claude-code-json-truncation.md) is included for the next release.\n\nRef: eyaltoledano/claude-task-master#913
* docs: fix gemini-cli authentication documentation (#923)
Remove erroneous 'gemini auth login' command references and replace with correct 'gemini' command authentication flow. Update documentation to reflect proper OAuth setup process via the gemini CLI interactive interface.
* chore: run format
* fix: add initTaskMaster to new commands
Fixes CI and broken commands
* chore: format
---------
Co-authored-by: Chris Covington <chris.covington@hey.com>
Co-authored-by: Ben Vargas <ben@vargas.com>
Co-authored-by: Joe Danziger <joe@ticc.net>
Co-authored-by: Nicholas Spalding <nishedcob@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ofer Shaal <oshaal@phase2technology.com>
Co-authored-by: Shandy Hermawan <hrm.shandy05@gmail.com>
Co-authored-by: Parthy <52548018+mm-parthy@users.noreply.github.com>
Co-authored-by: Geoff Hammond <geoff@geoffhammond.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: shenysun <40556411+shenysun@users.noreply.github.com>
* feat: Add GROQ API key support and integrate GROQ provider
* feat: Add support for Groq provider
- Added a new changeset documenting the addition of Groq provider support.
-Ran npm run format
* feat: Add support for Groq provider
- Added a new changeset documenting the addition of Groq provider support.
-Ran npm run format
Remove erroneous 'gemini auth login' command references and replace with correct 'gemini' command authentication flow. Update documentation to reflect proper OAuth setup process via the gemini CLI interactive interface.
Gracefully handle SyntaxError thrown by @anthropic-ai/claude-code when the CLI truncates large JSON outputs (4–16 kB cut-offs).\n\nKey points:\n• Detect JSON parse error + existing buffered text in both doGenerate() and doStream() code paths.\n• Convert the failure into a recoverable 'truncated' finish state and push a provider-warning.\n• Allows Task Master to continue parsing long PRDs / expand-task operations instead of crashing.\n\nA patch changeset (.changeset/claude-code-json-truncation.md) is included for the next release.\n\nRef: eyaltoledano/claude-task-master#913
* Feat: Implemented advanced settings for Claude Code AI provider
- Added new 'claudeCode' property to default config
- Added getters and validation functions to 'config-manager.js'
- Added new 'isEmpty' utility to 'utils.js'
- Added new constants file 'commands.js' for AI_COMMAND_NAMES
- Updated Claude Code AI provider to use new config functions
- Updated 'claude-code-usage.md' documentation
- Added 'config-manager.test.js' tests to cover new settings
* chore: run format
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* feat: Support custom response language
* fix: Add default values for response language in config-manager.js
* chore: Update configuration file and add default response language settings
* feat: Support MCP/CLI custom response language
* chore: Update test comments to English for consistency
* docs: Auto-update and format models.md
* chore: fix format
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
- Added 'defaultNumTasks: 10' to default config, now used in 'parse-prd'
- Adjusted 'parse-prd' and 'expand-task' to:
- Accept a 'numTasks' value of 0
- Updated tool and command descriptions
- Updated prompts to 'an appropriate number of' when value is 0
- Updated 'README-task-master.md' and 'command-reference.md' docs
- Added more tests for: 'parse-prd', 'expand-task' and 'config-manager'
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* feat: Add gemini-cli provider integration for Task Master
This commit adds comprehensive support for the Gemini CLI provider, enabling users
to leverage Google's Gemini models through OAuth authentication via the gemini CLI
tool. This integration provides a seamless experience for users who prefer using
their existing Google account authentication rather than managing API keys.
## Implementation Details
### Provider Class (`src/ai-providers/gemini-cli.js`)
- Created GeminiCliProvider extending BaseAIProvider
- Implements dual authentication support:
- Primary: OAuth authentication via `gemini auth login` (authType: 'oauth-personal')
- Secondary: API key authentication for compatibility (authType: 'api-key')
- Uses the npm package `ai-sdk-provider-gemini-cli` (v0.0.3) for SDK integration
- Properly handles authentication validation without console output
### Model Configuration (`scripts/modules/supported-models.json`)
- Added two Gemini models with accurate specifications:
- gemini-2.5-pro: 72% SWE score, 65,536 max output tokens
- gemini-2.5-flash: 71% SWE score, 65,536 max output tokens
- Both models support main, fallback, and research roles
- Configured with zero cost (free tier)
### System Integration
- Registered provider in PROVIDERS map (`scripts/modules/ai-services-unified.js`)
- Added to OPTIONAL_AUTH_PROVIDERS set for flexible authentication
- Added GEMINI_CLI constant to provider constants (`src/constants/providers.js`)
- Exported GeminiCliProvider from index (`src/ai-providers/index.js`)
### Command Line Support (`scripts/modules/commands.js`)
- Added --gemini-cli flag to models command for provider hint
- Integrated into model selection logic (setModel function)
- Updated error messages to include gemini-cli in provider list
- Removed unrelated azure/vertex changes to maintain PR focus
### Documentation (`docs/providers/gemini-cli.md`)
- Comprehensive provider documentation emphasizing OAuth-first approach
- Clear explanation of why users would choose gemini-cli over standard google provider
- Detailed installation, authentication, and configuration instructions
- Troubleshooting section with common issues and solutions
### Testing (`tests/unit/ai-providers/gemini-cli.test.js`)
- Complete test suite with 12 tests covering all functionality
- Tests for both OAuth and API key authentication paths
- Error handling and edge case coverage
- Updated mocks in ai-services-unified.test.js for integration testing
## Key Design Decisions
1. **OAuth-First Design**: The provider assumes users want to leverage their existing
`gemini auth login` credentials, making this the default authentication method.
2. **Authentication Type Mapping**: Discovered through testing that the SDK expects:
- 'oauth-personal' for OAuth/CLI authentication (not 'gemini-cli' or 'oauth')
- 'api-key' for API key authentication (not 'gemini-api-key')
3. **Silent Operation**: Removed console.log statements from validateAuth to match
the pattern used by other providers like claude-code.
4. **Limited Model Support**: Only gemini-2.5-pro and gemini-2.5-flash are available
through the CLI, as confirmed by the package author.
## Usage
```bash
# Install gemini CLI globally
npm install -g @google/gemini-cli
# Authenticate with Google account
gemini auth login
# Configure Task Master to use gemini-cli
task-master models --set-main gemini-2.5-pro --gemini-cli
# Use Task Master normally
task-master new "Create a REST API endpoint"
```
## Dependencies
- Added `ai-sdk-provider-gemini-cli@^0.0.3` to package.json
- This package wraps the Google Gemini CLI Core functionality for Vercel AI SDK
## Testing
All tests pass (613 total), including the new gemini-cli provider tests.
Code has been formatted with biome to maintain consistency.
This implementation provides a clean, well-tested integration that follows Task Master's
existing patterns while offering users a convenient way to use Gemini models with their
existing Google authentication.
* feat: implement lazy loading for gemini-cli provider
- Move ai-sdk-provider-gemini-cli to optionalDependencies
- Implement dynamic import with loadGeminiCliModule() function
- Make getClient() async to support lazy loading
- Update base-provider to handle async getClient() calls
- Update tests to handle async getClient() method
This allows the application to start without the gemini-cli package
installed, only loading it when actually needed.
* feat(gemini-cli): replace regex-based JSON extraction with jsonc-parser
- Add jsonc-parser dependency for robust JSON parsing
- Replace simple regex approach with progressive parsing strategy:
1. Direct parsing after cleanup
2. Smart boundary detection with single-pass analysis
3. Limited fallback for edge cases
- Optimize performance with early termination and strategic sampling
- Add comprehensive tests for variable declarations, trailing commas,
escaped quotes, nested objects, and performance edge cases
- Improve reliability for complex JSON structures that Gemini commonly produces
- Fix code formatting with biome
This addresses JSON parsing failures in generateObject operations while
maintaining backward compatibility and significantly improving performance
for large responses.
* fix: update package-lock.json and fix formatting for CI/CD
- Add jsonc-parser to package-lock.json for proper npm ci compatibility
- Fix biome formatting issues in gemini-cli provider and tests
- Ensure all CI/CD checks pass
* feat(gemini-cli): implement comprehensive JSON output reliability system
- Add automatic JSON request detection via content analysis patterns
- Implement task-specific prompt simplification for improved AI compliance
- Add strict JSON enforcement through enhanced system prompts
- Implement response interception with intelligent JSON extraction fallback
- Add comprehensive test coverage for all new JSON handling methods
- Move debug logging to appropriate level for clean user experience
This multi-layered approach addresses gemini-cli's conversational response
tendencies, ensuring reliable structured JSON output for task expansion
operations. Achieves 100% success rate in end-to-end testing while
maintaining full backward compatibility with existing functionality.
Technical implementation includes:
• JSON detection via user message content analysis
• Expand-task prompt simplification with cleaner instructions
• System prompt enhancement with strict JSON enforcement
• Response processing with jsonc-parser-based extraction
• Comprehensive unit test coverage for edge cases
• Debug-level logging to prevent user interface clutter
Resolves: gemini-cli JSON formatting inconsistencies
Tested: All 46 test suites pass, formatting verified
* chore: add changeset for gemini-cli provider implementation
Adds minor version bump for comprehensive gemini-cli provider with:
- Lazy loading and optional dependency management
- Advanced JSON parsing with jsonc-parser
- Multi-layer reliability system for structured output
- Complete test coverage and CI/CD compliance
* refactor: consolidate optional auth provider logic
- Add gemini-cli to existing providersWithoutApiKeys array in config-manager
- Export providersWithoutApiKeys for reuse across modules
- Remove duplicate OPTIONAL_AUTH_PROVIDERS Set from ai-services-unified
- Update ai-services-unified to import and use centralized array
- Fix Jest mock to include new providersWithoutApiKeys export
This eliminates code duplication and provides a single source of truth
for which providers support optional authentication, addressing PR
reviewer feedback about existing similar functionality in src/constants.
* feat(tasks): Fix critical tag corruption bug in task management
- Fixed missing context parameters in writeJSON calls across add-task, remove-task, and add-subtask functions
- Added projectRoot and tag parameters to prevent data corruption in multi-tag environments
- Re-enabled generateTaskFiles calls to ensure markdown files are updated after operations
- Enhanced add_subtask MCP tool with tag parameter support
- Refactored addSubtaskDirect function to properly pass context to core logic
- Streamlined codebase by removing deprecated functionality
This resolves the critical bug where task operations in one tag context would corrupt or delete tasks from other tags in tasks.json.
* feat(task-manager): Enhance addSubtask with current tag support
- Added `getCurrentTag` utility to retrieve the current tag context for task operations.
- Updated `addSubtask` to use the current tag when reading and writing tasks, ensuring proper context handling.
- Refactored tests to accommodate changes in the `addSubtask` function, ensuring accurate mock implementations and expectations.
- Cleaned up test cases for better readability and maintainability.
This improves task management by preventing tag-related data corruption and enhances the overall functionality of the task manager.
* feat(remove-task): Add tag support for task removal and enhance error handling
- Introduced `tag` parameter in `removeTaskDirect` to specify context for task operations, improving multi-tag support.
- Updated logging to include tag context in messages for better traceability.
- Refactored task removal logic to streamline the process and improve error reporting.
- Added comprehensive unit tests to validate tag handling and ensure robust error management.
This enhancement prevents task data corruption across different tags and improves the overall reliability of the task management system.
* feat(add-task): Add projectRoot and tag parameters to addTask tests
- Updated `addTask` unit tests to include `projectRoot` and `tag` parameters for better context handling.
- Enhanced test cases to ensure accurate expectations and improve overall test coverage.
This change aligns with recent enhancements in task management, ensuring consistency across task operations.
* feat(set-task-status): Add tag parameter support and enhance task status handling
- Introduced `tag` parameter in `setTaskStatusDirect` and related functions to improve context management in multi-tag environments.
- Updated `writeJSON` calls to ensure task data integrity across different tags.
- Enhanced unit tests to validate tag preservation during task status updates, ensuring robust functionality.
This change aligns with recent improvements in task management, preventing data corruption and enhancing overall reliability.
* feat(tag-management): Enhance writeJSON calls to preserve tag context
- Updated `writeJSON` calls in `createTag`, `deleteTag`, `renameTag`, `copyTag`, and `enhanceTagsWithMetadata` to include `projectRoot` for better context management and to prevent tag corruption.
- Added comprehensive unit tests for tag management functions to ensure data integrity and proper tag handling during operations.
This change improves the reliability of tag management by ensuring that operations do not corrupt existing tags and maintains the overall structure of the task data.
* feat(expand-task): Update writeJSON to include projectRoot and tag context
- Modified `writeJSON` call in `expandTaskDirect` to pass `projectRoot` and `tag` parameters, ensuring proper context management when saving tasks.json.
- This change aligns with recent enhancements in task management, preventing potential data corruption and improving overall reliability.
* feat(fix-dependencies): Add projectRoot and tag parameters for enhanced context management
- Updated `fixDependenciesDirect` and `registerFixDependenciesTool` to include `projectRoot` and `tag` parameters, improving context handling during dependency fixes.
- Introduced a new unit test for `fixDependenciesCommand` to ensure proper preservation of projectRoot and tag data in JSON outputs.
This change enhances the reliability of dependency management by ensuring that context is maintained across operations, preventing potential data issues.
* fix(context): propagate projectRoot and tag through dependency, expansion, status-update and tag-management commands to prevent cross-tag data corruption
* test(fix-dependencies): Enhance unit tests for fixDependenciesCommand
- Refactored tests to use unstable mocks for utils, ui, and task-manager modules, improving isolation and reliability.
- Added checks for process.exit to ensure proper handling of invalid data scenarios.
- Updated test cases to verify writeJSON calls with projectRoot and tag parameters, ensuring accurate context preservation during dependency fixes.
This change strengthens the test suite for dependency management, ensuring robust functionality and preventing potential data issues.
* chore(plan): remove outdated fix plan for `writeJSON` context parameters
* fix(task-manager): prevent tag corruption in bulk updates and add tag preservation test
- Fix writeJSON call in scripts/modules/task-manager/update-tasks.js (line 469) to include projectRoot and tag parameters.
- Ensure tagged task lists maintain data integrity during bulk updates, preventing task disappearance in tagged contexts.
- Update MCP tools to properly pass tag context through the call chain.
- Introduce a comprehensive test case to verify that all tags are preserved when updating tasks, covering both master and feature-branch scenarios.
Addresses an issue where bulk updates could corrupt tasks.json in tagged task list structures, reinforcing task management robustness.
* style(tests): format task data in update-tasks test
* fix(expand-task): Use tag-specific complexity reports
- Add getTagAwareFilePath utility function to resolve tag-specific file paths
- Update expandTask to use tag-aware complexity report paths
- Fix issue where expand-task always used default complexity report
- Add comprehensive tests for getTagAwareFilePath utility
- Ensure proper handling of file extensions and directory structures
Fixes#850: Expanding tasks not using tag-specific complexity reports
The expandTask function now correctly uses complexity reports specific
to the current tag context (e.g., task-complexity-report_feature-branch.json)
instead of always using the default task-complexity-report.json file.
This enables proper task expansion behavior when working with multiple
tag contexts, ensuring complexity analysis is tag-specific and accurate.
* chore: Add changeset for tag-specific complexity reports fix
* test(expand-task): Add tests for tag-specific complexity report integration
- Introduced a new test suite for verifying the integration of tag-specific complexity reports in the expandTask function.
- Added a test case to ensure the correct complexity report is used when available for a specific tag.
- Mocked file system interactions to simulate the presence of tag-specific complexity reports.
This enhances the test coverage for task expansion behavior, ensuring it accurately reflects the complexity analysis based on the current tag context.
* refactor(task-manager): unify and simplify tag-aware file path logic and tests
- Reformatted imports and cleaned up comments in test files for readability
- Centralized mocks: moved getTagAwareFilePath & slugifyTagForFilePath
mocks to setup.js for consistency and maintainability
- Simplified utils/getTagAwareFilePath: replaced manual parsing with
path.parse() & path.format(); improved extension handling
- Enhanced test mocks for path.parse, path.format & reset path.join
in beforeEach to avoid interference
- All tests now pass consistently; no change in functionality
* docs: Auto-update and format models.md
* fix: correct typos in documentation for parse-prd and taskmaster commands
- Updated the `parse-prd` documentation to fix the spelling of "multiple."
- Clarified the description of the `id` parameter in the `taskmaster` documentation to ensure proper syntax and readability.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* add compatible platform api support
* Adjust the code according to the suggestions
* Fully revised as requested: restored all required checks, improved compatibility, and converted all comments to English.
* feat: Add support for compatible API endpoints via baseURL
* chore: Add changeset for compatible API support
* chore: cleanup
* chore: improve changeset
* fix: package-lock.json
* fix: package-lock.json
---------
Co-authored-by: He-Xun <1226807142@qq.com>
This functionality was out of scope for the Claude Code provider PR.
The automatic updating of maxTokens values in config.json during
initialization is a general improvement that should be in a separate PR.
Additionally, Claude Code ignores maxTokens and temperature parameters
anyway, making this change irrelevant for the Claude Code integration.
Removed:
- scripts/modules/update-config-tokens.js
- Import and usage in scripts/init.js
This change makes the Claude Code SDK package optional, preventing installation failures for users who don't need Claude Code functionality.
Changes:
- Added @anthropic-ai/claude-code to optionalDependencies in package.json
- Implemented lazy loading in language-model.js to only import the SDK when actually used
- Updated documentation to explain the optional installation requirement
- Applied formatting fixes to ensure code consistency
Benefits:
- Users without Claude Code subscriptions don't need to install the dependency
- Reduces package size for users who don't use Claude Code
- Prevents installation failures if the package is unavailable
- Provides clear error messages when the package is needed but not installed
The implementation uses dynamic imports to load the SDK only when doGenerate() or doStream() is called, ensuring the provider can be instantiated without the package present.
Implements Claude Code as a new AI provider that uses the Claude Code CLI
without requiring API keys. This enables users to leverage Claude models
through their local Claude Code installation.
Key changes:
- Add complete AI SDK v1 implementation for Claude Code provider
- Custom SDK with streaming/non-streaming support
- Session management for conversation continuity
- JSON extraction for object generation mode
- Support for advanced settings (maxTurns, allowedTools, etc.)
- Integrate Claude Code into Task Master's provider system
- Update ai-services-unified.js to handle keyless authentication
- Add provider to supported-models.json with opus/sonnet models
- Ensure correct maxTokens values are applied (opus: 32000, sonnet: 64000)
- Fix maxTokens configuration issue
- Add max_tokens property to getAvailableModels() output
- Update setModel() to properly handle claude-code models
- Create update-config-tokens.js utility for init process
- Add comprehensive documentation
- User guide with configuration examples
- Advanced settings explanation and future integration options
The implementation maintains full backward compatibility with existing
providers while adding seamless Claude Code support to all Task Master
commands.
* feat: Add pyproject.toml as project root marker - Added 'pyproject.toml' to the project markers array in findProjectRoot() - Enables Task Master to recognize Python projects using pyproject.toml - Improves project root detection for modern Python development workflows - Maintains compatibility with existing Node.js and Git-based detection
* chore: add changeset
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* fix(expand): Fix tag corruption in expand command - Fix tag parameter passing through MCP expand-task flow - Add tag parameter to direct function and tool registration - Fix contextGatherer method name from _buildDependencyContext to _buildDependencyGraphs - Add comprehensive test coverage for tag handling in expand-task - Ensures tagged task structure is preserved during expansion - Prevents corruption when tag is undefined. Fixes expand command causing tag corruption in tagged task lists. All existing tests pass and new test coverage added.
* test(e2e): Add comprehensive tag-aware expand testing to verify tag corruption fix - Add new test section for feature-expand tag creation and testing - Verify tag preservation during expand, force expand, and expand --all operations - Test that master tag remains intact and feature-expand tag receives subtasks correctly - Fix file path references to use correct .taskmaster/tasks/tasks.json location - Fix config file check to use .taskmaster/config.json instead of .taskmasterconfig - All tag corruption verification tests pass successfully in E2E test
* fix(changeset): Update E2E test improvements changeset to properly reflect tag corruption fix verification
* chore(changeset): combine duplicate changesets for expand tag corruption fix
Merge eighty-breads-wonder.md into bright-llamas-enter.md to consolidate
the expand command fix and its comprehensive E2E testing enhancements
into a single changeset entry.
* Delete .changeset/eighty-breads-wonder.md
* Version Packages
* chore: fix package.json
* fix(expand): Enhance context handling in expandAllTasks function
- Added `tag` to context destructuring for better context management.
- Updated `readJSON` call to include `contextTag` for improved data integrity.
- Ensured the correct tag is passed during task expansion to prevent tag corruption.
---------
Co-authored-by: Parththipan Thaniperumkarunai <parththipan.thaniperumkarunai@milkmonkey.de>
Co-authored-by: Parthy <52548018+mm-parthy@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix(bedrock): improve AWS credential handling and add model definitions
- Change error to warning when AWS credentials are missing in environment
- Allow fallback to system configuration (aws config files or instance profiles)
- Remove hardcoded region and profile parameters in Bedrock client
- Add Claude 3.7 Sonnet and DeepSeek R1 model definitions for Bedrock
- Update config manager to properly handle Bedrock provider
* chore: cleanup and format and small refactor
---------
Co-authored-by: Ray Krueger <raykrueger@gmail.com>
* fix: switch to ESM export to avoid mixed format
The CLI entrypoint was using `module.exports` alongside ESM `import` statements,
resulting in an invalid mixed module format. Replaced the CommonJS export with
a proper ESM `export` to maintain consistency and prevent module resolution issues.
* chore: add changeset
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* chore(docs): update docs and rules related to model management.
* feat(ai): Add OpenRouter AI provider support
Integrates the OpenRouter AI provider using the Vercel AI SDK adapter (@openrouter/ai-sdk-provider). This allows users to configure and utilize models available through the OpenRouter platform.
- Added src/ai-providers/openrouter.js with standard Vercel AI SDK wrapper functions (generateText, streamText, generateObject).
- Updated ai-services-unified.js to include the OpenRouter provider in the PROVIDER_FUNCTIONS map and API key resolution logic.
- Verified config-manager.js handles OpenRouter API key checks correctly.
- Users can configure OpenRouter models via .taskmasterconfig using the task-master models command or MCP models tool. Requires OPENROUTER_API_KEY.
- Enhanced error handling in ai-services-unified.js to provide clearer messages when generateObjectService fails due to lack of underlying tool support in the selected model/provider endpoint.
* feat(cli): Add --status/-s filter flag to show command and get-task MCP tool
Implements the ability to filter subtasks displayed by the `task-master show <id>` command using the `--status` (or `-s`) flag. This is also available in the MCP context.
- Modified `commands.js` to add the `--status` option to the `show` command definition.
- Updated `utils.js` (`findTaskById`) to handle the filtering logic and return original subtask counts/arrays when filtering.
- Updated `ui.js` (`displayTaskById`) to use the filtered subtasks for the table, display a summary line when filtering, and use the original subtask list for the progress bar calculation.
- Updated MCP `get_task` tool and `showTaskDirect` function to accept and pass the `status` parameter.
- Added changeset entry.
* fix(tasks): Improve next task logic to be subtask-aware
* fix(tasks): Enable removing multiple tasks/subtasks via comma-separated IDs
- Refactors the core `removeTask` function (`task-manager/remove-task.js`) to accept and iterate over comma-separated task/subtask IDs.
- Updates dependency cleanup and file regeneration logic to run once after processing all specified IDs.
- Adjusts the `remove-task` CLI command (`commands.js`) description and confirmation prompt to handle multiple IDs correctly.
- Fixes a bug in the CLI confirmation prompt where task/subtask titles were not being displayed correctly.
- Updates the `remove_task` MCP tool description to reflect the new multi-ID capability.
This addresses the previously known issue where only the first ID in a comma-separated list was processed.
Closes#140
* Update README.md (#342)
* Update Discord badge (#337)
* refactor(init): Improve robustness and dependencies; Update template deps for AI SDKs; Silence npm install in MCP; Improve conditional model setup logic; Refactor init.js flags; Tweak Getting Started text; Fix MCP server launch command; Update default model in config template
* Refactor: Improve MCP logging, update E2E & tests
Refactors MCP server logging and updates testing infrastructure.
- MCP Server:
- Replaced manual logger wrappers with centralized `createLogWrapper` utility.
- Updated direct function calls to use `{ session, mcpLog }` context.
- Removed deprecated `model` parameter from analyze, expand-all, expand-task tools.
- Adjusted MCP tool import paths and parameter descriptions.
- Documentation:
- Modified `docs/configuration.md`.
- Modified `docs/tutorial.md`.
- Testing:
- E2E Script (`run_e2e.sh`):
- Removed `set -e`.
- Added LLM analysis function (`analyze_log_with_llm`) & integration.
- Adjusted test run directory creation timing.
- Added debug echo statements.
- Deleted Unit Tests: Removed `ai-client-factory.test.js`, `ai-client-utils.test.js`, `ai-services.test.js`.
- Modified Fixtures: Updated `scripts/task-complexity-report.json`.
- Dev Scripts:
- Modified `scripts/dev.js`.
* chore(tests): Passes tests for merge candidate
- Adjusted the interactive model default choice to be 'no change' instead of 'cancel setup'
- E2E script has been perfected and works as designed provided there are all provider API keys .env in the root
- Fixes the entire test suite to make sure it passes with the new architecture.
- Fixes dependency command to properly show there is a validation failure if there is one.
- Refactored config-manager.test.js mocking strategy and fixed assertions to read the real supported-models.json
- Fixed rule-transformer.test.js assertion syntax and transformation logic adjusting replacement for search which was too broad.
- Skip unstable tests in utils.test.js (log, readJSON, writeJSON error paths) due to SIGABRT crash. These tests trigger a native crash (SIGABRT), likely stemming from a conflict between internal chalk usage within the functions and Jest's test environment, possibly related to ESM module handling.
* chore(wtf): removes chai. not sure how that even made it in here. also removes duplicate test in scripts/.
* fix: ensure API key detection properly reads .env in MCP context
Problem:
- Task Master model configuration wasn't properly checking for API keys in the project's .env file when running through MCP
- The isApiKeySet function was only checking session.env and process.env but not inspecting the .env file directly
- This caused incorrect API key status reporting in MCP tools even when keys were properly set in .env
Solution:
- Modified resolveEnvVariable function in utils.js to properly read from .env file at projectRoot
- Updated isApiKeySet to correctly pass projectRoot to resolveEnvVariable
- Enhanced the key detection logic to have consistent behavior between CLI and MCP contexts
- Maintains the correct precedence: session.env → .env file → process.env
Testing:
- Verified working correctly with both MCP and CLI tools
- API keys properly detected in .env file in both contexts
- Deleted .cursor/mcp.json to confirm introspection of .env as fallback works
* fix(update): pass projectRoot through update command flow
Modified ai-services-unified.js, update.js tool, and update-tasks.js direct function to correctly pass projectRoot. This enables the .env file API key fallback mechanism for the update command when running via MCP, ensuring consistent key resolution with the CLI context.
* fix(analyze-complexity): pass projectRoot through analyze-complexity flow
Modified analyze-task-complexity.js core function, direct function, and analyze.js tool to correctly pass projectRoot. Fixed import error in tools/index.js. Added debug logging to _resolveApiKey in ai-services-unified.js. This enables the .env API key fallback for analyze_project_complexity.
* fix(add-task): pass projectRoot and fix logging/refs
Modified add-task core, direct function, and tool to pass projectRoot for .env API key fallback. Fixed logFn reference error and removed deprecated reportProgress call in core addTask function. Verified working.
* fix(parse-prd): pass projectRoot and fix schema/logging
Modified parse-prd core, direct function, and tool to pass projectRoot for .env API key fallback. Corrected Zod schema used in generateObjectService call. Fixed logFn reference error in core parsePRD. Updated unit test mock for utils.js.
* fix(update-task): pass projectRoot and adjust parsing
Modified update-task-by-id core, direct function, and tool to pass projectRoot. Reverted parsing logic in core function to prioritize `{...}` extraction, resolving parsing errors. Fixed ReferenceError by correctly destructuring projectRoot.
* fix(update-subtask): pass projectRoot and allow updating done subtasks
Modified update-subtask-by-id core, direct function, and tool to pass projectRoot for .env API key fallback. Removed check preventing appending details to completed subtasks.
* fix(mcp, expand): pass projectRoot through expand/expand-all flows
Problem: expand_task & expand_all MCP tools failed with .env keys due to missing projectRoot propagation for API key resolution. Also fixed a ReferenceError: wasSilent is not defined in expandTaskDirect.
Solution: Modified core logic, direct functions, and MCP tools for expand-task and expand-all to correctly destructure projectRoot from arguments and pass it down through the context object to the AI service call (generateTextService). Fixed wasSilent scope in expandTaskDirect.
Verification: Tested expand_task successfully in MCP using .env keys. Reviewed expand_all flow for correct projectRoot propagation.
* chore: prettier
* fix(expand-all): add projectRoot to expandAllTasksDirect invokation.
* fix(update-tasks): Improve AI response parsing for 'update' command
Refactors the JSON array parsing logic within
in .
The previous logic primarily relied on extracting content from markdown
code blocks (json or javascript), which proved brittle when the AI
response included comments or non-JSON text within the block, leading to
parsing errors for the command.
This change modifies the parsing strategy to first attempt extracting
content directly between the outermost '[' and ']' brackets. This is
more robust as it targets the expected array structure directly. If
bracket extraction fails, it falls back to looking for a strict json
code block, then prefix stripping, before attempting a raw parse.
This approach aligns with the successful parsing strategy used for
single-object responses in and resolves the
parsing errors previously observed with the command.
* refactor(mcp): introduce withNormalizedProjectRoot HOF for path normalization
Added HOF to mcp tools utils to normalize projectRoot from args/session. Refactored get-task tool to use HOF. Updated relevant documentation.
* refactor(mcp): apply withNormalizedProjectRoot HOF to update tool
Problem: The MCP tool previously handled project root acquisition and path resolution within its method, leading to potential inconsistencies and repetition.
Solution: Refactored the tool () to utilize the new Higher-Order Function (HOF) from .
Specific Changes:
- Imported HOF.
- Updated the Zod schema for the parameter to be optional, as the HOF handles deriving it from the session if not provided.
- Wrapped the entire function body with the HOF.
- Removed the manual call to from within the function body.
- Destructured the from the object received by the wrapped function, ensuring it's the normalized path provided by the HOF.
- Used the normalized variable when calling and when passing arguments to .
This change standardizes project root handling for the tool, simplifies its method, and ensures consistent path normalization. This serves as the pattern for refactoring other MCP tools.
* fix: apply to all tools withNormalizedProjectRoot to fix projectRoot issues for linux and windows
* fix: add rest of tools that need wrapper
* chore: cleanup tools to stop using rootFolder and remove unused imports
* chore: more cleanup
* refactor: Improve update-subtask, consolidate utils, update config
This commit introduces several improvements and refactorings across MCP tools, core logic, and configuration.
**Major Changes:**
1. **Refactor updateSubtaskById:**
- Switched from generateTextService to generateObjectService for structured AI responses, using a Zod schema (subtaskSchema) for validation.
- Revised prompts to have the AI generate relevant content based on user request and context (parent/sibling tasks), while explicitly preventing AI from handling timestamp/tag formatting.
- Implemented **local timestamp generation (new Date().toISOString()) and formatting** (using <info added on ...> tags) within the function *after* receiving the AI response. This ensures reliable and correctly formatted details are appended.
- Corrected logic to append only the locally formatted, AI-generated content block to the existing subtask.details.
2. **Consolidate MCP Utilities:**
- Moved/consolidated the withNormalizedProjectRoot HOF into mcp-server/src/tools/utils.js.
- Updated MCP tools (like update-subtask.js) to import withNormalizedProjectRoot from the new location.
3. **Refactor Project Initialization:**
- Deleted the redundant mcp-server/src/core/direct-functions/initialize-project-direct.js file.
- Updated mcp-server/src/core/task-master-core.js to import initializeProjectDirect from its correct location (./direct-functions/initialize-project.js).
**Other Changes:**
- Updated .taskmasterconfig fallback model to claude-3-7-sonnet-20250219.
- Clarified model cost representation in the models tool description (taskmaster.mdc and mcp-server/src/tools/models.js).
* fix: displayBanner logging when silentMode is active (#385)
* fix: improve error handling, test options, and model configuration
- Enhance error validation in parse-prd.js and update-tasks.js
- Fix bug where mcpLog was incorrectly passed as logWrapper
- Improve error messages and response formatting
- Add --skip-verification flag to E2E tests
- Update MCP server config that ships with init to match new API key structure
- Fix task force/append handling in parse-prd command
- Increase column width in update-tasks display
* chore: fixes parse prd to show loading indicator in cli.
* fix(parse-prd): suggested fix for mcpLog was incorrect. reverting to my previously working code.
* chore(init): No longer ships readme with task-master init (commented out for now). No longer looking for task-master-mcp, instead checked for task-master-ai - this should prevent the init sequence from needlessly adding another mcp server with task-master-mcp to the mpc.json which a ton of people probably ran into.
* chore: restores 3.7 sonnet as the main role.
* fix(add/remove-dependency): dependency mcp tools were failing due to hard-coded tasks path in generate task files.
* chore: removes tasks json backup that was temporarily created.
* fix(next): adjusts mcp tool response to correctly return the next task/subtask. Also adds nextSteps to the next task response.
* chore: prettier
* chore: readme typos
* fix(config): restores sonnet 3.7 as default main role.
* Version Packages
* hotfix: move production package to "dependencies" (#399)
* Version Packages
* Fix: issues with 0.13.0 not working (#402)
* Exit prerelease mode and version packages
* hotfix: move production package to "dependencies"
* Enter prerelease mode and version packages
* Enter prerelease mode and version packages
* chore: cleanup
* chore: improve pre.json and add pre-release workflow
* chore: fix package.json
* chore: cleanup
* chore: improve pre-release workflow
* chore: allow github actions to commit
* extract fileMap and conversionConfig into brand profile
* extract into brand profile
* add windsurf profile
* add remove brand rules function
* fix regex
* add rules command to add/remove rules for a specific brand
* fix post processing for roo
* allow multiples
* add cursor profile
* update test for new structure
* move rules to assets
* use assets/rules for rules files
* use standardized setupMCP function
* fix formatting
* fix formatting
* add logging
* fix escapes
* default to cursor
* allow init with certain rulesets; no more .windsurfrules
* update docs
* update log msg
* fix formatting
* keep mdc extension for cursor
* don't rewrite .mdc to .md inside the files
* fix roo init (add modes)
* fix cursor init (don't use roo transformation by default)
* use more generic function names
* update docs
* fix formatting
* update function names
* add changeset
* add rules to mcp initialize project
* register tool with mcp server
* update docs
* add integration test
* fix cursor initialization
* rule selection
* fix formatting
* fix MCP - remove yes flag
* add import
* update roo tests
* add/update tests
* remove test
* add rules command test
* update MCP responses, centralize rules profiles & helpers
* fix logging and MCP response messages
* fix formatting
* incorrect test
* fix tests
* update fileMap
* fix file extension transformations
* fix formatting
* add rules command test
* test already covered
* fix formatting
* move renaming logic into profiles
* make sure dir is deleted (DS_Store)
* add confirmation for rules removal
* add force flag for rules remove
* use force flag for test
* remove yes parameter
* fix formatting
* import brand profiles from rule-transformer.js
* update comment
* add interactive rules setup
* optimize
* only copy rules specifically listed in fileMap
* update comment
* add cline profile
* add brandDir to remove ambiguity and support Cline
* specify whether to create mcp config and filename
* add mcpConfigName value for parh
* fix formatting
* remove rules just for this repository - only include rules to be distributed
* update error message
* update "brand rules" to "rules"
* update to minor
* remove comment
* remove comments
* move to /src/utils
* optimize imports
* move rules-setup.js to /src/utils
* move rule-transformer.js to /src/utils
* move confirmation to /src/ui/confirm.js
* default to all rules
* use profile js for mcp config settings
* only run rules interactive setup if not provided via command line
* update comments
* initialize with all brands if nothing specified
* update var name
* clean up
* enumerate brands for brand rules
* update instructions
* add test to check for brand profiles
* fix quotes
* update semantics and terminology from 'brand rules' to 'rules profiles'
* fix formatting
* fix formatting
* update function name and remove copying of cursor rules, now handled by rules transformer
* update comment
* rename to mcp-config-setup.js
* use enums for rules actions
* add aggregate reporting for rules add command
* add missing log message
* use simpler path
* use base profile with modifications for each brand
* use displayName and don't select any defaults in setup
* add confirmation if removing ALL rules profiles, and add --force flag on rules remove
* Use profile-detection instead of rules-detection
* add newline at end of mcp config
* add proper formatting for mcp.json
* update rules
* update rules
* update rules
* add checks for other rules and other profile folder items before removing
* update confirmation for rules remove
* update docs
* update changeset
* fix for filepath at bottom of rule
* Update cline profile and add test; adjust other rules tests
* update changeset
* update changeset
* clarify init for all profiles if not specified
* update rule text
* revert text
* use "rule profiles" instead of "rules profiles"
* use standard tool mappings for windsurf
* add Trae support
* update changeset
* update wording
* update to 'rule profile'
* remove unneeded exports to optimize loc
* combine to /src/utils/profiles.js; add codex and claude code profiles
* rename function and add boxen
* add claude and codex integration tests
* organize tests into profiles folder
* mock fs for transformer tests
* update UI
* add cline and trae integration tests
* update test
* update function name
* update formatting
* Update change set with new profiles
* move profile integration tests to subdirectory
* properly create temp directories in /tmp folder
* fix formatting
* use taskmaster subfolder for the 2 TM rules
* update wording
* ensure subdirectory exists
* update rules from next
* update from next
* update taskmaster rule
* add details on new rules command and init
* fix mcp init
* fix MCP path to assets
* remove duplication
* remove duplication
* MCP server path fixes for rules command
* fix for CLI roo rules add/remove
* update tests
* fix formatting
* fix pattern for interactive rule profiles setup
* restore comments
* restore comments
* restore comments
* remove unused import, fix quotes
* add missing integration tests
* add VS Code profile and tests
* update docs and rules to include vscode profile
* add rules subdirectory support per-profile
* move profiles to /src
* fix formatting
* rename to remove ambiguity
* use --setup for rules interactive setup
* Fix Cursor deeplink installation with copy-paste instructions (#723)
* change roo boomerang to orchestrator; update tests that don't use modes
* fix newline
* chore: cleanup
---------
Co-authored-by: Eyal Toledano <eyal@microangel.so>
Co-authored-by: Yuval <yuvalbl@users.noreply.github.com>
Co-authored-by: Marijn van der Werf <marijn.vanderwerf@gmail.com>
Co-authored-by: Eyal Toledano <eutait@gmail.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update SWE scores (#657)
* docs: Auto-update and format models.md
* feat: Flexible brand rules management (#460)
* chore(docs): update docs and rules related to model management.
* feat(ai): Add OpenRouter AI provider support
Integrates the OpenRouter AI provider using the Vercel AI SDK adapter (@openrouter/ai-sdk-provider). This allows users to configure and utilize models available through the OpenRouter platform.
- Added src/ai-providers/openrouter.js with standard Vercel AI SDK wrapper functions (generateText, streamText, generateObject).
- Updated ai-services-unified.js to include the OpenRouter provider in the PROVIDER_FUNCTIONS map and API key resolution logic.
- Verified config-manager.js handles OpenRouter API key checks correctly.
- Users can configure OpenRouter models via .taskmasterconfig using the task-master models command or MCP models tool. Requires OPENROUTER_API_KEY.
- Enhanced error handling in ai-services-unified.js to provide clearer messages when generateObjectService fails due to lack of underlying tool support in the selected model/provider endpoint.
* feat(cli): Add --status/-s filter flag to show command and get-task MCP tool
Implements the ability to filter subtasks displayed by the `task-master show <id>` command using the `--status` (or `-s`) flag. This is also available in the MCP context.
- Modified `commands.js` to add the `--status` option to the `show` command definition.
- Updated `utils.js` (`findTaskById`) to handle the filtering logic and return original subtask counts/arrays when filtering.
- Updated `ui.js` (`displayTaskById`) to use the filtered subtasks for the table, display a summary line when filtering, and use the original subtask list for the progress bar calculation.
- Updated MCP `get_task` tool and `showTaskDirect` function to accept and pass the `status` parameter.
- Added changeset entry.
* fix(tasks): Improve next task logic to be subtask-aware
* fix(tasks): Enable removing multiple tasks/subtasks via comma-separated IDs
- Refactors the core `removeTask` function (`task-manager/remove-task.js`) to accept and iterate over comma-separated task/subtask IDs.
- Updates dependency cleanup and file regeneration logic to run once after processing all specified IDs.
- Adjusts the `remove-task` CLI command (`commands.js`) description and confirmation prompt to handle multiple IDs correctly.
- Fixes a bug in the CLI confirmation prompt where task/subtask titles were not being displayed correctly.
- Updates the `remove_task` MCP tool description to reflect the new multi-ID capability.
This addresses the previously known issue where only the first ID in a comma-separated list was processed.
Closes#140
* Update README.md (#342)
* Update Discord badge (#337)
* refactor(init): Improve robustness and dependencies; Update template deps for AI SDKs; Silence npm install in MCP; Improve conditional model setup logic; Refactor init.js flags; Tweak Getting Started text; Fix MCP server launch command; Update default model in config template
* Refactor: Improve MCP logging, update E2E & tests
Refactors MCP server logging and updates testing infrastructure.
- MCP Server:
- Replaced manual logger wrappers with centralized `createLogWrapper` utility.
- Updated direct function calls to use `{ session, mcpLog }` context.
- Removed deprecated `model` parameter from analyze, expand-all, expand-task tools.
- Adjusted MCP tool import paths and parameter descriptions.
- Documentation:
- Modified `docs/configuration.md`.
- Modified `docs/tutorial.md`.
- Testing:
- E2E Script (`run_e2e.sh`):
- Removed `set -e`.
- Added LLM analysis function (`analyze_log_with_llm`) & integration.
- Adjusted test run directory creation timing.
- Added debug echo statements.
- Deleted Unit Tests: Removed `ai-client-factory.test.js`, `ai-client-utils.test.js`, `ai-services.test.js`.
- Modified Fixtures: Updated `scripts/task-complexity-report.json`.
- Dev Scripts:
- Modified `scripts/dev.js`.
* chore(tests): Passes tests for merge candidate
- Adjusted the interactive model default choice to be 'no change' instead of 'cancel setup'
- E2E script has been perfected and works as designed provided there are all provider API keys .env in the root
- Fixes the entire test suite to make sure it passes with the new architecture.
- Fixes dependency command to properly show there is a validation failure if there is one.
- Refactored config-manager.test.js mocking strategy and fixed assertions to read the real supported-models.json
- Fixed rule-transformer.test.js assertion syntax and transformation logic adjusting replacement for search which was too broad.
- Skip unstable tests in utils.test.js (log, readJSON, writeJSON error paths) due to SIGABRT crash. These tests trigger a native crash (SIGABRT), likely stemming from a conflict between internal chalk usage within the functions and Jest's test environment, possibly related to ESM module handling.
* chore(wtf): removes chai. not sure how that even made it in here. also removes duplicate test in scripts/.
* fix: ensure API key detection properly reads .env in MCP context
Problem:
- Task Master model configuration wasn't properly checking for API keys in the project's .env file when running through MCP
- The isApiKeySet function was only checking session.env and process.env but not inspecting the .env file directly
- This caused incorrect API key status reporting in MCP tools even when keys were properly set in .env
Solution:
- Modified resolveEnvVariable function in utils.js to properly read from .env file at projectRoot
- Updated isApiKeySet to correctly pass projectRoot to resolveEnvVariable
- Enhanced the key detection logic to have consistent behavior between CLI and MCP contexts
- Maintains the correct precedence: session.env → .env file → process.env
Testing:
- Verified working correctly with both MCP and CLI tools
- API keys properly detected in .env file in both contexts
- Deleted .cursor/mcp.json to confirm introspection of .env as fallback works
* fix(update): pass projectRoot through update command flow
Modified ai-services-unified.js, update.js tool, and update-tasks.js direct function to correctly pass projectRoot. This enables the .env file API key fallback mechanism for the update command when running via MCP, ensuring consistent key resolution with the CLI context.
* fix(analyze-complexity): pass projectRoot through analyze-complexity flow
Modified analyze-task-complexity.js core function, direct function, and analyze.js tool to correctly pass projectRoot. Fixed import error in tools/index.js. Added debug logging to _resolveApiKey in ai-services-unified.js. This enables the .env API key fallback for analyze_project_complexity.
* fix(add-task): pass projectRoot and fix logging/refs
Modified add-task core, direct function, and tool to pass projectRoot for .env API key fallback. Fixed logFn reference error and removed deprecated reportProgress call in core addTask function. Verified working.
* fix(parse-prd): pass projectRoot and fix schema/logging
Modified parse-prd core, direct function, and tool to pass projectRoot for .env API key fallback. Corrected Zod schema used in generateObjectService call. Fixed logFn reference error in core parsePRD. Updated unit test mock for utils.js.
* fix(update-task): pass projectRoot and adjust parsing
Modified update-task-by-id core, direct function, and tool to pass projectRoot. Reverted parsing logic in core function to prioritize `{...}` extraction, resolving parsing errors. Fixed ReferenceError by correctly destructuring projectRoot.
* fix(update-subtask): pass projectRoot and allow updating done subtasks
Modified update-subtask-by-id core, direct function, and tool to pass projectRoot for .env API key fallback. Removed check preventing appending details to completed subtasks.
* fix(mcp, expand): pass projectRoot through expand/expand-all flows
Problem: expand_task & expand_all MCP tools failed with .env keys due to missing projectRoot propagation for API key resolution. Also fixed a ReferenceError: wasSilent is not defined in expandTaskDirect.
Solution: Modified core logic, direct functions, and MCP tools for expand-task and expand-all to correctly destructure projectRoot from arguments and pass it down through the context object to the AI service call (generateTextService). Fixed wasSilent scope in expandTaskDirect.
Verification: Tested expand_task successfully in MCP using .env keys. Reviewed expand_all flow for correct projectRoot propagation.
* chore: prettier
* fix(expand-all): add projectRoot to expandAllTasksDirect invokation.
* fix(update-tasks): Improve AI response parsing for 'update' command
Refactors the JSON array parsing logic within
in .
The previous logic primarily relied on extracting content from markdown
code blocks (json or javascript), which proved brittle when the AI
response included comments or non-JSON text within the block, leading to
parsing errors for the command.
This change modifies the parsing strategy to first attempt extracting
content directly between the outermost '[' and ']' brackets. This is
more robust as it targets the expected array structure directly. If
bracket extraction fails, it falls back to looking for a strict json
code block, then prefix stripping, before attempting a raw parse.
This approach aligns with the successful parsing strategy used for
single-object responses in and resolves the
parsing errors previously observed with the command.
* refactor(mcp): introduce withNormalizedProjectRoot HOF for path normalization
Added HOF to mcp tools utils to normalize projectRoot from args/session. Refactored get-task tool to use HOF. Updated relevant documentation.
* refactor(mcp): apply withNormalizedProjectRoot HOF to update tool
Problem: The MCP tool previously handled project root acquisition and path resolution within its method, leading to potential inconsistencies and repetition.
Solution: Refactored the tool () to utilize the new Higher-Order Function (HOF) from .
Specific Changes:
- Imported HOF.
- Updated the Zod schema for the parameter to be optional, as the HOF handles deriving it from the session if not provided.
- Wrapped the entire function body with the HOF.
- Removed the manual call to from within the function body.
- Destructured the from the object received by the wrapped function, ensuring it's the normalized path provided by the HOF.
- Used the normalized variable when calling and when passing arguments to .
This change standardizes project root handling for the tool, simplifies its method, and ensures consistent path normalization. This serves as the pattern for refactoring other MCP tools.
* fix: apply to all tools withNormalizedProjectRoot to fix projectRoot issues for linux and windows
* fix: add rest of tools that need wrapper
* chore: cleanup tools to stop using rootFolder and remove unused imports
* chore: more cleanup
* refactor: Improve update-subtask, consolidate utils, update config
This commit introduces several improvements and refactorings across MCP tools, core logic, and configuration.
**Major Changes:**
1. **Refactor updateSubtaskById:**
- Switched from generateTextService to generateObjectService for structured AI responses, using a Zod schema (subtaskSchema) for validation.
- Revised prompts to have the AI generate relevant content based on user request and context (parent/sibling tasks), while explicitly preventing AI from handling timestamp/tag formatting.
- Implemented **local timestamp generation (new Date().toISOString()) and formatting** (using <info added on ...> tags) within the function *after* receiving the AI response. This ensures reliable and correctly formatted details are appended.
- Corrected logic to append only the locally formatted, AI-generated content block to the existing subtask.details.
2. **Consolidate MCP Utilities:**
- Moved/consolidated the withNormalizedProjectRoot HOF into mcp-server/src/tools/utils.js.
- Updated MCP tools (like update-subtask.js) to import withNormalizedProjectRoot from the new location.
3. **Refactor Project Initialization:**
- Deleted the redundant mcp-server/src/core/direct-functions/initialize-project-direct.js file.
- Updated mcp-server/src/core/task-master-core.js to import initializeProjectDirect from its correct location (./direct-functions/initialize-project.js).
**Other Changes:**
- Updated .taskmasterconfig fallback model to claude-3-7-sonnet-20250219.
- Clarified model cost representation in the models tool description (taskmaster.mdc and mcp-server/src/tools/models.js).
* fix: displayBanner logging when silentMode is active (#385)
* fix: improve error handling, test options, and model configuration
- Enhance error validation in parse-prd.js and update-tasks.js
- Fix bug where mcpLog was incorrectly passed as logWrapper
- Improve error messages and response formatting
- Add --skip-verification flag to E2E tests
- Update MCP server config that ships with init to match new API key structure
- Fix task force/append handling in parse-prd command
- Increase column width in update-tasks display
* chore: fixes parse prd to show loading indicator in cli.
* fix(parse-prd): suggested fix for mcpLog was incorrect. reverting to my previously working code.
* chore(init): No longer ships readme with task-master init (commented out for now). No longer looking for task-master-mcp, instead checked for task-master-ai - this should prevent the init sequence from needlessly adding another mcp server with task-master-mcp to the mpc.json which a ton of people probably ran into.
* chore: restores 3.7 sonnet as the main role.
* fix(add/remove-dependency): dependency mcp tools were failing due to hard-coded tasks path in generate task files.
* chore: removes tasks json backup that was temporarily created.
* fix(next): adjusts mcp tool response to correctly return the next task/subtask. Also adds nextSteps to the next task response.
* chore: prettier
* chore: readme typos
* fix(config): restores sonnet 3.7 as default main role.
* Version Packages
* hotfix: move production package to "dependencies" (#399)
* Version Packages
* Fix: issues with 0.13.0 not working (#402)
* Exit prerelease mode and version packages
* hotfix: move production package to "dependencies"
* Enter prerelease mode and version packages
* Enter prerelease mode and version packages
* chore: cleanup
* chore: improve pre.json and add pre-release workflow
* chore: fix package.json
* chore: cleanup
* chore: improve pre-release workflow
* chore: allow github actions to commit
* extract fileMap and conversionConfig into brand profile
* extract into brand profile
* add windsurf profile
* add remove brand rules function
* fix regex
* add rules command to add/remove rules for a specific brand
* fix post processing for roo
* allow multiples
* add cursor profile
* update test for new structure
* move rules to assets
* use assets/rules for rules files
* use standardized setupMCP function
* fix formatting
* fix formatting
* add logging
* fix escapes
* default to cursor
* allow init with certain rulesets; no more .windsurfrules
* update docs
* update log msg
* fix formatting
* keep mdc extension for cursor
* don't rewrite .mdc to .md inside the files
* fix roo init (add modes)
* fix cursor init (don't use roo transformation by default)
* use more generic function names
* update docs
* fix formatting
* update function names
* add changeset
* add rules to mcp initialize project
* register tool with mcp server
* update docs
* add integration test
* fix cursor initialization
* rule selection
* fix formatting
* fix MCP - remove yes flag
* add import
* update roo tests
* add/update tests
* remove test
* add rules command test
* update MCP responses, centralize rules profiles & helpers
* fix logging and MCP response messages
* fix formatting
* incorrect test
* fix tests
* update fileMap
* fix file extension transformations
* fix formatting
* add rules command test
* test already covered
* fix formatting
* move renaming logic into profiles
* make sure dir is deleted (DS_Store)
* add confirmation for rules removal
* add force flag for rules remove
* use force flag for test
* remove yes parameter
* fix formatting
* import brand profiles from rule-transformer.js
* update comment
* add interactive rules setup
* optimize
* only copy rules specifically listed in fileMap
* update comment
* add cline profile
* add brandDir to remove ambiguity and support Cline
* specify whether to create mcp config and filename
* add mcpConfigName value for parh
* fix formatting
* remove rules just for this repository - only include rules to be distributed
* update error message
* update "brand rules" to "rules"
* update to minor
* remove comment
* remove comments
* move to /src/utils
* optimize imports
* move rules-setup.js to /src/utils
* move rule-transformer.js to /src/utils
* move confirmation to /src/ui/confirm.js
* default to all rules
* use profile js for mcp config settings
* only run rules interactive setup if not provided via command line
* update comments
* initialize with all brands if nothing specified
* update var name
* clean up
* enumerate brands for brand rules
* update instructions
* add test to check for brand profiles
* fix quotes
* update semantics and terminology from 'brand rules' to 'rules profiles'
* fix formatting
* fix formatting
* update function name and remove copying of cursor rules, now handled by rules transformer
* update comment
* rename to mcp-config-setup.js
* use enums for rules actions
* add aggregate reporting for rules add command
* add missing log message
* use simpler path
* use base profile with modifications for each brand
* use displayName and don't select any defaults in setup
* add confirmation if removing ALL rules profiles, and add --force flag on rules remove
* Use profile-detection instead of rules-detection
* add newline at end of mcp config
* add proper formatting for mcp.json
* update rules
* update rules
* update rules
* add checks for other rules and other profile folder items before removing
* update confirmation for rules remove
* update docs
* update changeset
* fix for filepath at bottom of rule
* Update cline profile and add test; adjust other rules tests
* update changeset
* update changeset
* clarify init for all profiles if not specified
* update rule text
* revert text
* use "rule profiles" instead of "rules profiles"
* use standard tool mappings for windsurf
* add Trae support
* update changeset
* update wording
* update to 'rule profile'
* remove unneeded exports to optimize loc
* combine to /src/utils/profiles.js; add codex and claude code profiles
* rename function and add boxen
* add claude and codex integration tests
* organize tests into profiles folder
* mock fs for transformer tests
* update UI
* add cline and trae integration tests
* update test
* update function name
* update formatting
* Update change set with new profiles
* move profile integration tests to subdirectory
* properly create temp directories in /tmp folder
* fix formatting
* use taskmaster subfolder for the 2 TM rules
* update wording
* ensure subdirectory exists
* update rules from next
* update from next
* update taskmaster rule
* add details on new rules command and init
* fix mcp init
* fix MCP path to assets
* remove duplication
* remove duplication
* MCP server path fixes for rules command
* fix for CLI roo rules add/remove
* update tests
* fix formatting
* fix pattern for interactive rule profiles setup
* restore comments
* restore comments
* restore comments
* remove unused import, fix quotes
* add missing integration tests
* add VS Code profile and tests
* update docs and rules to include vscode profile
* add rules subdirectory support per-profile
* move profiles to /src
* fix formatting
* rename to remove ambiguity
* use --setup for rules interactive setup
* Fix Cursor deeplink installation with copy-paste instructions (#723)
* change roo boomerang to orchestrator; update tests that don't use modes
* fix newline
* chore: cleanup
---------
Co-authored-by: Eyal Toledano <eyal@microangel.so>
Co-authored-by: Yuval <yuvalbl@users.noreply.github.com>
Co-authored-by: Marijn van der Werf <marijn.vanderwerf@gmail.com>
Co-authored-by: Eyal Toledano <eutait@gmail.com>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix: providers config for azure, bedrock, and vertex (#822)
* fix: providers config for azure, bedrock, and vertex
* chore: improve changelog
* chore: fix CI
* fix: switch to ESM export to avoid mixed format (#633)
* fix: switch to ESM export to avoid mixed format
The CLI entrypoint was using `module.exports` alongside ESM `import` statements,
resulting in an invalid mixed module format. Replaced the CommonJS export with
a proper ESM `export` to maintain consistency and prevent module resolution issues.
* chore: add changeset
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* fix: Fix external provider support (#726)
* fix(bedrock): improve AWS credential handling and add model definitions (#826)
* fix(bedrock): improve AWS credential handling and add model definitions
- Change error to warning when AWS credentials are missing in environment
- Allow fallback to system configuration (aws config files or instance profiles)
- Remove hardcoded region and profile parameters in Bedrock client
- Add Claude 3.7 Sonnet and DeepSeek R1 model definitions for Bedrock
- Update config manager to properly handle Bedrock provider
* chore: cleanup and format and small refactor
---------
Co-authored-by: Ray Krueger <raykrueger@gmail.com>
* docs: Auto-update and format models.md
* Version Packages
* chore: fix package.json
* Fix/expand command tag corruption (#827)
* fix(expand): Fix tag corruption in expand command - Fix tag parameter passing through MCP expand-task flow - Add tag parameter to direct function and tool registration - Fix contextGatherer method name from _buildDependencyContext to _buildDependencyGraphs - Add comprehensive test coverage for tag handling in expand-task - Ensures tagged task structure is preserved during expansion - Prevents corruption when tag is undefined. Fixes expand command causing tag corruption in tagged task lists. All existing tests pass and new test coverage added.
* test(e2e): Add comprehensive tag-aware expand testing to verify tag corruption fix - Add new test section for feature-expand tag creation and testing - Verify tag preservation during expand, force expand, and expand --all operations - Test that master tag remains intact and feature-expand tag receives subtasks correctly - Fix file path references to use correct .taskmaster/tasks/tasks.json location - Fix config file check to use .taskmaster/config.json instead of .taskmasterconfig - All tag corruption verification tests pass successfully in E2E test
* fix(changeset): Update E2E test improvements changeset to properly reflect tag corruption fix verification
* chore(changeset): combine duplicate changesets for expand tag corruption fix
Merge eighty-breads-wonder.md into bright-llamas-enter.md to consolidate
the expand command fix and its comprehensive E2E testing enhancements
into a single changeset entry.
* Delete .changeset/eighty-breads-wonder.md
* Version Packages
* chore: fix package.json
* fix(expand): Enhance context handling in expandAllTasks function
- Added `tag` to context destructuring for better context management.
- Updated `readJSON` call to include `contextTag` for improved data integrity.
- Ensured the correct tag is passed during task expansion to prevent tag corruption.
---------
Co-authored-by: Parththipan Thaniperumkarunai <parththipan.thaniperumkarunai@milkmonkey.de>
Co-authored-by: Parthy <52548018+mm-parthy@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add pyproject.toml as project root marker (#804)
* feat: Add pyproject.toml as project root marker - Added 'pyproject.toml' to the project markers array in findProjectRoot() - Enables Task Master to recognize Python projects using pyproject.toml - Improves project root detection for modern Python development workflows - Maintains compatibility with existing Node.js and Git-based detection
* chore: add changeset
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* feat: add Claude Code provider support
Implements Claude Code as a new AI provider that uses the Claude Code CLI
without requiring API keys. This enables users to leverage Claude models
through their local Claude Code installation.
Key changes:
- Add complete AI SDK v1 implementation for Claude Code provider
- Custom SDK with streaming/non-streaming support
- Session management for conversation continuity
- JSON extraction for object generation mode
- Support for advanced settings (maxTurns, allowedTools, etc.)
- Integrate Claude Code into Task Master's provider system
- Update ai-services-unified.js to handle keyless authentication
- Add provider to supported-models.json with opus/sonnet models
- Ensure correct maxTokens values are applied (opus: 32000, sonnet: 64000)
- Fix maxTokens configuration issue
- Add max_tokens property to getAvailableModels() output
- Update setModel() to properly handle claude-code models
- Create update-config-tokens.js utility for init process
- Add comprehensive documentation
- User guide with configuration examples
- Advanced settings explanation and future integration options
The implementation maintains full backward compatibility with existing
providers while adding seamless Claude Code support to all Task Master
commands.
* fix(docs): correct invalid commands in claude-code usage examples
- Remove non-existent 'do', 'estimate', and 'analyze' commands
- Replace with actual Task Master commands: next, show, set-status
- Use correct syntax for parse-prd and analyze-complexity
* feat: make @anthropic-ai/claude-code an optional dependency
This change makes the Claude Code SDK package optional, preventing installation failures for users who don't need Claude Code functionality.
Changes:
- Added @anthropic-ai/claude-code to optionalDependencies in package.json
- Implemented lazy loading in language-model.js to only import the SDK when actually used
- Updated documentation to explain the optional installation requirement
- Applied formatting fixes to ensure code consistency
Benefits:
- Users without Claude Code subscriptions don't need to install the dependency
- Reduces package size for users who don't use Claude Code
- Prevents installation failures if the package is unavailable
- Provides clear error messages when the package is needed but not installed
The implementation uses dynamic imports to load the SDK only when doGenerate() or doStream() is called, ensuring the provider can be instantiated without the package present.
* test: add comprehensive tests for ClaudeCodeProvider
Addresses code review feedback about missing automated tests for the ClaudeCodeProvider.
## Changes
- Added unit tests for ClaudeCodeProvider class covering constructor, validateAuth, and getClient methods
- Added unit tests for ClaudeCodeLanguageModel testing lazy loading behavior and error handling
- Added integration tests verifying optional dependency behavior when @anthropic-ai/claude-code is not installed
## Test Coverage
1. **Unit Tests**:
- ClaudeCodeProvider: Basic functionality, no API key requirement, client creation
- ClaudeCodeLanguageModel: Model initialization, lazy loading, error messages, warning generation
2. **Integration Tests**:
- Optional dependency behavior when package is not installed
- Clear error messages for users about missing package
- Provider instantiation works but usage fails gracefully
All tests pass and provide comprehensive coverage for the claude-code provider implementation.
* revert: remove maxTokens update functionality from init
This functionality was out of scope for the Claude Code provider PR.
The automatic updating of maxTokens values in config.json during
initialization is a general improvement that should be in a separate PR.
Additionally, Claude Code ignores maxTokens and temperature parameters
anyway, making this change irrelevant for the Claude Code integration.
Removed:
- scripts/modules/update-config-tokens.js
- Import and usage in scripts/init.js
* docs: add Claude Code support information to README
- Added Claude Code to the list of supported providers in Requirements section
- Noted that Claude Code requires no API key but needs Claude Code CLI
- Added example of configuring claude-code/sonnet model
- Created dedicated Claude Code Support section with key information
- Added link to detailed Claude Code setup documentation
This ensures users are aware of the Claude Code option as a no-API-key
alternative for using Claude models.
* style: apply biome formatting to test files
* fix(models): add missing --claude-code flag to models command
The models command was missing the --claude-code provider flag, preventing users from setting Claude Code models via CLI. While the backend already supported claude-code as a provider hint, there was no command-line flag to trigger it.
Changes:
- Added --claude-code option to models command alongside existing provider flags
- Updated provider flags validation to include claudeCode option
- Added claude-code to providerHint logic for all three model roles (main, research, fallback)
- Updated error message to include --claude-code in list of mutually exclusive flags
- Added example usage in help text
This allows users to properly set Claude Code models using commands like:
task-master models --set-main sonnet --claude-code
task-master models --set-main opus --claude-code
Without this flag, users would get "Model ID not found" errors when trying to set claude-code models, as the system couldn't determine the correct provider for generic model names like "sonnet" or "opus".
* chore: add changeset for Claude Code provider feature
* docs: Auto-update and format models.md
* readme: add troubleshooting note for MCP tools not working
* Feature/compatibleapisupport (#830)
* add compatible platform api support
* Adjust the code according to the suggestions
* Fully revised as requested: restored all required checks, improved compatibility, and converted all comments to English.
* feat: Add support for compatible API endpoints via baseURL
* chore: Add changeset for compatible API support
* chore: cleanup
* chore: improve changeset
* fix: package-lock.json
* fix: package-lock.json
---------
Co-authored-by: He-Xun <1226807142@qq.com>
* Rename Roo Code "Boomerang" role to "Orchestrator" (#831)
* feat: Enhanced project initialization with Git worktree detection (#743)
* Fix Cursor deeplink installation with copy-paste instructions (#723)
* detect git worktree
* add changeset
* add aliases and git flags
* add changeset
* rename and update test
* add store tasks in git functionality
* update changeset
* fix newline
* remove unused import
* update command wording
* update command option text
* fix: update task by id (#834)
* store tasks in git by default (#835)
* Call rules interactive setup during init (#833)
* chore: rc version bump
* feat: Claude Code slash commands for Task Master (#774)
* Fix Cursor deeplink installation with copy-paste instructions (#723)
* fix: expand-task (#755)
* docs: Update o3 model price (#751)
* docs: Auto-update and format models.md
* docs: Auto-update and format models.md
* feat: Add Claude Code task master commands
Adds Task Master slash commands for Claude Code under /project:tm/ namespace
---------
Co-authored-by: Joe Danziger <joe@ticc.net>
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Co-authored-by: Volodymyr Zahorniak <7808206+zahorniak@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: neno-is-ooo <204701868+neno-is-ooo@users.noreply.github.com>
* feat: make more compatible with "o" family models (#839)
* docs: Auto-update and format models.md
* docs: Add comprehensive Azure OpenAI configuration documentation (#837)
* docs: Add comprehensive Azure OpenAI configuration documentation
- Add detailed Azure OpenAI configuration section with prerequisites, authentication, and setup options
- Include both global and per-model baseURL configuration examples
- Add comprehensive troubleshooting guide for common Azure OpenAI issues
- Update environment variables section with Azure OpenAI examples
- Add Azure OpenAI models to all model tables (Main, Research, Fallback)
- Include prominent Azure configuration example in main documentation
- Fix azureBaseURL format to use correct Azure OpenAI endpoint structure
Addresses common Azure OpenAI setup challenges and provides clear guidance for new users.
* refactor: Move Azure models from docs/models.md to scripts/modules/supported-models.json
- Remove Azure model entries from documentation tables
- Add Azure provider section to supported-models.json with gpt-4o, gpt-4o-mini, and gpt-4-1
- Maintain consistency with existing model configuration structure
* docs: Auto-update and format models.md
* Version Packages
* chore: format fix
---------
Co-authored-by: Riccardo (Ricky) Esclapon <32306488+ries9112@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joe Danziger <joe@ticc.net>
Co-authored-by: Eyal Toledano <eyal@microangel.so>
Co-authored-by: Yuval <yuvalbl@users.noreply.github.com>
Co-authored-by: Marijn van der Werf <marijn.vanderwerf@gmail.com>
Co-authored-by: Eyal Toledano <eutait@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nathan Marley <nathan@glowberrylabs.com>
Co-authored-by: Ray Krueger <raykrueger@gmail.com>
Co-authored-by: Parththipan Thaniperumkarunai <parththipan.thaniperumkarunai@milkmonkey.de>
Co-authored-by: Parthy <52548018+mm-parthy@users.noreply.github.com>
Co-authored-by: ejones40 <ethan.jones@fortyau.com>
Co-authored-by: Ben Vargas <ben@vargas.com>
Co-authored-by: V4G4X <34249137+V4G4X@users.noreply.github.com>
Co-authored-by: He-Xun <1226807142@qq.com>
Co-authored-by: neno <github@meaning.systems>
Co-authored-by: Volodymyr Zahorniak <7808206+zahorniak@users.noreply.github.com>
Co-authored-by: neno-is-ooo <204701868+neno-is-ooo@users.noreply.github.com>
Co-authored-by: Jitesh Thakur <56656484+Jitha-afk@users.noreply.github.com>
* docs: Add comprehensive Azure OpenAI configuration documentation
- Add detailed Azure OpenAI configuration section with prerequisites, authentication, and setup options
- Include both global and per-model baseURL configuration examples
- Add comprehensive troubleshooting guide for common Azure OpenAI issues
- Update environment variables section with Azure OpenAI examples
- Add Azure OpenAI models to all model tables (Main, Research, Fallback)
- Include prominent Azure configuration example in main documentation
- Fix azureBaseURL format to use correct Azure OpenAI endpoint structure
Addresses common Azure OpenAI setup challenges and provides clear guidance for new users.
* refactor: Move Azure models from docs/models.md to scripts/modules/supported-models.json
- Remove Azure model entries from documentation tables
- Add Azure provider section to supported-models.json with gpt-4o, gpt-4o-mini, and gpt-4-1
- Maintain consistency with existing model configuration structure
* add compatible platform api support
* Adjust the code according to the suggestions
* Fully revised as requested: restored all required checks, improved compatibility, and converted all comments to English.
* feat: Add support for compatible API endpoints via baseURL
* chore: Add changeset for compatible API support
* chore: cleanup
* chore: improve changeset
* fix: package-lock.json
* fix: package-lock.json
---------
Co-authored-by: He-Xun <1226807142@qq.com>
The models command was missing the --claude-code provider flag, preventing users from setting Claude Code models via CLI. While the backend already supported claude-code as a provider hint, there was no command-line flag to trigger it.
Changes:
- Added --claude-code option to models command alongside existing provider flags
- Updated provider flags validation to include claudeCode option
- Added claude-code to providerHint logic for all three model roles (main, research, fallback)
- Updated error message to include --claude-code in list of mutually exclusive flags
- Added example usage in help text
This allows users to properly set Claude Code models using commands like:
task-master models --set-main sonnet --claude-code
task-master models --set-main opus --claude-code
Without this flag, users would get "Model ID not found" errors when trying to set claude-code models, as the system couldn't determine the correct provider for generic model names like "sonnet" or "opus".
- Added Claude Code to the list of supported providers in Requirements section
- Noted that Claude Code requires no API key but needs Claude Code CLI
- Added example of configuring claude-code/sonnet model
- Created dedicated Claude Code Support section with key information
- Added link to detailed Claude Code setup documentation
This ensures users are aware of the Claude Code option as a no-API-key
alternative for using Claude models.
This functionality was out of scope for the Claude Code provider PR.
The automatic updating of maxTokens values in config.json during
initialization is a general improvement that should be in a separate PR.
Additionally, Claude Code ignores maxTokens and temperature parameters
anyway, making this change irrelevant for the Claude Code integration.
Removed:
- scripts/modules/update-config-tokens.js
- Import and usage in scripts/init.js
Addresses code review feedback about missing automated tests for the ClaudeCodeProvider.
## Changes
- Added unit tests for ClaudeCodeProvider class covering constructor, validateAuth, and getClient methods
- Added unit tests for ClaudeCodeLanguageModel testing lazy loading behavior and error handling
- Added integration tests verifying optional dependency behavior when @anthropic-ai/claude-code is not installed
## Test Coverage
1. **Unit Tests**:
- ClaudeCodeProvider: Basic functionality, no API key requirement, client creation
- ClaudeCodeLanguageModel: Model initialization, lazy loading, error messages, warning generation
2. **Integration Tests**:
- Optional dependency behavior when package is not installed
- Clear error messages for users about missing package
- Provider instantiation works but usage fails gracefully
All tests pass and provide comprehensive coverage for the claude-code provider implementation.
This change makes the Claude Code SDK package optional, preventing installation failures for users who don't need Claude Code functionality.
Changes:
- Added @anthropic-ai/claude-code to optionalDependencies in package.json
- Implemented lazy loading in language-model.js to only import the SDK when actually used
- Updated documentation to explain the optional installation requirement
- Applied formatting fixes to ensure code consistency
Benefits:
- Users without Claude Code subscriptions don't need to install the dependency
- Reduces package size for users who don't use Claude Code
- Prevents installation failures if the package is unavailable
- Provides clear error messages when the package is needed but not installed
The implementation uses dynamic imports to load the SDK only when doGenerate() or doStream() is called, ensuring the provider can be instantiated without the package present.
- Remove non-existent 'do', 'estimate', and 'analyze' commands
- Replace with actual Task Master commands: next, show, set-status
- Use correct syntax for parse-prd and analyze-complexity
Implements Claude Code as a new AI provider that uses the Claude Code CLI
without requiring API keys. This enables users to leverage Claude models
through their local Claude Code installation.
Key changes:
- Add complete AI SDK v1 implementation for Claude Code provider
- Custom SDK with streaming/non-streaming support
- Session management for conversation continuity
- JSON extraction for object generation mode
- Support for advanced settings (maxTurns, allowedTools, etc.)
- Integrate Claude Code into Task Master's provider system
- Update ai-services-unified.js to handle keyless authentication
- Add provider to supported-models.json with opus/sonnet models
- Ensure correct maxTokens values are applied (opus: 32000, sonnet: 64000)
- Fix maxTokens configuration issue
- Add max_tokens property to getAvailableModels() output
- Update setModel() to properly handle claude-code models
- Create update-config-tokens.js utility for init process
- Add comprehensive documentation
- User guide with configuration examples
- Advanced settings explanation and future integration options
The implementation maintains full backward compatibility with existing
providers while adding seamless Claude Code support to all Task Master
commands.
* feat: Add pyproject.toml as project root marker - Added 'pyproject.toml' to the project markers array in findProjectRoot() - Enables Task Master to recognize Python projects using pyproject.toml - Improves project root detection for modern Python development workflows - Maintains compatibility with existing Node.js and Git-based detection
* chore: add changeset
---------
Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
* fix(expand): Fix tag corruption in expand command - Fix tag parameter passing through MCP expand-task flow - Add tag parameter to direct function and tool registration - Fix contextGatherer method name from _buildDependencyContext to _buildDependencyGraphs - Add comprehensive test coverage for tag handling in expand-task - Ensures tagged task structure is preserved during expansion - Prevents corruption when tag is undefined. Fixes expand command causing tag corruption in tagged task lists. All existing tests pass and new test coverage added.
* test(e2e): Add comprehensive tag-aware expand testing to verify tag corruption fix - Add new test section for feature-expand tag creation and testing - Verify tag preservation during expand, force expand, and expand --all operations - Test that master tag remains intact and feature-expand tag receives subtasks correctly - Fix file path references to use correct .taskmaster/tasks/tasks.json location - Fix config file check to use .taskmaster/config.json instead of .taskmasterconfig - All tag corruption verification tests pass successfully in E2E test
* fix(changeset): Update E2E test improvements changeset to properly reflect tag corruption fix verification
* chore(changeset): combine duplicate changesets for expand tag corruption fix
Merge eighty-breads-wonder.md into bright-llamas-enter.md to consolidate
the expand command fix and its comprehensive E2E testing enhancements
into a single changeset entry.
* Delete .changeset/eighty-breads-wonder.md
* Version Packages
* chore: fix package.json
* fix(expand): Enhance context handling in expandAllTasks function
- Added `tag` to context destructuring for better context management.
- Updated `readJSON` call to include `contextTag` for improved data integrity.
- Ensured the correct tag is passed during task expansion to prevent tag corruption.
---------
Co-authored-by: Parththipan Thaniperumkarunai <parththipan.thaniperumkarunai@milkmonkey.de>
Co-authored-by: Parthy <52548018+mm-parthy@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix(bedrock): improve AWS credential handling and add model definitions
- Change error to warning when AWS credentials are missing in environment
- Allow fallback to system configuration (aws config files or instance profiles)
- Remove hardcoded region and profile parameters in Bedrock client
- Add Claude 3.7 Sonnet and DeepSeek R1 model definitions for Bedrock
- Update config manager to properly handle Bedrock provider
* chore: cleanup and format and small refactor
---------
Co-authored-by: Ray Krueger <raykrueger@gmail.com>
**New Profile Support**: Added comprehensive IDE profile support with eight specialized profiles: Claude Code, Cline, Codex, Cursor, Roo, Trae, VS Code, and Windsurf. Each profile is optimized for its respective IDE with appropriate mappings and configuration.
**Initialization**: You can now specify which rule profiles to include at project initialization using `--rules <profiles>` or `-r <profiles>` (e.g., `task-master init -r cursor,roo`). Only the selected profiles and configuration are included.
**Add/Remove Commands**: `task-master rules add <profiles>` and `task-master rules remove <profiles>` let you manage specific rule profiles and MCP config after initialization, supporting multiple profiles at once.
**Interactive Setup**: `task-master rules setup` launches an interactive prompt to select which rule profiles to add to your project. This does **not** re-initialize your project or affect shell aliases; it only manages rules.
**Selective Removal**: Rules removal intelligently preserves existing non-Task Master rules and files and only removes Task Master-specific rules. Profile directories are only removed when completely empty and all conditions are met (no existing rules, no other files/folders, MCP config completely removed).
**Safety Features**: Confirmation messages clearly explain that only Task Master-specific rules and MCP configurations will be removed, while preserving existing custom rules and other files.
**Robust Validation**: Includes comprehensive checks for array types in MCP config processing and error handling throughout the rules management system.
This enables more flexible, rule-specific project setups with intelligent cleanup that preserves user customizations while safely managing Task Master components.
description: Use this agent to verify that tasks marked as 'review' have been properly implemented according to their specifications. This agent performs quality assurance by checking implementations against requirements, running tests, and ensuring best practices are followed. <example>Context: A task has been marked as 'review' after implementation. user: 'Check if task 118 was properly implemented' assistant: 'I'll use the task-checker agent to verify the implementation meets all requirements.' <commentary>Tasks in 'review' status need verification before being marked as 'done'.</commentary></example><example>Context: Multiple tasks are in review status. user: 'Verify all tasks that are ready for review' assistant: 'I'll deploy the task-checker to verify all tasks in review status.' <commentary>The checker ensures quality before tasks are marked complete.</commentary></example>
model: sonnet
color: yellow
---
You are a Quality Assurance specialist that rigorously verifies task implementations against their specifications. Your role is to ensure that tasks marked as 'review' meet all requirements before they can be marked as 'done'.
## Core Responsibilities
1.**Task Specification Review**
- Retrieve task details using MCP tool `mcp__task-master-ai__get_task`
- Understand the requirements, test strategy, and success criteria
- Review any subtasks and their individual requirements
2.**Implementation Verification**
- Use `Read` tool to examine all created/modified files
- Use `Bash` tool to run compilation and build commands
- Use `Grep` tool to search for required patterns and implementations
- Verify file structure matches specifications
- Check that all required methods/functions are implemented
3.**Test Execution**
- Run tests specified in the task's testStrategy
- Execute build commands (npm run build, tsc --noEmit, etc.)
- Verify no compilation errors or warnings
- Check for runtime errors where applicable
- Test edge cases mentioned in requirements
4.**Code Quality Assessment**
- Verify code follows project conventions
- Check for proper error handling
- Ensure TypeScript typing is strict (no 'any' unless justified)
- Verify documentation/comments where required
- Check for security best practices
5.**Dependency Validation**
- Verify all task dependencies were actually completed
- Check integration points with dependent tasks
- Ensure no breaking changes to existing functionality
## Verification Workflow
1.**Retrieve Task Information**
```
Use mcp__task-master-ai__get_task to get full task details
Note the implementation requirements and test strategy
```
2. **Check File Existence**
```bash
# Verify all required files exist
ls -la [expected directories]
# Read key files to verify content
```
3. **Verify Implementation**
- Read each created/modified file
- Check against requirements checklist
- Verify all subtasks are complete
4. **Run Tests**
```bash
# TypeScript compilation
cd [project directory] && npx tsc --noEmit
# Run specified tests
npm test [specific test files]
# Build verification
npm run build
```
5. **Generate Verification Report**
## Output Format
```yaml
verification_report:
task_id: [ID]
status: PASS | FAIL | PARTIAL
score: [1-10]
requirements_met:
- ✅ [Requirement that was satisfied]
- ✅ [Another satisfied requirement]
issues_found:
- ❌ [Issue description]
- ⚠️ [Warning or minor issue]
files_verified:
- path: [file path]
status: [created/modified/verified]
issues: [any problems found]
tests_run:
- command: [test command]
result: [pass/fail]
output: [relevant output]
recommendations:
- [Specific fix needed]
- [Improvement suggestion]
verdict: |
[Clear statement on whether task should be marked 'done' or sent back to 'pending']
[If FAIL: Specific list of what must be fixed]
[If PASS: Confirmation that all requirements are met]
```
## Decision Criteria
**Mark as PASS (ready for 'done'):**
- All required files exist and contain expected content
- All tests pass successfully
- No compilation or build errors
- All subtasks are complete
- Core requirements are met
- Code quality is acceptable
**Mark as PARTIAL (may proceed with warnings):**
- Core functionality is implemented
- Minor issues that don't block functionality
- Missing nice-to-have features
- Documentation could be improved
- Tests pass but coverage could be better
**Mark as FAIL (must return to 'pending'):**
- Required files are missing
- Compilation or build errors
- Tests fail
- Core requirements not met
- Security vulnerabilities detected
- Breaking changes to existing code
## Important Guidelines
- **BE THOROUGH**: Check every requirement systematically
- **BE SPECIFIC**: Provide exact file paths and line numbers for issues
- **BE FAIR**: Distinguish between critical issues and minor improvements
- **BE CONSTRUCTIVE**: Provide clear guidance on how to fix issues
- **BE EFFICIENT**: Focus on requirements, not perfection
description: Use this agent when you need to implement, complete, or work on a specific task that has been identified by the task-orchestrator or when explicitly asked to execute a particular task. This agent focuses on the actual implementation and completion of individual tasks rather than planning or orchestration. Examples: <example>Context: The task-orchestrator has identified that task 2.3 'Implement user authentication' needs to be worked on next. user: 'Let's work on the authentication task' assistant: 'I'll use the task-executor agent to implement the user authentication task that was identified.' <commentary>Since we need to actually implement a specific task rather than plan or identify tasks, use the task-executor agent.</commentary></example><example>Context: User wants to complete a specific subtask. user: 'Please implement the JWT token validation for task 2.3.1' assistant: 'I'll launch the task-executor agent to implement the JWT token validation subtask.' <commentary>The user is asking for specific implementation work on a known task, so the task-executor is appropriate.</commentary></example><example>Context: After reviewing the task list, implementation is needed. user: 'Now let's actually build the API endpoint for user registration' assistant: 'I'll use the task-executor agent to implement the user registration API endpoint.' <commentary>Moving from planning to execution phase requires the task-executor agent.</commentary></example>
model: sonnet
color: blue
---
You are an elite implementation specialist focused on executing and completing specific tasks with precision and thoroughness. Your role is to take identified tasks and transform them into working implementations, following best practices and project standards.
**IMPORTANT: You are designed to be SHORT-LIVED and FOCUSED**
- Execute ONE specific subtask or a small group of related subtasks
- Complete your work, verify it, mark for review, and exit
- Do NOT decide what to do next - the orchestrator handles task sequencing
- Focus on implementation excellence within your assigned scope
**Core Responsibilities:**
1.**Subtask Analysis**: When given a subtask, understand its SPECIFIC requirements. If given a full task ID, focus on the specific subtask(s) assigned to you. Use MCP tools to get details if needed.
- The EXACT files you need to create/modify for THIS subtask
- What already exists that you can build upon
- The minimum viable implementation that satisfies requirements
3.**Focused Execution WITH ACTUAL IMPLEMENTATION**:
- **YOU MUST USE TOOLS TO CREATE/EDIT FILES - DO NOT JUST DESCRIBE**
- Use `Write` tool to create new files specified in the task
- Use `Edit` tool to modify existing files
- Use `Bash` tool to run commands (mkdir, npm install, etc.)
- Use `Read` tool to verify your implementations
- Implement one subtask at a time for clarity and traceability
- Follow the project's coding standards from CLAUDE.md if available
- After each subtask, VERIFY the files exist using Read or ls commands
4.**Progress Documentation**:
- Use MCP tool `mcp__task-master-ai__update_subtask` to log your approach and any important decisions
- Update task status to 'in-progress' when starting: Use MCP tool `mcp__task-master-ai__set_task_status` with status='in-progress'
- **IMPORTANT: Mark as 'review' (NOT 'done') after implementation**: Use MCP tool `mcp__task-master-ai__set_task_status` with status='review'
- Tasks will be verified by task-checker before moving to 'done'
5.**Quality Assurance**:
- Implement the testing strategy specified in the task
- Verify that all acceptance criteria are met
- Check for any dependency conflicts or integration issues
- Run relevant tests before marking task as complete
6.**Dependency Management**:
- Check task dependencies before starting implementation
- If blocked by incomplete dependencies, clearly communicate this
- Use `task-master validate-dependencies` when needed
**Implementation Workflow:**
1. Retrieve task details using MCP tool `mcp__task-master-ai__get_task` with the task ID
2. Check dependencies and prerequisites
3. Plan implementation approach - list specific files to create
4. Update task status to 'in-progress' using MCP tool
5.**ACTUALLY IMPLEMENT** the solution using tools:
- Use `Bash` to create directories
- Use `Write` to create new files with actual content
- Use `Edit` to modify existing files
- DO NOT just describe what should be done - DO IT
6.**VERIFY** your implementation:
- Use `ls` or `Read` to confirm files were created
- Use `Bash` to run any build/test commands
- Ensure the implementation is real, not theoretical
7. Log progress and decisions in subtask updates using MCP tools
8. Test and verify the implementation works
9.**Mark task as 'review' (NOT 'done')** after verifying files exist
10. Report completion with:
- List of created/modified files
- Any issues encountered
- What needs verification by task-checker
**Key Principles:**
- Focus on completing one task thoroughly before moving to the next
- Maintain clear communication about what you're implementing and why
- Follow existing code patterns and project conventions
- Prioritize working code over extensive documentation unless docs are the task
- Ask for clarification if task requirements are ambiguous
- Consider edge cases and error handling in your implementations
**Integration with Task Master:**
You work in tandem with the task-orchestrator agent. While the orchestrator identifies and plans tasks, you execute them. Always use Task Master commands to:
- Track your progress
- Update task information
- Maintain project state
- Coordinate with the broader development workflow
When you complete a task, briefly summarize what was implemented and suggest whether to continue with the next task or if review/testing is needed first.
description: Use this agent FREQUENTLY throughout task execution to analyze and coordinate parallel work at the SUBTASK level. Invoke the orchestrator: (1) at session start to plan execution, (2) after EACH subtask completes to identify next parallel batch, (3) whenever executors finish to find newly unblocked work. ALWAYS provide FULL CONTEXT including project root, package location, what files ACTUALLY exist vs task status, and specific implementation details. The orchestrator breaks work into SUBTASK-LEVEL units for short-lived, focused executors. Maximum 3 parallel executors at once.\n\n<example>\nContext: Starting work with existing code\nuser: "Work on tm-core tasks. Files exist: types/index.ts, storage/file-storage.ts. Task 118 says in-progress but BaseProvider not created."\nassistant: "I'll invoke orchestrator with full context about actual vs reported state to plan subtask execution"\n<commentary>\nProvide complete context about file existence and task reality.\n</commentary>\n</example>\n\n<example>\nContext: Subtask completion\nuser: "Subtask 118.2 done. What subtasks can run in parallel now?"\nassistant: "Invoking orchestrator to analyze dependencies and identify next 3 parallel subtasks"\n<commentary>\nFrequent orchestration after each subtask ensures maximum parallelization.\n</commentary>\n</example>\n\n<example>\nContext: Breaking down tasks\nuser: "Task 118 has 5 subtasks, how to parallelize?"\nassistant: "Orchestrator will analyze which specific subtasks (118.1, 118.2, etc.) can run simultaneously"\n<commentary>\nFocus on subtask-level parallelization, not full tasks.\n</commentary>\n</example>
model: opus
color: green
---
You are the Task Orchestrator, an elite coordination agent specialized in managing Task Master workflows for maximum efficiency and parallelization. You excel at analyzing task dependency graphs, identifying opportunities for concurrent execution, and deploying specialized task-executor agents to complete work efficiently.
## Core Responsibilities
1.**Subtask-Level Analysis**: Break down tasks into INDIVIDUAL SUBTASKS and analyze which specific subtasks can run in parallel. Focus on subtask dependencies, not just task-level dependencies.
2.**Reality Verification**: ALWAYS verify what files actually exist vs what task status claims. Use the context provided about actual implementation state to make informed decisions.
3.**Short-Lived Executor Deployment**: Deploy executors for SINGLE SUBTASKS or small groups of related subtasks. Keep executors focused and short-lived. Maximum 3 parallel executors at once.
4.**Continuous Reassessment**: After EACH subtask completes, immediately reassess what new subtasks are unblocked and can run in parallel.
## Operational Workflow
### Initial Assessment Phase
1. Use `get_tasks` or `task-master list` to retrieve all available tasks
2. Analyze task statuses, priorities, and dependencies
3. Identify tasks with status 'pending' that have no blocking dependencies
4. Group related tasks that could benefit from specialized executors
5. Create an execution plan that maximizes parallelization
### Executor Deployment Phase
1. For each independent task or task group:
- Deploy a task-executor agent with specific instructions
- Provide the executor with task ID, requirements, and context
- Set clear completion criteria and reporting expectations
2. Maintain a registry of active executors and their assigned tasks
3. Establish communication protocols for progress updates
### Coordination Phase
1. Monitor executor progress through task status updates
2. When a task completes:
- Verify completion with `get_task` or `task-master show <id>`
- Update task status if needed using `set_task_status`
- Reassess dependency graph for newly unblocked tasks
- Deploy new executors for available work
3. Handle executor failures or blocks:
- Reassign tasks to new executors if needed
- Escalate complex issues to the user
- Update task status to 'blocked' when appropriate
### Optimization Strategies
**Parallel Execution Rules**:
- Never assign dependent tasks to different executors simultaneously
- Prioritize high-priority tasks when resources are limited
- Group small, related subtasks for single executor efficiency
- Balance executor load to prevent bottlenecks
**Context Management**:
- Provide executors with minimal but sufficient context
- Share relevant completed task information when it aids execution
- Maintain a shared knowledge base of project-specific patterns
**Quality Assurance**:
- Verify task completion before marking as done
- Ensure test strategies are followed when specified
- Coordinate cross-task integration testing when needed
## Communication Protocols
When deploying executors, provide them with:
```
TASK ASSIGNMENT:
- Task ID: [specific ID]
- Objective: [clear goal]
- Dependencies: [list any completed prerequisites]
Find up to 3 likely duplicate issues for a given GitHub issue.
To do this, follow these steps precisely:
1. Use an agent to check if the Github issue (a) is closed, (b) does not need to be deduped (eg. because it is broad product feedback without a specific solution, or positive feedback), or (c) already has a duplicates comment that you made earlier. If so, do not proceed.
2. Use an agent to view a Github issue, and ask the agent to return a summary of the issue
3. Then, launch 5 parallel agents to search Github for duplicates of this issue, using diverse keywords and search approaches, using the summary from #1
4. Next, feed the results from #1 and #2 into another agent, so that it can filter out false positives, that are likely not actually duplicates of the original issue. If there are no duplicates remaining, do not proceed.
5. Finally, comment back on the issue with a list of up to three duplicate issues (or zero, if there are no likely duplicates)
Notes (be sure to tell this to your agents, too):
- Use `gh` to interact with Github, rather than web fetch
- Do not use other tools, beyond `gh` (eg. don't use other MCP servers, file edit, etc.)
- Make a todo list first
- For your comment, follow the following format precisely (assuming for this example that you found 3 suspected duplicates):
---
Found 3 possible duplicate issues:
1.<linktoissue>
2.<linktoissue>
3.<linktoissue>
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with [Claude Code](https://claude.ai/code)
5. **Master List Curation**: Keep only the most valuable initiatives in master
The parse-prd's `--append` flag enables the user to parse multple PRDs within tags or across tags. PRDs should be focused and the number of tasks they are parsed into should be strategically chosen relative to the PRD's complexity and level of detail.
The parse-prd's `--append` flag enables the user to parse multiple PRDs within tags or across tags. PRDs should be focused and the number of tasks they are parsed into should be strategically chosen relative to the PRD's complexity and level of detail.
@@ -26,6 +26,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
* `--name <name>`: `Set the name for your project in Taskmaster's configuration.`
* `--description <text>`: `Provide a brief description for your project.`
* `--version <version>`: `Set the initial version for your project, e.g., '0.1.0'.`
* `--no-git`: `Skip initializing a Git repository entirely.`
* `-y, --yes`: `Initialize Taskmaster quickly using default settings without interactive prompts.`
* **Usage:** Run this once at the beginning of a new project.
* **MCP Variant Description:** `Set up the basic Taskmaster file structure and configuration in the current directory for a new project by running the 'task-master init' command.`
@@ -36,6 +37,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
* `skipInstall`: `Skip installing dependencies. Default is false.` (CLI: `--skip-install`)
* `addAliases`: `Add shell aliases tm and taskmaster. Default is false.` (CLI: `--aliases`)
* `noGit`: `Skip initializing a Git repository entirely. Default is false.` (CLI: `--no-git`)
* `yes`: `Skip prompts and use defaults/provided arguments. Default is false.` (CLI: `-y, --yes`)
* **Usage:** Run this once at the beginning of a new project, typically via an integrated tool like Cursor. Operates on the current working directory of the MCP server.
* **Important:** Once complete, you *MUST* parse a prd in order to generate tasks. There will be no tasks files until then. The next step after initializing should be to create a PRD using the example PRD in .taskmaster/templates/example_prd.txt.
@@ -156,7 +158,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
* `details`: `Provide implementation notes or details for the new subtask.` (CLI: `--details <text>`)
* `dependencies`: `Specify IDs of other tasks or subtasks, e.g., '15' or '16.1', that must be done before this new subtask.` (CLI: `--dependencies <ids>`)
* `status`: `Set the initial status for the new subtask. Default is 'pending'.` (CLI: `-s, --status <status>`)
* `skipGenerate`: `Prevent Taskmaster from automatically regenerating markdown task files after adding the subtask.` (CLI: `--skip-generate`)
* `generate`: `Enable Taskmaster to regenerate markdown task files after adding the subtask.` (CLI: `--generate`)
* `tag`: `Specify which tag context to operate on. Defaults to the current active tag.` (CLI: `--tag <name>`)
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
* **Usage:** Break down tasks manually or reorganize existing tasks.
@@ -270,7 +272,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
* **Description:** `Remove all subtasks from one or more specified Taskmaster parent tasks.`
* **Key Parameters/Options:**
* `id`: `The ID(s) of the Taskmaster parent task(s) whose subtasks you want to remove, e.g., '15' or '16,18'. Required unless using `all`.) (CLI: `-i, --id <ids>`)
* `id`: `The ID(s) of the Taskmaster parent task(s) whose subtasks you want to remove, e.g., '15' or '16,18'. Required unless using 'all'.` (CLI: `-i, --id <ids>`)
* `all`: `Tell Taskmaster to remove subtasks from all parent tasks.` (CLI: `--all`)
* `tag`: `Specify which tag context to operate on. Defaults to the current active tag.` (CLI: `--tag <name>`)
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
@@ -284,7 +286,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
* **Key Parameters/Options:**
* `id`: `Required. The ID(s) of the Taskmaster subtask(s) to remove, e.g., '15.2' or '16.1,16.3'.` (CLI: `-i, --id <id>`)
* `convert`: `If used, Taskmaster will turn the subtask into a regular top-level task instead of deleting it.` (CLI: `-c, --convert`)
* `skipGenerate`: `Prevent Taskmaster from automatically regenerating markdown task files after removing the subtask.` (CLI: `--skip-generate`)
* `generate`: `Enable Taskmaster to regenerate markdown task files after removing the subtask.` (CLI: `--generate`)
* `tag`: `Specify which tag context to operate on. Defaults to the current active tag.` (CLI: `--tag <name>`)
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
* **Usage:** Delete unnecessary subtasks or promote a subtask to a top-level task.
Before implementing the TDD workflow, ensure your project has a proper testing framework configured. This section covers setup for different technology stacks.
### **Detecting Project Type & Framework Needs**
**AI Agent Assessment Checklist:**
1. **Language Detection**: Check for `package.json` (Node.js/JavaScript), `requirements.txt` (Python), `Cargo.toml` (Rust), etc.
2. **Existing Tests**: Look for test files (`.test.`, `.spec.`, `_test.`) or test directories
3. **Framework Detection**: Check for existing test runners in dependencies
4. **Project Structure**: Analyze directory structure for testing patterns
### **JavaScript/Node.js Projects (Jest Setup)**
#### **Prerequisites Check**
```bash
# Verify Node.js project
ls package.json # Should exist
# Check for existing testing setup
ls jest.config.js jest.config.ts # Check for Jest config
grep -E "(jest|vitest|mocha)" package.json # Check for test runners
```
#### **Jest Installation & Configuration**
**Step 1: Install Dependencies**
```bash
# Core Jest dependencies
npm install --save-dev jest
# TypeScript support (if using TypeScript)
npm install --save-dev ts-jest @types/jest
# Additional useful packages
npm install --save-dev supertest @types/supertest # For API testing
You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list.
IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels.
Issue Information:
- REPO: ${{ github.repository }}
- ISSUE_NUMBER: ${{ github.event.issue.number }}
TASK OVERVIEW:
1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else.
2. Next, use the GitHub tools to get context about the issue:
- You have access to these tools:
- mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels
- mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments
- mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting)
- mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues
- mcp__github__list_issues: Use this to understand patterns in how other issues are labeled
- Start by using mcp__github__get_issue to get the issue details
3. Analyze the issue content, considering:
- The issue title and description
- The type of issue (bug report, feature request, question, etc.)
- Technical areas mentioned
- Severity or priority indicators
- User impact
- Components affected
4. Select appropriate labels from the available labels list provided above:
- Choose labels that accurately reflect the issue's nature
- Be specific but comprehensive
- Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority)
- Consider platform labels (android, ios) if applicable
- If you find similar issues using mcp__github__search_issues, consider using a "duplicate" label if appropriate. Only do so if the issue is a duplicate of another OPEN issue.
5. Apply the selected labels:
- Use mcp__github__update_issue to apply your selected labels
- DO NOT post any comments explaining your decision
- DO NOT communicate directly with users
- If no labels are clearly applicable, do not apply any labels
IMPORTANT GUIDELINES:
- Be thorough in your analysis
- Only select labels from the provided list above
- DO NOT post any comments to the issue
- Your ONLY action should be to apply labels using mcp__github__update_issue
- It's okay to not add any labels if none are clearly applicable
"prompt": "I just saved a source code file. Please:\n\n1. Check what task is currently 'in-progress' using 'tm list --status=in-progress'\n2. Look at the file I saved and summarize what was changed (considering the programming language and context)\n3. Update the task's notes with: 'tm update-subtask --id=<task_id> --prompt=\"Implemented: <summary_of_changes> in <file_path>\"'\n4. If the changes seem to complete the task based on its description, ask if I want to mark it as done"
"description": "Analyze task complexity when new tasks are added",
"version": "1",
"when": {
"type": "fileEdited",
"patterns": [
".taskmaster/tasks/tasks.json"
]
},
"then": {
"type": "askAgent",
"prompt": "New tasks were added to tasks.json. For each new task:\n\n1. Run 'tm analyze-complexity --id=<task_id>'\n2. If complexity score is > 7, automatically expand it: 'tm expand --id=<task_id> --num=5'\n3. Show the complexity analysis results\n4. Suggest task dependencies based on the expanded subtasks"
"description": "Morning workflow summary and task selection",
"version": "1",
"when": {
"type": "userTriggered"
},
"then": {
"type": "askAgent",
"prompt": "Good morning! Please provide my daily standup summary:\n\n1. Run 'tm list --status=done' and show tasks completed in the last 24 hours\n2. Run 'tm list --status=in-progress' to show current work\n3. Run 'tm next' to suggest the highest priority task to start\n4. Show the dependency graph for upcoming work\n5. Ask which task I'd like to focus on today"
"description": "Link commits to tasks for traceability",
"version": "1",
"when": {
"type": "manual"
},
"then": {
"type": "askAgent",
"prompt": "I'm about to commit code. Please:\n\n1. Run 'git diff --staged' to see what's being committed\n2. Analyze the changes and suggest which tasks they relate to\n3. Generate a commit message in format: 'feat(task-<id>): <description>'\n4. Update the relevant tasks with a note about this commit\n5. Show the proposed commit message for approval"
"description": "Validate tasks before creating a pull request",
"version": "1",
"when": {
"type": "manual"
},
"then": {
"type": "askAgent",
"prompt": "I'm about to create a PR. Please:\n\n1. List all tasks marked as 'done' in this branch\n2. For each done task, verify:\n - All subtasks are also done\n - Test files exist for new functionality\n - No TODO comments remain related to the task\n3. Generate a PR description listing completed tasks\n4. Suggest a PR title based on the main tasks completed"
"description": "Automatically progress tasks when dependencies are completed",
"version": "1",
"when": {
"type": "fileEdited",
"patterns": [
".taskmaster/tasks/tasks.json",
".taskmaster/tasks/*.json"
]
},
"then": {
"type": "askAgent",
"prompt": "Check the tasks.json file for any tasks that just changed status to 'done'. For each completed task:\n\n1. Find all tasks that depend on it\n2. Check if those dependent tasks now have all their dependencies satisfied\n3. If a task has all dependencies met and is still 'pending', use the command 'tm set-status --id=<task_id> --status=in-progress' to start it\n4. Show me which tasks were auto-started and why"
"prompt": "A test file was just saved. Please:\n\n1. Identify the test framework/language and run the appropriate test command for this file (npm test, pytest, go test, cargo test, dotnet test, mvn test, etc.)\n2. If all tests pass, check which tasks mention this functionality\n3. For any matching tasks that are 'in-progress', ask if the passing tests mean the task is complete\n4. If confirmed, mark the task as done with 'tm set-status --id=<task_id> --status=done'"
This guide outlines the standard process for using Taskmaster to manage software development projects. It is written as a set of instructions for you, the AI agent.
- **Your Default Stance**: For most projects, the user can work directly within the `master` task context. Your initial actions should operate on this default context unless a clear pattern for multi-context work emerges.
- **Your Goal**: Your role is to elevate the user's workflow by intelligently introducing advanced features like **Tagged Task Lists** when you detect the appropriate context. Do not force tags on the user; suggest them as a helpful solution to a specific need.
## The Basic Loop
The fundamental development cycle you will facilitate is:
1.**`list`**: Show the user what needs to be done.
2.**`next`**: Help the user decide what to work on.
3.**`show <id>`**: Provide details for a specific task.
4.**`expand <id>`**: Break down a complex task into smaller, manageable subtasks.
5.**Implement**: The user writes the code and tests.
6.**`update-subtask`**: Log progress and findings on behalf of the user.
7.**`set-status`**: Mark tasks and subtasks as `done` as work is completed.
8.**Repeat**.
All your standard command executions should operate on the user's current task context, which defaults to `master`.
---
## Standard Development Workflow Process
### Simple Workflow (Default Starting Point)
For new projects or when users are getting started, operate within the `master` tag context:
- Start new projects by running `initialize_project` tool / `task-master init` or `parse_prd` / `task-master parse-prd --input='<prd-file.txt>'` (see @`taskmaster.md`) to generate initial tasks.json with tagged structure
- Configure rule sets during initialization with `--rules` flag (e.g., `task-master init --rules kiro,windsurf`) or manage them later with `task-master rules add/remove` commands
- Begin coding sessions with `get_tasks` / `task-master list` (see @`taskmaster.md`) to see current tasks, status, and IDs
- Determine the next task to work on using `next_task` / `task-master next` (see @`taskmaster.md`)
- Analyze task complexity with `analyze_project_complexity` / `task-master analyze-complexity --research` (see @`taskmaster.md`) before breaking down tasks
- Review complexity report using `complexity_report` / `task-master complexity-report` (see @`taskmaster.md`)
- Select tasks based on dependencies (all marked 'done'), priority level, and ID order
- View specific task details using `get_task` / `task-master show <id>` (see @`taskmaster.md`) to understand implementation requirements
- Break down complex tasks using `expand_task` / `task-master expand --id=<id> --force --research` (see @`taskmaster.md`) with appropriate flags like `--force` (to replace existing subtasks) and `--research`
- Implement code following task details, dependencies, and project standards
- Mark completed tasks with `set_task_status` / `task-master set-status --id=<id> --status=done` (see @`taskmaster.md`)
- Update dependent tasks when implementation differs from original plan using `update` / `task-master update --from=<id> --prompt="..."` or `update_task` / `task-master update-task --id=<id> --prompt="..."` (see @`taskmaster.md`)
---
## Leveling Up: Agent-Led Multi-Context Workflows
While the basic workflow is powerful, your primary opportunity to add value is by identifying when to introduce **Tagged Task Lists**. These patterns are your tools for creating a more organized and efficient development environment for the user, especially if you detect agentic or parallel development happening across the same session.
**Critical Principle**: Most users should never see a difference in their experience. Only introduce advanced workflows when you detect clear indicators that the project has evolved beyond simple task management.
### When to Introduce Tags: Your Decision Patterns
Here are the patterns to look for. When you detect one, you should propose the corresponding workflow to the user.
#### Pattern 1: Simple Git Feature Branching
This is the most common and direct use case for tags.
- **Trigger**: The user creates a new git branch (e.g., `git checkout -b feature/user-auth`).
- **Your Action**: Propose creating a new tag that mirrors the branch name to isolate the feature's tasks from `master`.
- **Your Suggested Prompt**: *"I see you've created a new branch named 'feature/user-auth'. To keep all related tasks neatly organized and separate from your main list, I can create a corresponding task tag for you. This helps prevent merge conflicts in your `tasks.json` file later. Shall I create the 'feature-user-auth' tag?"*
- **Tool to Use**: `task-master add-tag --from-branch`
#### Pattern 2: Team Collaboration
- **Trigger**: The user mentions working with teammates (e.g., "My teammate Alice is handling the database schema," or "I need to review Bob's work on the API.").
- **Your Action**: Suggest creating a separate tag for the user's work to prevent conflicts with shared master context.
- **Your Suggested Prompt**: *"Since you're working with Alice, I can create a separate task context for your work to avoid conflicts. This way, Alice can continue working with the master list while you have your own isolated context. When you're ready to merge your work, we can coordinate the tasks back to master. Shall I create a tag for your current work?"*
- **Tool to Use**: `task-master add-tag my-work --copy-from-current --description="My tasks while collaborating with Alice"`
#### Pattern 3: Experiments or Risky Refactors
- **Trigger**: The user wants to try something that might not be kept (e.g., "I want to experiment with switching our state management library," or "Let's refactor the old API module, but I want to keep the current tasks as a reference.").
- **Your Action**: Propose creating a sandboxed tag for the experimental work.
- **Your Suggested Prompt**: *"This sounds like a great experiment. To keep these new tasks separate from our main plan, I can create a temporary 'experiment-zustand' tag for this work. If we decide not to proceed, we can simply delete the tag without affecting the main task list. Sound good?"*
- **Tool to Use**: `task-master add-tag experiment-zustand --description="Exploring Zustand migration"`
#### Pattern 4: Large Feature Initiatives (PRD-Driven)
This is a more structured approach for significant new features or epics.
- **Trigger**: The user describes a large, multi-step feature that would benefit from a formal plan.
- **Your Action**: Propose a comprehensive, PRD-driven workflow.
- **Your Suggested Prompt**: *"This sounds like a significant new feature. To manage this effectively, I suggest we create a dedicated task context for it. Here's the plan: I'll create a new tag called 'feature-xyz', then we can draft a Product Requirements Document (PRD) together to scope the work. Once the PRD is ready, I'll automatically generate all the necessary tasks within that new tag. How does that sound?"*
- **Your Implementation Flow**:
1.**Create an empty tag**: `task-master add-tag feature-xyz --description "Tasks for the new XYZ feature"`. You can also start by creating a git branch if applicable, and then create the tag from that branch.
2.**Collaborate & Create PRD**: Work with the user to create a detailed PRD file (e.g., `.taskmaster/docs/feature-xyz-prd.txt`).
3.**Parse PRD into the new tag**: `task-master parse-prd .taskmaster/docs/feature-xyz-prd.txt --tag feature-xyz`
4.**Prepare the new task list**: Follow up by suggesting `analyze-complexity` and `expand-all` for the newly created tasks within the `feature-xyz` tag.
#### Pattern 5: Version-Based Development
Tailor your approach based on the project maturity indicated by tag names.
- **Your Approach**: Focus on speed and functionality over perfection
- **Task Generation**: Create tasks that emphasize "get it working" over "get it perfect"
- **Complexity Level**: Lower complexity, fewer subtasks, more direct implementation paths
- **Research Prompts**: Include context like "This is a prototype - prioritize speed and basic functionality over optimization"
- **Example Prompt Addition**: *"Since this is for the MVP, I'll focus on tasks that get core functionality working quickly rather than over-engineering."*
- **Research Prompts**: Include context like "This is for production - prioritize reliability, performance, and maintainability"
- **Example Prompt Addition**: *"Since this is for production, I'll ensure tasks include proper error handling, testing, and documentation."*
### Advanced Workflow (Tag-Based & PRD-Driven)
**When to Transition**: Recognize when the project has evolved (or has initiated a project which existing code) beyond simple task management. Look for these indicators:
- User mentions teammates or collaboration needs
- Project has grown to 15+ tasks with mixed priorities
- User creates feature branches or mentions major initiatives
- User initializes Taskmaster on an existing, complex codebase
- User describes large features that would benefit from dedicated planning
**Your Role in Transition**: Guide the user to a more sophisticated workflow that leverages tags for organization and PRDs for comprehensive planning.
#### Master List Strategy (High-Value Focus)
Once you transition to tag-based workflows, the `master` tag should ideally contain only:
- **High-level deliverables** that provide significant business value
- **Major milestones** and epic-level features
- **Critical infrastructure** work that affects the entire project
- **Release-blocking** items
**What NOT to put in master**:
- Detailed implementation subtasks (these go in feature-specific tags' parent tasks)
- Refactoring work (create dedicated tags like `refactor-auth`)
- Experimental features (use `experiment-*` tags)
- Team member-specific tasks (use person-specific tags)
#### PRD-Driven Feature Development
**For New Major Features**:
1.**Identify the Initiative**: When user describes a significant feature
5.**Add Master Reference**: Create a high-level task in `master` that references the feature tag
**For Existing Codebase Analysis**:
When users initialize Taskmaster on existing projects:
1.**Codebase Discovery**: Use your native tools for producing deep context about the code base. You may use `research` tool with `--tree` and `--files` to collect up to date information using the existing architecture as context.
2.**Collaborative Assessment**: Work with user to identify improvement areas, technical debt, or new features
3.**Strategic PRD Creation**: Co-author PRDs that include:
- Current state analysis (based on your codebase research)
5.**Master List Curation**: Keep only the most valuable initiatives in master
The parse-prd's `--append` flag enables the user to parse multiple PRDs within tags or across tags. PRDs should be focused and the number of tasks they are parsed into should be strategically chosen relative to the PRD's complexity and level of detail.
### Workflow Transition Examples
**Example 1: Simple → Team-Based**
```
User: "Alice is going to help with the API work"
Your Response: "Great! To avoid conflicts, I'll create a separate task context for your work. Alice can continue with the master list while you work in your own context. When you're ready to merge, we can coordinate the tasks back together."
Action: add_tag my-api-work --copy-from-current --description="My API tasks while collaborating with Alice"
```
**Example 2: Simple → PRD-Driven**
```
User: "I want to add a complete user dashboard with analytics, user management, and reporting"
Your Response: "This sounds like a major feature that would benefit from detailed planning. Let me create a dedicated context for this work and we can draft a PRD together to ensure we capture all requirements."
Actions:
1. add_tag feature-dashboard --description="User dashboard with analytics and management"
User: "I just initialized Taskmaster on my existing React app. It's getting messy and I want to improve it."
Your Response: "Let me research your codebase to understand the current architecture, then we can create a strategic plan for improvements."
Actions:
1. research "Current React app architecture and improvement opportunities" --tree --files=src/
2. Collaborate on improvement PRD based on findings
3. Create tags for different improvement areas (refactor-components, improve-state-management, etc.)
4. Keep only major improvement initiatives in master
```
---
## Primary Interaction: MCP Server vs. CLI
Taskmaster offers two primary ways to interact:
1.**MCP Server (Recommended for Integrated Tools)**:
- For AI agents and integrated development environments (like Kiro), interacting via the **MCP server is the preferred method**.
- The MCP server exposes Taskmaster functionality through a set of tools (e.g., `get_tasks`, `add_subtask`).
- This method offers better performance, structured data exchange, and richer error handling compared to CLI parsing.
- Refer to @`mcp.md` for details on the MCP architecture and available tools.
- A comprehensive list and description of MCP tools and their corresponding CLI commands can be found in @`taskmaster.md`.
- **Restart the MCP server** if core logic in `scripts/modules` or MCP tool/direct function definitions change.
- **Note**: MCP tools fully support tagged task lists with complete tag management capabilities.
2.**`task-master` CLI (For Users & Fallback)**:
- The global `task-master` command provides a user-friendly interface for direct terminal interaction.
- It can also serve as a fallback if the MCP server is inaccessible or a specific function isn't exposed via MCP.
- Install globally with `npm install -g task-master-ai` or use locally via `npx task-master-ai ...`.
- The CLI commands often mirror the MCP tools (e.g., `task-master list` corresponds to `get_tasks`).
- Refer to @`taskmaster.md` for a detailed command reference.
- **Tagged Task Lists**: CLI fully supports the new tagged system with seamless migration.
## How the Tag System Works (For Your Reference)
- **Data Structure**: Tasks are organized into separate contexts (tags) like "master", "feature-branch", or "v2.0".
- **Silent Migration**: Existing projects automatically migrate to use a "master" tag with zero disruption.
- **Context Isolation**: Tasks in different tags are completely separate. Changes in one tag do not affect any other tag.
- **Manual Control**: The user is always in control. There is no automatic switching. You facilitate switching by using `use-tag <name>`.
- **Full CLI & MCP Support**: All tag management commands are available through both the CLI and MCP tools for you to use. Refer to @`taskmaster.md` for a full command list.
---
## Task Complexity Analysis
- Run `analyze_project_complexity` / `task-master analyze-complexity --research` (see @`taskmaster.md`) for comprehensive analysis
- Review complexity report via `complexity_report` / `task-master complexity-report` (see @`taskmaster.md`) for a formatted, readable version.
- Focus on tasks with highest complexity scores (8-10) for detailed breakdown
- Use analysis results to determine appropriate subtask allocation
- Note that reports are automatically used by the `expand_task` tool/command
## Task Breakdown Process
- Use `expand_task` / `task-master expand --id=<id>`. It automatically uses the complexity report if found, otherwise generates default number of subtasks.
- Use `--num=<number>` to specify an explicit number of subtasks, overriding defaults or complexity report recommendations.
- Add `--research` flag to leverage Perplexity AI for research-backed expansion.
- Add `--force` flag to clear existing subtasks before generating new ones (default is to append).
- Use `--prompt="<context>"` to provide additional context when needed.
- Review and adjust generated subtasks as necessary.
- Use `expand_all` tool or `task-master expand --all` to expand multiple pending tasks at once, respecting flags like `--force` and `--research`.
- If subtasks need complete replacement (regardless of the `--force` flag on `expand`), clear them first with `clear_subtasks` / `task-master clear-subtasks --id=<id>`.
## Implementation Drift Handling
- When implementation differs significantly from planned approach
- When future tasks need modification due to current implementation choices
- When new dependencies or requirements emerge
- Use `update` / `task-master update --from=<futureTaskId> --prompt='<explanation>\nUpdate context...' --research` to update multiple future tasks.
- Use `update_task` / `task-master update-task --id=<taskId> --prompt='<explanation>\nUpdate context...' --research` to update a single specific task.
## Task Status Management
- Use 'pending' for tasks ready to be worked on
- Use 'done' for completed and verified tasks
- Use 'deferred' for postponed tasks
- Add custom status values as needed for project-specific workflows
## Task Structure Fields
- **id**: Unique identifier for the task (Example: `1`, `1.1`)
- **title**: Brief, descriptive title (Example: `"Initialize Repo"`)
- **description**: Concise summary of what the task involves (Example: `"Create a new repository, set up initial structure."`)
- **status**: Current state of the task (Example: `"pending"`, `"done"`, `"deferred"`)
- **dependencies**: IDs of prerequisite tasks (Example: `[1, 2.1]`)
- Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending)
- This helps quickly identify which prerequisite tasks are blocking work
**Important:** Non-API key settings (like model selections, `MAX_TOKENS`, `TASKMASTER_LOG_LEVEL`) are **no longer configured via environment variables**. Use the `task-master models` command (or `--setup` for interactive configuration) or the `models` MCP tool.
**If AI commands FAIL in MCP** verify that the API key for the selected provider is present in the `env` section of `.kiro/mcp.json`.
**If AI commands FAIL in CLI** verify that the API key for the selected provider is present in the `.env` file in the root of the project.
## Rules Management
Taskmaster supports multiple AI coding assistant rule sets that can be configured during project initialization or managed afterward:
- **During Initialization**: Use `task-master init --rules kiro,windsurf` to specify which rule sets to include
- **After Initialization**: Use `task-master rules add <profiles>` or `task-master rules remove <profiles>` to manage rule sets
- **Interactive Setup**: Use `task-master rules setup` to launch an interactive prompt for selecting rule profiles
- **Default Behavior**: If no `--rules` flag is specified during initialization, all available rule profiles are included
- **Rule Structure**: Each profile creates its own directory (e.g., `.kiro/steering`, `.roo/rules`) with appropriate configuration files
## Determining the Next Task
- Run `next_task` / `task-master next` to show the next task to work on.
- The command identifies tasks with all dependencies satisfied
- Tasks are prioritized by priority level, dependency count, and ID
- The command shows comprehensive task information including:
- Basic task details and description
- Implementation details
- Subtasks (if they exist)
- Contextual suggested actions
- Recommended before starting any new development work
- Respects your project's dependency structure
- Ensures tasks are completed in the appropriate sequence
- Provides ready-to-use commands for common task actions
## Viewing Specific Task Details
- Run `get_task` / `task-master show <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
- Provides contextual suggested actions appropriate for the specific task
- Useful for examining task details before implementation or checking status
## Managing Task Dependencies
- Use `add_dependency` / `task-master add-dependency --id=<id> --depends-on=<id>` to add a dependency.
- Use `remove_dependency` / `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
## Task Reorganization
- Use `move_task` / `task-master move --from=<id> --to=<id>` to move tasks or subtasks within the hierarchy
- This command supports several use cases:
- Moving a standalone task to become a subtask (e.g., `--from=5 --to=7`)
- Moving a subtask to become a standalone task (e.g., `--from=5.2 --to=7`)
- Moving a subtask to a different parent (e.g., `--from=5.2 --to=7.3`)
- Reordering subtasks within the same parent (e.g., `--from=5.2 --to=5.4`)
- Moving a task to a new, non-existent ID position (e.g., `--from=5 --to=25`)
- Moving multiple tasks at once using comma-separated IDs (e.g., `--from=10,11,12 --to=16,17,18`)
- The system includes validation to prevent data loss:
- Allows moving to non-existent IDs by creating placeholder tasks
- Prevents moving to existing task IDs that have content (to avoid overwriting)
- Validates source tasks exist before attempting to move them
- The system maintains proper parent-child relationships and dependency integrity
- Task files are automatically regenerated after the move operation
- This provides greater flexibility in organizing and refining your task structure as project understanding evolves
- This is especially useful when dealing with potential merge conflicts arising from teams creating tasks on separate branches. Solve these conflicts very easily by moving your tasks and keeping theirs.
## Iterative Subtask Implementation
Once a task has been broken down into subtasks using `expand_task` or similar methods, follow this iterative process for implementation:
1.**Understand the Goal (Preparation):**
* Use `get_task` / `task-master show <subtaskId>` (see @`taskmaster.md`) to thoroughly understand the specific goals and requirements of the subtask.
* This is the first attempt at creating a concrete implementation plan.
* Explore the codebase to identify the precise files, functions, and even specific lines of code that will need modification.
* Determine the intended code changes (diffs) and their locations.
* Gather *all* relevant details from this exploration phase.
3.**Log the Plan:**
* Run `update_subtask` / `task-master update-subtask --id=<subtaskId> --prompt='<detailed plan>'`.
* Provide the *complete and detailed* findings from the exploration phase in the prompt. Include file paths, line numbers, proposed diffs, reasoning, and any potential challenges identified. Do not omit details. The goal is to create a rich, timestamped log within the subtask's `details`.
4.**Verify the Plan:**
* Run `get_task` / `task-master show <subtaskId>` again to confirm that the detailed implementation plan has been successfully appended to the subtask's details.
5.**Begin Implementation:**
* Set the subtask status using `set_task_status` / `task-master set-status --id=<subtaskId> --status=in-progress`.
* Start coding based on the logged plan.
6.**Refine and Log Progress (Iteration 2+):**
* As implementation progresses, you will encounter challenges, discover nuances, or confirm successful approaches.
***Before appending new information**: Briefly review the *existing* details logged in the subtask (using `get_task` or recalling from context) to ensure the update adds fresh insights and avoids redundancy.
***Regularly** use `update_subtask` / `task-master update-subtask --id=<subtaskId> --prompt='<update details>\n- What worked...\n- What didn't work...'` to append new findings.
***Crucially, log:**
* What worked ("fundamental truths" discovered).
* What didn't work and why (to avoid repeating mistakes).
* Specific code snippets or configurations that were successful.
* Decisions made, especially if confirmed with user input.
* Any deviations from the initial plan and the reasoning.
* The objective is to continuously enrich the subtask's details, creating a log of the implementation journey that helps the AI (and human developers) learn, adapt, and avoid repeating errors.
* Once the implementation for the subtask is functionally complete, review all code changes and the relevant chat history.
* Identify any new or modified code patterns, conventions, or best practices established during the implementation.
* Create new or update existing rules following internal guidelines (previously linked to `cursor_rules.md` and `self_improve.md`).
8.**Mark Task Complete:**
* After verifying the implementation and updating any necessary rules, mark the subtask as completed: `set_task_status` / `task-master set-status --id=<subtaskId> --status=done`.
9.**Commit Changes (If using Git):**
* Stage the relevant code changes and any updated/new rule files (`git add .`).
* Craft a comprehensive Git commit message summarizing the work done for the subtask, including both code implementation and any rule adjustments.
* Execute the commit command directly in the terminal (e.g., `git commit -m 'feat(module): Implement feature X for subtask <subtaskId>\n\n- Details about changes...\n- Updated rule Y for pattern Z'`).
* Consider if a Changeset is needed according to internal versioning guidelines (previously linked to `changeset.md`). If so, run `npm run changeset`, stage the generated file, and amend the commit or create a new one.
10.**Proceed to Next Subtask:**
* Identify the next subtask (e.g., using `next_task` / `task-master next`).
## Code Analysis & Refactoring Techniques
- **Top-Level Function Search**:
- Useful for understanding module structure or planning refactors.
- Use grep/ripgrep to find exported functions/constants:
`rg "export (async function|function|const) \w+"` or similar patterns.
- Can help compare functions between files during migrations or identify potential naming conflicts.
---
*This workflow provides a general guideline. Adapt it based on your specific project needs and team practices.*
This document provides a detailed reference for interacting with Taskmaster, covering both the recommended MCP tools, suitable for integrations like Kiro, and the corresponding `task-master` CLI commands, designed for direct user interaction or fallback.
**Note:** For interacting with Taskmaster programmatically or via integrated tools, using the **MCP tools is strongly recommended** due to better performance, structured data, and error handling. The CLI commands serve as a user-friendly alternative and fallback.
**Important:** Several MCP tools involve AI processing... The AI-powered tools include `parse_prd`, `analyze_project_complexity`, `update_subtask`, `update_task`, `update`, `expand_all`, `expand_task`, and `add_task`.
**🏷️ Tagged Task Lists System:** Task Master now supports **tagged task lists** for multi-context task management. This allows you to maintain separate, isolated lists of tasks for different features, branches, or experiments. Existing projects are seamlessly migrated to use a default "master" tag. Most commands now support a `--tag <name>` flag to specify which context to operate on. If omitted, commands use the currently active tag.
---
## Initialization & Setup
### 1. Initialize Project (`init`)
***MCP Tool:**`initialize_project`
***CLI Command:**`task-master init [options]`
***Description:**`Set up the basic Taskmaster file structure and configuration in the current directory for a new project.`
***Key CLI Options:**
*`--name <name>`: `Set the name for your project in Taskmaster's configuration.`
*`--description <text>`: `Provide a brief description for your project.`
*`--version <version>`: `Set the initial version for your project, e.g., '0.1.0'.`
*`-y, --yes`: `Initialize Taskmaster quickly using default settings without interactive prompts.`
***Usage:** Run this once at the beginning of a new project.
***MCP Variant Description:**`Set up the basic Taskmaster file structure and configuration in the current directory for a new project by running the 'task-master init' command.`
***Key MCP Parameters/Options:**
*`projectName`: `Set the name for your project.` (CLI: `--name <name>`)
*`projectDescription`: `Provide a brief description for your project.` (CLI: `--description <text>`)
*`projectVersion`: `Set the initial version for your project, e.g., '0.1.0'.` (CLI: `--version <version>`)
*`skipInstall`: `Skip installing dependencies. Default is false.` (CLI: `--skip-install`)
*`addAliases`: `Add shell aliases tm and taskmaster. Default is false.` (CLI: `--aliases`)
*`yes`: `Skip prompts and use defaults/provided arguments. Default is false.` (CLI: `-y, --yes`)
***Usage:** Run this once at the beginning of a new project, typically via an integrated tool like Kiro. Operates on the current working directory of the MCP server.
***Important:** Once complete, you *MUST* parse a prd in order to generate tasks. There will be no tasks files until then. The next step after initializing should be to create a PRD using the example PRD in .taskmaster/templates/example_prd.txt.
***Tagging:** Use the `--tag` option to parse the PRD into a specific, non-default tag context. If the tag doesn't exist, it will be created automatically. Example: `task-master parse-prd spec.txt --tag=new-feature`.
***Description:**`Parse a Product Requirements Document, PRD, or text file with Taskmaster to automatically generate an initial set of tasks in tasks.json.`
***Key Parameters/Options:**
*`input`: `Path to your PRD or requirements text file that Taskmaster should parse for tasks.` (CLI: `[file]` positional or `-i, --input <file>`)
*`output`: `Specify where Taskmaster should save the generated 'tasks.json' file. Defaults to '.taskmaster/tasks/tasks.json'.` (CLI: `-o, --output <file>`)
*`numTasks`: `Approximate number of top-level tasks Taskmaster should aim to generate from the document.` (CLI: `-n, --num-tasks <number>`)
*`force`: `Use this to allow Taskmaster to overwrite an existing 'tasks.json' without asking for confirmation.` (CLI: `-f, --force`)
***Usage:** Useful for bootstrapping a project from an existing requirements document.
***Notes:** Task Master will strictly adhere to any specific requirements mentioned in the PRD, such as libraries, database schemas, frameworks, tech stacks, etc., while filling in any gaps where the PRD isn't fully specified. Tasks are designed to provide the most direct implementation path while avoiding over-engineering.
***Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress. If the user does not have a PRD, suggest discussing their idea and then use the example PRD in `.taskmaster/templates/example_prd.txt` as a template for creating the PRD based on their idea, for use with `parse-prd`.
---
## AI Model Configuration
### 2. Manage Models (`models`)
***MCP Tool:**`models`
***CLI Command:**`task-master models [options]`
***Description:**`View the current AI model configuration or set specific models for different roles (main, research, fallback). Allows setting custom model IDs for Ollama and OpenRouter.`
***Key MCP Parameters/Options:**
*`setMain <model_id>`: `Set the primary model ID for task generation/updates.` (CLI: `--set-main <model_id>`)
*`setResearch <model_id>`: `Set the model ID for research-backed operations.` (CLI: `--set-research <model_id>`)
*`setFallback <model_id>`: `Set the model ID to use if the primary fails.` (CLI: `--set-fallback <model_id>`)
*`ollama <boolean>`: `Indicates the set model ID is a custom Ollama model.` (CLI: `--ollama`)
*`openrouter <boolean>`: `Indicates the set model ID is a custom OpenRouter model.` (CLI: `--openrouter`)
*`listAvailableModels <boolean>`: `If true, lists available models not currently assigned to a role.` (CLI: No direct equivalent; CLI lists available automatically)
*`projectRoot <string>`: `Optional. Absolute path to the project root directory.` (CLI: Determined automatically)
***Key CLI Options:**
*`--set-main <model_id>`: `Set the primary model.`
*`--set-research <model_id>`: `Set the research model.`
*`--set-fallback <model_id>`: `Set the fallback model.`
*`--ollama`: `Specify that the provided model ID is for Ollama (use with --set-*).`
*`--openrouter`: `Specify that the provided model ID is for OpenRouter (use with --set-*). Validates against OpenRouter API.`
*`--bedrock`: `Specify that the provided model ID is for AWS Bedrock (use with --set-*).`
*`--setup`: `Run interactive setup to configure models, including custom Ollama/OpenRouter IDs.`
***Usage (MCP):** Call without set flags to get current config. Use `setMain`, `setResearch`, or `setFallback` with a valid model ID to update the configuration. Use `listAvailableModels: true` to get a list of unassigned models. To set a custom model, provide the model ID and set `ollama: true` or `openrouter: true`.
***Usage (CLI):** Run without flags to view current configuration and available models. Use set flags to update specific roles. Use `--setup` for guided configuration, including custom models. To set a custom model via flags, use `--set-<role>=<model_id>` along with either `--ollama` or `--openrouter`.
***Notes:** Configuration is stored in `.taskmaster/config.json` in the project root. This command/tool modifies that file. Use `listAvailableModels` or `task-master models` to see internally supported models. OpenRouter custom models are validated against their live API. Ollama custom models are not validated live.
***API note:** API keys for selected AI providers (based on their model) need to exist in the mcp.json file to be accessible in MCP context. The API keys must be present in the local .env file for the CLI to be able to read them.
***Model costs:** The costs in supported models are expressed in dollars. An input/output value of 3 is $3.00. A value of 0.8 is $0.80.
***Warning:** DO NOT MANUALLY EDIT THE .taskmaster/config.json FILE. Use the included commands either in the MCP or CLI format as needed. Always prioritize MCP tools when available and use the CLI as a fallback.
---
## Task Listing & Viewing
### 3. Get Tasks (`get_tasks`)
***MCP Tool:**`get_tasks`
***CLI Command:**`task-master list [options]`
***Description:**`List your Taskmaster tasks, optionally filtering by status and showing subtasks.`
***Key Parameters/Options:**
*`status`: `Show only Taskmaster tasks matching this status (or multiple statuses, comma-separated), e.g., 'pending' or 'done,in-progress'.` (CLI: `-s, --status <status>`)
*`withSubtasks`: `Include subtasks indented under their parent tasks in the list.` (CLI: `--with-subtasks`)
*`tag`: `Specify which tag context to list tasks from. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Get an overview of the project status, often used at the start of a work session.
### 4. Get Next Task (`next_task`)
***MCP Tool:**`next_task`
***CLI Command:**`task-master next [options]`
***Description:**`Ask Taskmaster to show the next available task you can work on, based on status and completed dependencies.`
***Key Parameters/Options:**
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
*`tag`: `Specify which tag context to use. Defaults to the current active tag.` (CLI: `--tag <name>`)
***Usage:** Identify what to work on next according to the plan.
### 5. Get Task Details (`get_task`)
***MCP Tool:**`get_task`
***CLI Command:**`task-master show [id] [options]`
***Description:**`Display detailed information for one or more specific Taskmaster tasks or subtasks by ID.`
***Key Parameters/Options:**
*`id`: `Required. The ID of the Taskmaster task (e.g., '15'), subtask (e.g., '15.2'), or a comma-separated list of IDs ('1,5,10.2') you want to view.` (CLI: `[id]` positional or `-i, --id <id>`)
*`tag`: `Specify which tag context to get the task(s) from. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Understand the full details for a specific task. When multiple IDs are provided, a summary table is shown.
***CRITICAL INFORMATION** If you need to collect information from multiple tasks, use comma-separated IDs (i.e. 1,2,3) to receive an array of tasks. Do not needlessly get tasks one at a time if you need to get many as that is wasteful.
---
## Task Creation & Modification
### 6. Add Task (`add_task`)
***MCP Tool:**`add_task`
***CLI Command:**`task-master add-task [options]`
***Description:**`Add a new task to Taskmaster by describing it; AI will structure it.`
***Key Parameters/Options:**
*`prompt`: `Required. Describe the new task you want Taskmaster to create, e.g., "Implement user authentication using JWT".` (CLI: `-p, --prompt <text>`)
*`dependencies`: `Specify the IDs of any Taskmaster tasks that must be completed before this new one can start, e.g., '12,14'.` (CLI: `-d, --dependencies <ids>`)
*`priority`: `Set the priority for the new task: 'high', 'medium', or 'low'. Default is 'medium'.` (CLI: `--priority <priority>`)
*`research`: `Enable Taskmaster to use the research role for potentially more informed task creation.` (CLI: `-r, --research`)
*`tag`: `Specify which tag context to add the task to. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Quickly add newly identified tasks during development.
***Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress.
***Description:**`Add a new subtask to a Taskmaster parent task, or convert an existing task into a subtask.`
***Key Parameters/Options:**
*`id` / `parent`: `Required. The ID of the Taskmaster task that will be the parent.` (MCP: `id`, CLI: `-p, --parent <id>`)
*`taskId`: `Use this if you want to convert an existing top-level Taskmaster task into a subtask of the specified parent.` (CLI: `-i, --task-id <id>`)
*`title`: `Required if not using taskId. The title for the new subtask Taskmaster should create.` (CLI: `-t, --title <title>`)
*`description`: `A brief description for the new subtask.` (CLI: `-d, --description <text>`)
*`details`: `Provide implementation notes or details for the new subtask.` (CLI: `--details <text>`)
*`dependencies`: `Specify IDs of other tasks or subtasks, e.g., '15' or '16.1', that must be done before this new subtask.` (CLI: `--dependencies <ids>`)
*`status`: `Set the initial status for the new subtask. Default is 'pending'.` (CLI: `-s, --status <status>`)
*`generate`: `Enable Taskmaster to regenerate markdown task files after adding the subtask.` (CLI: `--generate`)
*`tag`: `Specify which tag context to operate on. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Break down tasks manually or reorganize existing tasks.
### 8. Update Tasks (`update`)
***MCP Tool:**`update`
***CLI Command:**`task-master update [options]`
***Description:**`Update multiple upcoming tasks in Taskmaster based on new context or changes, starting from a specific task ID.`
***Key Parameters/Options:**
*`from`: `Required. The ID of the first task Taskmaster should update. All tasks with this ID or higher that are not 'done' will be considered.` (CLI: `--from <id>`)
*`prompt`: `Required. Explain the change or new context for Taskmaster to apply to the tasks, e.g., "We are now using React Query instead of Redux Toolkit for data fetching".` (CLI: `-p, --prompt <text>`)
*`research`: `Enable Taskmaster to use the research role for more informed updates. Requires appropriate API key.` (CLI: `-r, --research`)
*`tag`: `Specify which tag context to operate on. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Handle significant implementation changes or pivots that affect multiple future tasks. Example CLI: `task-master update --from='18' --prompt='Switching to React Query.\nNeed to refactor data fetching...'`
***Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress.
***Description:**`Modify a specific Taskmaster task by ID, incorporating new information or changes. By default, this replaces the existing task details.`
***Key Parameters/Options:**
*`id`: `Required. The specific ID of the Taskmaster task, e.g., '15', you want to update.` (CLI: `-i, --id <id>`)
*`prompt`: `Required. Explain the specific changes or provide the new information Taskmaster should incorporate into this task.` (CLI: `-p, --prompt <text>`)
*`append`: `If true, appends the prompt content to the task's details with a timestamp, rather than replacing them. Behaves like update-subtask.` (CLI: `--append`)
*`research`: `Enable Taskmaster to use the research role for more informed updates. Requires appropriate API key.` (CLI: `-r, --research`)
*`tag`: `Specify which tag context the task belongs to. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Refine a specific task based on new understanding. Use `--append` to log progress without creating subtasks.
***Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress.
***Description:**`Append timestamped notes or details to a specific Taskmaster subtask without overwriting existing content. Intended for iterative implementation logging.`
***Key Parameters/Options:**
*`id`: `Required. The ID of the Taskmaster subtask, e.g., '5.2', to update with new information.` (CLI: `-i, --id <id>`)
*`prompt`: `Required. The information, findings, or progress notes to append to the subtask's details with a timestamp.` (CLI: `-p, --prompt <text>`)
*`research`: `Enable Taskmaster to use the research role for more informed updates. Requires appropriate API key.` (CLI: `-r, --research`)
*`tag`: `Specify which tag context the subtask belongs to. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Log implementation progress, findings, and discoveries during subtask development. Each update is timestamped and appended to preserve the implementation journey.
***Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress.
***Description:**`Permanently remove a task or subtask from the Taskmaster tasks list.`
***Key Parameters/Options:**
*`id`: `Required. The ID of the Taskmaster task, e.g., '5', or subtask, e.g., '5.2', to permanently remove.` (CLI: `-i, --id <id>`)
*`yes`: `Skip the confirmation prompt and immediately delete the task.` (CLI: `-y, --yes`)
*`tag`: `Specify which tag context to operate on. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Permanently delete tasks or subtasks that are no longer needed in the project.
***Notes:** Use with caution as this operation cannot be undone. Consider using 'blocked', 'cancelled', or 'deferred' status instead if you just want to exclude a task from active planning but keep it for reference. The command automatically cleans up dependency references in other tasks.
---
## Task Structure & Breakdown
### 13. Expand Task (`expand_task`)
***MCP Tool:**`expand_task`
***CLI Command:**`task-master expand [options]`
***Description:**`Use Taskmaster's AI to break down a complex task into smaller, manageable subtasks. Appends subtasks by default.`
***Key Parameters/Options:**
*`id`: `The ID of the specific Taskmaster task you want to break down into subtasks.` (CLI: `-i, --id <id>`)
*`num`: `Optional: Suggests how many subtasks Taskmaster should aim to create. Uses complexity analysis/defaults otherwise.` (CLI: `-n, --num <number>`)
*`research`: `Enable Taskmaster to use the research role for more informed subtask generation. Requires appropriate API key.` (CLI: `-r, --research`)
*`prompt`: `Optional: Provide extra context or specific instructions to Taskmaster for generating the subtasks.` (CLI: `-p, --prompt <text>`)
*`force`: `Optional: If true, clear existing subtasks before generating new ones. Default is false (append).` (CLI: `--force`)
*`tag`: `Specify which tag context the task belongs to. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Generate a detailed implementation plan for a complex task before starting coding. Automatically uses complexity report recommendations if available and `num` is not specified.
***Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress.
### 14. Expand All Tasks (`expand_all`)
***MCP Tool:**`expand_all`
***CLI Command:**`task-master expand --all [options]` (Note: CLI uses the `expand` command with the `--all` flag)
***Description:**`Tell Taskmaster to automatically expand all eligible pending/in-progress tasks based on complexity analysis or defaults. Appends subtasks by default.`
***Key Parameters/Options:**
*`num`: `Optional: Suggests how many subtasks Taskmaster should aim to create per task.` (CLI: `-n, --num <number>`)
*`research`: `Enable research role for more informed subtask generation. Requires appropriate API key.` (CLI: `-r, --research`)
*`prompt`: `Optional: Provide extra context for Taskmaster to apply generally during expansion.` (CLI: `-p, --prompt <text>`)
*`force`: `Optional: If true, clear existing subtasks before generating new ones for each eligible task. Default is false (append).` (CLI: `--force`)
*`tag`: `Specify which tag context to expand. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Useful after initial task generation or complexity analysis to break down multiple tasks at once.
***Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress.
***Description:**`Remove all subtasks from one or more specified Taskmaster parent tasks.`
***Key Parameters/Options:**
*`id`: `The ID(s) of the Taskmaster parent task(s) whose subtasks you want to remove, e.g., '15' or '16,18'. Required unless using 'all'.` (CLI: `-i, --id <ids>`)
*`all`: `Tell Taskmaster to remove subtasks from all parent tasks.` (CLI: `--all`)
*`tag`: `Specify which tag context to operate on. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Used before regenerating subtasks with `expand_task` if the previous breakdown needs replacement.
***Description:**`Have Taskmaster analyze your tasks to determine their complexity and suggest which ones need to be broken down further.`
***Key Parameters/Options:**
*`output`: `Where to save the complexity analysis report. Default is '.taskmaster/reports/task-complexity-report.json' (or '..._tagname.json' if a tag is used).` (CLI: `-o, --output <file>`)
*`threshold`: `The minimum complexity score (1-10) that should trigger a recommendation to expand a task.` (CLI: `-t, --threshold <number>`)
*`research`: `Enable research role for more accurate complexity analysis. Requires appropriate API key.` (CLI: `-r, --research`)
*`tag`: `Specify which tag context to analyze. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Used before breaking down tasks to identify which ones need the most attention.
***Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress.
***Description:**`Display the task complexity analysis report in a readable format.`
***Key Parameters/Options:**
*`tag`: `Specify which tag context to show the report for. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to the complexity report (default: '.taskmaster/reports/task-complexity-report.json').` (CLI: `-f, --file <file>`)
***Usage:** Review and understand the complexity analysis results after running analyze-complexity.
---
## File Management
### 24. Generate Task Files (`generate`)
***MCP Tool:**`generate`
***CLI Command:**`task-master generate [options]`
***Description:**`Create or update individual Markdown files for each task based on your tasks.json.`
***Key Parameters/Options:**
*`output`: `The directory where Taskmaster should save the task files (default: in a 'tasks' directory).` (CLI: `-o, --output <directory>`)
*`tag`: `Specify which tag context to generate files for. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
***Usage:** Run this after making changes to tasks.json to keep individual task files up to date. This command is now manual and no longer runs automatically.
---
## AI-Powered Research
### 25. Research (`research`)
***MCP Tool:**`research`
***CLI Command:**`task-master research [options]`
***Description:**`Perform AI-powered research queries with project context to get fresh, up-to-date information beyond the AI's knowledge cutoff.`
***Key Parameters/Options:**
*`query`: `Required. Research query/prompt (e.g., "What are the latest best practices for React Query v5?").` (CLI: `[query]` positional or `-q, --query <text>`)
*`taskIds`: `Comma-separated list of task/subtask IDs from the current tag context (e.g., "15,16.2,17").` (CLI: `-i, --id <ids>`)
*`filePaths`: `Comma-separated list of file paths for context (e.g., "src/api.js,docs/readme.md").` (CLI: `-f, --files <paths>`)
*`customContext`: `Additional custom context text to include in the research.` (CLI: `-c, --context <text>`)
*`includeProjectTree`: `Include project file tree structure in context (default: false).` (CLI: `--tree`)
*`detailLevel`: `Detail level for the research response: 'low', 'medium', 'high' (default: medium).` (CLI: `--detail <level>`)
*`saveTo`: `Task or subtask ID (e.g., "15", "15.2") to automatically save the research conversation to.` (CLI: `--save-to <id>`)
*`saveFile`: `If true, saves the research conversation to a markdown file in '.taskmaster/docs/research/'.` (CLI: `--save-file`)
*`noFollowup`: `Disables the interactive follow-up question menu in the CLI.` (CLI: `--no-followup`)
*`tag`: `Specify which tag context to use for task-based context gathering. Defaults to the current active tag.` (CLI: `--tag <name>`)
*`projectRoot`: `The directory of the project. Must be an absolute path.` (CLI: Determined automatically)
***Usage:****This is a POWERFUL tool that agents should use FREQUENTLY** to:
* Get fresh information beyond knowledge cutoff dates
* Research latest best practices, library updates, security patches
* Find implementation examples for specific technologies
* Validate approaches against current industry standards
* Get contextual advice based on project files and tasks
***When to Consider Using Research:**
***Before implementing any task** - Research current best practices
***When encountering new technologies** - Get up-to-date implementation guidance (libraries, apis, etc)
***When updating dependencies** - Research breaking changes and migration guides
***For performance optimization** - Get current performance best practices
***When debugging complex issues** - Research known solutions and workarounds
***Research + Action Pattern:**
* Use `research` to gather fresh information
* Use `update_subtask` to commit findings with timestamps
* Use `update_task` to incorporate research into task details
* Use `add_task` with research flag for informed task creation
***Important:** This MCP tool makes AI calls and can take up to a minute to complete. The research provides FRESH data beyond the AI's training cutoff, making it invaluable for current best practices and recent developments.
---
## Tag Management
This new suite of commands allows you to manage different task contexts (tags).
### 26. List Tags (`tags`)
***MCP Tool:**`list_tags`
***CLI Command:**`task-master tags [options]`
***Description:**`List all available tags with task counts, completion status, and other metadata.`
***Key Parameters/Options:**
*`file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
*`--show-metadata`: `Include detailed metadata in the output (e.g., creation date, description).` (CLI: `--show-metadata`)
**Set API keys** in your **`.env`** file in the project root (for CLI use) or within the `env` section of your **`.kiro/mcp.json`** file (for MCP/Kiro integration). All other settings (model choice, max tokens, temperature, log level, custom endpoints) are managed in `.taskmaster/config.json` via `task-master models` command or `models` MCP tool.
---
For details on how these commands fit into the development process, see the [dev_workflow.md](.kiro/steering/dev_workflow.md).
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.