Documentation
¶
Overview ¶
Package domain holds the core ticket types and the status state machine. It knows nothing about MCP, SQLite, or any transport — it is pure data and rules, imported by store, cli, and mcptools alike.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateTransition ¶
ValidateTransition returns nil if the move is legal, otherwise an error whose message tells the agent what it can do instead. Every validation error must be self-correcting prompt material.
Types ¶
type Link ¶
Link is a directed relationship to another ticket, with the far ticket's key and title resolved for rendering.
type Priority ¶
type Priority int
Priority is an ordered severity; lower sorts first.
func ParsePriority ¶
ParsePriority maps a name to a Priority. Empty defaults to Normal.
type Status ¶
type Status string
Status is a ticket's position in the fixed workflow. The state machine is intentionally not configurable in v0.
func ParseStatus ¶
ParseStatus validates a status string.
func (Status) CanTransition ¶
CanTransition reports whether moving from s to to is legal.
func (Status) IsTerminal ¶
IsTerminal reports whether no transitions leave this status.
type Ticket ¶
type Ticket struct {
ID int64
Key string
Project string
Title string
Description string
Status Status
Priority Priority
ParentID *int64
ParentKey string // populated on read for rendering convenience
Labels []string
CreatedAt time.Time
UpdatedAt time.Time
// Populated only by GetTicketFull / context queries.
Comments []Comment
Subtasks []Subtask
Links []Link
// CommentCount is set by lightweight list queries (e.g. the board) that
// do not load the full Comments slice.
CommentCount int
}
Ticket is the central record. Labels live as a decoded slice here even though the store persists them as a JSON column.