Orchestration

Task model

The Workspace → Project → Plan → Phase → Task hierarchy and lifecycle.

Hierarchy: Workspace → Project → Plan → Phase → Task. A task belongs to a phase and supports parent_task_id / children for subtasks.

Task fields

Key fields: status, priority, provider, assignee_id, branch_name, pr_url, estimated_minutes, actual_minutes, accepted_at, completed_at, can_run_parallel, depends_on_task_ids[], task_type, branch_prefix, required_proficiency, splittable, needs_analysis, requires_packages[].

Status lifecycle

shell
draft → dispatched → in_progress → awaiting_review → merged → completed

# pause:  any active → waiting_for_resume → (resume) → draft
# abort:  → cancelled

The execution path is short: ACTIVE = [dispatched, in_progress], DONE = [completed, approved, merged, completed_by_client]. Review approval, rejection and revision are not separate statuses — they are tracked by the review_sent_at, review_approved_at and revision_count markers while the task stays in awaiting_review. A paused task moves to waiting_for_resume; Resume returns it to draft for re-dispatch.

Dependencies & blockers

depends_on_task_ids declares prerequisites. GET /api/v1/tasks/{id}/blockers returns incomplete dependency tasks with their assignee names. me/tasks defaults to active plans only; add ?include_archived=1 to include the rest.