Repository navigation
Description
Specs: 10-command-line-interface.md
Plans: 740-cli-output-conventions.md
Every binary in the suite presents the same command-line surface. Three streams: a result to stdout, JSON
by default; narration to stderr; documents — definitions and traces — to the execution store. One
shared flag set decides how the result is rendered and where the store lives, and no command invents its own.
The reserved set, settled against aws, az, docker, gcloud, and kubectl:
--filter, --jq, --output / -o, --store. Renderings are csv, json, none, table,
template=BODY, value, and yaml.
csv and value are the delimited pair, split by consumer rather than by separator: csv quotes so a
parser round-trips it, value does not so a shell reads what was composed. A tsv rendering sat between
them until 2026-08-30 and served neither — cut and awk have no quote awareness, so quoting a field
containing a tab does not stop the row splitting. gcloud and aws each ship one raw delimited format and no
tsv, for the same reason.
A format that needs an argument carries it in the value, split on the first = — kubectl's -o go-template=
shape. So there is no separate --template flag, and no mutual-exclusion rule between a format and its
argument to state or enforce. There is no --output <file> either — stdout already is one — and no boolean
--json.
Landed: the mechanism. cmd/internal/cli/output.go binds the four flags and BuildPipeline composes a
result.Pipeline of filter, formatter, and sink over pkg/result + pkg/sink. pkg/result/selection.go
holds the format names and is the authority on them.
Adopted so far: devlore-test in full — its invented stream=dest routing is gone, the artifacts carry what
their names say, and an execution trace is persisted (#738). writ's flags — the boolean --json on
status and verify is deleted rather than aliased, verify.Execute returns []Report for the command to
emit, and the common set is registered on the root.
Remaining, in order:
writ's renderings. 22fmt.Printcalls instatus/report.go, fourSerializeGraphs(os.Stdout, …)
dry-run dumps acrossdeploy/decommission/upgrade/secret,migrate's own--format, and one
stdout write inmigrate/session.goto classify as narration or result.lore.runSearch's table (a bug fix as much as a refactor — lore search truncates descriptions by byte count, cutting multi-byte characters mid-rune #741), the hand-rolled flags on
bundle/onboard/list, and thirteenfmt.Printcalls to triage.star. Register the common set and deletecmd/star/cli, which duplicates eighteen exported names
fromcmd/internal/cliand now contradicts it (cmd/star/cli duplicates cmd/internal/cli, and the two now disagree on the flag surface #743).- Enforcement. A test that fails when a command registers an output flag of its own, and one that fails
on a directos.Stdoutwrite from a command package.
The scope was measured wrong when this epic was written: it said "seven direct os.Stdout writes" in writ,
counted by grepping the literal os.Stdout, which misses every fmt.Print — and those write to stdout just
the same. The real figure is 30 call sites.
The enforcement phase exists because adoption went backwards rather than merely lagging.
docs/plans/extract-output-package.md recorded two call sites in March — lore inspect and writ snapshot.
writ snapshot was removed, taking half the convention's adopters with it, and nothing recorded that it had.
Invariants that are not tested decay silently.
Plan and design documents
| Kind | Document |
|---|---|
| Plan | docs/plans/feature/740-cli-output-conventions.md |
Activity
feat(writ): the common set, and --json retires (#739, #740)
feat(result): csv and tsv presets; the format value carries its argum…
feat(result): the format value carries its argument; value renders raw (
feat(result): one delimited formatter with three presets, and one tab…
docs(cli): bring the reference and the plans current (#739, #740)
test(cli): the store test blocks MkdirAll on every platform (#740)
docs(cli): the plan's status matches its phases (#740)
feat(result)!: csv and value are the delimited pair; tsv is dropped (#…
docs(cli): the status document matches what landed (#740)
One output convention for every app: result to stdout, documents to t…
Merge develop: the output convention, and the devlore-test rewrite (#740
doc(cli): suite membership is infrastructure, and two version numbers (…
14 remaining items
A subcommand group takes no action: writ repo prints help, and a chec…
console and credentials move under cmd/internal; manifest and registr…
David-Noble-at-work commentedon Sep 12, 2026
Rows 7, 8 and 9: done in #835's pull request (
feature/782-writ-workflow-verify). Row 7's star half waits on #841, which callsCheckGroupsTakeNoActionfrom star's root test when an extension can declare a group.The workflow group on the shared root, groups that take no action, an…
David-Noble-at-work commentedon Sep 23, 2026
Closed 2026-09-23 by the owner. Schedule #887 closed all nineteen lanes across PRs #898, #901, #902, #905, #911 and #912; the report reads 25 of 25 leaves done across four features, and the three feature containers (#832, #834, #835) are closed with it.