Skip to content

Add structured output formatter for setup and agent mode#3

Merged
DylanBlakemore merged 1 commit intomainfrom
structured-output-formatter
Apr 3, 2026
Merged

Add structured output formatter for setup and agent mode#3
DylanBlakemore merged 1 commit intomainfrom
structured-output-formatter

Conversation

@DylanBlakemore
Copy link
Copy Markdown
Collaborator

Summary

  • Add internal/output package with a Formatter struct for structured, visually clear CLI output
  • Support both fancy (box-drawing + unicode) and plain text modes with automatic TTY detection
  • Mark section 2.1 complete in the agent setup improvements plan

Details

This introduces the output.Formatter that will replace raw fmt.Printf calls throughout setup execution and agent mode. The formatter provides a consistent visual language for phase boundaries (PhaseStart/PhaseEnd), step results (StepSuccess/StepFailure/StepSkipped), and skipped phase summaries (PhasesSkipped).

In TTY environments, output uses box-drawing characters and ANSI colors for readability. In non-TTY environments (CI, piped output) or when NO_COLOR is set, it falls back to plain text markers like [ok], [FAIL], and [skip]. Both behaviors can be overridden via WithColor() and WithFancy() options.

Tests cover all formatter methods, both output modes, color/no-color, TTY detection, and a full phase sequence integration test (95.3% coverage).

@DylanBlakemore DylanBlakemore merged commit 91c79ec into main Apr 3, 2026
7 checks passed
@DylanBlakemore DylanBlakemore deleted the structured-output-formatter branch April 3, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant