Skip to content

fix(operator): answer bare skills and repos in mqlaunch's own words - #171

Merged
MCamner merged 2 commits into
mainfrom
fix/operator-usage-skills-repos
Aug 3, 2026
Merged

fix(operator): answer bare skills and repos in mqlaunch's own words#171
MCamner merged 2 commits into
mainfrom
fix/operator-usage-skills-repos

Conversation

@MCamner

@MCamner MCamner commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Second fix from the P2 operator inventory. Message, usage and next step only — no underlying functionality changed.

Measured

$ mqlaunch skills
usage: mq-skills.py [-h] [--repo REPO] {audit,validate,new} ...
mq-skills.py: error: the following arguments are required: command   exit 2

$ mqlaunch repos
GitHub repo picker needs a terminal.                                 exit 1

skills hands the operator the delegate's file name and argparse's phrasing for a command typed as mqlaunch skills. repos names a subject that never appeared in the command line — bare repos routes to the hub, which is an interactive picker — and offers no way forward, even though six repos subcommands work fine headless.

After

$ mqlaunch skills
Usage: mqlaunch skills <command> [args]

Commands: audit, validate, new                                       exit 2

$ mqlaunch repos
mqlaunch repos with no command opens the repo hub, which needs a terminal.

Usage: mqlaunch repos <command> [args]

Commands: list, status, roadmaps, skills, wiki-status, diff-summary   exit 1

Both reuse print_namespace_help, so the verb lists stay in the one place that already held them.

Exit statuses are deliberately unchanged

  • skills stays 2 — a missing verb is a usage error either way.
  • repos stays 1 — bare repos is valid on a terminal, so this is an environment failure, not a usage error. No caller's exit-code handling moves.

Left alone on purpose

  • An invalid skills verb still goes to the delegate. Its error names the word the operator typed, which is the useful part, and intercepting it would mean carrying a second copy of the verb list in bash.
  • On a terminal, bare repos still opens the hub. The guard fires only when there is no interactive TTY.

Test

tests/operator-usage-message-smoke.sh, 8 steps. It checks the new text and that everything underneath still runs — a "fix" that stopped delegating would pass a message-only check:

step asserts
2 skills exits 2, usage on stderr, stdout empty, no mq-skills.py, all three verbs named
3 same message on a real terminal (via pty) — the fix is not headless-only
4 skills audit still runs and reports
5 skills bogus still answered by the delegate, naming the typed word
6 repos exits 1, does not say "GitHub repo picker", names mqlaunch repos, lists all six headless subcommands
7 on a pty, bare repos still reaches the hub — stubbed via a fake BASE_DIR, so it is observable and nothing interactive starts
8 repos list still produces the repo table

The gate was proven able to fail: against the unfixed tree it stops at step 2 with FAIL: delegate internals reached the operator: mq-skills.py.

ROADMAP

The section read Status: Planned with every box checked and its exit gate closed — stale. It now records the measuring pass, its five findings, the two fixed (here and #169), and the one open decision: system and theme exit 1 headless while git, release, shortcuts, tools and workflows exit 0. That needs a call before anything changes.

It also records that the sweep itself made signal-brain write a file into the mqobsidian vault — *-brain commands are writes and belong with the destructive exclusions in any repeat.

Full suite green, registry validator green, markdownlint clean.

🤖 Generated with Claude Code

MCamner and others added 2 commits August 3, 2026 01:12
Both commands, called with no argument, replied about something the operator
had not asked about:

  $ mqlaunch skills
  usage: mq-skills.py [-h] [--repo REPO] {audit,validate,new} ...
  mq-skills.py: error: the following arguments are required: command   exit 2

  $ mqlaunch repos
  GitHub repo picker needs a terminal.                                 exit 1

skills handed over the delegate's file name and argparse's phrasing. repos
named a subject absent from the command line — bare repos routes to the hub,
an interactive picker — and offered no way forward, though six repos
subcommands work headless.

Message, usage and next step only. Exit statuses are deliberately unchanged: 2
for skills, a usage error either way; 1 for repos, because bare repos is valid
on a terminal, so the failure is the environment rather than the command line
and no caller's exit-code handling moves.

Two things left alone on purpose. An invalid skills verb still goes to the
delegate — its error names the word the operator typed, and intercepting it
would mean a second copy of the verb list. And on a terminal bare repos still
opens the hub.

tests/operator-usage-message-smoke.sh checks both halves: the new text, and
that skills audit, skills bogus, repos list and the hub path all still reach
their delegates. A fix that stopped delegating would pass a message-only
check. Run against the unfixed tree it fails at step 2 on the leaked script
name.

ROADMAP: the section still read "Status: Planned" with every box checked. It
now records the measuring pass, its five findings, the two fixed here and in
#169, and the one open decision.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…kout

Step 4 ran `mqlaunch skills audit` for real and required it to report skills.
That measures the machine: mq-skills.py scans the MQ repos, a CI runner has
none, and the step failed there while passing locally. Same exposure in step 8
with mq-repos.py.

Both now stub the delegate under a fake BASE_DIR and compare the command line
the arm builds — which is what these two steps are actually about. Step 8 also
widened from one subcommand to three, including one with an argument, so
"forwards verbatim" covers arguments rather than just the verb.

Proven able to fail. With the skills guard changed to fire on every
invocation, the test stops at step 4 with EXIT=2; with the repos guard changed
to never open the hub, it stops at step 7 with EXIT=1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@MCamner
MCamner merged commit 1842b63 into main Aug 3, 2026
3 checks passed
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