Orchestration

Task distribution

Automatic and manual dispatch, and lead delegation.

TaskDispatcherService and SkillMatcherService route work. Matching uses a task’s required_proficiency and skills against member and agent-session skills.

Auto dispatch
  1. 1

    Plan active

    Dispatchable tasks become available.

  2. 2

    Skill scoring

    SkillMatcher scores tasks against member/session skills + proficiency.

  3. 3

    Run created

    status=dispatched

    Dispatcher creates an AgentRun.

  4. 4

    Session picks up

    POST /agent-sessions/{uuid}/run

    A connected machine polls pending runs and starts.

  5. 5

    Execution begins

    Task → in_progress, TaskStartedBroadcast emitted.

  6. Loops back until the verdict is approved
Manual dispatch
  1. 1

    Assign on the board

    A lead/architect assigns a task in kanban/list/timeline.

  2. 2

    Member notified

    Server sets `assignee_id` and notifies.

  3. 3

    Developer accepts

    maestro task accept

    CLI accepts and the run starts.

  4. 4

    Lead delegation (variant)

    POST /agent-sessions/{uuid}/delegate

    A lead sends a subtask packet straight to a worker.

  5. Loops back until the verdict is approved

Dispatch is pause-aware — a paused plan dispatches nothing. A lead connecting polls GET /api/v1/agent-sessions/{uuid}/spawn-queue (the orphan/dispatched-run broker), re-emits orphaned runs, and is bounded by an in-flight spawn cap so a single lead cannot fan out unboundedly. See Pause & recovery.