models

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidPoints

func IsValidPoints(p int) bool

IsValidPoints checks if a point value is valid

func IsValidPriority

func IsValidPriority(p Priority) bool

IsValidPriority checks if a priority is valid

func IsValidStatus

func IsValidStatus(s Status) bool

IsValidStatus checks if a status is valid

func IsValidType

func IsValidType(t Type) bool

IsValidType checks if a type is valid

func ValidPoints

func ValidPoints() []int

ValidPoints returns valid Fibonacci story points

Types

type ActionLog

type ActionLog struct {
	ID           int64      `json:"id"`
	SessionID    string     `json:"session_id"`
	ActionType   ActionType `json:"action_type"`
	EntityType   string     `json:"entity_type"` // issue, dependency, file_link
	EntityID     string     `json:"entity_id"`
	PreviousData string     `json:"previous_data"` // JSON snapshot before action
	NewData      string     `json:"new_data"`      // JSON snapshot after action
	Timestamp    time.Time  `json:"timestamp"`
	Undone       bool       `json:"undone"`
}

ActionLog represents a logged action that can be undone

type ActionType

type ActionType string

ActionType represents the type of action that was performed

const (
	ActionCreate           ActionType = "create"
	ActionUpdate           ActionType = "update"
	ActionDelete           ActionType = "delete"
	ActionRestore          ActionType = "restore"
	ActionStart            ActionType = "start"
	ActionReview           ActionType = "review"
	ActionApprove          ActionType = "approve"
	ActionReject           ActionType = "reject"
	ActionBlock            ActionType = "block"
	ActionUnblock          ActionType = "unblock"
	ActionClose            ActionType = "close"
	ActionReopen           ActionType = "reopen"
	ActionAddDep           ActionType = "add_dependency"
	ActionRemoveDep        ActionType = "remove_dependency"
	ActionLinkFile         ActionType = "link_file"
	ActionUnlinkFile       ActionType = "unlink_file"
	ActionHandoff          ActionType = "handoff"
	ActionBoardCreate      ActionType = "board_create"
	ActionBoardDelete      ActionType = "board_delete"
	ActionBoardAddIssue    ActionType = "board_add_issue"
	ActionBoardRemoveIssue ActionType = "board_remove_issue"
	ActionBoardMoveIssue   ActionType = "board_move_issue"
)

type Board added in v0.8.0

type Board struct {
	ID           string     `json:"id"`
	Name         string     `json:"name"`
	LastViewedAt *time.Time `json:"last_viewed_at,omitempty"`
	CreatedAt    time.Time  `json:"created_at"`
	UpdatedAt    time.Time  `json:"updated_at"`
}

Board represents a named view into issues with custom ordering

type BoardIssue added in v0.8.0

type BoardIssue struct {
	BoardID  string    `json:"board_id"`
	IssueID  string    `json:"issue_id"`
	Position int       `json:"position"`
	AddedAt  time.Time `json:"added_at"`
}

BoardIssue represents board membership with ordering

type BoardIssueView added in v0.8.0

type BoardIssueView struct {
	BoardID  string    `json:"board_id"`
	Position int       `json:"position"`
	AddedAt  time.Time `json:"added_at"`
	Issue    Issue     `json:"issue"`
}

BoardIssueView joins BoardIssue with Issue data

type Comment

type Comment struct {
	ID        int64     `json:"id"`
	IssueID   string    `json:"issue_id"`
	SessionID string    `json:"session_id"`
	Text      string    `json:"text"`
	CreatedAt time.Time `json:"created_at"`
}

Comment represents a comment on an issue

type Config

type Config struct {
	FocusedIssueID    string     `json:"focused_issue_id,omitempty"`
	ActiveWorkSession string     `json:"active_work_session,omitempty"`
	PaneHeights       [3]float64 `json:"pane_heights,omitempty"` // Ratios for 3 horizontal panes (sum=1.0)
}

Config represents the local config state

type ExtendedStats added in v0.4.1

type ExtendedStats struct {
	// Counts
	Total      int
	ByStatus   map[Status]int
	ByType     map[Type]int
	ByPriority map[Priority]int

	// Timeline
	OldestOpen      *Issue
	NewestTask      *Issue
	LastClosed      *Issue
	CreatedToday    int
	CreatedThisWeek int

	// Points/velocity
	TotalPoints      int
	AvgPointsPerTask float64
	CompletionRate   float64 // closed / total created (or created + closed)

	// Activity
	TotalLogs         int
	TotalHandoffs     int
	MostActiveSession string
}

ExtendedStats holds detailed statistics for dashboard/stats displays

type FileRole

type FileRole string

FileRole represents the role of a linked file

const (
	FileRoleImplementation FileRole = "implementation"
	FileRoleTest           FileRole = "test"
	FileRoleReference      FileRole = "reference"
	FileRoleConfig         FileRole = "config"
)

type GitSnapshot

type GitSnapshot struct {
	ID         int64     `json:"id"`
	IssueID    string    `json:"issue_id"`
	Event      string    `json:"event"` // start, handoff
	CommitSHA  string    `json:"commit_sha"`
	Branch     string    `json:"branch"`
	DirtyFiles int       `json:"dirty_files"`
	Timestamp  time.Time `json:"timestamp"`
}

GitSnapshot captures git state at a point in time

type Handoff

type Handoff struct {
	ID        int64     `json:"id"`
	IssueID   string    `json:"issue_id"`
	SessionID string    `json:"session_id"`
	Done      []string  `json:"done,omitempty"`
	Remaining []string  `json:"remaining,omitempty"`
	Decisions []string  `json:"decisions,omitempty"`
	Uncertain []string  `json:"uncertain,omitempty"`
	Timestamp time.Time `json:"timestamp"`
}

