refactor(buzz-acp): point agents at buzz --help instead of a command table - #7586
Conversation
…table The base prompt carried a `Group | Key commands` table — a second copy of a surface that already documents itself, and one nothing ties to the parser. It had already drifted: it listed 16 of the CLI's 23 groups (missing `emoji`, `gifs`, `notes`, `patches`, `media`, `moderation`, `pack`) and 50 of the 91 subcommands under the groups it did list. The adjacent exit-code line stopped at 4; the CLI has a 5th (write conflict). Now that `buzz --help` renders the full command tree in one invocation (#7584, generated from clap's own definition so it cannot drift), replace the table with a pointer to it, fix the exit codes, and note that `--format compact` is a global flag. Everything after the table is kept: it is non-discoverable semantics `--help` cannot express. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Salman Mohammed <smohammed@squareup.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🔐 Codex Security Review
|
|
🤖 Reviewed exact head Verified independently: the full Static inspection confirms |
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
Reviewed head 3bc265df8ace4812b03902d4c3f40fb5095a5520 against base 44c1cc7df8e0067c9d578a93ad8e4393304422b3.
No actionable code findings. This is a comment review, not an approval. This assessment is my source review; the additional delegated review lane was cancelled before returning a result.
- The prerequisite #7584 is the exact base. The root CLI parser installs the recursive clap-generated command tree, handles help before command/auth execution, and supports the documented root-level placement of
--format compact.CliError::Conflictmaps to exit code 5. - All instructions after the removed table are byte-identical to base, preserving draft authorization, stdin/newline handling, channel routing, links, mentions, and assignment semantics. Modern and legacy ACP delivery still consume the same embedded base prompt. The reported 13 KB / 199-line help fits the exact-head shell’s 50 KiB / 2,000-line inline-output threshold.
- Validation: source tracing and a direct base/head suffix comparison were performed locally. The author reports exact-head passes for the full ACP package (933 unit + 9 integration tests) and CLI package (473 tests) in this comment; those are author-reported results, not my own runs. I did not build this head, run broad suites, or exercise a live write conflict. The installed CLI predates the help-tree change, so its help-only probes are not exact-head runtime evidence.
Separate merge/validation notes: DCO is green and the commit has the matching sign-off. At the check snapshot, CI was still running and the security review remained required for this exact range; a completed Codex code-review summary does not clear that security gate. No inline Codex findings were returned. The available PR evidence does not establish completion of the full local just ci gate required by AGENTS.md:112; package-test passes are narrower. These are validation/process caveats, not discovered code defects.
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
REVIEW CLEAR: no actionable defects found.
Reviewed head 3bc265df8ace4812b03902d4c3f40fb5095a5520 against base 44c1cc7df8e0067c9d578a93ad8e4393304422b3.
- The prompt now directs agents to the CLI’s authoritative command tree, consistent with the agent-first product direction. Full-tree help is already present in the base; the updated exit codes and root-level
--format compactplacement match the implementation. - Traced the compiled default through modern/legacy ACP prompt composition and checked custom/disabled-base behavior. The existing owner-approval, routing, mention, assignment, and multiline-content rules are byte-identical to the base. Independent CLI-contract review also found no blocker.
- Validation was source-only on Wes’s Mac Studio, using exact-SHA source and diffs. No checkout, build, tests, or PR-code execution. Relay persistence, protocol handling, and native UI are unchanged and outside this one-file prompt review; no runtime or model-behavior guarantee is claimed.
* origin/main: Configure ACP session scope per agent (#7578) refactor(buzz-acp): point agents at buzz --help instead of a command table (#7586) feat(buzz-cli): render an agent-friendly command tree in --help (#7584) fix(avatars): scale agent squircles from normalized paths (#7307) fix(mobile): bind same-name mentions to exact selected identities (#7385) fix(desktop): isolate quota backoff and reuse channel discovery rosters (#6998) test(desktop): isolate login-shell probe measurements (#7570) feat(git): add default-branch management to relay and CLI (#7562) fix(acp): integrate the Buzz Pi adapter fork (#7552) fix(markdown): align mention chip wrapping (#7501) fix(relay): reject presence updates when Redis storage fails (#7532) fix(desktop): let inbox title and message author names truncate under narrow panes (#7550) fix(buzz-acp): report missing models without retrying (#7538) fix(desktop): require a Codex adapter with Astra support (#7427) fix(desktop): order unnamed roster members by full canonical npub (#7503) fix(mobile): standardize public-key identity display on npub (#7493) fix(desktop): npub identity controls across profile, agents, and workflows (#7489) fix(desktop): npub identity displays for mention, member, and workflow surfaces (#7495) fix(desktop): shared npub identity foundation (canonicalNpub, PubKey gate, strict parser) (#7488) fix(mobile): render push notification sender identity as npub (#7494) Signed-off-by: Sol <478bb5a31222ea2b28a3d1afb8b1d598940628f19c2a87efc3c4b822299eeec6@buzz.block.builderlab.xyz> # Conflicts: # desktop/src-tauri/src/commands/media_download.rs
Summary
The ACP base prompt carried a
Group | Key commandstable for thebuzzCLI — a second copy of a surface that already documents itself, with nothing tying it to the parser. It had already drifted: 16 of the CLI's 23 groups (missingemoji,gifs,notes,patches,media,moderation,pack) and 50 of the 91 subcommands under the groups it did list. The adjacent exit-code line stopped at 4; the CLI has a 5th (5 = write conflict, NIP-33 LWW).#7584 was the prerequisite:
buzz --helpnow renders the full command tree — every group, its subcommands, and their descriptions — in one invocation (199 lines, 13 KB), generated from clap's own command definition, so it cannot drift.buzz -hstill prints the group-level summary. Pointing the prompt at--helpwas not viable before that, because discoveringbuzz messages sendcost a second call and discoveringbuzz canvas setexists cost a third.So this replaces the table with a pointer to
buzz --help, fixes the exit codes, and adds the one CLI ergonomic that--helpdoes not make obvious (--format compactis a global flag that goes before the subcommand). Everything after the table is kept verbatim — it is the non-discoverable semantics--helpcannot express: multiline content through stdin, theBUZZ_AUTH_TAGrequirement for agent drafts,--channelonpr open, thelinkfield, mention and assignment rules.