
* 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>
14 KiB
Task Master Command Reference
Here's a comprehensive reference of all available commands:
Parse PRD
# Parse a PRD file and generate tasks
task-master parse-prd <prd-file.txt>
# Limit the number of tasks generated
task-master parse-prd <prd-file.txt> --num-tasks=10
List Tasks
# List all tasks
task-master list
# List tasks with a specific status
task-master list --status=<status>
# List tasks with subtasks
task-master list --with-subtasks
# List tasks with a specific status and include subtasks
task-master list --status=<status> --with-subtasks
Show Next Task
# Show the next task to work on based on dependencies and status
task-master next
Show Specific Task
# Show details of a specific task
task-master show <id>
# or
task-master show --id=<id>
# View multiple tasks with comma-separated IDs
task-master show 1,3,5
task-master show 44,55
# View a specific subtask (e.g., subtask 2 of task 1)
task-master show 1.2
# Mix parent tasks and subtasks
task-master show 44,44.1,55,55.2
Multiple Task Display:
- Single ID: Shows detailed task view with full implementation details
- Multiple IDs: Shows compact summary table with interactive action menu
- Action Menu: Provides copy-paste ready commands for batch operations:
- Mark all as in-progress/done
- Show next available task
- Expand all tasks (generate subtasks)
- View dependency relationships
- Generate task files
Update Tasks
# Update tasks from a specific ID and provide context
task-master update --from=<id> --prompt="<prompt>"
# Update tasks using research role
task-master update --from=<id> --prompt="<prompt>" --research
Update a Specific Task
# Update a single task by ID with new information
task-master update-task --id=<id> --prompt="<prompt>"
# Use research-backed updates
task-master update-task --id=<id> --prompt="<prompt>" --research
Update a Subtask
# Append additional information to a specific subtask
task-master update-subtask --id=<parentId.subtaskId> --prompt="<prompt>"
# Example: Add details about API rate limiting to subtask 2 of task 5
task-master update-subtask --id=5.2 --prompt="Add rate limiting of 100 requests per minute"
# Use research-backed updates
task-master update-subtask --id=<parentId.subtaskId> --prompt="<prompt>" --research
Unlike the update-task
command which replaces task information, the update-subtask
command appends new information to the existing subtask details, marking it with a timestamp. This is useful for iteratively enhancing subtasks while preserving the original content.
Generate Task Files
# Generate individual task files from tasks.json
task-master generate
Set Task Status
# Set status of a single task
task-master set-status --id=<id> --status=<status>
# Set status for multiple tasks
task-master set-status --id=1,2,3 --status=<status>
# Set status for subtasks
task-master set-status --id=1.1,1.2 --status=<status>
When marking a task as "done", all of its subtasks will automatically be marked as "done" as well.
Expand Tasks
# Expand a specific task with subtasks
task-master expand --id=<id> --num=<number>
# Expand with additional context
task-master expand --id=<id> --prompt="<context>"
# Expand all pending tasks
task-master expand --all
# Force regeneration of subtasks for tasks that already have them
task-master expand --all --force
# Research-backed subtask generation for a specific task
task-master expand --id=<id> --research
# Research-backed generation for all tasks
task-master expand --all --research
Clear Subtasks
# Clear subtasks from a specific task
task-master clear-subtasks --id=<id>
# Clear subtasks from multiple tasks
task-master clear-subtasks --id=1,2,3
# Clear subtasks from all tasks
task-master clear-subtasks --all
Analyze Task Complexity
# Analyze complexity of all tasks
task-master analyze-complexity
# Save report to a custom location
task-master analyze-complexity --output=my-report.json
# Use a specific LLM model
task-master analyze-complexity --model=claude-3-opus-20240229
# Set a custom complexity threshold (1-10)
task-master analyze-complexity --threshold=6
# Use an alternative tasks file
task-master analyze-complexity --file=custom-tasks.json
# Use Perplexity AI for research-backed complexity analysis
task-master analyze-complexity --research
View Complexity Report
# Display the task complexity analysis report
task-master complexity-report
# View a report at a custom location
task-master complexity-report --file=my-report.json
Managing Task Dependencies
# Add a dependency to a task
task-master add-dependency --id=<id> --depends-on=<id>
# Remove a dependency from a task
task-master remove-dependency --id=<id> --depends-on=<id>
# Validate dependencies without fixing them
task-master validate-dependencies
# Find and fix invalid dependencies automatically
task-master fix-dependencies
Move Tasks
# Move a task or subtask to a new position
task-master move --from=<id> --to=<id>
# Examples:
# Move task to become a subtask
task-master move --from=5 --to=7
# Move subtask to become a standalone task
task-master move --from=5.2 --to=7
# Move subtask to a different parent
task-master move --from=5.2 --to=7.3
# Reorder subtasks within the same parent
task-master move --from=5.2 --to=5.4
# Move a task to a new ID position (creates placeholder if doesn't exist)
task-master move --from=5 --to=25
# Move multiple tasks at once (must have the same number of IDs)
task-master move --from=10,11,12 --to=16,17,18
Add a New Task
# Add a new task using AI (main role)
task-master add-task --prompt="Description of the new task"
# Add a new task using AI (research role)
task-master add-task --prompt="Description of the new task" --research
# Add a task with dependencies
task-master add-task --prompt="Description" --dependencies=1,2,3
# Add a task with priority
task-master add-task --prompt="Description" --priority=high
Tag Management
Task Master supports tagged task lists for multi-context task management. Each tag represents a separate, isolated context for tasks.
# List all available tags with task counts and status
task-master tags
# List tags with detailed metadata
task-master tags --show-metadata
# Create a new empty tag
task-master add-tag <tag-name>
# Create a new tag with a description
task-master add-tag <tag-name> --description="Feature development tasks"
# Create a tag based on current git branch name
task-master add-tag --from-branch
# Create a new tag by copying tasks from the current tag
task-master add-tag <new-tag> --copy-from-current
# Create a new tag by copying from a specific tag
task-master add-tag <new-tag> --copy-from=<source-tag>
# Switch to a different tag context
task-master use-tag <tag-name>
# Rename an existing tag
task-master rename-tag <old-name> <new-name>
# Copy an entire tag to create a new one
task-master copy-tag <source-tag> <target-tag>
# Copy a tag with a description
task-master copy-tag <source-tag> <target-tag> --description="Copied for testing"
# Delete a tag and all its tasks (with confirmation)
task-master delete-tag <tag-name>
# Delete a tag without confirmation prompt
task-master delete-tag <tag-name> --yes
Tag Context:
- All task operations (list, show, add, update, etc.) work within the currently active tag
- Use
--tag=<name>
flag with most commands to operate on a specific tag context - Tags provide complete isolation - tasks in different tags don't interfere with each other
Initialize a Project
# Initialize a new project with Task Master structure
task-master init
# Initialize a new project applying specific rules
task-master init --rules cursor,windsurf,vscode
- The
--rules
flag allows you to specify one or more rule profiles (e.g.,cursor
,roo
,windsurf
,cline
) to apply during initialization. - If omitted, all available rule profiles are installed by default (claude, cline, codex, cursor, roo, trae, vscode, windsurf).
- You can use multiple comma-separated profiles in a single command.
Manage Rules
# Add rule profiles to your project
# (e.g., .roo/rules, .windsurf/rules)
task-master rules add <profile1,profile2,...>
# Remove rule sets from your project
task-master rules remove <profile1,profile2,...>
# Remove rule sets bypassing safety check (dangerous)
task-master rules remove <profile1,profile2,...> --force
# Launch interactive rules setup to select rules
# (does not re-initialize project or ask about shell aliases)
task-master rules setup
- Adding rules creates the profile and rules directory (e.g.,
.roo/rules
) and copies/initializes the rules. - Removing rules deletes the profile and rules directory and associated MCP config.
- Safety Check: Attempting to remove rule profiles will trigger a critical warning requiring confirmation. Use
--force
to bypass. - You can use multiple comma-separated rules in a single command.
- The
setup
action launches an interactive prompt to select which rules to apply. The list of rules is always current with the available profiles, and no manual updates are needed. This command does not re-initialize your project or affect shell aliases; it only manages rules interactively.
Examples:
task-master rules add windsurf,roo,vscode
task-master rules remove windsurf
task-master rules setup
Interactive Rules Setup
You can launch the interactive rules setup at any time with:
task-master rules setup
This command opens a prompt where you can select which rule profiles (e.g., Cursor, Roo, Windsurf) you want to add to your project. This does not re-initialize your project or ask about shell aliases; it only manages rules.
- Use this command to add rule profiles interactively after project creation.
- The same interactive prompt is also used during
init
if you don't specify rules with--rules
.
Configure AI Models
# View current AI model configuration and API key status
task-master models
# Set the primary model for generation/updates (provider inferred if known)
task-master models --set-main=claude-3-opus-20240229
# Set the research model
task-master models --set-research=sonar-pro
# Set the fallback model
task-master models --set-fallback=claude-3-haiku-20240307
# Set a custom Ollama model for the main role
task-master models --set-main=my-local-llama --ollama
# Set a custom OpenRouter model for the research role
task-master models --set-research=google/gemini-pro --openrouter
# Run interactive setup to configure models, including custom ones
task-master models --setup
Configuration is stored in .taskmaster/config.json
in your project root (legacy .taskmasterconfig
files are automatically migrated). API keys are still managed via .env
or MCP configuration. Use task-master models
without flags to see available built-in models. Use --setup
for a guided experience.
State is stored in .taskmaster/state.json
in your project root. It maintains important information like the current tag. Do not manually edit this file.
Research Fresh Information
# Perform AI-powered research with fresh, up-to-date information
task-master research "What are the latest best practices for JWT authentication in Node.js?"
# Research with specific task context
task-master research "How to implement OAuth 2.0?" --id=15,16
# Research with file context for code-aware suggestions
task-master research "How can I optimize this API implementation?" --files=src/api.js,src/auth.js
# Research with custom context and project tree
task-master research "Best practices for error handling" --context="We're using Express.js" --tree
# Research with different detail levels
task-master research "React Query v5 migration guide" --detail=high
# Disable interactive follow-up questions (useful for scripting, is the default for MCP)
# Use a custom tasks file location
task-master research "How to implement this feature?" --file=custom-tasks.json
# Research within a specific tag context
task-master research "Database optimization strategies" --tag=feature-branch
# Save research conversation to .taskmaster/docs/research/ directory (for later reference)
task-master research "Database optimization techniques" --save-file
# Save key findings directly to a task or subtask (recommended for actionable insights)
task-master research "How to implement OAuth?" --save-to=15
task-master research "API optimization strategies" --save-to=15.2
# Combine context gathering with automatic saving of findings
task-master research "Best practices for this implementation" --id=15,16 --files=src/auth.js --save-to=15.3
The research command is a powerful exploration tool that provides:
- Fresh information beyond AI knowledge cutoffs
- Project-aware context from your tasks and files
- Automatic task discovery using fuzzy search
- Multiple detail levels (low, medium, high)
- Token counting and cost tracking
- Interactive follow-up questions for deep exploration
- Flexible save options (commit findings to tasks or preserve conversations)
- Iterative discovery through continuous questioning and refinement
Use research frequently to:
- Get current best practices before implementing features
- Research new technologies and libraries
- Find solutions to complex problems
- Validate your implementation approaches
- Stay updated with latest security recommendations
Interactive Features (CLI):
- Follow-up questions that maintain conversation context and allow deep exploration
- Save menu during or after research with flexible options:
- Save to task/subtask: Commit key findings and actionable insights (recommended)
- Save to file: Preserve entire conversation for later reference if needed
- Continue exploring: Ask more follow-up questions to dig deeper
- Automatic file naming with timestamps and query-based slugs when saving conversations