A command that hand-wrote its synopsis had to restate every option it
accepts inside that string, which is the last restatement left on the help
surface after #2421 made the flag declaration own the option itself.
A synopsis is now grammar plus a generated `[label]` tail, and the two
rendering rules live on the declaration rather than per command:
- the tail names an option with its declared `usageLabel`, alias included,
the token the `Command flags:` section already shows;
- `usageHidden: true` keeps a cross-cutting opt-in out of every synopsis;
`--record` is the one today, and it stays under `Command flags:`.
`usageFlags` is where a command states that its synopsis names fewer options
than it accepts: `[]` for a synopsis that is pure grammar or writes its own
mutually-exclusive brackets, otherwise the subset it names. `Command flags:`
still documents everything in `allowedFlags`. Adding an option to a command
therefore updates `--help` on its own, except where the command said its
synopsis stays short.
`snapshot` and `proxy` drop their override; `daemon`, `device`, `doctor`,
`prepare`, `tv-remote`, `scroll` and `artifacts` drop the flag brackets from
theirs. Guards fail a tail that names an option the command does not accept,
or one the hand-written grammar already wrote.
Every synopsis except `snapshot` and `is` is byte-identical; those two move
exactly per the rules above, and the canonical `snapshot` docs line follows
the generator.
Closes #2444
Summary
A
--helpsynopsis restated the options its command already declared. #2421 made the flag declaration own the option; this removes the last copy.A synopsis is now grammar plus a generated
[label]tail, and the two rendering rules sit on the declaration: the tail names an option with its declaredusageLabel, alias included — the tokenCommand flags:already shows; andusageHidden: truekeeps a cross-cutting opt-in out of every synopsis (--recordtoday, still documented underCommand flags:).usageFlagsis the one addition a command may state: the options its synopsis names, defaulting toallowedFlags,[]when the synopsis is pure grammar or writes its own mutually-exclusive brackets. So adding an option updates--helpon its own unless that command said its synopsis stays short — the curation is now a declaration instead of an unstated property of a prose string.snapshotandproxydrop theirusageOverride; five more drop only the flag brackets.isloses[--record]; the other 67 synopses are byte-identical, verified by generating all of them before and after.commands.mdmoves to the generated line and its byte-for-byte doc test stays green. 27 files. Closes #2444.Validation
pnpm check:affected --rungreen on7240ef1db9(format, lint, typecheck, layering, fallow, build, related Vitest, command-docs, agent-guidance);check:fallow --base origin/mainclean. Replay, web-smoke and device lanes stay GitHub-authoritative: only synopsis strings changed.Guards verified by planting: a forgotten
usageFlags: []renders[--settle] [--settle]and fails; a tail naming an unaccepted option fails; an added option reachessnapshotandpreparewith no override edit; a terse synopsis keeps it inCommand flags:only.