Repository navigation
docs(commands): generate the keyboard, scroll, and clipboard API blocks - #4809
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
|
The PR is ready at 32b5a05. The generator and the schema text were read; the generator and |
The command reference restated registry facts by hand. A marked block per command now carries the summary, synopsis, options, and capabilities link, rendered by scripts/command-docs/generate.ts from the existing registry data. The hand-written text of the three pilot sections keeps only what a person who drives an agent needs to know. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The command-docs gate now also runs the drift guard, so a stale block fails on the unit lane and on the docs lane. The docs workflow reruns when the generator changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…re the help-flag and drift helpers Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
32b5a05 to
a78e1ec
Compare
|
Follow-up on the optional notes at Doc content, all applied
Code, both applied
Local: build, lint and typecheck, |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on a78e1ec. The verdict and the full list are in the summary comment.
| name, | ||
| summary: schema.text.summary, | ||
| usage: buildCommandUsage(name, schema), | ||
| aliases: cliAliasesForCommand(name).map((entry) => entry.alias), |
There was a problem hiding this comment.
No longer raised on 7352d81: marked fixed in 7352d81 by thymikee in this comment.
🆕 🟡 Minor · Keyboard aliases no longer appear anywhere in commands.md
The generated block for keyboard renders no Aliases: line, so commands.md no longer documents that keyboard get and keyboard return are accepted spellings, and the scroll refresh description lost the note that Android aims the pull inside the scroll container (only the iOS middle-of-screen half survived). collectCommandFacts fills aliases from cliAliasesForCommand(name), which has no keyboard entries — those spellings are positional values of usageOverride: 'keyboard [status|get|dismiss|enter|return]', so the Aliases: branch never fires and nothing replaces the old hand-written bullets.
Suggested change
Re-add the facts the generator cannot derive to the hand-written lists: that keyboard get and keyboard return are accepted spellings, and that scroll refresh aims inside the scroll container on Android.
Details
Also raised here
Also raised at this location by persona senior-developer: keyboard status field returnKeyLabel dropped from user docs — website/docs/docs/commands.md no longer mentions returnKeyLabel anywhere after this PR, so a reader of the keyboard reference cannot learn that keyboard status can return a localized Return-key label — the removed bullet carried "can include its localized accessibility label as returnKeyLabel", "A label alone leaves the action unknown and the label field absent", and "Only Android can report none", none of which the generated block or the new bullets restore. The generated block only emits registry facts (summary, synopsis, aliases, options, capabilities link), so response fields documented by hand have no owner in the hybrid.
Also raised at this location by persona senior-developer: iOS keyboard dismiss no-op on hidden keyboard no longer documented — The keyboard section now states only that keyboard dismiss does not close a visible keyboard on iOS and returns keyboard_dismiss_unavailable, while the removed bullet also documented that on the native iOS runner the command succeeds as a no-op when the software keyboard is already hidden. A caller that dismisses defensively and checks for failure reads a keyboard_dismiss_unavailable-shaped mental model and will treat the real no-op success as something else; the Android bullet documents its equivalent ("If the keyboard stays up, it returns keyboard_dismiss_unavailable"), so the asymmetry is a silent omission, not a deliberate simplification.
persona: senior-developer, javascript
Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.
Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.
There was a problem hiding this comment.
Fixed at 7352d8166f: the bullets name keyboard get and keyboard return as aliases again. The registry holds only command-level aliases, so the generated block cannot print action aliases; they stay in the hand-written text.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
Summary
commands.mdchanged 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.command-docsgate 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):
After:
plus four short "Things to know" bullets.
Validation
At 32b5a05, 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.No
check:affected --runreceipt; CI validates. Docs and tooling only: no device run applies.🤖 Generated with Claude Code