You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scanned 1,821 non-test Go files under pkg/ (excluding testdata/ fixtures). The foundation is solid: diagnostics go to stderr, stdout stays reserved for data, all huh forms go through console.New*Form wrappers, and the color palette is adaptive. The remaining gaps are one user-visible markdown leak, inconsistent warnings in pkg/workflow, hand-built tables, and missing accessibility fallbacks in the full-screen TUIs.
Key metrics
Measure
Count
Non-console fmt.Fprint*(os.Stderr, ...) writes
2,568
...wrapping a console.* helper
1,857 (72%)
...wrapping a local format* helper
49 (2%)
...literal writes with no helper
662 (26%), of which 220 are blank spacer lines
Direct fmt.Print* to stdout outside pkg/console
0
Direct huh.NewForm outside pkg/console
0
lipgloss.Color calls outside pkg/styles
0
Output lines with markdown **bold** markers
13
Top issues
P1: markdown leaks into terminal (pkg/cli/mcp_inspect_mcp.go:525-571). 13 raw fmt.Fprintf(os.Stderr, ...) calls print **Name:**, **Status:** and similar as literal asterisks, beside styled console headers in the same function. Fix: add a styled label/value helper to pkg/console and use it at all 13 sites.
P1: inconsistent warnings in pkg/workflow.compiler_orchestrator_engine.go:328,334 print an uppercase WARNING: unconditionally and unstyled. push_to_pull_request_branch.go:128 and cache_steps.go:24 print Warning: unstyled (verbose only). The rest of the compiler routes through formatCompilerMessage. Fix: use console.PrintWarningMessage or formatCompilerMessage and drop the hand-typed prefix.
P2: hand-built tables.pkg/cli/experiments_analyze_statistics.go (printVariantProgress, about lines 805-830) pads columns with %-20s and draws strings.Repeat rules. The file has 46 literal stderr writes and 2 console calls. Fix: use console.RenderTable. Similar rules are at pkg/cli/audit_diff_render.go:52 and pkg/cli/actionlint.go:123.
P2: no accessible fallback in full-screen TUIs.pkg/cli/work_command_tui.go (about line 308) gates on TTY only. pkg/cli/org_rollout_tui.go (about line 271) is started only after the TTY and non-CI check in org_rollout_flags.go:82, and it does not check accessible mode either. Huh forms (via IsAccessibleMode()) and spinners already honor ACCESSIBLE, NO_COLOR and TERM=dumb. Fix: fall back to the plain line-based path when accessible mode is on.
P2: literal headings and status text in high-volume files.audit_report_render.go (84 literal writes, 10 console calls), experiments_analyze_statistics.go (46), preconditions.go (27), audit_cross_run_render.go (27), engine_secrets.go (24), copilot_setup.go (20), add_interactive_orchestrator.go (20). Section titles such as Statistical Analysis: (experiments_analyze_statistics.go:715) should use console.PrintSectionHeader.
P3: inconsistent Note and marker conventions.console.FormatInfoMessage("Note: ...") renders as i Note: ... (run_workflow_execution.go:297,391,475). Bare Note: lines are at preconditions.go:93,145. The warning marker in deps_report.go:124,152,177 is an emoji fragment with a variation selector. Terminals render that at inconsistent widths, and it does not match the ⚠ used by console helpers.
P3: API naming. Unsuffixed Format* is stderr-aware, *Stdout is stdout-aware, and *Stderr (pkg/console/destination_aliases.go) are aliases of the unsuffixed functions. Three names cover two behaviors. Document the canonical set and deprecate the aliases over time.
Enforcement gap. The existing consolestderr analyzer (pkg/linters/consolestderr) checks the inverse problem: stdout-aware formatters written to stderr. Nothing flags literal fmt.Fprint*(os.Stderr, ...) writes or markdown in terminal output.
Next actions
Replace the 13 markdown-bold sites in mcp_inspect_mcp.go with a styled label helper. Small change, user-visible.
Route the 4 raw warnings in pkg/workflow through the warning helpers.
Convert the experiments_analyze_statistics.go tables to console.RenderTable and replace hand-typed rules with a muted styled rule.
Add an accessible-mode fallback to work_command_tui and org_rollout_tui.
Baseline the 442 non-blank literal writes and add a report-only analyzer for raw literal stderr writes in pkg/cli. Allow (nolint/redacted) for copy-paste text such as shell_completion.go:235.
Lipgloss and Huh analysis
Lipgloss (charm.land/lipgloss/v2)
Strengths: the palette in pkg/styles/theme.go uses adaptiveColor with light and dark variants, and the background probe is skipped on Windows. Hex values live only in that file. pkg/logger writes through the color-profile writer. Tables use lipgloss/v2/table through console.RenderTable with a width budget (MaxWidth). engine_secrets.go aligns names with lipgloss.Width, the right approach for wide glyphs.
Opportunities: route rules and labels through styles tokens instead of raw strings (issues 1, 3, 6), and move the statistics tables to console.RenderTable.
Huh (charm.land/huh/v2)
Strengths: every form is built through console.NewForm, NewInputForm, NewSelectForm or NewConfirmForm. These apply the gh-aw theme, WithAccessible, and clear-on-finish. PromptForm.Run errors unless stdin and stderr are TTYs. interactive.go falls back to a line scanner when stderr is not a TTY. Secret inputs use EchoModePassword (engine_secrets.go:402,486,538). Validators exist at add_interactive_engine.go:290, and console.IsCancelled wraps huh.ErrUserAborted.
Gaps: the bubbletea TUIs ignore accessible mode (issue 4). Validation coverage across all free-text inputs was not audited in this pass.
Good and bad examples
Good
console.PrintWarningMessage(fmt.Sprintf("Failed to list %s: %v", listName, err)) (pkg/cli/mcp_inspect_mcp.go:281)
Scope: pkg/**/*.go excluding *_test.go and testdata/ (1,821 files). Only .go files were analyzed.
Counts come from grep over the tree. "Literal" is a heuristic: a stderr write with no console. or format* call. Blank spacer lines are counted separately.
Serena (Go language server) confirmed console.PrintWarningMessage call sites in pkg/cli.
Line numbers reflect the working tree at the start of this run. No code was changed.
Not verified: validation coverage on every huh input, and whether any literal output is parsed by scripts. Styling changes there should be checked first.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Overview
Scanned 1,821 non-test Go files under
pkg/(excludingtestdata/fixtures). The foundation is solid: diagnostics go to stderr, stdout stays reserved for data, all huh forms go throughconsole.New*Formwrappers, and the color palette is adaptive. The remaining gaps are one user-visible markdown leak, inconsistent warnings inpkg/workflow, hand-built tables, and missing accessibility fallbacks in the full-screen TUIs.Key metrics
fmt.Fprint*(os.Stderr, ...)writesconsole.*helperformat*helperfmt.Print*to stdout outsidepkg/consolehuh.NewFormoutsidepkg/consolelipgloss.Colorcalls outsidepkg/styles**bold**markersTop issues
pkg/cli/mcp_inspect_mcp.go:525-571). 13 rawfmt.Fprintf(os.Stderr, ...)calls print**Name:**,**Status:**and similar as literal asterisks, beside styled console headers in the same function. Fix: add a styled label/value helper topkg/consoleand use it at all 13 sites.pkg/workflow.compiler_orchestrator_engine.go:328,334print an uppercaseWARNING:unconditionally and unstyled.push_to_pull_request_branch.go:128andcache_steps.go:24printWarning:unstyled (verbose only). The rest of the compiler routes throughformatCompilerMessage. Fix: useconsole.PrintWarningMessageorformatCompilerMessageand drop the hand-typed prefix.pkg/cli/experiments_analyze_statistics.go(printVariantProgress, about lines 805-830) pads columns with%-20sand drawsstrings.Repeatrules. The file has 46 literal stderr writes and 2 console calls. Fix: useconsole.RenderTable. Similar rules are atpkg/cli/audit_diff_render.go:52andpkg/cli/actionlint.go:123.pkg/cli/work_command_tui.go(about line 308) gates on TTY only.pkg/cli/org_rollout_tui.go(about line 271) is started only after the TTY and non-CI check inorg_rollout_flags.go:82, and it does not check accessible mode either. Huh forms (viaIsAccessibleMode()) and spinners already honorACCESSIBLE,NO_COLORandTERM=dumb. Fix: fall back to the plain line-based path when accessible mode is on.audit_report_render.go(84 literal writes, 10 console calls),experiments_analyze_statistics.go(46),preconditions.go(27),audit_cross_run_render.go(27),engine_secrets.go(24),copilot_setup.go(20),add_interactive_orchestrator.go(20). Section titles such asStatistical Analysis:(experiments_analyze_statistics.go:715) should useconsole.PrintSectionHeader.console.FormatInfoMessage("Note: ...")renders asi Note: ...(run_workflow_execution.go:297,391,475). BareNote:lines are atpreconditions.go:93,145. The warning marker indeps_report.go:124,152,177is an emoji fragment with a variation selector. Terminals render that at inconsistent widths, and it does not match the⚠used by console helpers.Format*is stderr-aware,*Stdoutis stdout-aware, and*Stderr(pkg/console/destination_aliases.go) are aliases of the unsuffixed functions. Three names cover two behaviors. Document the canonical set and deprecate the aliases over time.consolestderranalyzer (pkg/linters/consolestderr) checks the inverse problem: stdout-aware formatters written to stderr. Nothing flags literalfmt.Fprint*(os.Stderr, ...)writes or markdown in terminal output.Next actions
mcp_inspect_mcp.gowith a styled label helper. Small change, user-visible.pkg/workflowthrough the warning helpers.experiments_analyze_statistics.gotables toconsole.RenderTableand replace hand-typed rules with a muted styled rule.work_command_tuiandorg_rollout_tui.pkg/cli. Allow(nolint/redacted)for copy-paste text such asshell_completion.go:235.Lipgloss and Huh analysis
Lipgloss (
charm.land/lipgloss/v2)pkg/styles/theme.gousesadaptiveColorwith light and dark variants, and the background probe is skipped on Windows. Hex values live only in that file.pkg/loggerwrites through the color-profile writer. Tables uselipgloss/v2/tablethroughconsole.RenderTablewith a width budget (MaxWidth).engine_secrets.goaligns names withlipgloss.Width, the right approach for wide glyphs.stylestokens instead of raw strings (issues 1, 3, 6), and move the statistics tables toconsole.RenderTable.Huh (
charm.land/huh/v2)console.NewForm,NewInputForm,NewSelectFormorNewConfirmForm. These apply the gh-aw theme,WithAccessible, and clear-on-finish.PromptForm.Runerrors unless stdin and stderr are TTYs.interactive.gofalls back to a line scanner when stderr is not a TTY. Secret inputs useEchoModePassword(engine_secrets.go:402,486,538). Validators exist atadd_interactive_engine.go:290, andconsole.IsCancelledwrapshuh.ErrUserAborted.Good and bad examples
Good
console.PrintWarningMessage(fmt.Sprintf("Failed to list %s: %v", listName, err))(pkg/cli/mcp_inspect_mcp.go:281)fmt.Fprintln(os.Stderr, formatCompilerMessage(markdownPath, "warning", msg))(pkg/workflow/compiler_validators.go:153)console.NewInputForm(input).Run()(pkg/cli/bootstrap_profile_helpers.go:117)Bad
fmt.Fprintf(os.Stderr, "📋 **Name:** %s\\n", foundTool.Name)(pkg/cli/mcp_inspect_mcp.go:525)fmt.Fprintf(os.Stderr, "WARNING: Skipping security scan for unresolvable import '%s': %v\\n", ...)(pkg/workflow/compiler_orchestrator_engine.go:328)fmt.Fprintf(os.Stderr, " %-20s %8d %8d %10s %s\\n", ...)(pkg/cli/experiments_analyze_statistics.go:816)Method and limits
pkg/**/*.goexcluding*_test.goandtestdata/(1,821 files). Only.gofiles were analyzed.console.orformat*call. Blank spacer lines are counted separately.console.PrintWarningMessagecall sites inpkg/cli.References: §44885871937
All reactions