Compare commits
2 Commits
docs/auto-
...
docs/auto-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
468106af1e | ||
|
|
90e6bdcf1c |
16
.changeset/smart-owls-relax.md
Normal file
16
.changeset/smart-owls-relax.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
"task-master-ai": minor
|
||||
---
|
||||
|
||||
Enhance `expand_all` to intelligently use complexity analysis recommendations when expanding tasks.
|
||||
|
||||
The expand-all operation now automatically leverages recommendations from `analyze-complexity` to determine optimal subtask counts for each task, resulting in more accurate and context-aware task breakdowns.
|
||||
|
||||
Key improvements:
|
||||
- Automatic integration with complexity analysis reports
|
||||
- Tag-aware complexity report path resolution
|
||||
- Intelligent subtask count determination based on task complexity
|
||||
- Falls back to defaults when complexity analysis is unavailable
|
||||
- Enhanced logging for better visibility into expansion decisions
|
||||
|
||||
When you run `task-master expand --all` after `task-master analyze-complexity`, Task Master now uses the recommended subtask counts from the complexity analysis instead of applying uniform defaults, ensuring each task is broken down according to its actual complexity.
|
||||
@@ -6,28 +6,10 @@ description: "Learn how to set up and use Task Master with Cursor AI"
|
||||
## Setting up Cursor AI Integration
|
||||
|
||||
<Check>
|
||||
Task Master is designed to work seamlessly with [Cursor AI](https://www.cursor.so/), providing a structured workflow for AI-driven development. As of version 0.28.0, Task Master automatically sets up custom slash commands in Cursor IDE.
|
||||
Task Master is designed to work seamlessly with [Cursor AI](https://www.cursor.so/), providing a structured workflow for AI-driven development.
|
||||
</Check>
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="Cursor Custom Slash Commands (New in 0.28.0)" icon="terminal">
|
||||
Task Master now automatically configures custom slash commands in Cursor IDE when adding a profile. These commands provide quick access to Task Master functionality:
|
||||
|
||||
### Available Slash Commands
|
||||
- `/tm-list` - View all tasks with their status
|
||||
- `/tm-next` - Get the next available task to work on
|
||||
- `/tm-show` - Show detailed task information
|
||||
- `/tm-add` - Add a new task with AI assistance
|
||||
- `/tm-status` - Set task status (pending, in-progress, done, etc.)
|
||||
- `/tm-expand` - Expand a task into subtasks
|
||||
- `/tm-complexity` - Analyze task complexity
|
||||
|
||||
### Automatic Setup
|
||||
When you run `task-master profiles add cursor`, the slash commands are automatically copied to `.cursor/commands/`. If you remove the profile with `task-master profiles remove cursor`, the commands are cleaned up automatically.
|
||||
|
||||
### Manual Setup
|
||||
If you need to manually set up the commands, they're available in the `assets/claude/commands/` directory of your Task Master installation.
|
||||
</Accordion>
|
||||
<Accordion title="Using Cursor with MCP (Recommended)" icon="sparkles">
|
||||
If you've already set up Task Master with MCP in Cursor, the integration is automatic. You can simply use natural language to interact with Task Master:
|
||||
|
||||
|
||||
@@ -124,6 +124,8 @@ sidebarTitle: "CLI Commands"
|
||||
# Research-backed generation for all tasks
|
||||
task-master expand --all --research
|
||||
```
|
||||
|
||||
When you run `task-master expand --all` after `task-master analyze-complexity`, the expand operation automatically uses the recommended subtask counts from the complexity analysis instead of applying uniform defaults. This ensures each task is broken down according to its actual complexity level.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Clear Subtasks">
|
||||
|
||||
@@ -40,7 +40,7 @@ The MCP tools can be categorized in the same way as the core functionalities:
|
||||
|
||||
- **`parse_prd`**: Parses a PRD to generate tasks.
|
||||
- **`expand_task`**: Expands a task into subtasks.
|
||||
- **`expand_all`**: Expands all eligible tasks.
|
||||
- **`expand_all`**: Expands all eligible tasks, automatically using complexity analysis recommendations when available.
|
||||
- **`analyze_project_complexity`**: Analyzes task complexity.
|
||||
- **`complexity_report`**: Displays the complexity analysis report.
|
||||
|
||||
@@ -65,37 +65,4 @@ The MCP tools can be categorized in the same way as the core functionalities:
|
||||
- **`list_tags`**: Lists all tags.
|
||||
- **`use_tag`**: Switches to a different tag.
|
||||
- **`rename_tag`**: Renames a tag.
|
||||
- **`copy_tag`**: Copies a tag.
|
||||
|
||||
## Configuration and Performance
|
||||
|
||||
### Timeout Configuration
|
||||
|
||||
As of version 0.28.0, Task Master automatically configures appropriate timeouts for MCP operations to handle long-running AI tasks. The Roo Code profile now includes a 300-second timeout (increased from the default 60 seconds) to accommodate complex operations like:
|
||||
|
||||
- `parse_prd` - PRD parsing and task generation
|
||||
- `expand_all` - Expanding multiple tasks into subtasks
|
||||
- `analyze_project_complexity` - Project-wide complexity analysis
|
||||
- Research-enabled operations with the `--research` flag
|
||||
|
||||
### MCP Server Configuration
|
||||
|
||||
The recommended MCP server configuration automatically includes these timeout settings:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"task-master-ai": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "task-master-ai"],
|
||||
"timeout": 300000,
|
||||
"env": {
|
||||
"ANTHROPIC_API_KEY": "your-key-here",
|
||||
"PERPLEXITY_API_KEY": "your-key-here"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This configuration is automatically generated when using Task Master profiles with Roo Code and other AI coding assistants.
|
||||
- **`copy_tag`**: Copies a tag.
|
||||
@@ -197,7 +197,7 @@ Task Master will:
|
||||
task-master analyze-complexity --research
|
||||
```
|
||||
|
||||
Review the complexity report to identify tasks that need expansion.
|
||||
Review the complexity report to identify tasks that need expansion and determine optimal subtask counts.
|
||||
|
||||
### Step 4: Expand Tasks
|
||||
|
||||
@@ -205,7 +205,7 @@ Review the complexity report to identify tasks that need expansion.
|
||||
task-master expand --all --research
|
||||
```
|
||||
|
||||
Break down complex tasks into manageable subtasks while preserving dependency chains.
|
||||
Break down complex tasks into manageable subtasks while preserving dependency chains. The expand operation automatically uses the complexity analysis recommendations to determine the appropriate number of subtasks for each task based on its complexity level.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -42,20 +42,6 @@ PERPLEXITY_API_KEY="pplx-your-key-here"
|
||||
OPENAI_API_KEY="sk-proj-your-key-here"
|
||||
```
|
||||
|
||||
### OPENAI_CODEX_API_KEY (New)
|
||||
- **Provider**: Codex CLI (GPT-5 and GPT-5-Codex models)
|
||||
- **Format**: Various formats
|
||||
- **Required**: ❌ **No** (OAuth-first authentication via `codex login`)
|
||||
- **Models**: GPT-5, GPT-5-Codex (272K input / 128K output context)
|
||||
- **Authentication**: Primary authentication is OAuth via `codex login` command
|
||||
- **Features**: Codebase analysis capabilities automatically enabled
|
||||
- **Get Access**: Follow Codex CLI setup instructions
|
||||
|
||||
```bash
|
||||
# Optional - OAuth via 'codex login' is preferred
|
||||
OPENAI_CODEX_API_KEY="your-codex-api-key-here"
|
||||
```
|
||||
|
||||
### GOOGLE_API_KEY
|
||||
- **Provider**: Google Gemini models
|
||||
- **Format**: Various formats
|
||||
@@ -211,20 +197,16 @@ For Claude Code integration, configure keys in `.mcp.json`:
|
||||
"task-master-ai": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "task-master-ai"],
|
||||
"timeout": 300000,
|
||||
"env": {
|
||||
"ANTHROPIC_API_KEY": "your-key-here",
|
||||
"PERPLEXITY_API_KEY": "your-key-here",
|
||||
"OPENAI_API_KEY": "your-key-here",
|
||||
"OPENAI_CODEX_API_KEY": "your-codex-key-here"
|
||||
"OPENAI_API_KEY": "your-key-here"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Note**: The `timeout: 300000` (300 seconds) setting is recommended for long-running AI operations like PRD parsing and complexity analysis.
|
||||
|
||||
## Key Requirements
|
||||
|
||||
### Minimum Requirements
|
||||
|
||||
@@ -3,58 +3,4 @@ title: "What's New"
|
||||
sidebarTitle: "What's New"
|
||||
---
|
||||
|
||||
# What's New in Task Master
|
||||
|
||||
## Version 0.28.0 - Latest Release
|
||||
|
||||
### 🚀 New Features
|
||||
|
||||
#### Codex CLI Provider Support
|
||||
- Added support for GPT-5 and GPT-5-Codex models via Codex CLI
|
||||
- OAuth-first authentication - no API key required (just run `codex login`)
|
||||
- 272K input / 128K output context windows
|
||||
- Codebase analysis capabilities automatically enabled
|
||||
- Optional `OPENAI_CODEX_API_KEY` support for API-based usage
|
||||
|
||||
#### Cursor IDE Slash Commands
|
||||
- Automatically installs custom slash commands when adding Cursor profile
|
||||
- Quick access to Task Master functionality directly in Cursor IDE
|
||||
- Commands include `/tm-list`, `/tm-next`, `/tm-show`, `/tm-add`, and more
|
||||
- Automatic cleanup when removing Cursor profile
|
||||
|
||||
#### Enhanced MCP Configuration
|
||||
- Improved timeout configuration for long-running AI operations
|
||||
- 300-second timeout for complex tasks like PRD parsing and task expansion
|
||||
- Programmatic MCP configuration generation for better reliability
|
||||
- Enhanced support for Roo Code and other AI coding assistants
|
||||
|
||||
### 🔧 Technical Improvements
|
||||
|
||||
#### AI SDK v5 Migration
|
||||
- Migrated to AI SDK v5 for better compatibility with modern AI providers
|
||||
- Improved support for Claude Code and Gemini CLI integration
|
||||
- Better structured output generation with `generateObject`
|
||||
- Enhanced JSON mode support for supported providers
|
||||
|
||||
#### Structured Data Generation
|
||||
- All AI services now use `generateObject` for more reliable responses
|
||||
- Integrated Zod schemas for automatic validation
|
||||
- Reduced parsing errors and improved data consistency
|
||||
- Better subtask ID generation (fixes numbering inconsistencies)
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
- Fixed MCP connection errors from deprecated function calls
|
||||
- Fixed MCP server errors when file parameters not provided
|
||||
- Corrected complexity scores display in `task-master show` and `list`
|
||||
- Fixed Perplexity Sonar Deep Research model naming
|
||||
- Improved parent task status handling when all subtasks are pending
|
||||
|
||||
### 📖 Documentation Updates
|
||||
- New comprehensive API keys configuration guide
|
||||
- Enhanced Cursor IDE integration documentation
|
||||
- Improved MCP timeout configuration documentation
|
||||
- Updated examples and configuration snippets
|
||||
|
||||
---
|
||||
|
||||
For detailed release notes and full changelog, visit our [GitHub releases page](https://github.com/eyaltoledano/claude-task-master/releases).
|
||||
An easy way to see the latest releases
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
disableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
import { resolveComplexityReportOutputPath } from '../../../../src/utils/path-utils.js';
|
||||
|
||||
/**
|
||||
* Expand all pending tasks with subtasks (Direct Function Wrapper)
|
||||
@@ -25,13 +26,30 @@ import { createLogWrapper } from '../../tools/utils.js';
|
||||
*/
|
||||
export async function expandAllTasksDirect(args, log, context = {}) {
|
||||
const { session } = context; // Extract session
|
||||
// Destructure expected args, including projectRoot
|
||||
const { tasksJsonPath, num, research, prompt, force, projectRoot, tag } =
|
||||
args;
|
||||
// Destructure expected args, including projectRoot and complexityReportPath
|
||||
const {
|
||||
tasksJsonPath,
|
||||
num,
|
||||
research,
|
||||
prompt,
|
||||
force,
|
||||
projectRoot,
|
||||
tag,
|
||||
complexityReportPath: providedComplexityReportPath
|
||||
} = args;
|
||||
|
||||
// Create logger wrapper using the utility
|
||||
const mcpLog = createLogWrapper(log);
|
||||
|
||||
// Use provided complexity report path or compute it
|
||||
const complexityReportPath =
|
||||
providedComplexityReportPath ||
|
||||
resolveComplexityReportOutputPath(null, { projectRoot, tag }, log);
|
||||
|
||||
log.info(
|
||||
`Expand all tasks will use complexity report at: ${complexityReportPath}`
|
||||
);
|
||||
|
||||
if (!tasksJsonPath) {
|
||||
log.error('expandAllTasksDirect called without tasksJsonPath');
|
||||
return {
|
||||
@@ -55,14 +73,14 @@ export async function expandAllTasksDirect(args, log, context = {}) {
|
||||
const additionalContext = prompt || '';
|
||||
const forceFlag = force === true;
|
||||
|
||||
// Call the core function, passing options and the context object { session, mcpLog, projectRoot }
|
||||
// Call the core function, passing options and the context object { session, mcpLog, projectRoot, tag, complexityReportPath }
|
||||
const result = await expandAllTasks(
|
||||
tasksJsonPath,
|
||||
numSubtasks,
|
||||
useResearch,
|
||||
additionalContext,
|
||||
forceFlag,
|
||||
{ session, mcpLog, projectRoot, tag },
|
||||
{ session, mcpLog, projectRoot, tag, complexityReportPath },
|
||||
'json'
|
||||
);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
findTasksPath as coreFindTasksPath,
|
||||
findPRDPath as coreFindPrdPath,
|
||||
findComplexityReportPath as coreFindComplexityReportPath,
|
||||
resolveComplexityReportOutputPath as coreResolveComplexityReportOutputPath,
|
||||
findProjectRoot as coreFindProjectRoot,
|
||||
normalizeProjectRoot
|
||||
} from '../../../../src/utils/path-utils.js';
|
||||
@@ -224,6 +225,21 @@ export function findComplexityReportPath(args, log = silentLogger) {
|
||||
return resolveComplexityReportPath(args, log);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve complexity report output path (create if needed) - primary MCP function
|
||||
* @param {string|null} [explicitPath] - Explicit path to complexity report
|
||||
* @param {Object} args - Arguments object containing projectRoot and tag
|
||||
* @param {Object} [log] - Log function to prevent console logging
|
||||
* @returns {string} - Resolved output path for complexity report
|
||||
*/
|
||||
export function resolveComplexityReportOutputPath(
|
||||
explicitPath,
|
||||
args,
|
||||
log = silentLogger
|
||||
) {
|
||||
return coreResolveComplexityReportOutputPath(explicitPath, args, log);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find PRD path - primary MCP function
|
||||
* @param {string} [explicitPath] - Explicit path to PRD file
|
||||
|
||||
@@ -10,7 +10,10 @@ import {
|
||||
withNormalizedProjectRoot
|
||||
} from './utils.js';
|
||||
import { expandAllTasksDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import {
|
||||
findTasksPath,
|
||||
resolveComplexityReportOutputPath
|
||||
} from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
@@ -85,6 +88,14 @@ export function registerExpandAllTool(server) {
|
||||
);
|
||||
}
|
||||
|
||||
// Resolve complexity report path to use recommendations from analyze-complexity
|
||||
const complexityReportPath = resolveComplexityReportOutputPath(
|
||||
null,
|
||||
{ projectRoot: args.projectRoot, tag: resolvedTag },
|
||||
log
|
||||
);
|
||||
log.info(`Using complexity report path: ${complexityReportPath}`);
|
||||
|
||||
const result = await expandAllTasksDirect(
|
||||
{
|
||||
tasksJsonPath: tasksJsonPath,
|
||||
@@ -93,7 +104,8 @@ export function registerExpandAllTool(server) {
|
||||
prompt: args.prompt,
|
||||
force: args.force,
|
||||
projectRoot: args.projectRoot,
|
||||
tag: resolvedTag
|
||||
tag: resolvedTag,
|
||||
complexityReportPath
|
||||
},
|
||||
log,
|
||||
{ session }
|
||||
|
||||
110
output.txt
110
output.txt
File diff suppressed because one or more lines are too long
@@ -244,6 +244,53 @@ describe('expandAllTasks', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('should pass complexityReportPath to expandTask when provided in context', async () => {
|
||||
// Arrange
|
||||
const mockComplexityReportPath =
|
||||
'/test/project/.taskmaster/reports/task-complexity-report.json';
|
||||
mockExpandTask.mockResolvedValue({
|
||||
telemetryData: { commandName: 'expand-task', totalCost: 0.05 }
|
||||
});
|
||||
|
||||
// Act
|
||||
const result = await expandAllTasks(
|
||||
mockTasksPath,
|
||||
undefined, // numSubtasks not specified, should use complexity report
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
{
|
||||
session: mockSession,
|
||||
mcpLog: mockMcpLog,
|
||||
projectRoot: mockProjectRoot,
|
||||
tag: 'master',
|
||||
complexityReportPath: mockComplexityReportPath
|
||||
},
|
||||
'json'
|
||||
);
|
||||
|
||||
// Assert
|
||||
expect(result.success).toBe(true);
|
||||
expect(result.expandedCount).toBe(2); // Tasks 1 and 2
|
||||
|
||||
// Verify expandTask was called with complexityReportPath in context
|
||||
expect(mockExpandTask).toHaveBeenCalledWith(
|
||||
mockTasksPath,
|
||||
expect.any(Number), // task id
|
||||
undefined, // numSubtasks
|
||||
false, // useResearch
|
||||
'', // additionalContext
|
||||
expect.objectContaining({
|
||||
session: mockSession,
|
||||
mcpLog: mockMcpLog,
|
||||
projectRoot: mockProjectRoot,
|
||||
tag: 'master',
|
||||
complexityReportPath: mockComplexityReportPath
|
||||
}),
|
||||
false // force
|
||||
);
|
||||
});
|
||||
|
||||
test('should return success with message when no tasks are eligible', async () => {
|
||||
// Arrange - Mock tasks data with no eligible tasks
|
||||
const noEligibleTasksData = {
|
||||
|
||||
Reference in New Issue
Block a user