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
| Column | Purpose |
|---|---|
backlog | Unprioritized work (default column for a new task) |
todo | Ready to start |
doing | In progress |
review | Awaiting review |
done | Completed |
File layout
workspace/kanban/
boards/
default.yaml
tasks/
task-001.yaml
lanes/
coding.yaml
research.yamlBoard 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: 2Task 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: codingPer-agent state machine
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: 2Default 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).
Events
The engine publishes to the event bus on two transitions today:
| Event subject | When |
|---|---|
EventSubjects.TASK_ASSIGNED | assignAgent() adds an agent assignee |
EventSubjects.TASK_COMPLETED | updateAgentState() 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
linkedGoalpoints 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 indocs/28-kanban-system.mddescribe the intended command surface. Verify them againstapps/cli/srcbefore relying on exact flags; theKanbanEnginemethods above are the authoritative contract.
Last updated on