Role Overview
Director
Strategic plannerCreates and prioritizes tasks
Worker
Code producerExecutes tasks in isolation
Steward
Maintenance agentHandles merge and recovery
Director
The Director is the strategic coordinator that translates human goals into actionable work.Responsibilities
Task Planning
Task Planning
- Receives goals from human operators
- Breaks down work into discrete tasks
- Sets priorities (1-5 scale, 1 is highest)
- Defines task dependencies
- Creates plans for related task groups
Coordination
Coordination
- Reports status to human when requested
- Does NOT monitor workers (handled by daemon)
- Does NOT dispatch tasks (handled by daemon)
- Focuses on strategic planning, not tactical execution
Session Type
Persistent (Interactive) - Directors run continuously in an interactive session.Example Workflow
Directors create tasks but do not assign them. The Dispatch Daemon handles assignment automatically.
Worker
Workers execute tasks and produce code. They come in two flavors: Ephemeral and Persistent.Ephemeral Worker
- Overview
- Lifecycle
- Registration
Short-lived workers spawned per-task by the Dispatch Daemon.Key Characteristics:
- Auto-spawned when task is available
- Runs in isolated git worktree
- Auto-terminates after task completion
- Reports to Director (indirectly)
Worktree Isolation
Each ephemeral worker gets its own git worktree:Worktrees provide true isolation - multiple workers can work on the same repository simultaneously without conflicts.
Persistent Worker
- Overview
- Use Cases
- Registration
Long-lived workers for interactive, exploratory work with a human.Key Characteristics:
- Manually started and stopped
- Not auto-dispatched by daemon
- Responds to human in real-time
- Session-scoped worktree
Worker Task Execution
When a worker receives a task:Read Task Context
- Task title and description
- Acceptance criteria
- Dependencies and blockers
- Handoff notes (if continuing previous work)
Execute Work
- Make code changes
- Run tests
- Commit frequently with clear messages
- Push to remote regularly
Complete or Handoff
Complete:
sf task complete <task-id>- Moves task to REVIEW status
- Creates merge request
- Triggers Merge Steward
sf task handoff <task-id> --message "reason"- Unassigns worker
- Preserves worktree and branch
- Appends handoff note to description
- Returns task to pool for next worker
Steward
Stewards handle specialized maintenance workflows that keep the system running smoothly.Steward Types
- Merge Steward
- Docs Steward
- Recovery Steward
- Custom Steward
Focus: Code integration and quality gatesTriggers: Task moves to REVIEW statusWorkflow:
- Run test command
- If tests pass: squash-merge to main
- If tests fail: create handoff task with error logs
- Clean up merged worktree and branch
Steward Execution Model
Stewards are ephemeral by default:Role Comparison Matrix
| Attribute | Director | Ephemeral Worker | Persistent Worker | Steward |
|---|---|---|---|---|
| Session Type | Persistent | Ephemeral | Persistent | Ephemeral |
| Reports To | Human | Director | Human | System |
| Dispatch | Manual | Automatic | Manual | Trigger-based |
| Worktree | Optional | Required | Optional | Temporary |
| Concurrency | 1 | Pool-limited | 1 | Pool-limited |
| Use Case | Planning | Production | Exploration | Maintenance |
Registration Examples
Next Steps
Orchestration Loop
See how agents are dispatched and coordinated
Task Management
Learn about task lifecycle and handoffs
Workflows
Build reusable task sequences
Dependencies
Understand blocking relationships