Render a global usage for help outside a project - #131
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
The global usage listing needs the descriptions without instantiating the builtins (whose default constructors build real accessors); one constant serves both views so they cannot drift. Co-authored-by: Cursor <cursoragent@cursor.com>
Bare dev / --help / -h / help hit the Runner's manifest load and died with the no-dev.yml refusal even though five global builtins work anywhere. GlobalDispatch now claims the help spellings when no dev.yml encloses the cwd and renders the global command listing; inside a project, help still routes to the Runner and lists the project catalog. Co-authored-by: Cursor <cursoragent@cursor.com>
Bare dev and --help in a dev.yml-less directory now exit 0 with the global usage; the hostile-env boot test routes through a project command since bare dev no longer reaches the no-dev.yml refusal. Co-authored-by: Cursor <cursoragent@cursor.com>
Sorbet rejects T.nilable(String) into Hash#key?; bare argv reaches the help fallback through the explicit nil check instead. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
JPDuchesne
added a commit
that referenced
this pull request
Aug 21, 2026
742c417 Merge pull request #131 from d3mlabs/jpd/global-help-without-dev-yml e207e17 Guard the nilable argv head before the global-command lookup 8e697a2 Cover the help-outside-a-project routing at the bin/dev boundary 64b5826 Render a global usage for help outside a project 1d78b6c Hoist global builtin descriptions to DESC constants 4ab1152 Add GlobalUsagePrinter: the usage view for help outside a project
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.
Summary
dev,--help,-h, anddev helpoutside any project now print a global usage screen (the five global builtins plus a hint) and exit 0, instead of dying with the no-dev.yml refusal. Inside a project, help still routes to the Runner and renders the project catalog unchanged.GlobalDispatchclaims the help spellings only when no ancestor holds adev.yml(a plain git checkout still gets global help);GLOBAL_COMMANDSbecame a name→description hash serving both dispatch membership and the listing.DESCconstants on the five global builtin wrappers so the project and global help views share one source; a newDev::Cli::GlobalUsagePrinterrenders the flat global listing (the project-shapedUsagePrinterstays untouched).Test plan
GlobalUsagePrinterunit tests (rows, alphabetical order, hint)GlobalDispatchtests: help spellings global from a dev.yml-less cwd (incl. a.git-only checkout), not global under a dev.yml, baredevprints the canonical descriptionsbin/devend-to-end: baredevand--helpin a dev.yml-less dir exit 0 with the global usage; hostile-env boot test now routes through a project command since baredevno longer refusesdev tc(Sorbet),dev style(RuboCop) all greenMade with Cursor