feat(cli): summaries, TTY-gated auto-open, exit-codes doc, scoped flag help#275
Merged
Conversation
…g help Track B CLI ergonomics wins from the audit, all additive: - .summary() on the 12 leaf commands so 'homun --help' lists one line each instead of wrapping the full description (commander v14 API). - TTY-gate the human-mode browser auto-open on watch and every lab backend to match observe's existing gate (a non-TTY, non-json, no-flag run no longer spawns a browser opener). Behavioral change, narrow blast radius. The 6 backend sites now share ONE extracted resolveBackendShouldOpen helper with direct unit coverage (closing the review's coverage gap). - README 'Exit Codes' section (0 ok / 1 commander usage / 2 domain / 128+N signal), verified against the code. - scoped '<backend> only:' prefixes on lab run's backend-specific flags. Reviewed; the review's one MEDIUM (TTY gate untested at 7/9 sites) is resolved by the helper extraction + unit tests rather than 6 near-identical integration tests. 922 passed, scan clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Track B CLI ergonomics wins from the audit, all additive and non-breaking (except the one noted behavioral change), sharpening the freshly-released 0.14.0 UX.
What
.summary()on the 12 leaf commands sohomun --helpshows one line per command instead of wrapping the full description onto two lines. Full.description()still shown on<cmd> --help. (Commander v14 API, verified in node_modules.)watchand all six lab backends to matchobserve's existing gate. A non-TTY, non---json, no---open/--no-openrun no longer tries to spawn a browser. The six backend sites now call ONE extractedresolveBackendShouldOpenhelper (one code path, one test) instead of six copied predicates. Behavioral change (narrow: only scripts/CI relying on auto-open without a TTY and without--no-open).<backend> only:prefixes onlab run's backend-specific flags, extending the existing convention.Out of scope (deferred per the audit): createProgram exitOverride,
--dry-runrename,--run/--run-id, shell completions.Review
Reviewed; the one MEDIUM finding (the TTY gate was untested at 7 of 9 sites, mutation-confirmed) is resolved structurally: the 6 lab-backend sites were extracted into
resolveBackendShouldOpenwith 5 direct unit tests covering every branch (no-open, machine mode, TTY vs non-TTY watch, run mode, defaults.open), so a regression at any backend site now fails a test.Proof
pnpm check: 922 passed / 10 skipped, build OK.pnpm public-surface:scan: ok.homun --helprenders a de-wrapped one-line-per-command list (in the PR discussion).🤖 Generated with Claude Code