Skip to content

Make simbroker help and doctor human-readable by default - #3

Merged
VladimirBrejcha merged 2 commits into
mainfrom
cli/human-help-json
Aug 17, 2026
Merged

Make simbroker help and doctor human-readable by default#3
VladimirBrejcha merged 2 commits into
mainfrom
cli/human-help-json

Conversation

@VladimirBrejcha

Copy link
Copy Markdown
Contributor

Step 2 of the public-onboarding sequence: a person can read simbroker, --help, and doctor without parsing JSON.

What changed

  • Bare simbroker, simbroker --help / help, and simbroker doctor print prose by default.
  • The same commands with --json still emit the existing machine payload (usage / commands for help, issues for doctor).
  • Other commands stay JSON by default so wrappers that parse lease contain keep working.
  • Client tests spawn the shipped CLI for both modes.

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-only passed
  • npm run agent:verify -- --profile implementation passed (npm test + harness)
  • npm run agent:complete passed for task-sessions/20260818-human-cli-help

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
@VladimirBrejcha
VladimirBrejcha merged commit 09ec703 into main Aug 17, 2026
1 check failed
@VladimirBrejcha
VladimirBrejcha deleted the cli/human-help-json branch August 17, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant