AAnvio
Workflows & Automation

Kanban

File-first task boards with multi-agent assignment, per-agent work state, WIP limits, and skill-routed worker lanes.

3 min read

Anvio's kanban system manages tasks across a fixed set of columns, assigns them to one or more agents (each with independent work state), and routes work to capable agents through named worker lanes. Like everything else in a workspace, boards, tasks, and lanes are plain YAML files.

The engine is packages/kanban/src/kanban-engine.ts (KanbanEngineImpl), backed by FilesystemTaskStore and routed by LaneRouter.

Columns

ColumnPurpose
backlogUnprioritized work (default column for a new task)
todoReady to start
doingIn progress
reviewAwaiting review
doneCompleted

File layout

workspace/kanban/
  boards/
    default.yaml
  tasks/
    task-001.yaml
  lanes/
    coding.yaml
    research.yaml

Board schema

wipLimits are enforced on move: moveTask() calls assertWipLimit() and rejects a move that would exceed the target column's limit.

apiVersion: anvio.io/v1
kind: KanbanBoard
metadata:
  slug: default
spec:
  columns: [backlog, todo, doing, review, done]
  defaultLane: coding
  wipLimits:
    doing: 3
    review: 2

Task schema

Each assignee carries independent work state (status, startedAt, sessionId), so two agents on the same task can be in different states at once.

apiVersion: anvio.io/v1
kind: KanbanTask
metadata:
  id: task-001
spec:
  title: Refactor Authentication
  column: doing
  priority: high
  assignees:
    - type: agent
      id: architect
      state:
        status: researching
        sessionId: sess-abc123
    - type: agent
      id: software-engineer
      state:
        status: idle
  linkedGoal: project-refactor
  requiredSkills: [architecture, coding]
  lane: coding

Per-agent state machine

Rendering diagram…

Worker lanes

Lanes route tasks to agents by capability. LaneRouter.resolveAgentForLane(lane, requiredSkills) picks a capable agent, and autoAssign() only assigns automatically when the lane sets autoAssign: true.

apiVersion: anvio.io/v1
kind: WorkerLane
metadata:
  slug: coding
spec:
  description: Implementation and code changes
  requiredSkills: [coding]
  preferredAgents: [software-engineer]
  autoAssign: true
  concurrency: 2

Default lanes are provided by defaultWorkerLanes() when no lane files exist. See docs/28-kanban-system.md in the source repo for the full built-in lane table (research, coding, review, testing, documentation).

Rendering diagram…

Events

The engine publishes to the event bus on two transitions today:

Event subjectWhen
EventSubjects.TASK_ASSIGNEDassignAgent() adds an agent assignee
EventSubjects.TASK_COMPLETEDupdateAgentState() sets an assignee status: done

Not every documented event is emitted yet

docs/28-kanban-system.md lists TASK_CREATED, TASK_MOVED, and LANE_QUEUE_UPDATED as intended events, but KanbanEngineImpl currently only publishes TASK_ASSIGNED and TASK_COMPLETED. Don't build hooks against the others until they're wired.

Integration points

  • Goals. A task's linkedGoal points back at a goal slug.
  • Automation. The automation engine can create or move tasks.
  • Runtime. autoAssign() hands a task to an agent runtime.

TODO: The anvio kanban ... CLI verbs in docs/28-kanban-system.md describe the intended command surface. Verify them against apps/cli/src before relying on exact flags; the KanbanEngine methods above are the authoritative contract.

Edit on GitHub

Last updated on

On this page