Documentation
¶
Overview ¶
Package plan provides plan file selection, parsing, and manipulation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoPlansFound = errors.New("no plans found")
ErrNoPlansFound is returned when no plan files exist in the plans directory.
Functions ¶
func ExtractBranchName ¶
ExtractBranchName derives a branch name from a plan file path. removes the .md extension and strips any leading date prefix (e.g., "2024-01-15-").
Types ¶
type Plan ¶ added in v0.16.0
Plan represents a parsed plan file.
func ParsePlanFile ¶ added in v0.16.0
ParsePlanFile reads and parses a plan file from disk.
type Selector ¶
Selector handles plan file selection and resolution.
func NewSelector ¶
NewSelector creates a new Selector with the given plans directory and colors.
func (*Selector) FindRecent ¶
FindRecent finds the most recently modified plan file in the plans directory that was modified after the given start time.
type Task ¶ added in v0.16.0
type Task struct {
Number int `json:"number"`
Title string `json:"title"`
Status TaskStatus `json:"status"`
Checkboxes []Checkbox `json:"checkboxes"`
}
Task represents a task section in a plan.
type TaskStatus ¶ added in v0.16.0
type TaskStatus string
TaskStatus represents the execution status of a task.
const ( TaskStatusPending TaskStatus = "pending" TaskStatusActive TaskStatus = "active" TaskStatusDone TaskStatus = "done" TaskStatusFailed TaskStatus = "failed" )
task status constants.
func DetermineTaskStatus ¶ added in v0.16.0
func DetermineTaskStatus(checkboxes []Checkbox) TaskStatus
DetermineTaskStatus calculates task status based on checkbox states.