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
This report analyzes console output patterns across all Go source files in pkg/, covering Lipgloss v2 usage, Huh form implementations, and console formatting consistency.
Architecture (pkg/styles/): The codebase has an excellent centralized style system:
Full adaptive color palette using compat.AdaptiveColor{Light, Dark} for every semantic color — properly handles both light and dark terminal themes
All pre-configured style variables (Error, Warning, Success, Info, Command, Progress, Prompt, Verbose, Count, FilePath, etc.) use adaptive colors
Version split handled correctly: charm.land/lipgloss/v2 used for core CLI, github.com/charmbracelet/lipgloss (v1) used in pkg/styles/huh_theme.go to match huh's dependency requirements
TTY Detection: The applyStyle() helper in console.go correctly gates all Lipgloss rendering:
Table Rendering: RenderTable() in console.go uses charm.land/lipgloss/v2/table with proper zebra-striping via ColorTableAltRow, header styling, and border configuration.
Layout Features Used:
lipgloss.JoinVertical() for composing multi-section displays
lipgloss.DoubleBorder() for title boxes
lipgloss.NormalBorder() for info section left-border emphasis
charm.land/bubbles/v2/progress — Determinate/indeterminate with gradient blend
charm.land/bubbles/v2/list — Full Bubble Tea interactive list with keyboard nav
⚠️ Improvement Opportunities
1. Manual formatting in audit_cross_run_render.go and audit_diff_render.go
These files produce markdown-formatted table output using raw fmt.Printf instead of the RenderTable() helper. While intentional for piped/redirected output (the output is markdown text, not styled terminal output), the inconsistency is notable:
// Current: audit_cross_run_render.gofmt.Printf("| Metric | Value |\n")
fmt.Printf("|--------|-------|\n")
// ...// Could use RenderTable() for TTY display and fallback gracefully
2. Missing symmetric functions in console.go
The WASM stub (console_wasm.go) defines three functions absent from console.go:
FormatLocationMessage(message string) — for directory/file location messages
FormatCountMessage(message string) — for count/numeric status
FormatListHeader(header string) — for list section headers
While pkg/styles/theme.go defines Location, Count, and ListHeader styles, the corresponding Format*Message() helper functions are missing from the non-WASM build. This creates an API inconsistency between build targets and prevents these patterns from being used in non-WASM CLI code.
3. Raw stderr calls bypassing console formatting (~477 occurrences)
The following files have diagnostic messages sent to stderr without using the console formatting helpers — missing the styled prefix icons and color coding:
pkg/cli/compile_watch.go (5 occurrences):
// Current — plain textfmt.Fprintln(os.Stderr, "Press Ctrl+C to stop watching.")
fmt.Fprintln(os.Stderr, "🔨 Initial compilation of all workflow files...")
fmt.Fprintln(os.Stderr, "Watching for file changes")
// Should befmt.Fprintln(os.Stderr, console.FormatInfoMessage("Press Ctrl+C to stop watching."))
fmt.Fprintln(os.Stderr, console.FormatProgressMessage("Initial compilation of all workflow files..."))
fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Watching for file changes"))
pkg/cli/preconditions.go (~11 occurrences):
// Current — unformatted guidance textfmt.Fprintln(os.Stderr, "Please run the following command to authenticate:")
fmt.Fprintln(os.Stderr, "You can still add workflows, but they won't run until Actions is enabled.")
// Should use FormatInfoMessage or FormatWarningMessage
// Current — plain WARNING prefix without stylingfmt.Fprintf(os.Stderr, "WARNING: Skipping security scan for unresolvable import '%s': %v\n", ...)
// Should befmt.Fprintln(os.Stderr, console.FormatWarningMessage(...))
pkg/workflow/cache.go (2 occurrences):
// Currentfmt.Fprintf(os.Stderr, "Warning: Failed to parse cache configuration: %v\n", err)
// Should befmt.Fprintln(os.Stderr, console.FormatWarningMessage(...))
pkg/cli/compile_stats.go (6 occurrences):
// Current — raw formattingfmt.Fprintf(os.Stderr, " Total workflows: %d\n", len(statsList))
fmt.Fprintf(os.Stderr, " Total size: %s\n", console.FormatFileSize(totalSize))
// Could use RenderTable() for structured stats display
Accessibility mode: All forms check console.IsAccessibleMode(), which correctly detects ACCESSIBLE, TERM=dumb, and NO_COLOR environment variables — excellent screen reader support.
Context propagation: 13/15 forms use RunWithContext(ctx) instead of Run() for proper cancellation support. The 2 exceptions (confirm.go, input.go) are utility helpers that don't have a context parameter, which is acceptable.
Theme implementation (pkg/styles/huh_theme.go): Well-structured mapping of the codebase palette to huh's field styles, covering:
NewInput — secret entry with EchoModePassword (masking), validation
NewSelect — engine selection with descriptive labels
NewMultiSelect — tool selection
NewConfirm — PR merge confirmation
NewText — multi-line intent/prompt input
⚠️ Improvement Opportunities
1. No Description fields on most Select forms
Most NewSelect forms omit the .Description() call, which provides helpful context below the title:
// Currenthuh.NewSelect[string]().
Title("Which coding agent would you like to use?").
Options(engineOptions...).
Value(&selectedEngine)
// Improved — with descriptionhuh.NewSelect[string]().
Title("Which coding agent would you like to use?").
Description("Select the AI engine that will process your agentic workflows.").
Options(engineOptions...).
Value(&selectedEngine)
2. `huh.NewNote` not used for informational display
Several places output raw fmt.Fprintln(os.Stderr, ...) text before or after forms. These could use huh.NewNote() fields within the form group for more cohesive UI:
// Current — message before formfmt.Fprintln(os.Stderr, console.FormatInfoMessage("Workflow specifies engine: "+workflowSpecifiedEngine))
form:= huh.NewForm(...)
// Improved — Note as part of form
huh.NewForm(
huh.NewGroup(
huh.NewNote().
Title("Engine Preference").
Body("This workflow specifies: "+workflowSpecifiedEngine),
huh.NewSelect[string]()...
),
)
3. Validation inconsistency
pkg/console/input.go implements field validation but many NewInput usages in pkg/cli/ do not validate input:
// console/input.go — has validationhuh.NewInput().
Validate(func(sstring) error {
iflen(s) ==0 {
returnerrors.New("value cannot be empty")
}
returnnil
})
// Some cli forms — no validation on required inputshuh.NewInput().
Title("Workflow name").
Value(&workflowName)
// Missing: Validate() to prevent empty submission
Console Package Architecture Assessment
The pkg/console/ package is well-designed with clear separation of concerns:
File
Responsibility
Assessment
console.go
Format functions, table, box rendering
✅ Comprehensive
banner.go
ASCII logo rendering
✅ Proper applyStyle usage
spinner.go
Animated spinner (Bubble Tea)
✅ TTY-aware
progress.go
Progress bar (determinate/indeterminate)
✅ Gradient, TTY fallback
list.go
Interactive list (Bubble Tea)
✅ TTY fallback to text
confirm.go
Confirm dialog (Huh)
✅ Accessible
input.go
Password input (Huh)
✅ Masked, validated
accessibility.go
Mode detection
✅ Comprehensive env checks
verbose.go
Verbose logging helper
✅ Simple, correct
render.go
Struct→console via reflection
✅ Tag-driven rendering
format.go
File size / number formatting
✅ Pure utility
Minor gap: FormatLocationMessage, FormatCountMessage, and FormatListHeader are defined in the WASM stub but absent from console.go. While no code currently calls them from non-WASM builds, adding them would complete the API symmetry and enable new usage patterns (particularly FormatCountMessage for statistics output, which currently uses raw fmt.Fprintf).
Recommendations (Priority Order)
Priority
Area
Action
🔴 High
pkg/workflow/claude_logs.go
Replace fmt.Fprintf(os.Stderr, ...) with logger.Printf() — these are debug messages, not user messages
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.
-
This report analyzes console output patterns across all Go source files in
pkg/, covering Lipgloss v2 usage, Huh form implementations, and console formatting consistency.Workflow Run: §23684561979
Summary
console.*formattingconsole.*formattingfmt.Fprintln/Fprintf(os.Stderr)callsconsole.*helpersRunWithContextLipgloss Usage Analysis
✅ Strengths
Architecture (
pkg/styles/): The codebase has an excellent centralized style system:compat.AdaptiveColor{Light, Dark}for every semantic color — properly handles both light and dark terminal themesError,Warning,Success,Info,Command,Progress,Prompt,Verbose,Count,FilePath, etc.) use adaptive colorscharm.land/lipgloss/v2used for core CLI,github.com/charmbracelet/lipgloss(v1) used inpkg/styles/huh_theme.goto match huh's dependency requirementsTTY Detection: The
applyStyle()helper inconsole.gocorrectly gates all Lipgloss rendering:Table Rendering:
RenderTable()inconsole.gousescharm.land/lipgloss/v2/tablewith proper zebra-striping viaColorTableAltRow, header styling, and border configuration.Layout Features Used:
lipgloss.JoinVertical()for composing multi-section displayslipgloss.DoubleBorder()for title boxeslipgloss.NormalBorder()for info section left-border emphasislipgloss.RoundedBorder()for error boxesCharmbracelet Ecosystem Integration:
charm.land/bubbles/v2/spinner— TTY-aware, accessible-mode disabledcharm.land/bubbles/v2/progress— Determinate/indeterminate with gradient blendcharm.land/bubbles/v2/list— Full Bubble Tea interactive list with keyboard nav1. Manual formatting in
audit_cross_run_render.goandaudit_diff_render.goThese files produce markdown-formatted table output using raw
fmt.Printfinstead of theRenderTable()helper. While intentional for piped/redirected output (the output is markdown text, not styled terminal output), the inconsistency is notable:2. Missing symmetric functions in
console.goThe WASM stub (
console_wasm.go) defines three functions absent fromconsole.go:FormatLocationMessage(message string)— for directory/file location messagesFormatCountMessage(message string)— for count/numeric statusFormatListHeader(header string)— for list section headersWhile
pkg/styles/theme.godefinesLocation,Count, andListHeaderstyles, the correspondingFormat*Message()helper functions are missing from the non-WASM build. This creates an API inconsistency between build targets and prevents these patterns from being used in non-WASM CLI code.3. Raw stderr calls bypassing console formatting (~477 occurrences)
The following files have diagnostic messages sent to stderr without using the console formatting helpers — missing the styled prefix icons and color coding:
pkg/cli/compile_watch.go(5 occurrences):pkg/cli/preconditions.go(~11 occurrences):pkg/cli/mcp_inspect_inspector.go(~7 occurrences — configuration detail lines):pkg/workflow/compiler_orchestrator_engine.go(2 occurrences):pkg/workflow/cache.go(2 occurrences):pkg/cli/compile_stats.go(6 occurrences):pkg/workflow/claude_logs.go(~5 occurrences — debug-level messages):Huh Form Analysis
✅ Strengths
Consistent theming across all 15 forms: Every form applies the custom Dracula-inspired theme:
Accessibility mode: All forms check
console.IsAccessibleMode(), which correctly detectsACCESSIBLE,TERM=dumb, andNO_COLORenvironment variables — excellent screen reader support.Context propagation: 13/15 forms use
RunWithContext(ctx)instead ofRun()for proper cancellation support. The 2 exceptions (confirm.go,input.go) are utility helpers that don't have a context parameter, which is acceptable.Theme implementation (
pkg/styles/huh_theme.go): Well-structured mapping of the codebase palette to huh's field styles, covering:Field types in use:
NewInput— secret entry with EchoModePassword (masking), validationNewSelect— engine selection with descriptive labelsNewMultiSelect— tool selectionNewConfirm— PR merge confirmationNewText— multi-line intent/prompt input1. No Description fields on most Select forms
Most
NewSelectforms omit the.Description()call, which provides helpful context below the title:2. `huh.NewNote` not used for informational display
Several places output raw
fmt.Fprintln(os.Stderr, ...)text before or after forms. These could usehuh.NewNote()fields within the form group for more cohesive UI:3. Validation inconsistency
pkg/console/input.goimplements field validation but manyNewInputusages inpkg/cli/do not validate input:Console Package Architecture Assessment
The
pkg/console/package is well-designed with clear separation of concerns:console.gobanner.gospinner.goprogress.golist.goconfirm.goinput.goaccessibility.goverbose.gorender.goformat.goMinor gap:
FormatLocationMessage,FormatCountMessage, andFormatListHeaderare defined in the WASM stub but absent fromconsole.go. While no code currently calls them from non-WASM builds, adding them would complete the API symmetry and enable new usage patterns (particularlyFormatCountMessagefor statistics output, which currently uses rawfmt.Fprintf).Recommendations (Priority Order)
pkg/workflow/claude_logs.gofmt.Fprintf(os.Stderr, ...)withlogger.Printf()— these are debug messages, not user messagespkg/workflow/compiler_orchestrator_engine.go,cache.go"WARNING: ..."strings withconsole.FormatWarningMessage()pkg/cli/compile_watch.go,preconditions.gopkg/console/console.goFormatLocationMessage,FormatCountMessage,FormatListHeaderto match WASM stub APIpkg/cli/mcp_inspect_inspector.goconsole.FormatListItem()for bullet point server listings.Description()toNewSelectfields for better UXhuh.NewNote()for pre-form informational messagesPositive Patterns to Preserve
References:
Beta Was this translation helpful? Give feedback.
All reactions