plugins/agent-teams/commands/team-delegate.md
Manage task assignments and team workload. Provides a delegation dashboard showing unassigned tasks, member workloads, blocked tasks, and rebalancing suggestions.
Parse $ARGUMENTS for team name and action flags:
--assign task-id=member-name: assign a specific task to a member--message member-name 'content': send a message to a specific member--rebalance: analyze and rebalance workload distributionRead team config from ~/.claude/teams/{team-name}/config.json using the Read tool
Call TaskList to get current state
If --assign flag is provided:
task-id=member-name formatTaskUpdate to set the task ownerSendMessage with type: "message" to notify the member:
If --message flag is provided:
SendMessage with type: "message":
If --rebalance flag is provided:
Analyze current workload distribution:
Generate rebalancing suggestions:
## Workload Analysis
Member Tasks Status
─────────────────────────────────
implementer-1 3 overloaded
implementer-2 1 balanced
implementer-3 0 idle
Suggestions:
1. Move task #5 from implementer-1 to implementer-3
2. Assign unassigned task #7 to implementer-3
Ask user for confirmation before executing rebalancing
Execute approved moves with TaskUpdate and SendMessage
If no action flag is provided, display the full delegation dashboard:
## Delegation Dashboard: {team-name}
### Unassigned Tasks
#5 Review error handling patterns
#7 Add integration tests
### Member Workloads
implementer-1 3 tasks (1 in_progress, 2 pending)
implementer-2 1 task (1 in_progress)
implementer-3 0 tasks (idle)
### Blocked Tasks
#6 Blocked by #4 (in_progress, owner: implementer-1)
### Suggestions
- Assign #5 to implementer-3 (idle)
- Assign #7 to implementer-2 (low workload)
Tip: Use Shift+Tab to enter Claude Code's built-in delegate mode for ad-hoc task delegation.