Make simbroker help and doctor human-readable by default - #3
Merged
Conversation
Why: Bare `simbroker`, `--help`, and `doctor` printed JSON, so a person landing on the CLI could not see usage or a next step without parsing a payload. Changed: Default help and doctor output is now prose. Pass `--json` for the existing machine payload. Other commands still emit JSON so wrappers that parse `lease contain` keep working. Tests drive the shipped CLI for both modes. Verification: npm run test:client npm run agent:verify -- --profile spec-only --paths client/bin/simbroker.mjs,client/command-dispatch.mjs,client/test/simbroker.test.mjs,client/README.md,README.md,docs/getting-started.md --session-dir task-sessions/20260818-human-cli-help npm run agent:verify -- --profile implementation --paths client/bin/simbroker.mjs,client/command-dispatch.mjs,client/test/simbroker.test.mjs,client/README.md,README.md,docs/getting-started.md --session-dir task-sessions/20260818-human-cli-help Affected: client/bin/simbroker.mjs client/command-dispatch.mjs client/test/simbroker.test.mjs client/README.md README.md docs/getting-started.md Refs: https://github.com/fiveonecode/simulator-broker client/command-dispatch.mjs Session: task-sessions/20260818-human-cli-help
Why: Global help told newcomers to run `simbroker <group> --help` for events, pin, simulators, service, and doctor, but those names had no help handler and failed with a JSON unknown-command error. Changed: Add help payloads and execute cases for events, pin, simulators, service, and doctor. Treat doctor as a top-level command in global help. Route `--help` before service start/stop/status. Skip the service probe for help so `--help` stays local. Cover every advertised `--help` page plus alias-unhealthy doctor prose. Specs now record the help/doctor human default and `--json` machine payload. Verification: npm run test:client npm run agent:verify -- --profile spec-only --paths client/command-dispatch.mjs,client/bin/simbroker.mjs,client/test/simbroker.test.mjs,spec/global-simulator-broker.md,spec/architecture.md --session-dir task-sessions/20260818-help-groups npm run agent:verify -- --profile implementation --paths client/command-dispatch.mjs,client/bin/simbroker.mjs,client/test/simbroker.test.mjs,spec/global-simulator-broker.md,spec/architecture.md --session-dir task-sessions/20260818-help-groups Affected: client/command-dispatch.mjs client/bin/simbroker.mjs client/test/simbroker.test.mjs spec/global-simulator-broker.md spec/architecture.md Refs: #3 Session: task-sessions/20260818-help-groups
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.
Step 2 of the public-onboarding sequence: a person can read
simbroker,--help, anddoctorwithout parsing JSON.What changed
simbroker,simbroker --help/help, andsimbroker doctorprint prose by default.--jsonstill emit the existing machine payload (usage/commandsfor help,issuesfor doctor).lease containkeep working.Out of scope
CLI-only install, PATH persistence, Homebrew, releases, issue templates, and the CONTRIBUTING split stay for later PRs.
Verification
npm run test:client(168/168)npm run agent:verify -- --profile spec-onlypassednpm run agent:verify -- --profile implementationpassed (npm test+ harness)npm run agent:completepassed fortask-sessions/20260818-human-cli-help