Handoff represents a structured handoff state

type Issue

type Issue struct {
	ID                 string     `json:"id"`
	Title              string     `json:"title"`
	Description        string     `json:"description,omitempty"`
	Status             Status     `json:"status"`
	Type               Type       `json:"type"`
	Priority           Priority   `json:"priority"`
	Points             int        `json:"points,omitempty"`
	Labels             []string   `json:"labels,omitempty"`
	ParentID           string     `json:"parent_id,omitempty"`
	Acceptance         string     `json:"acceptance,omitempty"`
	ImplementerSession string     `json:"implementer_session,omitempty"`
	CreatorSession     string     `json:"creator_session,omitempty"`
	ReviewerSession    string     `json:"reviewer_session,omitempty"`
	CreatedAt          time.Time  `json:"created_at"`
	UpdatedAt          time.Time  `json:"updated_at"`
	ClosedAt           *time.Time `json:"closed_at,omitempty"`
	DeletedAt          *time.Time `json:"deleted_at,omitempty"`
	Minor              bool       `json:"minor,omitempty"`
	CreatedBranch      string     `json:"created_branch,omitempty"`
}

Issue represents a task/issue in the system

type IssueDependency

type IssueDependency struct {
	IssueID      string `json:"issue_id"`
	DependsOnID  string `json:"depends_on_id"`
	RelationType string `json:"relation_type"` // blocks, depends_on
}

IssueDependency represents issue relationships

type IssueFile

type IssueFile struct {
	ID        int64     `json:"id"`
	IssueID   string    `json:"issue_id"`
	FilePath  string    `json:"file_path"`
	Role      FileRole  `json:"role"`
	LinkedSHA string    `json:"linked_sha"`
	LinkedAt  time.Time `json:"linked_at"`
}

IssueFile represents a linked file

type IssueSessionAction added in v0.4.26

type IssueSessionAction string

IssueSessionAction represents actions a session can take on an issue

const (
	ActionSessionCreated   IssueSessionAction = "created"
	ActionSessionStarted   IssueSessionAction = "started"
	ActionSessionUnstarted IssueSessionAction = "unstarted"
	ActionSessionReviewed  IssueSessionAction = "reviewed"
)

type IssueSessionHistory added in v0.4.26

type IssueSessionHistory struct {
	ID        string             `json:"id"`
	IssueID   string             `json:"issue_id"`
	SessionID string             `json:"session_id"`
	Action    IssueSessionAction `json:"action"`
	CreatedAt time.Time          `json:"created_at"`
}

IssueSessionHistory tracks all sessions that touched an issue

type Log

type Log struct {
	ID            int64     `json:"id"`
	IssueID       string    `json:"issue_id"`
	SessionID     string    `json:"session_id"`
	WorkSessionID string    `json:"work_session_id,omitempty"`
	Message       string    `json:"message"`
	Type          LogType   `json:"type"`
	Timestamp     time.Time `json:"timestamp"`
}

Log represents a session log entry

type LogType

type LogType string

LogType represents the type of log entry

const (
	LogTypeProgress   LogType = "progress"
	LogTypeSecurity   LogType = "security"
	LogTypeBlocker    LogType = "blocker"
	LogTypeDecision   LogType = "decision"
	LogTypeHypothesis LogType = "hypothesis"
	LogTypeTried      LogType = "tried"
	LogTypeResult     LogType = "result"
)

type Priority

type Priority string

Priority represents issue priority

const (
	PriorityP0 Priority = "P0" // critical
	PriorityP1 Priority = "P1" // high
	PriorityP2 Priority = "P2" // medium (default)
	PriorityP3 Priority = "P3" // low
	PriorityP4 Priority = "P4" // none
)

func NormalizePriority added in v0.4.17

func NormalizePriority(p string) Priority

NormalizePriority converts alternate priority formats to canonical form Accepts: "0", "1", "2", "3", "4" as aliases for "P0", "P1", "P2", "P3", "P4"

type Status

type Status string

Status represents issue status

const (
	StatusOpen       Status = "open"
	StatusInProgress Status = "in_progress"
	StatusBlocked    Status = "blocked"
	StatusInReview   Status = "in_review"
	StatusClosed     Status = "closed"
)

func NormalizeStatus added in v0.4.17

func NormalizeStatus(s string) Status

NormalizeStatus converts alternate status names to canonical form Accepts: "review" as alias for "in_review"

type Type

type Type string

Type represents issue type

const (
	TypeBug     Type = "bug"
	TypeFeature Type = "feature"
	TypeTask    Type = "task"
	TypeEpic    Type = "epic"
	TypeChore   Type = "chore"
)

func NormalizeType added in v0.4.17

func NormalizeType(t string) Type

NormalizeType converts alternate type names to canonical form Accepts: "story" as alias for "feature"

type WorkSession

type WorkSession struct {
	ID        string     `json:"id"`
	Name      string     `json:"name"`
	SessionID string     `json:"session_id"`
	StartedAt time.Time  `json:"started_at"`
	EndedAt   *time.Time `json:"ended_at,omitempty"`
	StartSHA  string     `json:"start_sha,omitempty"`
	EndSHA    string     `json:"end_sha,omitempty"`
}

WorkSession represents a multi-issue work session

type WorkSessionIssue

type WorkSessionIssue struct {
	WorkSessionID string    `json:"work_session_id"`
	IssueID       string    `json:"issue_id"`
	TaggedAt      time.Time `json:"tagged_at"`
}

WorkSessionIssue links a work session to an issue

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL