calibrate

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 7 Imported by: 0

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL