Skip to main content

Task Fields in tasks.json

Tasks in tasks.json have the following structure:

Task File Format

Individual task files follow this format:

User-Defined Metadata Field

The metadata field allows you to store arbitrary custom data on tasks without requiring schema changes. This is useful for:
  • External IDs: Link tasks to GitHub issues, Jira tickets, Linear issues, etc.
  • Workflow data: Track sprints, story points, custom statuses
  • Integration data: Store sync timestamps, external system references
  • Custom tracking: UUIDs, version numbers, audit information

Key Characteristics

Fully Optional

The field is optional. Existing tasks work without it.

AI-Safe

AI operations preserve your metadata - it’s never overwritten by AI.

Flexible Schema

Store any JSON-serializable data: strings, numbers, objects, arrays.

Subtask Support

Both tasks and subtasks can have their own metadata.

Usage Examples

GitHub Issue Linking
Sprint & Project Management
External System Integration
Stable UUID Tracking
Security Note: Do not store secrets, API keys, or sensitive credentials in the metadata field. Task data may be visible in logs, exports, or shared with AI providers.

Metadata Behavior

Updating Metadata via MCP

The update_task and update_subtask MCP tools support a metadata parameter for updating task metadata. This feature is disabled by default for safety. To enable MCP metadata updates: Add TASK_MASTER_ALLOW_METADATA_UPDATES=true to your MCP server environment configuration in .mcp.json:
Usage example:
The metadata parameter accepts a JSON string. The new metadata is merged with existing metadata, allowing you to update specific fields without losing others.

Features in Detail

The analyze-complexity command:
  • Analyzes each task using AI to assess its complexity on a scale of 1-10
  • Recommends optimal number of subtasks based on configured DEFAULT_SUBTASKS
  • Generates tailored prompts for expanding each task
  • Creates a comprehensive JSON report with ready-to-use commands
  • Saves the report to scripts/task-complexity-report.json by default
The generated report contains:
  • Complexity analysis for each task (scored 1-10)
  • Recommended number of subtasks based on complexity
  • AI-generated expansion prompts customized for each task
  • Ready-to-run expansion commands directly within each task analysis
The complexity-report command:
  • Displays a formatted, easy-to-read version of the complexity analysis report
  • Shows tasks organized by complexity score (highest to lowest)
  • Provides complexity distribution statistics (low, medium, high)
  • Highlights tasks recommended for expansion based on threshold score
  • Includes ready-to-use expansion commands for each complex task
  • If no report exists, offers to generate one on the spot
The expand command automatically checks for and uses the complexity report:When a complexity report exists:
  • Tasks are automatically expanded using the recommended subtask count and prompts
  • When expanding all tasks, they’re processed in order of complexity (highest first)
  • Research-backed generation is preserved from the complexity analysis
  • You can still override recommendations with explicit command-line options
Example workflow:
The next command:
  • Identifies tasks that are pending/in-progress and have all dependencies satisfied
  • Prioritizes tasks by priority level, dependency count, and task ID
  • Displays comprehensive information about the selected task:
    • Basic task details (ID, title, priority, dependencies)
    • Implementation details
    • Subtasks (if they exist)
  • Provides contextual suggested actions:
    • Command to mark the task as in-progress
    • Command to mark the task as done
    • Commands for working with subtasks
The show command:
  • Displays comprehensive details about a specific task or subtask
  • Shows task status, priority, dependencies, and detailed implementation notes
  • For parent tasks, displays all subtasks and their status
  • For subtasks, shows parent task relationship
  • Provides contextual action suggestions based on the task’s state
  • Works with both regular tasks and subtasks (using the format taskId.subtaskId)

Best Practices for AI-Driven Development

📝 Detailed PRD

The more detailed your PRD, the better the generated tasks will be.

👀 Review Tasks

After parsing the PRD, review the tasks to ensure they make sense and have appropriate dependencies.

📊 Analyze Complexity

Use the complexity analysis feature to identify which tasks should be broken down further.

⛓️ Follow Dependencies

Always respect task dependencies - the Cursor agent will help with this.

🔄 Update As You Go

If your implementation diverges from the plan, use the update command to keep future tasks aligned.

📦 Break Down Tasks

Use the expand command to break down complex tasks into manageable subtasks.

🔄 Regenerate Files

After any updates to tasks.json, regenerate the task files to keep them in sync.

💬 Provide Context

When asking the Cursor agent to help with a task, provide context about what you’re trying to achieve.

✅ Validate Dependencies

Periodically run the validate-dependencies command to check for invalid or circular dependencies.