Skip to content

Implement new scope-up & scope-down commands #77

@eyaltoledano

Description

@eyaltoledano

"I often find myself needing to quickly adjust the complexity of tasks as project requirements evolve. Having commands to easily scale task complexity up or down would streamline my workflow and improve adaptability."


Motivation

The use of the expand command exposes the task to a pretty arbitrary level of complexity when it gets regenerated. The expand and update commands don't worry too much about scope, which we hope to solve also with #76 and #75.

However, that's still too rigid, and AI being AI, users currently have no convenient method to dynamically adjust the granularity of existing tasks or subtasks. Adding commands specifically designed to quickly scale complexity up or down will significantly enhance flexibility and responsiveness to project changes.

Being able to scope-up/down with different levels of strength also helps the user use the command with light/regular/strong modifiers for when things are really too simple or too complex, or even if they're just a little too complex or not enough. This will solve this pain.

AI Chat prompt to capture intent for this command

"this is way too complicated"
"how can we add more value to this feature?"
"we probably need to add a little more polish before calling this done"


Proposed Solution

Implement two complementary CLI commands:

  • task-master scope-up --id=<task|subtask_ids> [--strength=light|regular|heavy]
  • task-master scope-down --id=<task|subtask_ids> [--strength=light|regular|heavy]

These commands allow users to dynamically adjust task complexity:

  • scope-up: Expands existing tasks/subtasks to add greater detail, enhanced testing, and deeper implementation guidance.
  • scope-down: Condenses tasks/subtasks by reducing complexity, removing non-essential subtasks, and streamlining instructions for simpler execution.

The optional --strength flag specifies the intensity of complexity adjustment:

  • light: Small adjustments to complexity.
  • regular: Moderate adjustments to complexity (default).
  • heavy: Significant adjustments to complexity, aggressively simplifying or expanding task details.

Both commands leverage existing milestone context (foundation, mvp, v1, etc.) to intelligently guide the scope adjustments.


High-Level Workflow

  1. Parse provided task/subtask IDs and strength flag.
  2. Fetch current task details and milestone context.
  3. Construct a context-aware prompt to increase (scope-up) or decrease (scope-down) complexity based on strength.
  4. Generate adjusted task/subtask details using the AI service (Claude/Perplexity as configured).
  5. Replace existing task details and subtasks with updated, complexity-adjusted content.
  6. Update task files and tasks.json accordingly.
  7. Display confirmation indicating successful complexity adjustment.

Key Elements

  • Command syntax:
task-master scope-up --id=<id[,id2,...]> [--strength=light|regular|heavy]
task-master scope-down --id=<id[,id2,...]> [--strength=light|regular|heavy]
  • Intelligent prompts tied to milestones for context-aware adjustments.
  • Direct modification and simplification/expansion of task content and subtasks.

Example Workflow

# Increase complexity moderately for MVP tasks
task-master scope-up --id=5,9

# Heavily decrease complexity after prototyping for specific tasks
task-master scope-down --id=12.1 --strength=heavy

Example output after adjustment:

Task ID: 5 (after scope-up)
+ 1. Add comprehensive input validation with detailed error messages.
+ 2. Include additional test cases covering edge scenarios.
Task ID: 12.1 (after scope-down)
- 3. Remove advanced caching strategies entirely.
- 4. Simplify error handling significantly to basic checks only.

Implementation Considerations

  • Robust validation for task/subtask IDs and strength parameters.
  • Preserve historical data for potential rollback or comparison (diff-plan).
  • Clear CLI output demonstrating before-and-after differences.
  • Ensure compatibility with milestone-based complexity guidelines.

Out of Scope (Future Considerations)

  • Automatic complexity adjustments triggered by AI-driven feedback loops.
  • Real-time visual representation of complexity adjustments in MCP.
  • GUI integrations for interactive complexity scaling.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status
Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions