models

package
v0.4.15 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"
)

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"`
}

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"`
	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 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"
	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
)

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"
)

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"
)

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