Documentation
¶
Overview ¶
Package calibrate computes effort-estimate calibration metrics from historical task actuals and asks the AI to suggest updated estimates for pending tasks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CalibrationReport ¶
type CalibrationReport struct {
OverallFactor float64 // recommended global calibration factor
ByRole []RoleStat // per-role breakdown (first entry is "all")
Suggestions []EstimateSuggestion // AI suggestions for pending tasks
}
CalibrationReport contains the full calibration result.
func Run ¶
func Run(ctx context.Context, prov provider.Provider, opts provider.Options, plan *pm.Plan) (*CalibrationReport, error)
Run computes calibration metrics from the plan and optionally calls the AI to generate per-task suggestions for all pending tasks.
If prov is nil the AI call is skipped and only the statistical report is returned.
type EstimateSuggestion ¶
type EstimateSuggestion struct {
TaskID int `json:"task_id"`
Title string `json:"title"`
OldMinutes int `json:"old_minutes"`
NewMinutes int `json:"new_minutes"`
Reasoning string `json:"reasoning"`
}
EstimateSuggestion is an AI-suggested new estimate for a pending task.
type RoleStat ¶
type RoleStat struct {
Role string
TaskCount int
EstTotal int // sum of EstimatedMinutes
ActualTotal int // sum of ActualMinutes
MAE float64 // mean absolute error in minutes
Bias float64 // mean(actual - estimated); positive = underestimated
Factor float64 // ActualTotal / EstTotal; 1.0 = perfect, >1 = underestimate
}
RoleStat holds accuracy metrics for one agent role (or "all" for the aggregate).
Click to show internal directories.
Click to hide internal directories.