@@ -199,7 +199,7 @@ func writeRecommendations(b *strings.Builder, recs []model.Recommendation, opts
199199func writeLegend (b * strings.Builder , opts Options ) {
200200 lines := []string {
201201 "CPU/MEM = current → proposed request · SAVINGS = $/mo (↑ grow = reliability, not a saving)" ,
202- "CONF = confidence: ▒ low · ▓ med · █ high — grows with data history (tier, window, samples). --explain shows the % ." ,
202+ "CONF = confidence: ▒ low · ▓ med · █ high + score% — grows with data history (tier, window, samples)." ,
203203 }
204204 for _ , l := range lines {
205205 if opts .Color {
@@ -234,18 +234,20 @@ func savingsCell(rec model.Recommendation) string {
234234 return fmt .Sprintf ("%s/mo" , formatDollarsAbs (rec .MonthlySavings ))
235235}
236236
237- // confidenceCell renders the qualitative confidence band with a shaded glyph that reads as a
238- // fill level even without color. A precise percentage is intentionally omitted here (it implies
239- // false precision) ; the number is available under --explain .
237+ // confidenceCell renders the confidence as a shaded band glyph (a fill level readable without
238+ // color) + the band label + the score percent, e.g. "▒ low 31%". The band leads so the column
239+ // scans at a glance ; the percent gives the precise score for those who want it .
240240func confidenceCell (rec model.Recommendation ) string {
241+ var glyph , label string
241242 switch rec .Confidence .Band () {
242243 case model .ConfidenceHigh :
243- return "█ high"
244+ glyph , label = "█" , " high"
244245 case model .ConfidenceMedium :
245- return "▓ med"
246+ glyph , label = "▓" , " med"
246247 default :
247- return "▒ low"
248+ glyph , label = "▒" , " low"
248249 }
250+ return fmt .Sprintf ("%s %s %d%%" , glyph , label , rec .Confidence .Percent ())
249251}
250252
251253// JSON renders a stable machine-readable schema of the scan result.
0 commit comments