feat: print the CLI surface on demand - #12
Merged
Merged
Conversation
A session composing an unfamiliar call had to infer the flags from prose in a SKILL.md, and prose is where a flag that never existed comes from: `wb pr check --key ABC-1` was written that way and refused by argparse. `test_plugin.py` already holds every command to being *named* somewhere a session reads. Naming is not knowing what it takes. `wb surface` walks `build_parser()`, so it reports the arguments the CLI actually accepts and cannot drift from them -- a hand-kept list of flags would be a second description of the CLI, which is the thing that drifts. It carries what the invented calls get wrong: which arguments are positional, which are required, which take no value, and the closed set a choice flag allows. This is the schema MCP publishes for every tool in the system prompt of every session, used or not. Here it is complete and costs nothing until something asks for it -- the same trade `wb route` made by being a command rather than an eleventh skill. Refs WB-18
Merged
matheusPavaneli
added a commit
that referenced
this pull request
Aug 22, 2026
Five merged PRs sat on main under a 0.6.0 version string: #10, #11, #12, #13 and #14. The marketplace compares declared versions, so a string that does not move is a release nobody receives -- the same failure #11 was written to catch, one release later and from the other side. The gate holds the declared version to a released changelog section; it cannot hold main to declaring the work that landed on it. Three commands gained surface -- `wb surface`, `wb status --stats --global`, `wb task clean --merged/--older-than` -- so this is a minor bump. No breaking change: every existing group, action, flag and exit code behaves as it did in 0.6.0, and no `--json` payload lost or renamed a key. Co-authored-by: matheusPavaneli <matheusPavaneli@users.noreply.github.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.
What
wb surfaceprints every group, action and flag, walked frombuild_parser().A session composing an unfamiliar call had to infer flags from prose in a SKILL.md, and prose is where a flag that never existed comes from —
wb pr check --key ABC-1was written that way and refused by argparse.test_plugin.pyalready holds every command to being named somewhere a session reads; naming is not knowing what it takes.It reports what the invented calls get wrong: which arguments are positional, which are required, which take no value, and the closed set a choice flag allows.
This is the schema MCP publishes for every tool in the system prompt of every session, used or not. Here it is complete and costs nothing until something asks — the same trade
wb routemade by being a command rather than an eleventh skill. No SKILL.md names it; the README does.Walked rather than kept by hand, because a hand-kept list of flags is a second description of the CLI, and a second description is the thing that drifts.
Verification
7 new tests, including the one that matters:
wb surface pr --jsonnames exactly--fileand--shape, and asserts--keyis absent.One regression is covered because it happened during the work: the positional was first named
group, which is the dest the top-level parser already owns, sowb surface taskoverwrote it and dispatched towb taskinstead. Renamed toofwith metavarGROUP, with a test that naming a group prints it rather than running it.Risk and rollback
New command, nothing existing changed.
contract.VERSIONSgainssurface: 1. Revert the commit to remove it.