feat(cli): group the help by task and wrap it - #391
Merged
Merged
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
Author
sysml -help and the manual page list the flags under task headings, each spelled once with its shorthand folded in and its argument named, with a description of a line or two; the detail those descriptions carried moves into the section on that mode, and the -pdf-* spellings sit under Deprecated. A mistyped flag is answered with the synopsis and a pointer to -help rather than the whole help. %help groups every REPL command under a heading and wraps the descriptions, a wide signature on a line of its own. A flag left out of every group fails a test. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration
Bot
force-pushed
the
feature/grouped-help
branch
from
September 19, 2026 18:34
847965b to
1a03c01
Compare
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.
What and why
sysml -helpwas 463 lines: 84 flags in one alphabetical list, each alias an entry of its own, arguments typed (string,value) rather than named, 21 descriptions over 200 characters unwrapped, and a mistyped flag dumped the whole list after the error.%helphad 24 commands under no heading.The
usage.Docmodel gains option groups, and the terminal help and the manual page render them from the same table:sysml -help: flags under 14 task headings (General, Evaluating, Checking a model, Running behaviors, Analysis engines, Checking every schedule, Converting and migrating, Compiling natively, Rendering views, Rendering documents, Styling HTML documents, Syncing against a repository, Diagnostics and profiling, Deprecated), spelled once with the shorthand folded in (-e, -eval <expr>,-o, -output <file>,-satisfy[=<name>]), description wrapped in the column beside it. Examples come before the options (Section.BeforeOptions).Checking a model, newRunning actions and state machinesandChecking every schedule,Analysis engines,Conversion,Rendering a view). The-pdf-*trio and-tosit under Deprecated as "Former name of -doc-…".flag.Usageisdoc().WriteHint, so a bad flag prints the error, the synopsis and one pointer line on stderr..SS, each option a.BR \-e ", " \-eval " \fIexpr\fP"tag;man/man1/sysml.1regenerated.sysml-lspandsysml-grpcdeclare no groups and render as before.%help: the ungrouped commands come under Session, Settings, Analysis engines and Checking every schedule; descriptions wrap into a 28-column gutter, a signature wider than that takes a line of its own (folded at 72 for%check-bounds),%exitis noted beside%quit. Table entries are written{name: …, group: …}soexamples/self_model_test.go's source check still finds them.Line-width contract unchanged: no help line exceeds 96 columns (options wrap at 78); the help is now 609 lines, all of it grouped and readable. Not in this PR: a short-card
-helpwith-help <topic>/%help <command>, which needs a one-line summary per flag and is a separate change.How it was verified
TestGroupedOptionsFoldAliasesAndWrap,TestCheckOptionsFindsStrayFlags(internal/frontend/usage),TestEveryFlagIsInOneOptionGroup(cmd/sysml — fails when a flag is registered without a group),TestHelpTextIsGroupedAndWrapped(internal/frontend/repl — headings, folded alias, signature fold, width).TestStreamsAndStatusexpects-convert <format>in-hand the three-line answer to--nosuchflag;TestPrintUsageStatesTheExperimentalNoticerenders againstdocFlags().go build ./...,go vet ./...,gofmt -l .(empty),go test ./...,make man-check,python3 scripts/changelog.py check,scripts/check-doc-ids.pyall pass.sysml -h,sysml --nosuchflag,man -l man/man1/sysml.1,%helpin the REPL.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelog