Managing Dependencies

Dependencies define the order work should happen in. When task 5 depends on task 3, Taskmaster ensures task 3 is completed before recommending task 5.

Adding Dependencies

# Task 5 depends on task 3 — task 3 must be done first
tm add-dependency --id=5 --depends-on=3

# Remove a dependency
tm remove-dependency --id=5 --depends-on=3

How Dependencies Affect Your Workflow

Dependencies power several Taskmaster features:

  • tm next only recommends tasks whose dependencies are all satisfied
  • tm list --ready filters to tasks that are unblocked and ready to start
  • tm list --blocking shows tasks that other tasks are waiting on
  • tm clusters groups tasks by dependency level for parallel execution

Finding High-Impact Work

The --ready and --blocking filters help you focus on what matters:

# Tasks you can start right now (all dependencies met)
tm list --ready

# Tasks that are holding up other work
tm list --blocking

# The sweet spot — tasks you can start that also unblock others
tm list --ready --blocking

Validating Dependencies

Check your dependency graph for problems:

# Check for circular dependencies or references to missing tasks
tm validate-dependencies

# Automatically fix invalid dependencies
tm fix-dependencies

Dependency Resolution Rules

  • A dependency is satisfied when its task status is done or cancelled
  • Dependencies work across tags — task 5 in feature-auth can depend on task 3 in core
  • When you mark a parent task as done, all its subtasks are automatically marked done too
  • The tm next command walks the full dependency graph to find the highest-priority unblocked task

Best Practices

  1. Set dependencies during PRD parsing — A well-structured PRD generates tasks with proper ordering automatically
  2. Validate periodically — Run tm validate-dependencies after reorganizing tasks
  3. Use --ready --blocking — This combo surfaces the most impactful work
  4. Don't over-depend — Only add dependencies where there's a genuine ordering requirement