Skip to content

Group the renderings, and make the group names the headings #895

Closed

Description

@David-Noble-at-work

--output offers nine names in one alphabetical list. Nine is not many, but a flat list answers "what
exists" and never "which one do I want". Grouping answers the second, and the groups are already load-bearing
elsewhere.

The grouping

Ruled 2026-09-14.

Group Renderings What it is
Serialized csv, json, yaml lossless; a library reads it back
Records list, table records laid out for a person
Document markdown, terminal a document; source, or rendered for a terminal
Composed template=BODY, value you chose the shape
Nothing none the exit code alone

Five groups, none larger than three.

Two corrections the grouping forces

yaml is serialization, not a human rendering. Its help text today reads "the same content as json; when
reading a large result by eye", which sells a use rather than a category. All three serialized renderings
round-trip: a library on the other end parses them back into the value. That yaml is pleasanter to read than
json is a property of yaml, not a different job — nobody hand-writes a writ status result.

Four human renderings are two pairs, each split by one axis. table and list are records, split by
whether the records share a schema — table derives one column set and leaves holes, list gives each
record its own keys (§8). markdown and terminal are a document, split by whether it is rendered.
Read that way there is nothing redundant in the set.

Wanted

  1. The groups are a property of the formatter, not a list transcribed into each place that needs them.
  2. The group names are the headings. In the generated man pages and in --output's own help text, the
    renderings appear under their group rather than in one alphabetical run. Alphabetical within a group.
  3. §7 and §8 of docs/architecture/10-command-line-interface.md state the grouping and the two
    corrections above.

Consequence for #830

#830 pages "table, list, yaml, value, template" and
refuses "json, csv". Against the grouping that is wrong twice: it pages yaml, which is serialization, and
it pages value and template, which are the shapes you composed to send somewhere else. The rule the
grouping gives is Records and Document page; nothing else does — and the TTY test already protects every
piped case regardless. #830's paging list is amended here or this issue is wrong; they cannot both stand.

Plan and design documents

Kind Document
Plan docs/plans/feature/826-scalar-rendering-and-paging.md

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions