Skip to content

Conversation

@silvin-lubecki
Copy link
Contributor

@silvin-lubecki silvin-lubecki commented Jan 24, 2026

Add tasks tool with dependency management

Summary

This PR introduces a new tasks toolset. It provides dependency-aware task orchestration while keeping the original todo tool unchanged for simple use cases.

Features

• Dependency management: Tasks can specify blocked_by to create dependency
chains
• Automatic enforcement: Cannot start a task until all its blockers are
completed
• Circular dependency detection: Prevents invalid dependency graphs
• Owner assignment: Assign tasks to team members/agents
• Visual indicators: ✓ done, ■ in-progress, □ pending, ⚠ blocked
• Unblock notifications: Get notified when completing a task unblocks others
• Multi-agent sharing: Use shared: true to share task state across agents

New tools

Tool                      Description

create_task              Create task with optional  blocked_by  and  owner
create_tasks             Batch create tasks with dependencies
update_tasks             Update status (enforces dependency rules)
list_tasks               List with stats and blocked indicators
add_task_dependency      Add blockers to existing task
remove_task_dependency   Remove blockers
get_blocked_tasks        Query blocked tasks

Usage

toolsets:
- type: tasks
shared: true  # Optional: share across agents

Example output

Tasks (1 done, 1 in progress, 2 pending, 1 blocked)

✓ [task_1] Research API
■ [task_2] Implement backend (backend-dev)
□ [task_3] Write tests
⚠ [task_4] Deploy → blocked by: task_2, task_3

Testing

• 35+ unit tests covering all features
• TUI sidebar component with visual indicators
• E2E test configurations for single and multi-agent setups

Add a new 'tasks' toolset separate from 'todo' that provides
dependency-aware task management inspired by Claude Code's task system:

Features:
- BlockedBy/Blocks relationships between tasks
- Automatic enforcement: cannot start blocked tasks
- Visual indicators: ✓=done, ■=in-progress, □=pending, ⚠=blocked
- Owner assignment for tasks
- Circular dependency detection
- Unblock notifications when dependencies complete

New tools:
- create_task: Create task with optional blocked_by and owner
- create_tasks: Batch create tasks with dependencies
- update_tasks: Update status with dependency enforcement
- list_tasks: List with stats and blocked indicators
- add_task_dependency: Add blockers to existing task
- remove_task_dependency: Remove blockers
- get_blocked_tasks: Query blocked tasks

Usage in config:
  toolsets:
    - type: tasks
      shared: true  # Optional: share across agents

The original 'todo' tool remains unchanged for simple use cases.

Assisted-By: cagent
Unit tests (tasks_test.go):
- Test task creation with/without dependencies
- Test canStart logic for blocked tasks
- Test update enforcement (cannot start blocked)
- Test completion unblocking dependents
- Test list_tasks output with visual indicators
- Test add/remove dependencies
- Test circular dependency detection
- Test shared instance behavior
- Test cross-agent sharing simulation

TUI components:
- Add taskstool package with sidebar component
- Display tasks with dependency indicators in sidebar
- Show stats: X done · Y active · Z pending · W blocked
- Visual icons: ✓ □ ■ ⚠
- Owner display and blocked-by indicators
- Update sidebar to render both todos and tasks

E2E test configs:
- tasks_dependencies.yaml: single agent with tasks
- shared_tasks.yaml: multi-agent with shared tasks

Assisted-By: cagent
Replace todo with tasks to leverage dependency management
for more structured development workflows.

Assisted-By: cagent
@silvin-lubecki silvin-lubecki requested a review from a team as a code owner January 24, 2026 16:46
@silvin-lubecki silvin-lubecki changed the title Feature/tasks dependencies Tasks dependencies Jan 24, 2026
- Fix gci import formatting in tasks.go
- Combine append calls in taskstool/sidebar.go (gocritic)
- Use integer range syntax for loop (intrange)

Assisted-By: cagent
@silvin-lubecki silvin-lubecki marked this pull request as draft January 24, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant