Eyal Toledano 70cc15bc87 refactor(analyze): Align complexity analysis with unified AI service
Refactored the  feature and related components (CLI command, MCP tool, direct function) to integrate with the unified AI service layer ().

Initially,  was implemented to leverage structured output generation. However, this approach encountered persistent errors:
- Perplexity provider returned internal server errors.
- Anthropic provider failed with schema type and model errors.

Due to the unreliability of  for this specific use case, the core AI interaction within  was reverted to use . Basic manual JSON parsing and cleanup logic for the text response were reintroduced.

Key changes include:
- Removed direct AI client initialization (Anthropic, Perplexity).
- Removed direct fetching of AI model configuration parameters.
- Removed manual AI retry/fallback/streaming logic.
- Replaced direct AI calls with a call to .
- Updated  wrapper to pass session context correctly.
- Updated  MCP tool for correct path resolution and argument passing.
- Updated  CLI command for correct path resolution.
- Preserved core functionality: task loading/filtering, report generation, CLI summary display.

Both the CLI command ([INFO] Initialized Perplexity client with OpenAI compatibility layer
[INFO] Initialized Perplexity client with OpenAI compatibility layer
Analyzing task complexity from: tasks/tasks.json
Output report will be saved to: scripts/task-complexity-report.json
Analyzing task complexity and generating expansion recommendations...
[INFO] Reading tasks from tasks/tasks.json...
[INFO] Found 62 total tasks in the task file.
[INFO] Skipping 31 tasks marked as done/cancelled/deferred. Analyzing 31 active tasks.
Skipping 31 tasks marked as done/cancelled/deferred. Analyzing 31 active tasks.
[INFO] Claude API attempt 1/2
[ERROR] Error in Claude API call: 400 {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: 100000 > 64000, which is the maximum allowed number of output tokens for claude-3-7-sonnet-20250219"}}
[ERROR] Non-overload Claude API error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: 100000 > 64000, which is the maximum allowed number of output tokens for claude-3-7-sonnet-20250219"}}
Claude API error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: 100000 > 64000, which is the maximum allowed number of output tokens for claude-3-7-sonnet-20250219"}}
[ERROR] Error during AI analysis: 400 {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: 100000 > 64000, which is the maximum allowed number of output tokens for claude-3-7-sonnet-20250219"}}
[ERROR] Error analyzing task complexity: 400 {"type":"error","error":{"type":"invalid_request_error","message":"max_tokens: 100000 > 64000, which is the maximum allowed number of output tokens for claude-3-7-sonnet-20250219"}}) and the MCP tool () have been verified to work correctly with this revised approach.
2025-04-24 22:33:33 -04:00
2025-04-09 00:30:05 +02:00
2025-03-04 13:55:17 -05:00
2025-04-09 00:30:05 +02:00
2025-04-11 19:34:07 +00:00
2025-04-09 00:30:05 +02:00
2025-03-31 17:09:31 +02:00
2025-04-09 00:30:05 +02:00
2025-04-09 00:30:05 +02:00

Task Master GitHub stars

CI npm version Discord Follow License: MIT with Commons Clause

By @eyaltoledano & @RalphEcom

Twitter Follow Twitter Follow

A task management system for AI-driven development with Claude, designed to work seamlessly with Cursor AI.

Requirements

  • Anthropic API key (Claude API)
  • OpenAI SDK (for Perplexity API integration, optional)

Quick Start

MCP (Model Control Protocol) provides the easiest way to get started with Task Master directly in your editor.

  1. Install the package
npm i -g task-master-ai
  1. Add the MCP config to your editor (Cursor recommended, but it works with other text editors):
{
	"mcpServers": {
		"taskmaster-ai": {
			"command": "npx",
			"args": ["-y", "task-master-mcp"],
			"env": {
				"ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE",
				"PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE",
				"MODEL": "claude-3-7-sonnet-20250219",
				"PERPLEXITY_MODEL": "sonar-pro",
				"MAX_TOKENS": 64000,
				"TEMPERATURE": 0.2,
				"DEFAULT_SUBTASKS": 5,
				"DEFAULT_PRIORITY": "medium"
			}
		}
	}
}
  1. Enable the MCP in your editor

  2. Prompt the AI to initialize Task Master:

Can you please initialize taskmaster-ai into my project?
  1. Use common commands directly through your AI assistant:
Can you parse my PRD at scripts/prd.txt?
What's the next task I should work on?
Can you help me implement task 3?
Can you help me expand task 4?

Option 2: Using Command Line

Installation

# Install globally
npm install -g task-master-ai

# OR install locally within your project
npm install task-master-ai

Initialize a new project

# If installed globally
task-master init

# If installed locally
npx task-master-init

This will prompt you for project details and set up a new project with the necessary files and structure.

Common Commands

# Initialize a new project
task-master init

# Parse a PRD and generate tasks
task-master parse-prd your-prd.txt

# List all tasks
task-master list

# Show the next task to work on
task-master next

# Generate task files
task-master generate

Documentation

For more detailed information, check out the documentation in the docs directory:

Troubleshooting

If task-master init doesn't respond:

Try running it with Node directly:

node node_modules/claude-task-master/scripts/init.js

Or clone the repository and run:

git clone https://github.com/eyaltoledano/claude-task-master.git
cd claude-task-master
node scripts/init.js

Contributors

Task Master project contributors

Star History

Star History Chart

Licensing

Task Master is licensed under the MIT License with Commons Clause. This means you can:

Allowed:

  • Use Task Master for any purpose (personal, commercial, academic)
  • Modify the code
  • Distribute copies
  • Create and sell products built using Task Master

Not Allowed:

  • Sell Task Master itself
  • Offer Task Master as a hosted service
  • Create competing products based on Task Master

See the LICENSE file for the complete license text and licensing details for more information.

Description
An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.
Readme MIT 42 MiB
Languages
JavaScript 71.1%
TypeScript 23.8%
MDX 3.2%
Shell 1.7%
CSS 0.2%