Documentation
¶
Overview ¶
Package milestone implements sprint/release planning for cloop PM mode. Milestones group tasks into named releases or sprints with optional deadlines and provide AI-powered velocity forecasting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPlanPrompt ¶
BuildPlanPrompt creates a prompt asking the AI to organize tasks into milestones.
Types ¶
type ForecastResult ¶
type ForecastResult struct {
EstimatedDate *time.Time
DaysRemaining int
TasksPerDay float64
IsOnTrack bool
RiskLevel string // "low" | "medium" | "high"
Notes string
}
ForecastResult holds an AI-powered completion prediction.
type Milestone ¶
type Milestone struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Deadline *time.Time `json:"deadline,omitempty"`
TaskIDs []int `json:"task_ids"`
CreatedAt time.Time `json:"created_at"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
}
Milestone groups PM tasks into a named sprint or release.
func FindByName ¶
FindByName returns the first milestone matching name (case-insensitive prefix match).
func ParsePlan ¶
ParsePlan parses the AI output into a slice of Milestone structs. It handles JSON embedded in markdown code fences.
func Plan ¶
func Plan(ctx context.Context, prov provider.Provider, goal string, plan *pm.Plan, existing []*Milestone, opts provider.Options) ([]*Milestone, error)
Plan calls the AI provider to generate a milestone plan from the current task list.
func (*Milestone) Forecast ¶
Forecast computes a completion forecast based on historical task velocity. createdAt is the session start time used to calculate elapsed time.