Ray's Knowledge Base
Unlock

In rgit's TOON output every list of plain values prints one item per line

PreferenceVerified 29 Sep 2026Holds project: rgit
Preference. A rule, why it holds, and how to apply it.

Rule#

In rgit's TOON output, a list of plain values prints one item per line, indented under key[N]:, not key[N]: a,b,c on one line. An item's own leading space stays, unquoted; quotes appear only when needed to keep the value intact (an empty string, a line break). Tables and lists of objects do not change. This matches rait, whose render.rs runs an expand_lists step, so both tools look the same to agents.

Why#

The user asked for this form, with a commit summary as the example:

lines[2]:
  [main b1a7ca6] fix(merge): ...
   5 files changed, ...

How to apply#

When you add or change a TOON list in rgit, print it one item per line; check new output against rait's.

Evidence#

rgit's own encoder crates/rgit-cli/src/toon.rs printed lists on one line in write_array; it was changed in the same series as the human-output change (b938581, aca5866, dc357fb).

Also found by searching

  • rgit TOON prints lines[2]: a,b on one line, should it be one item per line
  • how should lists of strings render in rgit's agent-facing output
  • how do I format plain value lists in TOON output for rgit to match rait
  • expand_lists render.rs key[N]: indented items, quoting only empty strings or line breaks
  • how should a list of plain strings be printed in rgit TOON output, inline or one per line
  • key[N]: a,b,c versus indented items for toon lists, rait expand_lists
  • what format should TOON output use for commit summary lines
  • adding a new toon output field in rgit, agents want same look as rait