Skip to content

[plan] Fix unformatted stderr output in add/interactive CLI files #21178

@github-actions

Description

@github-actions

Objective

Replace raw fmt.Fprintf(os.Stderr, ...) calls with console.Format* wrappers across interactive and add-workflow CLI files identified in the Terminal Stylist audit (discussion #21126).

Context

The audit found ~54 files with unformatted stderr output. This issue covers interactive workflow and add command files.

Files to Modify

All files are in pkg/cli/:

  • add_command.go
  • add_interactive_auth.go
  • add_interactive_engine.go
  • add_interactive_git.go
  • add_interactive_orchestrator.go
  • add_interactive_schedule.go
  • add_interactive_secrets.go
  • add_interactive_workflow.go
  • interactive.go
  • run_interactive.go
  • run_push.go
  • run_workflow_execution.go

Approach

For each file:

  1. Find all fmt.Fprintf(os.Stderr, ...) and fmt.Fprintln(os.Stderr, ...) calls NOT already using console formatters
  2. Choose the correct formatter based on message semantics:
    • Info/neutral → console.FormatInfoMessage
    • Success/completion → console.FormatSuccessMessage
    • Warning → console.FormatWarningMessage
    • Error → console.FormatErrorMessage
    • Command display → console.FormatCommandMessage
    • Prompt messages → console.FormatPromptMessage
    • List items → console.FormatListItem
  3. Convert fmt.Fprintf(os.Stderr, "...\n", args...)fmt.Fprintln(os.Stderr, console.FormatXxxMessage(fmt.Sprintf("...", args...)))

Note

Do NOT change:

  • Calls that already wrap a console.Format* function
  • Calls that output structured data (JSON, tables) to stdout
  • Interactive Huh form setup code (these use their own styling)

Acceptance Criteria

  • All raw fmt.Fprintf(os.Stderr, ...) diagnostic messages in the listed files replaced with console formatters
  • make fmt passes with no changes
  • make test-unit passes

Generated by Plan Command for issue #discussion #21126 ·

  • expires on Mar 18, 2026, 5:12 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions