Repository navigation
Drop TOON output support (--toon flag and toon-go dependency) #28
Description
Proposal
Drop TOON output support: the --toon flag, the auto-enable-when-piped behavior, and the toon-format/toon-go dependency. Keep --json as the CLI's one structured output format, and consider auto-enabling --json when stdout isn't a terminal so scripts/agents still get structured output with zero flags.
Why
TOON was added experimentally in v0.3.0 as a token-efficient, LLM-friendly alternative to JSON, auto-enabled whenever output is piped. A pre-1.0 audit surfaced enough problems that it's worth reconsidering rather than patching around them:
scout traces showproduces invalid TOON when piped — the default, agent-facing path. Root cause istoon-gofailing to round-trip a struct with 2+ levels of nested list-of-structs (reproducible in a minimal repro with no Scout code involved).--toonand--jsondisagree on key names and field sets for every other struct-backed command (e.g.apps list --json→id/name;--toon→ID/Name/LastReportedAt, PascalCase,omitemptyignored). Cause:toon-goreads atoon:struct tag that none of this codebase's types define, so it silently falls back to raw Go field names.- TOON output has no trailing newline, so piped output runs into whatever the next line in the pipeline is.
None of these are really "bugs Scout introduced" so much as immaturity in the format and its Go port:
- Thoughtworks' Technology Radar (Apr 2026) places TOON at "Assess" — their lowest-commitment tier, meaning "worth exploring," not "ready to build on." Thoughtworks' own description calls it "an idea in progress... nothing set in stone."
toon-format/toon-go, the dependency this CLI uses, is pinned to an untagged pseudo-version — there's no released version of the Go port at all, and TOON's reference implementation is TypeScript, not Go.- Current industry guidance for CLI-agent output consistently lands on plain
--json(zero translation loss, universally supported) or plain markdown tables, not a bespoke serialization format — see You Need to Rewrite Your CLI for AI Agents and AI Agents Are Your New Users. - Scout's own MCP server is the better-suited channel for "an agent wants structured Scout data" today — it hands the agent a typed tool schema up front, which is exactly the setup 2026 sources describe as the right fit for agent-native, structured access. The CLI's job for agent consumption is now secondary (scripting / ad hoc shell use), where plain JSON is fine.
Given all of that, carrying an unreleased dependency's encoding bugs as scout-cli's own bugs, to serve a use case the MCP server already covers better, isn't worth it right now. TOON can be revisited later if the spec/ecosystem matures (a tagged Go release, wider adoption) or a specific integration justifies the token savings enough to accept the risk.
Scope
- Remove
--toonflag and thetoonOutputauto-detection incmd/root.go. - Remove
outputTOONand thetoon-format/toon-goimport/dependency (go.mod, go.sum). - Decide and implement the piped-output default: either keep requiring explicit
--json, or auto-enable--jsonwhen stdout isn't a terminal (mirrors the old TOON behavior's "zero-config for scripts/agents" goal without the format itself). - Update README's "LLM / Agent Usage" section and the
--toonreferences throughout the Usage examples. - Update CHANGELOG (
## Pending→ note the removal, referencing this issue and the original TOON PR). - Remove any TOON-specific tests.
Found during
A pre-1.0 audit of the whole CLI.
Activity
Document JSON-when-piped in README and add changelog fragment
Document JSON-when-piped in README and add changelog fragment
Document JSON-when-piped in README and add changelog fragment
Document JSON-when-piped in README and add changelog fragment