Skip to content

Add /help <command> usage cards for every slash command - #6

Merged
Darknode-Official merged 2 commits into
mainfrom
feat/command-polish
Oct 31, 2026
Merged

Darknode-Official merged 2 commits into
mainfrom
feat/command-polish

Conversation

@Darknode-Official

Copy link
Copy Markdown
Owner

What

/help <command> now shows a usage card — argument syntax, per-argument notes, examples and "see also" — for every slash command. Descriptions still come only from the CMDS table (one source of truth); the new lib/cli/command-help.js adds just the extra detail a one-liner can't carry.

  • /help <word>: an exact command → its card; anything else → the existing full-text search.
  • The main /help footer and the "did you mean" hint on an unknown command both point at /help <command>.
  • usageLine() gives handlers one consistent usage string so help and errors can't drift.
  • Cards were checked against each handler and corrected where they listed the wrong arguments; cards were added for every arg-taking command that lacked one.

Tests

test/command-help.test.js (wired into npm test) checks the table against the real command list: no stale entries, every "see also"/example is a real command, every command renders a card. Full suite passes. Cards verified in a live --tui session.

Each command already has a one-line description in the CMDS table; what a
one-liner can't carry is the argument syntax and a concrete example. This
adds that as structured data and surfaces it on demand.

- lib/cli/command-help.js: per-command usage, argument notes, examples and
  "see also", for all 142 slash commands. Descriptions still come from CMDS
  (one source of truth); this only adds the extra detail. usageLine() gives
  a handler one consistent usage string so the help a user reads and the
  error they hit can't drift.
- /help <command> now renders a card (usage, arguments, examples, see also);
  /help <word> still falls back to the full-text search for non-commands.
  The main /help footer points at it.
- An unknown slash command's "did you mean" hint now also offers
  /help <nearest> for that command's usage.
- test/command-help.test.js checks the table against the real command list:
  no stale entries, every "see also" and example is a real command, every
  command renders a card. Wired into npm test.
After checking each card against the handler it documents:
- fixed cards that listed the wrong arguments: /fallback (<model>|off,
  not on|off), /snippet (save/<name>/del, not "name = text"), /api
  (adds key/off), /alias (adds rm), /branch (adds delete), /plan
  (add/done/clear/run);
- added cards that were missing for arg-taking commands: /mcp,
  /marketplace, /cowork, /bench, /btw, /whatbroke, /ai-prompt.
@Darknode-Official
Darknode-Official merged commit 491b0c2 into main Oct 31, 2026
0 of 6 checks passed
@Darknode-Official
Darknode-Official deleted the feat/command-polish branch October 31, 2026 23:26
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