docs(commands): generate the keyboard, scroll, and clipboard API blocks

Merged
TH
7d ago
+343-51

Summary

commands.md changed in 54 of the last 200 commits because it restates facts the command registry owns. This pilot makes Keyboard, Scroll, and Clipboard hybrid.

  • scripts/command-docs/generate.ts (pnpm generate:command-docs) rewrites only the regions between <!-- generated:command <name> --> and <!-- /generated -->. A block holds the summary, synopsis, aliases, options table, and capabilities link, all read from existing registry data.
  • The hand-written text is now a short "Things to know" list for a person who drives an agent.
  • The command-docs gate also runs the new drift guard. No new gate id, no waiver.

The shipped tool is unchanged. 6 files touched. All other sections are byte-identical (3 diff hunks).

Before (Keyboard, 1 of 3 bullets):

keyboard status (alias keyboard get) reports whether the software keyboard is visible. When it can identify a visible Return control, it reports its action as returnKey and can include … (6 more sentences)

After:

Inspect, press, or dismiss the device keyboard.
agent-device keyboard [status|get|dismiss|enter|return]
Supported targets: Keyboard dismiss, enter, and status
Exact behavior: `agent-device help keyboard`.

plus four short "Things to know" bullets.

Validation

At 32b5a05f6c, local:

  • pnpm check:command-docs: 17 passed (coverage guard and drift guard).
  • runner-refusal-reason-docs.test.ts: 3 passed.
  • pnpm check:doc-prose, pnpm check:doc-links, pnpm check:gate-manifest, pnpm check:quick: pass.
  • Built site: the markers are HTML comments and do not render.

No check:affected --run receipt; CI validates. Docs and tooling only: no device run applies.

šŸ¤– Generated with Claude Code