docs(command-docs): generate the common option table and per-action option tables

Merged
TH
7d ago
+448-49

Summary

Fixes what the pilot (#4809) showed, so generated blocks can roll out to every command.

  • ## Common options is a new generated region (<!-- generated:common-options -->). It lists each option that 5 or more public CLI commands allow and that no command overrides text for, computed from the registry against one named threshold constant. A command block drops those rows and prints one Also accepts line naming them. agent-device help output is unchanged; the generator only reads data that already exists.
  • A command with flagsByAction renders one options table per action under a bold label, so record contact-sheet --out no longer reads as available to record start.
  • Two or more generated blocks under one heading are covered by a test, including that regenerating them is stable.
  • Pilot cleanup: the Keyboard example block and two Clipboard example lines that repeated the usage line are gone; the Scroll --settle bullet no longer restates a generated row. No fact was dropped.

Before / after

Scroll options table:

-| `--settle` | After the action, wait for the UI to go quiet and return the settled diff vs the pre-action tree in the same response (best-effort; never fails the action) |
-| `--settle-quiet <ms>` | Settle: quiet window the UI must hold to count as settled (default 500ms; … keeps the asked window |
-| `--timeout <ms>` | Boot/Open/Prepare: startup budget … With --settle: the settle-wait deadline (default 10s) |
+Also accepts: [common options](#common-options): `--settle`, `--settle-quiet <ms>`, `--timeout <ms>`.

Validation

Head 2531d93. Ran locally: generate:command-docs, check:command-docs (27 tests), the tests under src/commands/schema (114), test/repo-guards (166), check:doc-prose, check:doc-links after pnpm --dir website build, check:gate-manifest, check:fallow, check:quick, format. The change is generator, test, and docs only, so runtime and device tests do not apply. CI validates the rest. No waivers or allowlists were added.

Flags in Common options: --settle, --settle-quiet <ms>, --timeout <ms>, --depth, -d <depth>, --scope, -s <scope>, --raw, --out <path>.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.