Context
The 2026-05-21 Repository Quality report (discussion #33768) found:
- 1,844 raw
fmt.Errorf calls vs only 70 uses of console.FormatErrorMessage (3.8 % adoption).
- 64
fmt.Println calls in CLI commands that emit diagnostic output to stdout — violating the Unix convention that diagnostics belong on stderr and breaking pipe-able workflows.
Files flagged with the worst offenders:
pkg/cli/audit_cross_run_render.go — 13+ diagnostic fmt.Printlns.
pkg/cli/compile_stats.go — recovery-plan output to stdout.
pkg/cli/domains_command.go — status messages to stdout.
pkg/cli/forecast.go — analysis output to stdout (1,142-line file).
Guidelines already exist in .github/skills/error-messages/SKILL.md; the infrastructure (pkg/console/) is in place — adoption is the gap.
Quick-win task
For each of the 4 files above:
- Convert diagnostic
fmt.Println("...") → fmt.Fprintln(os.Stderr, console.FormatInfoMessage("...")) (or FormatErrorMessage / FormatWarningMessage as appropriate).
- Keep structured / final-output prints on stdout (e.g. JSON, hash output, expected report body).
- Add a single-line CI grep guard:
pkg/cli/.*\.go files with bare fmt.Println( should be reviewed.
Success criteria
- Diagnostic
fmt.Println count in pkg/cli/ drops from ~64 to ~0 outside intentional stdout writers (e.g. hash_command.go).
gh aw compile ... | jq ... style pipes work cleanly with no diagnostic noise mixed into stdout.
References
- Source report: discussion #33768
- Skill guidelines:
.github/skills/error-messages/SKILL.md
- Estimated effort: 2-3h
Generated by 🔬 DeepReport - Intelligence Gathering Agent · ● 17.9M · ◷
Context
The 2026-05-21 Repository Quality report (discussion #33768) found:
fmt.Errorfcalls vs only 70 uses ofconsole.FormatErrorMessage(3.8 % adoption).fmt.Printlncalls in CLI commands that emit diagnostic output to stdout — violating the Unix convention that diagnostics belong on stderr and breaking pipe-able workflows.Files flagged with the worst offenders:
pkg/cli/audit_cross_run_render.go— 13+ diagnosticfmt.Printlns.pkg/cli/compile_stats.go— recovery-plan output to stdout.pkg/cli/domains_command.go— status messages to stdout.pkg/cli/forecast.go— analysis output to stdout (1,142-line file).Guidelines already exist in
.github/skills/error-messages/SKILL.md; the infrastructure (pkg/console/) is in place — adoption is the gap.Quick-win task
For each of the 4 files above:
fmt.Println("...")→fmt.Fprintln(os.Stderr, console.FormatInfoMessage("..."))(orFormatErrorMessage/FormatWarningMessageas appropriate).pkg/cli/.*\.gofiles with barefmt.Println(should be reviewed.Success criteria
fmt.Printlncount inpkg/cli/drops from ~64 to ~0 outside intentional stdout writers (e.g.hash_command.go).gh aw compile ... | jq ...style pipes work cleanly with no diagnostic noise mixed into stdout.References
.github/skills/error-messages/SKILL.md