Repository navigation
docs(cli): cut --help prose to usage and contract - #403
Merged
Merged
Conversation
Every command's long_about now states usage and the current contract only: no iteration numbers, no fixed-bug history, no kb/ paths. Detail that an agent rarely needs first (extra output shapes, edge cases, examples) moves to after_long_help, below the option list. launch and eval show Usage: at line 15 (was 157 / 130); eval names --stringify on line 4. No command has more than 25 lines of prose before Usage:. args.rs has 0 `iter-NNN` mentions (was 110). No flag, default or behaviour changes. Ticks the kb/backlog.md "long --help buries the option list" line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- eval: the return-last-statement rule applies to wrapped scripts only (declaring, await, --stringify); plain scripts are sent verbatim and keep their completion value. - launch/screenshot: --window-size is the way to a live session at a real window size, not the only viewport emulation (screenshot --viewport). - stop: restore that a launch --profile instance is stoppable too. - screenshot --window-size arg: drop the Firefox version note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # crates/ff-rdp-cli/src/cli/args.rs # kb/backlog.md
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.
Cause
Long
--helphid the option list under prose (kb/backlog.md, agent feedback 2026-11-26).launch --helpprinted 155 lines beforeUsage:,eval --help128.--stringifyfirst came up around line 108 ofeval --help.crates/ff-rdp-cli/src/cli/args.rshad 110iter-NNNmentions and a lot of fixed-bug history ("from iter-93 to iter-164 … even though this help claimed otherwise", "BREAKING (iter-160)", "Note (iter-126): previously …").Fix
This PR changes help text only. No flag, default or behaviour changes.
long_aboutnow holds the usage and the current contract, written tersely: defaults, wait semantics, output fields, exit codes, flag interactions, and limits such as the ~500px window floor.after_long_help, which clap prints afterOptions:. These are extra output shapes, edge cases and Examples. This applies to navigate, eval, network, screenshot, click, type, reload, launch, stop, install-skill, install-hook, profiles, profiles prune, run and index.kb/paths and "used to / before iter-N" history are gone from help strings, argument docs and the non-help comments inargs.rs.eval --helpline 4 now says: "Objects and arrays come back as protocol grips (actor IDs, class names); pass --stringify for the value."consenthelp saidconsent accept"exits 1 for the two non-accepting outcomes", but there are three (clicked_not_dismissed,detected_not_actioned,no_cmp_detected). It now says "exits 1 for every outcome but accepted", which matches the exit table inconsent accept --help.Output:line untouched, because a sibling PR owns it.Proofs
Each number is the count of lines before
Usage:inff-rdp <cmd> --help. I measured every command and subcommand with the same script on the binaries built before and after the change.Usage:on line 15)Usage:on line 16;--stringifyon line 4)The largest value for any command is now 25 (stop, addon reload). Before, 13 commands were over 25.
Gates on the final tree:
cargo fmtandcargo clippy --workspace --all-targets -- -D warningsare clean.FF_RDP_BLESS=1 cargo test -p ff-rdp-cli --test skill_driftpassed, and SKILL.md did not change (its generated region does not come fromlong_about).cargo test --workspace -q: 2485 passed, 0 failed.The existing help-wording tests (
unit_165_help_text_matches_behaviour,unit_160_type_help_states_synthetic_ceiling,stop_help_states_the_safety_rules,click_help_states_no_user_activation, and the screenshot/eval/responsive/launch/manifest--helpassertions) pass unmodified.I did not run Firefox: the change touches help text only.
Facts I dropped on purpose
statusbeing null before iter-166;results.networkonce being a bare array.--jqonce switching the detail mode.totalonce meaning the sample size.enteredfield.auto_consent: truefield.type --submithas two budgets (the 600 ms and 3 s budgets stay); thecomparis.chexample host.kb/research/viewport-emulation.md,kb/iterations/iteration-142-…, DEC-027 and dogfooding-session references.Review (code-review, medium)
The review found no correctness bugs. I fixed all four wording findings in aa6aa6a:
await, or run with--stringify. Plain scripts are sent verbatim and keep their completion value. The help now says this.--window-sizewas described as "the only path with true viewport emulation". It is now described as the way to get a live session at a real window size, with a pointer toscreenshot --viewport. Screenshot's "only true sub-500px raster" had the same problem and is reworded the same way.launch --profile DIRinstance can be stopped too, because its owner markers live in a managed directory, not in the user's profile.--window-sizeflag doc: the Firefox version note is gone.CI
supply-chainfailed on the first push because of RUSTSEC-2026-0592 (url2.5.8). That advisory also failed main, so it was not caused by this PR. ff-rdp#404 bumpedurlto 2.5.9 and is merged. This branch now includes it through a merge of origin/main.Skipped
ff-rdp --helpafter-text (AFTER_LONG_HELP) is still long. It follows the option list, and I only removed its history and iteration references.Not confirmed
long_aboutunwrapped, so the longOutput:lines count as one line each. Narrow terminals wrap them, so a reader there sees more than the counts above.🤖 Generated with Claude Code