Domain Types Reference¶
Core domain types for the kanban board, tasks, and agent workflow.
Source¶
All types are defined in src/domain/types.ts.
Stage¶
Task¶
interface Task {
id: string
title: string
description?: string
stage: Stage
priority: 'low' | 'medium' | 'high' | 'critical'
tags: string[]
assignedAgents: string[] // Agent IDs
workspaceId: string // Linked workspace
branch?: string // Git branch name
createdAt: string // ISO 8601
updatedAt: string // ISO 8601
events: TaskEvent[] // Activity history
sessions: ChatSession[] // Agent chat sessions
comments: TaskComment[] // Human comments
}
TaskEvent¶
interface TaskEvent {
id: string
type: 'stage_change' | 'agent_action' | 'comment' | 'assignment' | 'created'
message: string
timestamp: string
agentId?: string
}
ChatSession¶
interface ChatSession {
id: string
agentId: string
messages: SessionMessage[]
startedAt: string
endedAt?: string
}
AgentDecision¶
interface AgentDecision {
decision: 'approve' | 'request_changes' | 'escalate'
nextStage?: Stage
comments: string
}
StageTransition¶
interface StageTransition {
from: Stage
to: Stage
trigger: 'auto' | 'agent' | 'human'
requiresApproval: boolean
}
Transitions Table¶
const TRANSITIONS: StageTransition[] = [
{ from: 'idea', to: 'planning', trigger: 'auto', requiresApproval: false },
{ from: 'planning', to: 'implementation', trigger: 'agent', requiresApproval: false },
{ from: 'implementation', to: 'review', trigger: 'agent', requiresApproval: false },
{ from: 'review', to: 'implementation', trigger: 'agent', requiresApproval: false },
{ from: 'review', to: 'merge', trigger: 'human', requiresApproval: true },
]
AgentRole¶
Roles determine which agent is triggered at each stage:
| Stage | Agent Role |
|---|---|
| Planning | planner |
| Implementation | developer |
| Review | reviewer |