feat(docs): support flattened subcommand help - #1118
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
374eaba to
1b5daf6
Compare
Instruction counts
No instruction-count regression above 1%. 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 comparisonParsing
|
f087a52 to
ca98d2b
Compare
ca98d2b to
130f668
Compare
130f668 to
143de7b
Compare
143de7b to
7011ee5
Compare
7011ee5 to
4dadac5
Compare
4dadac5 to
11c20fd
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 11c20fd. Configure here.

Summary
flatten_helpthrough typed derives, KDL, the clap bridge, and conformance tablessubcommand_requiredinto generated Go help tables so flattened usage preserves required-command semanticsTest plan
cargo clippy --all --all-features -- -D warningscargo test --all --all-featuresgo test ./...mise run rendermise run gen-shadowmise run gen-gogit diff --checkNote
Medium Risk
Broad help-output changes across Rust, Go, and docs generators; behavior is covered by new tests but any CLI relying on exact help formatting could see differences when
flatten_helpis enabled.Overview
Adds clap-style
flatten_help: when set on a command, help drops the usual Commands list and instead prints multiple usage lines plus per-subcommand sections (about, args, flags), including nested flattening on descendants.The flag is wired through
CommandMeta/ KDL /#[usage(flatten_help)]/ clap bridge and is no longer treated as a fidelity loss. Rust (argv/help.rs), usage-lib CLI templates, and generated Go (usageLines,flatCommandsShort/Long) share the same layout rules; Go help metadata also gainsSubcommandRequired(and shadow mise tables are regenerated) so flattened usage respects required-subcommand semantics.Docs and PLAN.md mark
flatten_helpdone; markdown rendering switches torender_withso multi-page output does not deep-clone the full command tree per page.Reviewed by Cursor Bugbot for commit b060f15. Bugbot is set up for automated code reviews on this repo. Configure here.