Repository navigation
feat(standards): --compact output switch and WC-OUT-24 - #445
Merged
Merged
Conversation
Adds --compact to the flag vocabulary (role output, switch) and the rule WC-OUT-24: one line per item, drawn from the same answer as --json, with page, missing, next and meta.complete kept as "# " lines on stdout. The flag's name is held once in COMPACT_FLAG (exported from @wirecat/cli-base/standards), because the owner has not settled it yet (NEED-2131); a rename is that one constant. WC-CMD-14 and WC-CMD-15 list it with the shared output switches and the non-interactive ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
leemour
added a commit
that referenced
this pull request
Nov 2, 2026
Dates the Unreleased section (`--compact`, WC-OUT-24, #445) as 0.74.0. Only package.json and the CHANGELOG heading change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
leemour
added a commit
to WireCatLabs/cli-core
that referenced
this pull request
Nov 2, 2026
…pe (#2375) Slice F1 of the compact output plan: one renderer that every answer goes through, by declaring a row shape. - `RowShape`, `SHARED_ROWS` (`message`, `message.summary`, `message.hit`, `chat`), `entityRows`, `rowShapeOf` and a pure `compactText(body, shape, options)`. No store, no clock. - `answerEntity(cmd, name, schema, { row })` declares a command's own row. Otherwise the generic row (moved from memo) is used: key/ref/id, title/name/path, state, text. - Global `--compact`, wired into `resolveOutput` and `renderAnswer`. Header: shared ref prefix, columns every row has in common, date span, zone. Footer on stdout: `# more`, `# missing`, `# next`, `# complete: false`. Each command line in it carries `--compact`. - Refused with `--json`, `--json=…`, `--jsonl` and `--brief` (`output.conflict`). Counts as machine output for prompts, failures and the output cap. Exit code is the same as JSON's. MCP stays JSON. - Side fix: `--brief` did nothing on messenger search hits. It now cuts them. Size: on 1 000 synthetic MAX messages of one chat (Cyrillic, ~150 chars each), compact is **48.6 %** of the JSON bytes and keeps every ref. The plan's bar is 45 %. The texts alone are 40 % of the JSON, so the id, time and sender on each row leave 48 %. **CI will fail until cli-base releases `COMPACT_FLAG`** (WireCatLabs/cli-base#445). Locally, built against that branch: lint, typecheck, command lint, all 8 723 tests, docs:check, docs:lint, docs:spell, standards:check and check:dist pass. After the release, the pin in `package.json` needs a bump. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the shared
--compactswitch for agent-sized output.--compactin the flag vocabulary (roleoutput, switch).COMPACT_FLAGin@wirecat/cli-base/standardsholds the name. The owner has not settled the name yet, so a rename is one constant.--json; the reference first, the text last and cut with…(+N);page,missing,nextandmeta.completekept as#lines on stdout; refused with--json,--jsonland--brief.cli-core draws the form (separate PR, needs this release first).
Checks: lint, typecheck, tests, docs:check, docs:lint and standards:check pass.
docs:spellfails onGlamaindocs/standards/new-cli.md:120, which is onmainalready and not touched here.🤖 Generated with Claude Code