Documentation
¶
Overview ¶
Package complexity implements AI-powered T-shirt size complexity estimation for PM tasks. It rates each task with a T-shirt size (XS/S/M/L/XL) and corresponding Fibonacci story points (1/2/3/5/8/13) based on description, dependencies, codebase context, and similar completed tasks from history.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidSize ¶
IsValidSize returns true if s is a known T-shirt size.
func PointsForSize ¶
PointsForSize returns the Fibonacci story points for a given T-shirt size. Returns 0 for unknown sizes.
Types ¶
type ComplexityEstimate ¶
type ComplexityEstimate struct {
TaskID int `json:"task_id"`
TaskTitle string `json:"task_title"`
Size string `json:"size"` // XS/S/M/L/XL
StoryPoints int `json:"story_points"` // 1/2/3/5/8/13 Fibonacci
Rationale string `json:"rationale"` // 2-3 sentence explanation
Confidence string `json:"confidence"` // low/medium/high
SimilarTasks []string `json:"similar_tasks"` // completed task titles used as calibration
}
ComplexityEstimate holds the AI-generated complexity assessment for a single task.
func Estimate ¶
func Estimate(ctx context.Context, prov provider.Provider, model string, task *pm.Task, plan *pm.Plan, completedSamples []pm.Task) (*ComplexityEstimate, error)
Estimate calls the AI to produce a complexity estimate for the given task. completedSamples are used as calibration anchors (pass SelectCalibrationSamples result).