Objective
Replace raw fmt.Fprintf(os.Stderr, ...) calls in pkg/cli/compile_stats.go with the console package formatting functions to fix inconsistent visual hierarchy in compile error reports.
Context
This issue was identified in discussion #39209 (Terminal Stylist analysis). The file already uses console.FormatErrorMessage() for some outputs but reverts to raw fmt.Fprintf calls for failure lists and recovery steps, creating inconsistent styling.
Current Problem (approx. 20 raw calls)
Examples of current raw calls:
// ❌ Current
fmt.Fprintf(os.Stderr, " ✗ %s\n", filepath.Base(failure.Path))
fmt.Fprintf(os.Stderr, " 💡 Recovery plan:\n")
fmt.Fprintf(os.Stderr, " %s %s:\n", prioritized.Severity.Icon(), heading)
fmt.Fprintf(os.Stderr, " %d. %s\n", i+1, prioritized.Message)
fmt.Fprintf(os.Stderr, " → %s\n", prioritized.Suggestion)
fmt.Fprintf(os.Stderr, " i Suppressed %d cascading error(s)...\n", ...)
fmt.Fprintf(os.Stderr, " Run 'gh aw compile --show-all'...\n", ...)
Approach
- Open
pkg/cli/compile_stats.go and audit all fmt.Fprintf(os.Stderr, ...) and fmt.Fprintln(os.Stderr) calls.
- Replace failure/path lines with
console.FormatErrorMessage() wrapped in fmt.Fprintln.
- Replace recovery plan headings with
console.FormatInfoMessage() wrapped in fmt.Fprintln.
- Replace error detail lines (severity icon + heading, numbered messages, suggestions, suppressed count, show-all hint) with
console.FormatInfoMessage() or console.FormatWarningMessage() as appropriate.
- Replace bare
fmt.Fprintln(os.Stderr) blank-line separators — these can remain as-is or become fmt.Fprintln(os.Stderr, \"\").
- Run
make fmt and make agent-report-progress before committing.
Files to Modify
Acceptance Criteria
Generated by 📋 Plan Command · 151.7 AIC · ⌖ 34.4 AIC · ⊞ 16.1K · ◷
Comment /plan to run again
Objective
Replace raw
fmt.Fprintf(os.Stderr, ...)calls inpkg/cli/compile_stats.gowith theconsolepackage formatting functions to fix inconsistent visual hierarchy in compile error reports.Context
This issue was identified in discussion #39209 (Terminal Stylist analysis). The file already uses
console.FormatErrorMessage()for some outputs but reverts to rawfmt.Fprintfcalls for failure lists and recovery steps, creating inconsistent styling.Current Problem (approx. 20 raw calls)
Examples of current raw calls:
Approach
pkg/cli/compile_stats.goand audit allfmt.Fprintf(os.Stderr, ...)andfmt.Fprintln(os.Stderr)calls.console.FormatErrorMessage()wrapped infmt.Fprintln.console.FormatInfoMessage()wrapped infmt.Fprintln.console.FormatInfoMessage()orconsole.FormatWarningMessage()as appropriate.fmt.Fprintln(os.Stderr)blank-line separators — these can remain as-is or becomefmt.Fprintln(os.Stderr, \"\").make fmtandmake agent-report-progressbefore committing.Files to Modify
pkg/cli/compile_stats.goAcceptance Criteria
fmt.Fprintf(os.Stderr, ...)calls incompile_stats.gothat produce user-visible output use aconsole.Format*functionconsole.FormatErrorMessage()callsmake agent-report-progress)make fmtpasses