feat(commands): Phase 3 consolidation — 64 → 41 visible slash commands (#73)#78
Conversation
The slash intercept layer matched on the bare command name regardless of arguments, so subcommand folds like /rewind list, /session rename, and /review security were silently swallowed by the bare-name overlays. Only /config, /usage, and /mcp respected arguments. Argument forms of rewind, session, export, review, agent(s), status, thinking, plugin, effort, and login now fall through to the commands crate, while folded subcommands that map to a TUI surface (/usage stats, /config theme, /config keybindings, /config import, /export copy, /effort fast) open the same overlay as their former top-level names. Groundwork for the Phase 3 folds (#73) and a fix for the Phase 2 /rewind argument routing (#71). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- /usage stats shows session statistics (TUI: opens the stats dialog) - /agent absorbs /agents management subcommands and /managed-agents via /agent managed; both old names stay hidden one-release aliases - NamedCommandAdapter gains slash_hidden for adapter-backed aliases - /upgrade leaves autocomplete (it was a duplicate listing of /update; the alias keeps working) Part of #73. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
/session absorbs /fork, /branch, /tag, and /add-dir as subcommands; /export absorbs /copy and /share. The five old names plus /copy stay registered as hidden one-release compatibility aliases and leave autocomplete. Part of #73. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
/login absorbs /switch and /refresh; /thinking absorbs /think-back (including think-back play); /effort absorbs /fast. The four old names stay hidden one-release compatibility aliases. In the TUI, /effort fast keeps the same toggle behavior the bare /fast intercept had. Part of #73. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
/config absorbs /keybindings, /theme, /output-style, /import-config (as /config import), and /advisor; /review absorbs /pr-comments (as /review comments); /status absorbs /doctor; /reload-plugins leaves autocomplete in favor of the existing /plugin reload. All old names stay hidden one-release compatibility aliases. Part of #73. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
/coven goal absorbs the standalone /goal command (hidden one-release alias), putting durable autonomous goals under the Coven surface. The Phase 2 hidden aliases (/color, /vim, /voice, /statusline, /terminal-setup, /cost, /context, /undo, /revert) shipped their one-release grace period in v0.0.25 and are now unregistered; their functionality lives on under /config, /usage, and /rewind. Part of #73. Co-developed with a concurrent session on this checkout. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One canonical section per surviving command, subcommand docs under each parent, duplicate stubs removed, and a Deprecated Aliases table covering all 22 old -> new mappings. Palette/demo data and index.md updated to the new forms. Part of #73. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR implements Phase 3 of the slash-command consolidation plan (issue #73), reducing the visible slash-command surface area (64 → 41) by folding multiple top-level commands into subcommands while keeping legacy names as hidden, one-release compatibility aliases. It also updates the TUI intercept layer to be argument-aware so subcommand forms (e.g. /rewind list, /review security) reach the commands layer instead of being swallowed by overlays, and refreshes docs/demo data to reflect the new canonical command shapes.
Changes:
- Consolidate many standalone slash commands into subcommands (
/session …,/export …,/login …,/config …,/agent …,/status doctor,/thinking back,/usage stats) and mark legacy names as hidden aliases. - Make the TUI slash-command intercept argument-aware, including explicit mappings so folded subcommands can still open legacy TUI overlays where appropriate.
- Restructure the slash-command reference docs and update docs palette/demo datasets.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src-rust/crates/tui/src/lib.rs | Updates a TUI test expectation for the new canonical /agent surface. |
| src-rust/crates/tui/src/app.rs | Updates visible command list and makes slash-command interception argument-aware; adds intercept tests. |
| src-rust/crates/commands/src/lib.rs | Adds hidden-flag support for adapters, folds multiple commands into subcommands, updates help text, and extends routing/tests accordingly. |
| docs/src/palette-data.js | Updates palette command entries to match consolidated command shapes. |
| docs/src/demos.js | Updates demo command entries to match consolidated command shapes. |
| docs/index.md | Updates top-level documentation snippets to reference new canonical slash forms. |
| docs/commands.md | Rewrites the command reference around canonical surviving commands and adds a deprecated-alias table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if cmd == "agents" && args_trimmed == "reset" { | ||
| self.open_agents_menu(); | ||
| self.agents_menu.route = AgentsRoute::ResetConfirm; | ||
| return true; | ||
| } |
| let trimmed = args.trim(); | ||
| if let Some(rest) = trimmed.strip_prefix("doctor") { | ||
| return DoctorCommand.execute(rest.trim(), ctx).await; | ||
| } |
| let trimmed = args.trim(); | ||
| if let Some(rest) = trimmed.strip_prefix("back") { | ||
| return ThinkBackCommand.execute(rest.trim(), ctx).await; | ||
| } |
| let trimmed = args.trim(); | ||
| if let Some(rest) = trimmed.strip_prefix("fast") { | ||
| return FastCommand.execute(rest.trim(), ctx).await; | ||
| } |
| "Usage: /export [copy [n]|share] [--format markdown|json] [--output <file>]\n\n\ | ||
| Export the current conversation.\n\n\ | ||
| Subcommands:\n\ | ||
| copy [n] Copy the (n-th most recent) assistant response\n\ | ||
| to the clipboard (absorbs the former /copy)\n\ | ||
| share Upload the session as a secret gist and return\n\ | ||
| a shareable URL (absorbs the former /share)\n\n\ |
| | Level | Description | | ||
| |-------|-------------| | ||
| | `low` | Minimal thinking; fastest responses | | ||
| | `medium` | Balanced thinking and speed | | ||
| | `high` | Deep reasoning; slower responses | | ||
| | `max` | Maximum token budget for thinking | | ||
|
|
||
| ``` | ||
| /effort low | ||
| /effort medium | ||
| /effort high | ||
| /effort max | ||
| ``` |
| When running with `--remote`, only a restricted set of commands is available: | ||
|
|
||
| `session`, `exit`, `clear`, `help`, `theme`, `config`, `usage`, `plan`, `keybindings` |
| ['/agent', 'Agents & Tasks', 'Switch active agent for this session'], | ||
| ['/tasks', 'Agents & Tasks', 'Show the live task list'], | ||
| ['/goal', 'Agents & Tasks', 'Set an autonomous multi-turn goal'], | ||
| ['/managed-agents', 'Agents & Tasks', 'Configure manager-executor agents'], | ||
| ['/agent managed', 'Agents & Tasks', 'Configure manager-executor agents'], |
| { id: '/agent list', category: 'Agents & Tasks', desc: 'List built-in, custom, and familiar agents' }, | ||
| { id: '/agent', category: 'Agents & Tasks', desc: 'Switch active agent for this session' }, | ||
| { id: '/tasks', category: 'Agents & Tasks', desc: 'Show the live task list' }, | ||
| { id: '/goal', category: 'Agents & Tasks', desc: 'Set an autonomous multi-turn goal' }, | ||
| { id: '/managed-agents', category: 'Agents & Tasks', desc: 'Configure manager-executor agents' }, | ||
| { id: '/agent managed', category: 'Agents & Tasks', desc: 'Configure manager-executor agents' }, |
Summary
Implements the full disposition matrix from #73, taking the visible slash surface from 64 to 41 commands (target was ~40). Every fold keeps the old name as a hidden one-release compatibility alias.
TUI intercept layer made args-aware (prerequisite + bug fix): the intercept layer matched bare command names regardless of arguments, so
/rewind list(#71),/session rename, and/review securitywere silently swallowed by overlays. Argument forms now reach the commands crate, and folded subcommands that map to a TUI surface (/usage stats,/config theme,/config keybindings,/config import,/export copy,/effort fast) open the same overlay their old top-level names did.Folds (old → new):
/fork,/branch,/tag,/add-dir→/session …/copy,/share→/export …/switch,/refresh→/login …/think-back→/thinking back;/fast→/effort fast/keybindings,/theme,/output-style,/import-config,/advisor→/config …/agents,/managed-agents→/agent …/pr-comments→/review comments;/doctor→/status doctor/stats→/usage stats;/goal→/coven goal/reload-plugins→/plugin reload(subcommand already existed);/upgradededuped (was always an/updatealias)Decisions on the issue's "evaluate" items:
/doctor,/add-dir,/advisorfolded as proposed;/goalfolded into/coven goal(fits the Coven surface for durable autonomous work).Phase 2 housekeeping: the nine Phase 2 hidden aliases (
/color,/vim,/voice,/statusline,/terminal-setup,/cost,/context,/undo,/revert) shipped their one-release grace period in v0.0.25 and are now unregistered.Docs: command reference restructured — one canonical section per surviving command, duplicate stubs removed, a 22-row Deprecated Aliases table added; palette/demo data and index.md updated.
Named CLI commands (
coven-code agents|branch|tag|add-dir|pr-comments|…) are unchanged.Verification
cargo test -p claurst-commands— 84 passed (incl. per-cluster routing tests and hidden-alias coverage)cargo test -p claurst-tui— 636 passed (incl. new intercept fall-through tests)cargo test -p claurst-core— 472 passed;cargo check -p claurstclean; scopedcargo fmt --checkcleanCloses #73
🤖 Generated with Claude Code