Skip to content

feat(docs): add recursive help - #1132

Merged
jdx merged 1 commit into
agent/mount-corpusfrom
agent/recursive-help
Aug 21, 2026
Merged

feat(docs): add recursive help#1132
jdx merged 1 commit into
agent/mount-corpusfrom
agent/recursive-help

Conversation

@jdx

@jdx jdx commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an explicit portable HelpAll flag action for typed Rust, KDL, usage-lib, and generated Go
  • render the selected command and every visible descendant in depth-first display order
  • preserve route-specific help and exclude hidden subtrees
  • document the action and close the recursive-help PLAN item

Validation

  • cargo test -p usage-conformance --test help_request --all-features
  • cargo test -p usage-argv --all-features
  • cargo test -p usage-lib --all-features
  • cargo clippy --workspace --all-features --all-targets -- -D warnings
  • cd go && go test ./...

This PR was generated by Codex.


Note

Medium Risk
Touches parser error variants, help rendering, derive codegen, and Go generation in parallel, so a mismatch in walk order or hidden-command filtering would show up as user-facing help. Behavior is additive and covered by conformance and Go tests.

Overview
Adds a portable ArgAction::HelpAll (action="help_all") that prints long help for the selected command and every visible descendant, in depth-first display_order then name order. Hidden subcommands are skipped; a nested request starts at that command and does not prepend ancestor pages.

The action is wired through typed Rust (Error::HelpAll, render_all / render_all_at), KDL, usage-lib, generated Go (AllHelp, Error.All), the derive/parse() print-and-exit path, and usage-cli. Docs and the PLAN recursive-help item are updated to match.

Reviewed by Cursor Bugbot for commit 482cf99. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: c1e6d282-beee-40a2-9601-d70bd027a386

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread argv/src/help.rs Outdated
@jdx
jdx force-pushed the agent/recursive-help branch from 14b7159 to 6b13bf9 Compare August 20, 2026 14:38
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
markdown ▄▁▁█ 199,315,003 → 218,173,848 +9.46% ⚠️ 19.00 → 20.55ms +8.16%
startup ▁██▇ 1,221,718 → 1,221,253 -0.04% 1.35 → 1.37ms +1.66%

1 benchmark(s) above the 1% gate: markdown +9.46%

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

Shadow comparison

Parsing mise use -g node@20 against a shadow of mise's committed spec.
Reported, not gated: the shadow grows as the derive learns to express more, so
what to watch is the ratio rather than either column.

framework instructions, cold parse vs usage
usage 4355
argh 6292 1.4x
clap 5895248 1353x
bpaf 21917778 5032x
                                              min       p01       p10    median
usage-rs: argv -> struct                      191       194       196       200  ns
argh: argv -> struct                          265       271       276       288  ns
clap: build tree + parse -> struct         480970    482856    489548    497901  ns
bpaf: build parser + parse -> struct      1557494   1557494   1608581   1654904  ns

usage: argv -> struct                             213 ns      0.21 µs
clap: build tree + parse -> struct             487582 ns    487.58 µs
clap: parse -> struct, tree reused              23767 ns     23.77 µs
clap: build tree only                          304740 ns    304.74 µs

d0323d68d2d0 vs c10d85cbe1b9 · measured on the runner, not pushed to the history.

@jdx
jdx force-pushed the agent/recursive-help branch from 6b13bf9 to aee5c3e Compare August 20, 2026 14:42
@jdx
jdx force-pushed the agent/recursive-help branch from aee5c3e to 4d7221a Compare August 20, 2026 14:46
Comment thread go/argv/page_long.go
@jdx
jdx force-pushed the agent/recursive-help branch 2 times, most recently from 51dda75 to 2bc54a9 Compare August 20, 2026 14:55

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2bc54a9. Configure here.

Comment thread go/internal/spec/spec.go
@jdx
jdx force-pushed the agent/recursive-help branch 3 times, most recently from 4562f2c to d3e1548 Compare August 21, 2026 01:50
@jdx
jdx force-pushed the agent/recursive-help branch from d3e1548 to bef1d69 Compare August 21, 2026 03:16
@jdx
jdx force-pushed the agent/recursive-help branch from bef1d69 to 664e62c Compare August 21, 2026 03:20
@jdx
jdx force-pushed the agent/recursive-help branch from 664e62c to efc419b Compare August 21, 2026 03:40
@jdx
jdx force-pushed the agent/recursive-help branch 2 times, most recently from 6e4cd61 to efc419b Compare August 21, 2026 03:49
@jdx
jdx force-pushed the agent/recursive-help branch from efc419b to 481d902 Compare August 21, 2026 04:10
@jdx
jdx force-pushed the agent/recursive-help branch from 0951778 to b1d249d Compare August 21, 2026 04:30
@jdx
jdx force-pushed the agent/recursive-help branch from b1d249d to b5c8945 Compare August 21, 2026 04:40
@jdx
jdx force-pushed the agent/recursive-help branch 2 times, most recently from 482f211 to b5c8945 Compare August 21, 2026 04:43
@jdx
jdx force-pushed the agent/recursive-help branch from b5c8945 to fc1fc5a Compare August 21, 2026 05:02
@jdx
jdx force-pushed the agent/recursive-help branch from fc1fc5a to 30e73fa Compare August 21, 2026 05:36
@jdx
jdx force-pushed the agent/recursive-help branch from 30e73fa to dd01e54 Compare August 21, 2026 05:47
@jdx
jdx force-pushed the agent/recursive-help branch 2 times, most recently from 9586cff to d0323d6 Compare August 21, 2026 06:23
@jdx jdx closed this Aug 21, 2026
@jdx jdx reopened this Aug 21, 2026
@jdx
jdx force-pushed the agent/recursive-help branch from d0323d6 to 862c8a3 Compare August 21, 2026 07:30
@jdx
jdx force-pushed the agent/recursive-help branch from 862c8a3 to 6f29854 Compare August 21, 2026 07:49
@jdx
jdx force-pushed the agent/recursive-help branch from 6f29854 to 482cf99 Compare August 21, 2026 08:32
@jdx
jdx merged commit c617dc5 into main Aug 21, 2026
8 of 9 checks passed
@jdx
jdx deleted the agent/recursive-help branch August 21, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant