From 1a98cb1ede4282e093dfbd97876e31b067eeec0e Mon Sep 17 00:00:00 2001 From: Val Alexander <68980965+BunsDev@users.noreply.github.com> Date: Wed, 10 Jun 2026 23:32:20 -0500 Subject: [PATCH 1/7] fix(tui): let argument forms reach the command layer 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 --- src-rust/crates/tui/src/app.rs | 82 ++++++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 3 deletions(-) diff --git a/src-rust/crates/tui/src/app.rs b/src-rust/crates/tui/src/app.rs index 33904749..6faeac3b 100644 --- a/src-rust/crates/tui/src/app.rs +++ b/src-rust/crates/tui/src/app.rs @@ -2450,17 +2450,64 @@ impl App { /// Handle slash commands that should open UI screens rather than execute /// as normal commands. Returns `true` if the command was intercepted. pub fn intercept_slash_command_with_args(&mut self, cmd: &str, args: &str) -> bool { - if !args.trim().is_empty() && matches!(cmd, "config" | "settings" | "usage") { + let args_trimmed = args.trim(); + // Folded subcommands (issue #73) open the same TUI surfaces as their + // former top-level names, so e.g. `/config theme` still gets the + // picker and `/usage stats` still gets the stats dialog. + let (sub, sub_rest) = match args_trimmed.split_once(char::is_whitespace) { + Some((s, r)) => (s, r.trim()), + None => (args_trimmed, ""), + }; + match (cmd, sub, sub_rest) { + ("usage", "stats", _) => return self.intercept_slash_command("stats"), + ("config" | "settings", "theme", "") => { + return self.intercept_slash_command("theme") + } + ("config" | "settings", "keybindings", _) => { + return self.intercept_slash_command("keybindings") + } + ("config" | "settings", "import" | "import-config", _) => { + return self.intercept_slash_command("import-config") + } + ("export", "copy", "") => return self.intercept_slash_command("copy"), + ("effort", "fast", _) => return self.intercept_slash_command("fast"), + _ => {} + } + if !args_trimmed.is_empty() && matches!(cmd, "config" | "settings" | "usage") { return false; } - if cmd == "mcp" && !args.trim().is_empty() { + if cmd == "mcp" && !args_trimmed.is_empty() { return false; } - if cmd == "agents" && args.trim() == "reset" { + if cmd == "agents" && args_trimmed == "reset" { self.open_agents_menu(); self.agents_menu.route = AgentsRoute::ResetConfirm; return true; } + // Commands whose argument forms are handled by the commands crate + // (subcommand folds from issues #59/#73): only the bare form keeps + // its TUI overlay/intercept behavior. + if !args_trimmed.is_empty() + && matches!( + cmd, + "rewind" + | "session" + | "remote" + | "export" + | "review" + | "agent" + | "agents" + | "status" + | "thinking" + | "think" + | "plugin" + | "plugins" + | "effort" + | "login" + ) + { + return false; + } if cmd == "handoff" { let familiar = args.trim().to_string(); if familiar.is_empty() { @@ -7663,6 +7710,35 @@ role = "Research" assert!(!app.mcp_view.visible); } + #[test] + fn argument_forms_reach_command_layer() { + let mut app = make_app(); + // Folded subcommand forms must not be swallowed by the bare-name + // TUI intercepts (issues #59/#73). + assert!(!app.intercept_slash_command_with_args("rewind", "list")); + assert!(!app.rewind_flow.visible); + assert!(!app.intercept_slash_command_with_args("session", "rename my-title")); + assert!(!app.session_browser.visible); + assert!(!app.intercept_slash_command_with_args("export", "copy 2")); + assert!(!app.export_dialog.visible); + assert!(!app.intercept_slash_command_with_args("review", "security")); + assert!(!app.intercept_slash_command_with_args("status", "doctor")); + assert!(!app.intercept_slash_command_with_args("thinking", "back")); + // Bare forms keep their overlays. + assert!(app.intercept_slash_command_with_args("rewind", "")); + assert!(app.rewind_flow.visible); + } + + #[test] + fn folded_subcommands_open_legacy_tui_surfaces() { + let mut app = make_app(); + assert!(app.intercept_slash_command_with_args("usage", "stats")); + assert!(app.stats_dialog.visible); + app.stats_dialog.close(); + assert!(app.intercept_slash_command_with_args("config", "theme")); + assert!(app.theme_screen.visible); + } + #[test] fn test_clear_slash_command_clears_messages() { let mut app = make_app(); From 8bc9d233c535bbc69cffc3ccd9955a265d1dd01f Mon Sep 17 00:00:00 2001 From: Val Alexander <68980965+BunsDev@users.noreply.github.com> Date: Wed, 10 Jun 2026 23:36:04 -0500 Subject: [PATCH 2/7] feat(commands): fold stats, agents, managed-agents; dedupe upgrade - /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 --- src-rust/crates/commands/src/lib.rs | 102 ++++++++++++++++++++++++++-- src-rust/crates/tui/src/app.rs | 19 ++---- src-rust/crates/tui/src/lib.rs | 2 +- 3 files changed, 101 insertions(+), 22 deletions(-) diff --git a/src-rust/crates/commands/src/lib.rs b/src-rust/crates/commands/src/lib.rs index 76773ec6..389fc018 100644 --- a/src-rust/crates/commands/src/lib.rs +++ b/src-rust/crates/commands/src/lib.rs @@ -287,6 +287,8 @@ pub struct NamedCommandAdapter { pub slash_aliases: &'static [&'static str], pub slash_description: &'static str, pub slash_help: &'static str, + /// One-release compatibility aliases for folded commands (issue #73). + pub slash_hidden: bool, } #[derive(serde::Serialize)] @@ -1984,10 +1986,13 @@ impl SlashCommand for UsageCommand { "Show API usage, quotas, and rate limit status" } fn help(&self) -> &str { - "Usage: /usage [cost|context]\n\n\ + "Usage: /usage [cost|context|stats]\n\n\ Shows current session API usage and account quota information.\n\ - Use /usage cost for the session cost breakdown or /usage context for context-window details.\n\ - The legacy /cost and /context commands remain hidden compatibility aliases." + Use /usage cost for the session cost breakdown, /usage context for\n\ + context-window details, or /usage stats for the detailed statistics\n\ + view (opens the stats dialog in the TUI).\n\ + The legacy /cost, /context, and /stats commands remain hidden\n\ + compatibility aliases." } async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { @@ -1998,9 +2003,10 @@ impl SlashCommand for UsageCommand { "" | "summary" | "quota" | "status" => {} "cost" | "costs" => return CostCommand.execute(rest, ctx).await, "context" | "window" => return ContextCommand.execute(rest, ctx).await, + "stats" => return StatsCommand.execute(rest, ctx).await, other => { return CommandResult::Error(format!( - "Unknown usage view '{}'. Use: /usage [cost|context]", + "Unknown usage view '{}'. Use: /usage [cost|context|stats]", other )) } @@ -7447,6 +7453,10 @@ impl SlashCommand for NamedCommandAdapter { self.slash_help } + fn hidden(&self) -> bool { + self.slash_hidden + } + async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { execute_named_command_from_slash(self.target_name, args, ctx) } @@ -7868,12 +7878,34 @@ impl SlashCommand for AgentCommand { "List available agents or get info about a specific agent" } fn help(&self) -> &str { - "Usage: /agent [name]\n\nWithout arguments, lists all available named agents.\nWith a name, shows details for that agent.\n\nTo use an agent, start Coven Code with: --agent " + "Usage: /agent [name] | /agent [list|create|edit|delete|reset] [name] | /agent managed ...\n\n\ + Without arguments, lists all available named agents.\n\ + With a name, shows details for that agent.\n\n\ + Management subcommands (absorbing the former /agents):\n\ + /agent list|create|edit|delete|reset [name]\n\ + Managed-agent architecture (absorbing the former /managed-agents):\n\ + /agent managed ...\n\n\ + To use an agent, start Coven Code with: --agent " } async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { use std::collections::HashMap; + // Subcommands absorbed from the former /agents and /managed-agents + // commands (issue #73); both stay as hidden one-release aliases. + let trimmed = args.trim(); + let (head, rest) = match trimmed.split_once(char::is_whitespace) { + Some((h, r)) => (h, r.trim()), + None => (trimmed, ""), + }; + match head { + "list" | "create" | "edit" | "delete" | "reset" => { + return execute_named_command_from_slash("agents", trimmed, ctx); + } + "managed" => return ManagedAgentsCommand.execute(rest, ctx).await, + _ => {} + } + // Merge built-in defaults with user-defined agents (user wins on collision). let mut all_agents: HashMap = claurst_core::default_agents(); @@ -8116,6 +8148,9 @@ impl SlashCommand for ManagedAgentsCommand { fn name(&self) -> &str { "managed-agents" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Configure and manage the manager-executor agent architecture" } @@ -9258,13 +9293,15 @@ static COMMANDS: Lazy>> = Lazy::new(|| { slash_aliases: &[], slash_description: "Add a directory to Coven Code's allowed workspace paths", slash_help: "Usage: /add-dir ", + slash_hidden: false, }), Box::new(NamedCommandAdapter { slash_name: "agents", target_name: "agents", slash_aliases: &[], slash_description: "Manage and configure sub-agents", - slash_help: "Usage: /agents [list|create|edit|delete|reset] [name]", + slash_help: "Usage: /agents [list|create|edit|delete|reset] [name]\nDeprecated: use /agent [list|create|edit|delete|reset|managed]", + slash_hidden: true, }), Box::new(NamedCommandAdapter { slash_name: "branch", @@ -9272,6 +9309,7 @@ static COMMANDS: Lazy>> = Lazy::new(|| { slash_aliases: &[], slash_description: "Create a branch of the current conversation at this point", slash_help: "Usage: /branch [create|switch|list] [name]", + slash_hidden: false, }), Box::new(NamedCommandAdapter { slash_name: "tag", @@ -9279,6 +9317,7 @@ static COMMANDS: Lazy>> = Lazy::new(|| { slash_aliases: &[], slash_description: "Toggle a searchable tag on the current session", slash_help: "Usage: /tag [list|add|remove] [tag]", + slash_hidden: false, }), Box::new(NamedCommandAdapter { slash_name: "pr-comments", @@ -9286,6 +9325,7 @@ static COMMANDS: Lazy>> = Lazy::new(|| { slash_aliases: &[], slash_description: "Get comments from a GitHub pull request", slash_help: "Usage: /pr-comments ", + slash_hidden: false, }), // Batch-1 new commands Box::new(ContextCommand), @@ -9696,6 +9736,54 @@ mod tests { } } + #[test] + fn phase_three_legacy_commands_are_hidden_but_callable() { + let hidden_legacy = ["agents", "managed-agents"]; + + for name in hidden_legacy { + let command = find_command(name).unwrap_or_else(|| panic!("{name} should resolve")); + assert!( + command.hidden(), + "{name} should stay callable as a hidden one-release compatibility alias" + ); + } + } + + #[tokio::test] + async fn usage_stats_subcommand_routes_to_stats() { + let _guard = CommandEnvGuard::with_coven_home(None); + let mut ctx = make_ctx(); + let command = find_command("usage").unwrap(); + let result = command.execute("stats", &mut ctx).await; + match result { + CommandResult::Message(message) => { + assert!(message.contains("Session Statistics") || message.contains("oken")) + } + other => panic!("expected stats message, got {:?}", other), + } + } + + #[tokio::test] + async fn agent_command_absorbs_agents_and_managed() { + let _guard = CommandEnvGuard::with_coven_home(None); + let mut ctx = make_ctx(); + let command = find_command("agent").unwrap(); + + // /agent list routes to the named agents command. + let result = command.execute("list", &mut ctx).await; + assert!( + matches!(result, CommandResult::Message(_)), + "/agent list should route to the named agents command" + ); + + // /agent managed routes to the managed-agents surface. + let result = command.execute("managed", &mut ctx).await; + assert!( + !matches!(result, CommandResult::Error(_)), + "/agent managed should route to the managed-agents surface" + ); + } + #[tokio::test] async fn config_command_owns_folded_ui_settings() { let _guard = CommandEnvGuard::with_coven_home(None); @@ -10248,7 +10336,7 @@ mod tests { // - stats: intercepted directly by the TUI to open the live stats // dialog; the named CLI `stats` command handles aggregate saved // session reports outside the TUI. - const ALLOWED_ALIAS_NAMES: &[&str] = &["quit", "settings", "survey", "handoff", "stats"]; + const ALLOWED_ALIAS_NAMES: &[&str] = &["quit", "settings", "survey", "handoff"]; let prompt_names: HashSet<&str> = claurst_tui::app::PROMPT_SLASH_COMMANDS .iter() diff --git a/src-rust/crates/tui/src/app.rs b/src-rust/crates/tui/src/app.rs index 6faeac3b..dbb467f6 100644 --- a/src-rust/crates/tui/src/app.rs +++ b/src-rust/crates/tui/src/app.rs @@ -57,8 +57,10 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ "Add an extra workspace root to the active session", ), ("advisor", "Set or unset the server-side advisor model"), - ("agent", "List available familiars or show familiar details"), - ("agents", "Browse familiar definitions and active familiars"), + ( + "agent", + "List, inspect, and manage familiars and managed agents", + ), ("branch", "Create or switch session branches"), ("chrome", "Browser automation via Chrome DevTools Protocol"), ("clear", "Clear the conversation transcript"), @@ -105,10 +107,6 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ("keybindings", "Show keybinding configuration"), ("login", "Log in to Coven Code"), ("logout", "Log out of Coven Code"), - ( - "managed-agents", - "Configure manager-executor managed agent system", - ), ("mcp", "Browse configured MCP servers"), ("memory", "Browse and open AGENTS.md memory files"), ("model", "Change the AI model"), @@ -143,7 +141,6 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ), ("skills", "List and manage skills"), ("status", "Show the current session status"), - ("stats", "Open the interactive session statistics dialog"), ("survey", "Open session feedback survey"), ("switch", "Switch the active account for a provider"), ("tag", "Tag the current session with a label"), @@ -158,10 +155,6 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ "update", "Check for updates and upgrade to the latest version", ), - ( - "upgrade", - "Check for updates and upgrade to the latest version", - ), ("usage", "Detailed per-call token usage breakdown"), ("version", "Display the current Coven Code version"), ( @@ -2460,9 +2453,7 @@ impl App { }; match (cmd, sub, sub_rest) { ("usage", "stats", _) => return self.intercept_slash_command("stats"), - ("config" | "settings", "theme", "") => { - return self.intercept_slash_command("theme") - } + ("config" | "settings", "theme", "") => return self.intercept_slash_command("theme"), ("config" | "settings", "keybindings", _) => { return self.intercept_slash_command("keybindings") } diff --git a/src-rust/crates/tui/src/lib.rs b/src-rust/crates/tui/src/lib.rs index a97f5edb..8be0172c 100644 --- a/src-rust/crates/tui/src/lib.rs +++ b/src-rust/crates/tui/src/lib.rs @@ -947,7 +947,7 @@ mod tests { .collect::>() .join(""); - assert!(rendered.contains("/agents")); + assert!(rendered.contains("/agent")); assert!(rendered.contains("[cmd]")); } From 9ed50ea6d0eb490ca71e65518b1b3ef1de6a0b7c Mon Sep 17 00:00:00 2001 From: Val Alexander <68980965+BunsDev@users.noreply.github.com> Date: Wed, 10 Jun 2026 23:40:22 -0500 Subject: [PATCH 3/7] feat(commands): fold sessions and export clusters /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 --- src-rust/crates/commands/src/lib.rs | 102 ++++++++++++++++++++++++++-- src-rust/crates/tui/src/app.rs | 16 +---- 2 files changed, 98 insertions(+), 20 deletions(-) diff --git a/src-rust/crates/commands/src/lib.rs b/src-rust/crates/commands/src/lib.rs index 389fc018..545fb9a7 100644 --- a/src-rust/crates/commands/src/lib.rs +++ b/src-rust/crates/commands/src/lib.rs @@ -4446,6 +4446,19 @@ impl SlashCommand for SessionCommand { fn description(&self) -> &str { "Show or manage conversation sessions" } + fn help(&self) -> &str { + "Usage: /session [list|rename |fork [name]|branch ...|tag ...|add-dir ]\n\n\ + Without arguments, shows the current session (or the active remote URL).\n\n\ + Subcommands:\n\ + /session list — list saved sessions\n\ + /session rename — rename the current session\n\ + /session fork [name] — fork the session into a new branch\n\ + /session branch ... — create/switch/list conversation branches\n\ + /session tag ... — toggle searchable session tags\n\ + /session add-dir — add a workspace root to the session\n\n\ + The legacy /fork, /branch, /tag, and /add-dir commands remain hidden\n\ + one-release compatibility aliases." + } async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { let trimmed = args.trim(); @@ -4453,6 +4466,19 @@ impl SlashCommand for SessionCommand { if let Some(rest) = trimmed.strip_prefix("rename") { return RenameCommand.execute(rest.trim(), ctx).await; } + // Subcommands absorbed from the former /fork, /branch, /tag, and + // /add-dir commands (issue #73). + let (head, rest) = match trimmed.split_once(char::is_whitespace) { + Some((h, r)) => (h, r.trim()), + None => (trimmed, ""), + }; + match head { + "fork" => return ForkCommand.execute(rest, ctx).await, + "branch" => return execute_named_command_from_slash("branch", rest, ctx), + "tag" => return execute_named_command_from_slash("tag", rest, ctx), + "add-dir" => return execute_named_command_from_slash("add-dir", rest, ctx), + _ => {} + } match trimmed { "list" => { let sessions = claurst_core::history::list_sessions().await; @@ -4551,6 +4577,9 @@ impl SlashCommand for ForkCommand { fn name(&self) -> &str { "fork" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Fork the current session into a new branch" } @@ -4793,15 +4822,21 @@ impl SlashCommand for ExportCommand { "Export conversation to markdown or JSON" } fn help(&self) -> &str { - "Usage: /export [--format markdown|json] [--output ]\n\n\ + "Usage: /export [copy [n]|share] [--format markdown|json] [--output ]\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\ Flags:\n\ --format markdown Render as readable Markdown (default for .md files)\n\ --format json Full structured JSON export (default)\n\ --output Write to file; if omitted, prints to the terminal\n\n\ Examples:\n\ /export\n\ - /export --format markdown\n\ + /export copy\n\ + /export share\n\ /export --format json --output chat.json\n\ /export --output conversation.md" } @@ -4809,6 +4844,17 @@ impl SlashCommand for ExportCommand { async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { // ── Parse flags ──────────────────────────────────────────────────── let args = args.trim(); + // Subcommands absorbed from the former /copy and /share commands + // (issue #73); both stay as hidden one-release aliases. + let (head, rest) = match args.split_once(char::is_whitespace) { + Some((h, r)) => (h, r.trim()), + None => (args, ""), + }; + match head { + "copy" => return CopyCommand.execute(rest, ctx).await, + "share" => return ShareCommand.execute(rest, ctx).await, + _ => {} + } let mut format: Option<&str> = None; // "markdown" | "json" let mut output_path: Option = None; @@ -4935,6 +4981,9 @@ impl SlashCommand for ShareCommand { fn name(&self) -> &str { "share" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Upload the current session as a secret GitHub gist and return a shareable URL" } @@ -5644,6 +5693,9 @@ impl SlashCommand for CopyCommand { fn name(&self) -> &str { "copy" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Copy the last assistant response to the clipboard" } @@ -9293,7 +9345,7 @@ static COMMANDS: Lazy>> = Lazy::new(|| { slash_aliases: &[], slash_description: "Add a directory to Coven Code's allowed workspace paths", slash_help: "Usage: /add-dir ", - slash_hidden: false, + slash_hidden: true, }), Box::new(NamedCommandAdapter { slash_name: "agents", @@ -9309,7 +9361,7 @@ static COMMANDS: Lazy>> = Lazy::new(|| { slash_aliases: &[], slash_description: "Create a branch of the current conversation at this point", slash_help: "Usage: /branch [create|switch|list] [name]", - slash_hidden: false, + slash_hidden: true, }), Box::new(NamedCommandAdapter { slash_name: "tag", @@ -9317,7 +9369,7 @@ static COMMANDS: Lazy>> = Lazy::new(|| { slash_aliases: &[], slash_description: "Toggle a searchable tag on the current session", slash_help: "Usage: /tag [list|add|remove] [tag]", - slash_hidden: false, + slash_hidden: true, }), Box::new(NamedCommandAdapter { slash_name: "pr-comments", @@ -9738,7 +9790,16 @@ mod tests { #[test] fn phase_three_legacy_commands_are_hidden_but_callable() { - let hidden_legacy = ["agents", "managed-agents"]; + let hidden_legacy = [ + "agents", + "managed-agents", + "fork", + "branch", + "tag", + "add-dir", + "copy", + "share", + ]; for name in hidden_legacy { let command = find_command(name).unwrap_or_else(|| panic!("{name} should resolve")); @@ -9763,6 +9824,35 @@ mod tests { } } + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn session_and_export_absorb_their_clusters() { + let _guard = CommandEnvGuard::with_coven_home(None); + let mut ctx = make_ctx(); + + // /session list still works and fork/branch/tag/add-dir route to + // their absorbed implementations (never an unknown-subcommand error). + let session = find_command("session").unwrap(); + for sub in ["tag list", "branch list", "add-dir"] { + let result = session.execute(sub, &mut ctx).await; + if let CommandResult::Error(message) = &result { + assert!( + !message.contains("Unknown subcommand"), + "/session {sub} should route to the absorbed command, got: {message}" + ); + } + } + + // /export copy routes to the clipboard copy path. + let export = find_command("export").unwrap(); + let result = export.execute("copy", &mut ctx).await; + match result { + CommandResult::Message(message) => { + assert!(message.contains("No assistant messages")) + } + other => panic!("expected copy-path message, got {:?}", other), + } + } + #[tokio::test] async fn agent_command_absorbs_agents_and_managed() { let _guard = CommandEnvGuard::with_coven_home(None); diff --git a/src-rust/crates/tui/src/app.rs b/src-rust/crates/tui/src/app.rs index dbb467f6..26285bcb 100644 --- a/src-rust/crates/tui/src/app.rs +++ b/src-rust/crates/tui/src/app.rs @@ -52,16 +52,11 @@ use tracing::debug; /// `prompt_slash_commands_covers_registry` test in `claurst-commands` /// enforces that. pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ - ( - "add-dir", - "Add an extra workspace root to the active session", - ), ("advisor", "Set or unset the server-side advisor model"), ( "agent", "List, inspect, and manage familiars and managed agents", ), - ("branch", "Create or switch session branches"), ("chrome", "Browser automation via Chrome DevTools Protocol"), ("clear", "Clear the conversation transcript"), ( @@ -71,7 +66,6 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ("compact", "Compact the conversation context"), ("config", "Open settings"), ("connect", "Connect an AI provider"), - ("copy", "Copy the last assistant response to clipboard"), ( "coven", "Drive the local Coven daemon (sessions, harness runs, rituals)", @@ -80,14 +74,13 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ("doctor", "Run diagnostics"), ("effort", "Set effort level (low/medium/high/max)"), ("exit", "Quit Coven Code"), - ("export", "Export conversation"), + ("export", "Export, copy, or share the conversation"), ( "familiar", "Set your active familiar — changes the TUI mascot live", ), ("fast", "Toggle fast mode"), ("feedback", "Open session feedback survey"), - ("fork", "Fork session into a new branch"), ("goal", "Set or view the current session goal"), ( "handoff", @@ -133,17 +126,12 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ), ("sandbox", "Toggle sandboxed shell execution"), ("search", "Search the codebase by natural language or regex"), - ("session", "Browse and manage sessions"), + ("session", "Browse, rename, fork, branch, and tag sessions"), ("settings", "Open settings"), - ( - "share", - "Upload the current session as a secret gist and get a shareable URL", - ), ("skills", "List and manage skills"), ("status", "Show the current session status"), ("survey", "Open session feedback survey"), ("switch", "Switch the active account for a provider"), - ("tag", "Tag the current session with a label"), ("tasks", "Manage tracked background tasks"), ("theme", "Open the theme picker"), ( From 3fc3d5dd5d2f46e2b722ef292c2d997e5e663cd5 Mon Sep 17 00:00:00 2001 From: Val Alexander <68980965+BunsDev@users.noreply.github.com> Date: Wed, 10 Jun 2026 23:41:59 -0500 Subject: [PATCH 4/7] feat(commands): fold auth and modes clusters /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 --- src-rust/crates/commands/src/lib.rs | 92 +++++++++++++++++++++++++++-- src-rust/crates/tui/src/app.rs | 15 +++-- 2 files changed, 94 insertions(+), 13 deletions(-) diff --git a/src-rust/crates/commands/src/lib.rs b/src-rust/crates/commands/src/lib.rs index 545fb9a7..4140f3cf 100644 --- a/src-rust/crates/commands/src/lib.rs +++ b/src-rust/crates/commands/src/lib.rs @@ -2779,10 +2779,25 @@ impl SlashCommand for LoginCommand { client ID via COVEN_CODE_ANTHROPIC_OAUTH_CLIENT_ID; use\n\ ANTHROPIC_API_KEY until that client is configured. Pass `--codex` to\n\ add a ChatGPT/Codex account. `--label work` names the saved profile so\n\ - you can `switch` to it later by that name." + you can switch to it later by that name.\n\n\ + Subcommands (absorbing the former /switch and /refresh):\n\ + /login switch [name] — switch the active account for a provider\n\ + /login refresh — clear saved provider auth and model caches" } - async fn execute(&self, args: &str, _ctx: &mut CommandContext) -> CommandResult { + async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { + // Subcommands absorbed from the former /switch and /refresh commands + // (issue #73); both stay as hidden one-release aliases. + let trimmed = args.trim(); + let (head, rest) = match trimmed.split_once(char::is_whitespace) { + Some((h, r)) => (h, r.trim()), + None => (trimmed, ""), + }; + match head { + "switch" => return SwitchCommand.execute(rest, ctx).await, + "refresh" => return RefreshCommand.execute(rest, ctx).await, + _ => {} + } let tokens: Vec<&str> = args.split_whitespace().collect(); let use_codex = tokens.contains(&"--codex"); let login_with_claude_ai = !tokens.contains(&"--console"); @@ -2957,6 +2972,9 @@ impl SlashCommand for SwitchCommand { fn name(&self) -> &str { "switch" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Switch the active account for a provider" } @@ -3006,6 +3024,9 @@ impl SlashCommand for RefreshCommand { fn name(&self) -> &str { "refresh" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Clear saved provider auth and model caches" } @@ -4636,7 +4657,20 @@ impl SlashCommand for ThinkingCommand { vec!["think"] } - async fn execute(&self, _args: &str, ctx: &mut CommandContext) -> CommandResult { + fn help(&self) -> &str { + "Usage: /thinking [back ...]\n\n\ + Shows extended-thinking availability for the active model.\n\ + /thinking back [play] shows extended-thinking traces from previous\n\ + responses (absorbing the former /think-back command)." + } + + async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { + // /thinking back absorbs the former standalone /think-back command + // (issue #73); the old name stays a hidden one-release alias. + let trimmed = args.trim(); + if let Some(rest) = trimmed.strip_prefix("back") { + return ThinkBackCommand.execute(rest.trim(), ctx).await; + } // Extended thinking is configured through the model; just inform the user let model = ctx.config.effective_model(); if model.contains("claude-3-5") || model.contains("claude-3.5") { @@ -5497,12 +5531,20 @@ impl SlashCommand for EffortCommand { "Set the model's thinking effort (low | normal | high)" } fn help(&self) -> &str { - "Usage: /effort [low|normal|high]\n\ + "Usage: /effort [low|normal|high|fast [on|off]]\n\ Sets how much computation the model uses for reasoning.\n\ - 'high' enables extended thinking with a larger budget." + 'high' enables extended thinking with a larger budget.\n\ + /effort fast toggles fast mode (smaller, quicker model),\n\ + absorbing the former /fast command." } async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { + // /effort fast absorbs the former standalone /fast command + // (issue #73); the old name stays a hidden one-release alias. + let trimmed = args.trim(); + if let Some(rest) = trimmed.strip_prefix("fast") { + return FastCommand.execute(rest.trim(), ctx).await; + } match args.trim() { "" => CommandResult::Message( "Current effort: normal\nUse /effort [low|normal|high] to change.".to_string(), @@ -6873,6 +6915,9 @@ impl SlashCommand for FastCommand { fn name(&self) -> &str { "fast" } + fn hidden(&self) -> bool { + true + } fn aliases(&self) -> Vec<&str> { vec!["speed"] } @@ -6946,6 +6991,9 @@ impl SlashCommand for ThinkBackCommand { fn name(&self) -> &str { "think-back" } + fn hidden(&self) -> bool { + true + } fn aliases(&self) -> Vec<&str> { vec!["thinkback"] } @@ -9799,6 +9847,10 @@ mod tests { "add-dir", "copy", "share", + "switch", + "refresh", + "think-back", + "fast", ]; for name in hidden_legacy { @@ -9853,6 +9905,36 @@ mod tests { } } + #[tokio::test] + async fn login_thinking_effort_absorb_their_clusters() { + let _guard = CommandEnvGuard::with_coven_home(None); + let mut ctx = make_ctx(); + + // /login refresh routes to the provider-reset path. + let login = find_command("login").unwrap(); + let result = login.execute("refresh", &mut ctx).await; + assert!( + matches!(result, CommandResult::RefreshProviderState), + "/login refresh should route to the refresh path" + ); + + // /thinking back routes to the think-back trace viewer. + let thinking = find_command("thinking").unwrap(); + let result = thinking.execute("back", &mut ctx).await; + assert!( + !matches!(result, CommandResult::Error(_)), + "/thinking back should route to the think-back path" + ); + + // /effort fast routes to the fast-mode toggle. + let effort = find_command("effort").unwrap(); + let result = effort.execute("fast on", &mut ctx).await; + assert!( + matches!(result, CommandResult::ConfigChangeMessage(_, _)), + "/effort fast should route to the fast-mode toggle" + ); + } + #[tokio::test] async fn agent_command_absorbs_agents_and_managed() { let _guard = CommandEnvGuard::with_coven_home(None); diff --git a/src-rust/crates/tui/src/app.rs b/src-rust/crates/tui/src/app.rs index 26285bcb..64136b3c 100644 --- a/src-rust/crates/tui/src/app.rs +++ b/src-rust/crates/tui/src/app.rs @@ -72,14 +72,16 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ), ("diff", "Inspect the current git diff"), ("doctor", "Run diagnostics"), - ("effort", "Set effort level (low/medium/high/max)"), + ( + "effort", + "Set effort level (low/normal/high) or toggle fast mode", + ), ("exit", "Quit Coven Code"), ("export", "Export, copy, or share the conversation"), ( "familiar", "Set your active familiar — changes the TUI mascot live", ), - ("fast", "Toggle fast mode"), ("feedback", "Open session feedback survey"), ("goal", "Set or view the current session goal"), ( @@ -98,7 +100,7 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ), ("init", "Initialize AGENTS.md for this project"), ("keybindings", "Show keybinding configuration"), - ("login", "Log in to Coven Code"), + ("login", "Log in, switch accounts, or refresh provider auth"), ("logout", "Log out of Coven Code"), ("mcp", "Browse configured MCP servers"), ("memory", "Browse and open AGENTS.md memory files"), @@ -113,7 +115,6 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ), ("providers", "List available AI providers and their status"), ("quit", "Exit Coven Code"), - ("refresh", "Clear saved provider auth and model caches"), ( "reload-plugins", "Reload the active session plugin registry", @@ -131,14 +132,12 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ("skills", "List and manage skills"), ("status", "Show the current session status"), ("survey", "Open session feedback survey"), - ("switch", "Switch the active account for a provider"), ("tasks", "Manage tracked background tasks"), ("theme", "Open the theme picker"), ( - "think-back", - "Show extended-thinking traces from previous responses", + "thinking", + "Configure extended thinking or view past thinking traces", ), - ("thinking", "Configure extended thinking for the session"), ( "update", "Check for updates and upgrade to the latest version", From ab963389069eea957dbc08b8543df6bef3f0ff66 Mon Sep 17 00:00:00 2001 From: Val Alexander <68980965+BunsDev@users.noreply.github.com> Date: Wed, 10 Jun 2026 23:45:59 -0500 Subject: [PATCH 5/7] feat(commands): fold config cluster, review/status/plugin strays /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 --- src-rust/crates/commands/src/lib.rs | 112 ++++++++++++++++++++++++++-- src-rust/crates/tui/src/app.rs | 36 +++++---- 2 files changed, 123 insertions(+), 25 deletions(-) diff --git a/src-rust/crates/commands/src/lib.rs b/src-rust/crates/commands/src/lib.rs index 4140f3cf..52b99752 100644 --- a/src-rust/crates/commands/src/lib.rs +++ b/src-rust/crates/commands/src/lib.rs @@ -826,7 +826,7 @@ impl SlashCommand for ConfigCommand { "Show or modify configuration settings" } fn help(&self) -> &str { - "Usage: /config [show|get|set|unset|color|vim|voice|statusline|terminal-setup] ...\n\n\ + "Usage: /config [show|get|set|unset|] ...\n\n\ Shows or modifies configuration settings.\n\n\ Core settings:\n\ /config\n\ @@ -835,12 +835,17 @@ impl SlashCommand for ConfigCommand { /config set model \n\ /config set permission-mode \n\ /config unset \n\n\ - UI settings:\n\ + Areas:\n\ /config color []\n\ /config vim [on|off]\n\ /config voice [on|off|status]\n\ /config statusline [show|hide] [cost|tokens|model|time|all]\n\ - /config terminal-setup" + /config terminal-setup\n\ + /config theme [name] — theme picker / set theme\n\ + /config keybindings — open keybindings.json\n\ + /config output-style [s] — show or set the output style\n\ + /config import — import settings from ~/.claude\n\ + /config advisor [model] — set the advisor model" } async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { @@ -876,6 +881,23 @@ impl SlashCommand for ConfigCommand { } return TerminalSetupCommand.execute("", ctx).await; } + // Folded in Phase 3 (issue #73); the old top-level names stay + // hidden one-release aliases. + "keybindings" | "keybinding" => { + return KeybindingsCommand.execute(subcommand_args, ctx).await; + } + "theme" => { + return ThemeCommand.execute(subcommand_args, ctx).await; + } + "output-style" | "output_style" => { + return OutputStyleCommand.execute(subcommand_args, ctx).await; + } + "import" | "import-config" | "import_config" => { + return ImportConfigCommand.execute(subcommand_args, ctx).await; + } + "advisor" => { + return AdvisorCommand.execute(subcommand_args, ctx).await; + } _ => {} } @@ -1116,6 +1138,9 @@ impl SlashCommand for ThemeCommand { fn name(&self) -> &str { "theme" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Show or change the current theme" } @@ -1157,6 +1182,9 @@ impl SlashCommand for OutputStyleCommand { fn name(&self) -> &str { "output-style" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Show or switch the current output style" } @@ -1219,6 +1247,9 @@ impl SlashCommand for KeybindingsCommand { fn name(&self) -> &str { "keybindings" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Create or open ~/.coven-code/keybindings.json" } @@ -1352,8 +1383,20 @@ impl SlashCommand for StatusCommand { fn description(&self) -> &str { "Show comprehensive system and session status" } + fn help(&self) -> &str { + "Usage: /status [doctor]\n\n\ + Shows authentication, MCP, hook, and session status.\n\ + /status doctor runs the full diagnostic suite (absorbing the\n\ + former /doctor command)." + } - async fn execute(&self, _args: &str, ctx: &mut CommandContext) -> CommandResult { + async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { + // /status doctor absorbs the former standalone /doctor command + // (issue #73); the old name stays a hidden one-release alias. + let trimmed = args.trim(); + if let Some(rest) = trimmed.strip_prefix("doctor") { + return DoctorCommand.execute(rest.trim(), ctx).await; + } // Auth status let auth_status = match claurst_core::oauth::OAuthTokens::load().await { Some(tokens) => { @@ -2230,6 +2273,9 @@ impl SlashCommand for ReloadPluginsCommand { fn name(&self) -> &str { "reload-plugins" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Reload all plugins without restarting" } @@ -2343,6 +2389,9 @@ impl SlashCommand for DoctorCommand { fn name(&self) -> &str { "doctor" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Check system health and diagnose issues" } @@ -3154,7 +3203,8 @@ impl SlashCommand for ReviewCommand { review as a comment to the associated GitHub PR.\n\n\ Variants:\n\ /review security — security-focused review (vulnerabilities, secrets, injection)\n\ - /review ultra — exhaustive multi-dimensional review\n\n\ + /review ultra — exhaustive multi-dimensional review\n\ + /review comments — read comments on the active GitHub PR\n\n\ GitHub posting requires:\n\ GITHUB_TOKEN — a personal access token with repo scope\n\ CLAUDE_PR_NUMBER — the PR number (auto-detected from `git remote` if absent)\n\n\ @@ -3175,6 +3225,11 @@ impl SlashCommand for ReviewCommand { match head { "security" => return SecurityReviewCommand.execute(rest, ctx).await, "ultra" | "ultrareview" => return UltrareviewCommand.execute(rest, ctx).await, + // /review comments absorbs the former standalone /pr-comments + // command (issue #73); the old name stays a hidden alias. + "comments" | "pr-comments" => { + return execute_named_command_from_slash("pr-comments", rest, ctx) + } _ => {} } let base = trimmed; @@ -3487,6 +3542,9 @@ impl SlashCommand for ImportConfigCommand { fn name(&self) -> &str { "import-config" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Import CLAUDE.md and settings.json from ~/.claude" } @@ -6847,6 +6905,9 @@ impl SlashCommand for AdvisorCommand { fn name(&self) -> &str { "advisor" } + fn hidden(&self) -> bool { + true + } fn description(&self) -> &str { "Set or unset the server-side advisor model" } @@ -9425,7 +9486,7 @@ static COMMANDS: Lazy>> = Lazy::new(|| { slash_aliases: &[], slash_description: "Get comments from a GitHub pull request", slash_help: "Usage: /pr-comments ", - slash_hidden: false, + slash_hidden: true, }), // Batch-1 new commands Box::new(ContextCommand), @@ -9851,6 +9912,14 @@ mod tests { "refresh", "think-back", "fast", + "keybindings", + "theme", + "output-style", + "import-config", + "advisor", + "doctor", + "reload-plugins", + "pr-comments", ]; for name in hidden_legacy { @@ -9935,6 +10004,37 @@ mod tests { ); } + #[tokio::test] + async fn config_review_status_absorb_their_clusters() { + let _guard = CommandEnvGuard::with_coven_home(None); + let mut ctx = make_ctx(); + + // /config advisor routes to the advisor settings path. + let config = find_command("config").unwrap(); + let result = config.execute("advisor", &mut ctx).await; + match result { + CommandResult::Message(message) => assert!(message.contains("Advisor model")), + other => panic!("expected advisor message, got {:?}", other), + } + + // /config output-style shows/sets the output style. + let result = config.execute("output-style", &mut ctx).await; + assert!( + !matches!(result, CommandResult::Error(_)), + "/config output-style should route to the output-style command" + ); + + // /status doctor routes to the diagnostic suite. + let status = find_command("status").unwrap(); + let result = status.execute("doctor", &mut ctx).await; + match result { + CommandResult::Message(message) => { + assert!(message.to_lowercase().contains("coven")) + } + other => panic!("expected doctor diagnostics, got {:?}", other), + } + } + #[tokio::test] async fn agent_command_absorbs_agents_and_managed() { let _guard = CommandEnvGuard::with_coven_home(None); diff --git a/src-rust/crates/tui/src/app.rs b/src-rust/crates/tui/src/app.rs index 64136b3c..d52a3d06 100644 --- a/src-rust/crates/tui/src/app.rs +++ b/src-rust/crates/tui/src/app.rs @@ -52,7 +52,6 @@ use tracing::debug; /// `prompt_slash_commands_covers_registry` test in `claurst-commands` /// enforces that. pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ - ("advisor", "Set or unset the server-side advisor model"), ( "agent", "List, inspect, and manage familiars and managed agents", @@ -64,14 +63,16 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ "Stage and commit changes (model drafts the message)", ), ("compact", "Compact the conversation context"), - ("config", "Open settings"), + ( + "config", + "Open settings (theme, keybindings, advisor, import, UI)", + ), ("connect", "Connect an AI provider"), ( "coven", "Drive the local Coven daemon (sessions, harness runs, rituals)", ), ("diff", "Inspect the current git diff"), - ("doctor", "Run diagnostics"), ( "effort", "Set effort level (low/normal/high) or toggle fast mode", @@ -90,37 +91,29 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ), ("help", "Show help"), ("hooks", "Browse configured hooks (read-only)"), - ( - "import-config", - "Import CLAUDE.md and settings.json from ~/.claude", - ), ( "incant", "Cast a speech incantation (caveman, rocky) or lift it with off", ), ("init", "Initialize AGENTS.md for this project"), - ("keybindings", "Show keybinding configuration"), ("login", "Log in, switch accounts, or refresh provider auth"), ("logout", "Log out of Coven Code"), ("mcp", "Browse configured MCP servers"), ("memory", "Browse and open AGENTS.md memory files"), ("model", "Change the AI model"), - ("output-style", "Toggle output style (auto/stream/verbose)"), ("permissions", "Manage tool permission rules"), ("plan", "Enter plan mode (read-only)"), - ("plugin", "Manage plugins (list/info/enable/disable/reload)"), ( - "pr-comments", - "Read or post comments on the active GitHub PR", + "plugin", + "Manage plugins (list/info/enable/disable/install/reload)", ), ("providers", "List available AI providers and their status"), ("quit", "Exit Coven Code"), + ("resume", "Resume a previous session"), ( - "reload-plugins", - "Reload the active session plugin registry", + "review", + "Review changes (security/ultra variants, PR comments)", ), - ("resume", "Resume a previous session"), - ("review", "Review changes (git diff)"), ( "rewind", "Rewind the conversation or roll back file changes", @@ -128,12 +121,17 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ ("sandbox", "Toggle sandboxed shell execution"), ("search", "Search the codebase by natural language or regex"), ("session", "Browse, rename, fork, branch, and tag sessions"), - ("settings", "Open settings"), + ( + "settings", + "Open settings (theme, keybindings, advisor, import, UI)", + ), ("skills", "List and manage skills"), - ("status", "Show the current session status"), + ( + "status", + "Show session status or run diagnostics (/status doctor)", + ), ("survey", "Open session feedback survey"), ("tasks", "Manage tracked background tasks"), - ("theme", "Open the theme picker"), ( "thinking", "Configure extended thinking or view past thinking traces", From ee2cbb94fd193fdfdaad88a7b2d4721a9e64927e Mon Sep 17 00:00:00 2001 From: Val Alexander <68980965+BunsDev@users.noreply.github.com> Date: Wed, 10 Jun 2026 23:59:00 -0500 Subject: [PATCH 6/7] feat(commands): fold goal into /coven goal; drop Phase 2 aliases /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 --- src-rust/crates/commands/src/lib.rs | 57 ++++++++++++----------------- src-rust/crates/tui/src/app.rs | 1 - 2 files changed, 23 insertions(+), 35 deletions(-) diff --git a/src-rust/crates/commands/src/lib.rs b/src-rust/crates/commands/src/lib.rs index 52b99752..331312c6 100644 --- a/src-rust/crates/commands/src/lib.rs +++ b/src-rust/crates/commands/src/lib.rs @@ -1576,6 +1576,9 @@ impl SlashCommand for GoalCommand { fn name(&self) -> &str { "goal" } + fn hidden(&self) -> bool { + true // folded into /coven goal (issue #73); one-release alias + } fn description(&self) -> &str { "Set or manage a durable long-running goal for autonomous work" } @@ -8681,6 +8684,7 @@ fn coven_help_text() -> &'static str { Status & lifecycle\n\ /coven Daemon health + active session count\n\ /coven status Same as /coven\n\ + /coven goal Set or manage a durable autonomous goal\n\ /coven capabilities Daemon capability catalog (harness manifests)\n\ /coven familiars List familiar statuses\n\ /coven doctor Detect installed harness CLIs\n\ @@ -8956,7 +8960,7 @@ impl SlashCommand for CovenCommand { fn help(&self) -> &str { coven_help_text() } - async fn execute(&self, args: &str, _ctx: &mut CommandContext) -> CommandResult { + async fn execute(&self, args: &str, ctx: &mut CommandContext) -> CommandResult { use claurst_core::coven_shared::DaemonClient; let trimmed = args.trim(); @@ -8964,6 +8968,12 @@ impl SlashCommand for CovenCommand { let sub = parts.next().unwrap_or("").trim(); let rest = parts.next().unwrap_or("").trim(); + // /coven goal absorbs the former standalone /goal command + // (issue #73); /goal stays as a hidden one-release alias. + if sub == "goal" { + return GoalCommand.execute(rest, ctx).await; + } + // No subcommand → status. Matches `coven` (default) UX in coven-cli. if sub.is_empty() || sub == "status" { match DaemonClient::new() { @@ -9407,11 +9417,9 @@ static COMMANDS: Lazy>> = Lazy::new(|| { Box::new(HelpCommand), Box::new(ClearCommand), Box::new(CompactCommand), - Box::new(CostCommand), Box::new(ExitCommand), Box::new(ModelCommand), Box::new(ConfigCommand), - Box::new(ColorCommand), Box::new(PluginCommand), Box::new(VersionCommand), Box::new(ResumeCommand), @@ -9489,14 +9497,9 @@ static COMMANDS: Lazy>> = Lazy::new(|| { slash_hidden: true, }), // Batch-1 new commands - Box::new(ContextCommand), Box::new(CopyCommand), Box::new(ChromeCommand), - Box::new(VimCommand), - Box::new(VoiceCommand), Box::new(UpgradeCommand), - Box::new(StatuslineCommand), - Box::new(TerminalSetupCommand), Box::new(FastCommand), Box::new(ThinkBackCommand), // /whisper (BtwCommand) and /sandbox (SandboxToggleCommand) @@ -9505,8 +9508,6 @@ static COMMANDS: Lazy>> = Lazy::new(|| { // Advisor Box::new(AdvisorCommand), // Snapshot / revert system - Box::new(UndoCommand), - Box::new(RevertCommand), // Multi-provider support Box::new(ProvidersCommand), Box::new(ConnectCommand), @@ -9863,8 +9864,12 @@ mod tests { } #[test] - fn phase_two_legacy_commands_are_hidden_but_callable() { - let hidden_legacy = [ + fn phase_two_legacy_aliases_are_removed() { + // The Phase 2 hidden aliases' one-release grace period ended with + // this release (issue #73 housekeeping): the names no longer resolve. + // Their functionality lives on as subcommands of /config, /usage, + // and /rewind. + for name in [ "color", "context", "cost", @@ -9874,25 +9879,10 @@ mod tests { "undo", "vim", "voice", - ]; - - for name in hidden_legacy { - let command = find_command(name).unwrap_or_else(|| panic!("{name} should resolve")); - assert!( - command.hidden(), - "{name} should stay callable as a hidden one-release compatibility alias" - ); - } - - let visible_names: std::collections::HashSet<&str> = all_commands() - .iter() - .filter(|command| !command.hidden()) - .map(|command| command.name()) - .collect(); - for name in hidden_legacy { + ] { assert!( - !visible_names.contains(name), - "{name} should not be a visible primary command" + find_command(name).is_none(), + "{name} should be fully removed after its alias grace period" ); } } @@ -10167,7 +10157,6 @@ mod tests { "help", "clear", "compact", - "cost", "exit", "model", "config", @@ -10293,10 +10282,10 @@ mod tests { } #[tokio::test] - async fn test_cost_command_returns_message() { + async fn test_usage_cost_returns_message() { let mut ctx = make_ctx(); - let cmd = find_command("cost").unwrap(); - let result = cmd.execute("", &mut ctx).await; + let cmd = find_command("usage").unwrap(); + let result = cmd.execute("cost", &mut ctx).await; assert!(matches!(result, CommandResult::Message(_))); } diff --git a/src-rust/crates/tui/src/app.rs b/src-rust/crates/tui/src/app.rs index d52a3d06..be21c56b 100644 --- a/src-rust/crates/tui/src/app.rs +++ b/src-rust/crates/tui/src/app.rs @@ -84,7 +84,6 @@ pub const PROMPT_SLASH_COMMANDS: &[(&str, &str)] = &[ "Set your active familiar — changes the TUI mascot live", ), ("feedback", "Open session feedback survey"), - ("goal", "Set or view the current session goal"), ( "handoff", "Hand off current session context to a Coven familiar", From b8f4f1a03e6e7932f77de902f374f7ce2af99a3b Mon Sep 17 00:00:00 2001 From: Val Alexander <68980965+BunsDev@users.noreply.github.com> Date: Wed, 10 Jun 2026 23:59:00 -0500 Subject: [PATCH 7/7] docs: restructure command reference for Phase 3 folds 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 --- docs/commands.md | 2455 +++++++++++++++++++------------------- docs/index.md | 22 +- docs/src/demos.js | 30 +- docs/src/palette-data.js | 28 +- 4 files changed, 1259 insertions(+), 1276 deletions(-) diff --git a/docs/commands.md b/docs/commands.md index baede6c9..07c08c40 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -1,1236 +1,1219 @@ -# Coven Code Slash Commands Reference - -This document is the reference for the visible slash commands available in Coven Code. Commands are invoked by typing `/command-name` at the REPL prompt. - ---- - -## Table of Contents - -1. [Command System Overview](#command-system-overview) -2. [Session & Navigation](#session--navigation) -3. [Model & Provider](#model--provider) — `/model`, `/providers`, `/connect`, `/thinking`, `/effort`, `/advisor`, `/fast` -4. [Configuration & Settings](#configuration--settings) — `/config`, `/keybindings`, `/permissions`, `/hooks`, `/mcp`, `/output-style`, `/theme` -5. [Code & Git](#code--git) — `/commit`, `/diff`, `/review`, `/init`, `/search` -6. [Search & Files](#search--files) -7. [Memory & Context](#memory--context) — `/memory`, `/usage`, `/stats`, `/status` -8. [Agents & Tasks](#agents--tasks) — `/agents`, `/tasks`, `/goal`, `/managed-agents`, `/agent` -9. [Planning & Review](#planning--review) — `/plan`, `ultraplan` (CLI) -10. [MCP & Integrations](#mcp--integrations) — `/mcp`, `/skills`, `/plugin`, `/chrome` -11. [Authentication](#authentication) — `/login`, `/logout`, `/switch`, `/refresh` -12. [Display & Terminal](#display--terminal) — `/theme`, `/output-style`, `/incant` -13. [Diagnostics & Info](#diagnostics--info) — `/doctor`, `/version`, `/update` -14. [Export & Sharing](#export--sharing) — `/export`, `/copy`, `/share` -15. [Advanced & Internal](#advanced--internal) — `/thinking`, `/connect`, `/fork`, `/effort`, `/whisper`, `/sandbox`, `/think-back` -16. [Coven Substrate](#coven-substrate) — `/coven`, `/handoff`, `/familiar` -17. [Additional Commands](#additional-commands) — feedback, config import, plugin reload, named CLI commands -18. [Command Availability](#command-availability) - ---- - -## Command System Overview - -Commands are resolved in a priority-ordered registry. When you type a command name, Coven Code checks: - -``` -built-in commands -> user command templates -> discovered skills -> plugin commands -``` - -Commands support aliases — for example `/h`, `/?`, and `/help` all invoke the same handler. - -### Usage Syntax - -``` -/command-name [arguments] -``` - -Arguments are passed as a single string after the command name. - ---- - -## Session & Navigation - -### /help -**Aliases:** `h`, `?` - -Display all available commands with their descriptions. Hidden and setup-only commands are suppressed from the default listing. - -``` -/help -/h -/? -``` - ---- - -### /clear -**Aliases:** `c`, `reset`, `new` - -Clear the current conversation history and start a fresh session. The session file is retained on disk; only the in-memory message list is cleared. - -``` -/clear -``` - ---- - -### /exit -**Aliases:** `quit`, `q` - -Exit the Coven Code REPL. Equivalent to pressing `Ctrl+D`. Unsaved session state is flushed before exit. - -``` -/exit -/quit -``` - ---- - -### /resume -**Aliases:** `r`, `continue` - -Resume a previous session from the session store. Displays a list of recent sessions with timestamps and summaries. Select one to restore its message history and file state. - -``` -/resume -/resume -``` - ---- - -### /session -**Aliases:** `remote` - -Show or manage conversation sessions. Without arguments, shows the current session status (including the remote session URL when a bridge is active). - -``` -/session — show current session status -/session list — list recent sessions -/session rename — rename the current session -``` - -`/session rename` absorbs the former standalone `/rename` command. The new name is used in session listings and exports. - ---- - -### /fork - -Fork the current session into a new independent session that begins from the current conversation state. Useful for exploring two different approaches without losing either. - -``` -/fork -/fork -``` - ---- - -### /rewind - -Single entry point for going back in time. Without arguments, opens an interactive overlay to pick the message to rewind the conversation to. With arguments, rolls back file changes recorded by the shadow-git snapshot system (absorbing the former `/undo` and `/revert`). - -``` -/rewind — interactive conversation rewind overlay -/rewind list — list assistant turns with recorded file changes -/rewind diff [n] — preview a turn's diff without reverting -/rewind last — revert the most recent assistant turn -/rewind — revert the n-th most recent assistant turn -/rewind — revert the turn whose message id starts with -``` - -`/undo` and `/revert` remain hidden compatibility aliases for one release. - ---- - -### /compact - -Summarize and compress the conversation history to reduce context window usage. The model is asked to produce a dense summary of the prior exchange; that summary replaces the raw messages. - -``` -/compact -``` - ---- - -## Model & Provider - -### /model - -Open the interactive model picker. Displays a searchable list of available models from all configured providers. The selected model is used for all subsequent inference in the current session. - -``` -/model -/model claude-opus-4-5 -/model claude-sonnet-4-6 -``` - ---- - -### /providers - -List all configured AI providers and their connection status. Shows provider name, base URL, and whether credentials are present. - -``` -/providers -``` - ---- - -### /connect - -Connect to a remote AI provider or configure a custom provider endpoint. Supports OpenAI-compatible APIs, Anthropic direct, and others. - -``` -/connect -/connect -/connect openai https://api.openai.com/v1 -``` - ---- - -### /thinking -**Aliases:** `think` - -Configure extended thinking for the current session. Extended thinking allows the model to reason through problems before responding, at the cost of additional tokens. - -``` -/thinking -/thinking on -/thinking off -``` - -See also `/effort` for a higher-level interface to thinking depth. - ---- - -### /effort - -Set the thinking effort level. This is a convenience wrapper over `/thinking` that maps human-readable levels to token budgets. - -| 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 -``` - ---- - -### /advisor - -Set or unset a secondary advisor model that provides supplementary suggestions alongside the main model. When set, the advisor model's context is available to improve main-model responses. - -``` -/advisor — show current advisor setting -/advisor claude-opus-4-6 — set advisor model by name -/advisor provider/model — set advisor using provider/model format -/advisor off — disable the advisor -/advisor unset — disable the advisor -``` - -The advisor model persists to `~/.coven-code/settings.json` under `advisorModel`. Model IDs must start with `claude-` or contain a `/` (provider/model format). - ---- - -### /fast -**Aliases:** `speed` - -Toggle fast mode. In fast mode, Coven Code switches to the active provider's smaller, faster model for quick responses. Useful when you want rapid answers and deep reasoning is not required. - -``` -/fast — toggle fast mode on/off -/fast on — enable fast mode -/fast off — disable fast mode -``` - -Setting persists to `~/.coven-code/ui-settings.json`. - ---- - -## Configuration & Settings - -### /config -**Aliases:** `settings` - -View or modify Coven Code configuration values. Without arguments, renders an interactive settings panel. With arguments, acts as a key-value accessor. - -``` -/config -/config get -/config set -/config reset -``` - -Common keys: - -| Key | Description | -|-----|-------------| -| `model` | Default model name | -| `theme` | Color theme name | -| `vim` | Vim mode enabled (`true`/`false`) | -| `outputStyle` | Output rendering style | -| `autoApprove` | Auto-approve tool calls | - ---- - -### /keybindings - -Open the interactive keybinding configurator. Displays all bound actions with their current shortcuts. Select an action to rebind it. Changes are written to `~/.coven-code/keybindings.json`. - -``` -/keybindings -``` - -See [keybindings.md](./keybindings.md) for the full keybindings reference. - ---- - -### /permissions - -View and manage tool permission rules. Permissions control which tools can run without prompting, which are blocked, and which always require confirmation. - -``` -/permissions -/permissions list -/permissions allow -/permissions deny -/permissions reset -``` - ---- - -### /hooks - -Manage event hooks. Hooks are shell commands or scripts that execute when lifecycle events fire (e.g., before/after tool calls, on session start/end). - -``` -/hooks -/hooks list -/hooks add -/hooks remove -``` - -Available events: `pre-tool`, `post-tool`, `session-start`, `session-end`, `message-send`, `message-receive`. - ---- - -### /mcp - -Inspect Model Context Protocol (MCP) servers and reconnect configured servers. MCP servers expose additional tools and resources to the agent. - -``` -/mcp -/mcp list -/mcp status -/mcp auth -/mcp connect -/mcp logs -/mcp resources [name] -/mcp prompts [name] -/mcp get-prompt [key=value ...] -``` - -Add or remove MCP servers by editing `~/.coven-code/settings.json`. - ---- - -### /output-style - -Select how the model's output is rendered in the terminal. Choices include `auto`, `plain`, `markdown`, `streaming`, and others depending on terminal capabilities. - -``` -/output-style -/output-style plain -/output-style markdown -``` - ---- - -### /theme - -Open the interactive theme picker. Preview and select a color theme for the Coven Code TUI. - -``` -/theme -/theme dark -/theme light -/theme solarized -``` - ---- - -### /config statusline - -Configure the status line displayed at the bottom of the TUI. Toggle individual elements such as model name, token count, session name, and git branch. - -``` -/config statusline -/config statusline show model -/config statusline hide tokens -``` - ---- - -### /config vim - -Toggle vim keybinding mode on or off. In vim mode the input field behaves like a vim editor (normal/insert/visual modes). Persisted to config. - -``` -/config vim -/config vim on -/config vim off -``` - ---- - -### /config voice - -Configure voice input/output. Requires a supported audio backend. Subcommands control microphone selection, TTS voice, and push-to-talk behavior. - -``` -/config voice status -/config voice on -/config voice off -``` - ---- - -### /config terminal-setup - -Run the terminal capability detection and setup wizard. Checks for true-color support, font ligatures, Unicode rendering, and configures Coven Code accordingly. - -``` -/config terminal-setup -``` - ---- - -## Code & Git - -### /commit - -Stage and commit changes to the current git repository. The model drafts a commit message based on the diff. You can review and edit the message before confirming. - -``` -/commit -/commit "optional message override" -``` - ---- - -### /diff - -Show file diffs for changes made during the current session. Displays a unified diff of all files Coven Code has written or edited since the session started. - -``` -/diff -/diff -``` - ---- - -### /review - -Review code changes via the model and optionally post the review to the associated GitHub PR. Runs `git diff ...HEAD` (or `git diff --cached` when no base is given) and sends the diff for a structured review. - -``` -/review — review staged changes -/review main — review the diff from main..HEAD -/review origin/main — review against a remote base ref -``` - -Variants (the former `/security-review` and `/ultrareview` commands fold in here as subcommands): - -``` -/review security [path] — security-focused review: vulnerabilities, credential - exposure, injection risks, and other security concerns -/review ultra [path] — exhaustive multi-dimensional review covering security, - performance, maintainability, error handling, test - coverage, API design, and architecture; each finding - is tagged by category and severity -``` - -GitHub posting requires `GITHUB_TOKEN` (a personal access token with repo scope); the PR number is auto-detected from `git remote` or supplied via `CLAUDE_PR_NUMBER`. - ---- - -### /init - -Initialize Coven Code project configuration in the current directory. Creates a `CLAUDE.md` file that acts as persistent project-level context injected at the start of every session. - -``` -/init -``` - ---- - -### /search - -Search the codebase using natural language or regex patterns. Wraps the GrepTool and GlobTool with a higher-level interface. - -``` -/search -/search "TODO" --type ts -/search "function.*export" --regex -``` - ---- - -## Search & Files - -### /usage context - -Analyze context window usage. Shows a breakdown of tokens consumed by system prompt, conversation history, file contents, and tool results. Helps identify what to compact or drop. - -``` -/usage context -``` - ---- - -## Memory & Context - -### /memory - -Manage session memory. Memory entries are short notes persisted across sessions. The model can read these at session start to maintain continuity. - -``` -/memory -/memory list -/memory add -/memory delete -/memory clear -``` - ---- - -### /usage - -Display a detailed token usage breakdown for the current session. Shows input tokens, output tokens, cache reads, cache writes, and estimated cost per API call. - -``` -/usage -/usage cost -/usage context -``` - ---- - -### /usage cost - -Show the total token usage and estimated cost for the current session. Provides a quick summary without the full account/quota context of `/usage`. In the TUI, `/stats` opens the interactive stats dialog. - -``` -/usage cost -``` - -For aggregate token / cost / tool statistics across saved sessions, use the `stats` CLI command: `coven-code stats [summary|sessions|tools|daily|session ]`. - ---- - -### /status - -Show the current session status. Includes active model, permission mode, thinking config, connected MCP servers, and loaded plugins. - -``` -/status -``` - ---- - -## Agents & Tasks - -### /agents - -Browse and manage saved workspace agents and Coven familiars. - -``` -/agents — open the agents/familiars menu -/agents reset — open reset confirmation -coven-code agents reset — erase saved user agents and familiar roster -``` - -The reset action removes `~/.coven/familiars.toml`, custom `*.md` agent files -from `~/.coven-code/agents/` and the current workspace's `.coven-code/agents/`, -and clears `agents`, `familiar`, and `managed_agents` settings. It does not -remove built-in agents, plugin packages, sessions, credentials, or history. - ---- - -### /tasks -**Aliases:** `bashes` - -Manage tracked background tasks. Tasks are shell commands or model invocations running asynchronously. Monitor progress, fetch output, or stop tasks from this interface. - -``` -/tasks -/tasks list -/tasks output -/tasks stop -``` - ---- - -### /goal - -Set a durable multi-turn autonomous goal. When a goal is active, Coven Code continues working across turns until the goal is marked complete, paused, or a 200-turn runaway guard fires. Designed for complex, sustained tasks that would otherwise require repeated manual re-prompting. - -``` -/goal — set a new goal and begin working autonomously -/goal --tokens 250K — set a goal with a soft token budget cap -/goal — show current goal status -/goal status — show current goal status -/goal pause — pause the active goal -/goal resume — resume a paused goal -/goal clear — delete the current goal -/goal complete — request a completion audit -``` - -When the model believes the goal has been achieved, it calls the `GoalComplete` tool with an audit summary and evidence. Goals can be disabled globally by setting `COVEN_CODE_GOALS=0` in your environment. - -See [Goal System](./advanced.md#goal-system) in the advanced guide. - ---- - -### /managed-agents - -Configure the manager-executor agent architecture, where a manager model delegates subtasks to one or more executor agents working in parallel. Includes budget controls and isolation options. - -``` -/managed-agents — show current configuration -/managed-agents status — show current configuration -/managed-agents presets — list built-in presets -/managed-agents preset — apply a named preset -/managed-agents setup — show setup instructions -/managed-agents enable — enable managed agents -/managed-agents disable — disable managed agents -/managed-agents reset — remove all managed-agent configuration -/managed-agents configure manager-model — set the manager model -/managed-agents configure executor-model — set the executor model -/managed-agents configure executor-turns — set executor max turns -/managed-agents configure concurrent — set max concurrent executors -/managed-agents configure isolation on|off — toggle executor isolation -/managed-agents configure budget-split shared — shared token pool -/managed-agents configure budget-split percentage: — percentage split (manager gets n%) -/managed-agents configure budget-split fixed:: — fixed USD caps (manager / executor) -/managed-agents budget — set total budget in USD (0 to clear) -``` - -Model format: `provider/model` (e.g., `anthropic/claude-opus-4-6`, `openai/gpt-4o`). Configuration persists to `~/.coven-code/settings.json` under `managed_agents`. - -> **Preview feature.** Behaviour may change across releases. - -See [Managed Agents](./advanced.md#managed-agents) in the advanced guide. - ---- - -### /agent - -List all available named agents, or show details for a specific agent. Named agents are predefined configurations with their own system prompts, model bindings, and access levels. Useful for discovering what agents are available before starting a session. - -``` -/agent — list all visible named agents with access levels -/agent — show full details for a specific named agent -``` - -To activate an agent, start Coven Code with `--agent `. See [agents.md](./agents.md) for defining custom agents. - ---- - -## Planning & Review - -### /plan - -Enter plan mode (read-only). In plan mode the model can read files and reason about changes but cannot write, edit, or execute anything. Use this to draft an approach before allowing writes. - -``` -/plan -``` - -To exit plan mode, use `/plan off` or the `/exit-plan` internal action. - ---- - -### ultraplan (CLI) - -Launch the Ultraplan agentic code planner with extended thinking. Like `/plan` but with an elevated thinking budget to allow more thorough analysis before acting. Ultraplan is a named CLI command — it has no slash form. - -``` -coven-code ultraplan [--effort=medium|high|maximum] -``` - -For an exhaustive review pass, see [`/review ultra`](#review). - ---- - -## MCP & Integrations - -### /mcp - -Documented above under [Configuration & Settings](#configuration--settings). - ---- - -### /skills -**Aliases:** `skill` - -List and manage skills. Skills are bundled prompt-commands that extend Coven Code's capabilities without writing code. They appear alongside built-in commands in the registry. - -``` -/skills -/skills list -/skills enable -/skills disable -/skills reload -``` - ---- - -### /plugin -**Aliases:** `plugins` - -Manage plugins. Plugins are loadable modules that can register new commands, tools, hooks, agents, skills, and MCP server definitions. - -``` -/plugin -/plugin list -/plugin info -/plugin enable -/plugin disable -/plugin install -/plugin reload -``` - -`/plugin reload` refreshes the active session plugin registry, hook registry, plugin commands, agents, skills, and in-memory MCP server definitions. New plugin MCP servers are included in the initial MCP connection at startup; if a reload adds a new MCP server after startup, start a new session before expecting its tools in the model tool list. - ---- - -### /chrome - -Browser automation via Chrome DevTools Protocol (CDP). Connects to a running Chrome or Chromium instance and lets Coven Code control it — navigate pages, click elements, fill forms, evaluate JavaScript, and take screenshots. - -First, launch Chrome with remote debugging enabled: - -```bash -chrome --remote-debugging-port=9222 --no-first-run -``` - -Then: - -``` -/chrome connect [--port 9222] — connect to Chrome on the given port (default: 9222) -/chrome navigate — navigate to a URL -/chrome screenshot — take a screenshot, saved to a temp file -/chrome click — click a CSS selector -/chrome fill — fill an input field -/chrome eval — evaluate JavaScript and return the result -/chrome disconnect — disconnect from Chrome -``` - -Useful for testing web applications, scraping, or automating browser-based workflows without a separate browser-automation tool. - ---- - -## Authentication - -Coven Code supports **multiple named accounts per provider** — Anthropic (Claude.ai or Console) and Codex (OpenAI ChatGPT subscription). Each login creates a profile under `~/.coven-code/accounts///` and the registry at `~/.coven-code/accounts.json` tracks which one is active. - -See [Authentication Guide](./auth.md#multi-account-profiles) for the full story and on-disk layout. - -### /login - -Authenticate with Anthropic or Codex via OAuth PKCE. Opens a browser for the flow and saves tokens under the active profile (or creates a new profile if none exists). - -``` -/login — Claude.ai OAuth (Bearer token, default) -/login --console — Console OAuth (creates an API key) -/login --codex — Codex / ChatGPT OAuth -/login --label work — name the new profile "work" -/login --codex --label personal — Codex login, name the profile "personal" -``` - -If a profile matching the JWT's email or account_id already exists, that profile is refreshed in place — re-logging-in is idempotent. Use `--label` to either name a fresh profile or to disambiguate. - ---- - -### /logout - -Remove credentials. By default removes only the **active** profile for the provider; other stored profiles remain switchable. - -``` -/logout — clear active Anthropic profile (drops it from registry) -/logout --codex — clear active Codex profile -/logout --all — purge every Anthropic profile + clear any API key in settings -/logout --codex --all — purge every Codex profile -``` - ---- - -### /switch - -Switch the active account for a provider. Anthropic by default; pass `--codex` for Codex. Run `/switch` with no arguments to list every stored account and see available profile ids — the active profile in each provider is marked with `*`. - -``` -/switch — list stored accounts across providers -/switch work — set active Anthropic profile to "work" -/switch --codex personal — set active Codex profile to "personal" -``` - -Sample listing output: - -``` -Anthropic: - * personal [pro] kuber@personal.example - work [max] kuber@company.example -Codex: - work kuber@company.example -``` - ---- - -### /refresh - -Refresh the provider authentication state. Forces a token refresh without full re-authentication. Useful when a session token has expired mid-session. - -``` -/refresh -``` - ---- - -## Display & Terminal - -### /theme - -Documented above under [Configuration & Settings](#configuration--settings). - ---- - -### /output-style - -Documented above under [Configuration & Settings](#configuration--settings). - ---- - -### /config statusline - -Documented above under [Configuration & Settings](#configuration--settings). - ---- - -### /config vim - -Documented above under [Configuration & Settings](#configuration--settings). - ---- - -### /config terminal-setup - -Documented above under [Configuration & Settings](#configuration--settings). - ---- - -### /incant - -Cast a speech incantation — change the model's voice, trading flourish for tokens. The former `/caveman`, `/rocky`, and `/normal` commands fold in here: voices become arguments and `/incant off` replaces `/normal`. - -``` -/incant [lite|full|ultra] — cast an incantation at the given intensity -/incant off — lift the active incantation, return to normal speech -``` - -Voices: - -| Voice | Description | -|-------|-------------| -| `caveman` | Why use many token when few token do trick. Strips pleasantries, hedging, articles, and transitional phrases (~75% token reduction) | -| `rocky` | Eridian engineer from *Project Hail Mary*. Save big token. Good good good. | - -Intensity: - -| Level | Description | -|-------|-------------| -| `lite` | Light touch (~40% reduction) | -| `full` | The default (~75% reduction) | -| `ultra` | Maximum compression | - -``` -/incant caveman — full caveman mode -/incant rocky lite — Rocky grammar, light touch -/incant off — back to normal speech -``` - ---- - -### /config color - -Set the prompt bar color for the current session. Accepts standard color names or hex values. The color resets when the session ends unless saved via `/config`. - -``` -/config color — show the current prompt color -/config color — set to a named color (e.g., blue, red, green) -/config color #ff6b6b — set to a hex color value -/config color default — reset to the theme default -``` - ---- - -## Diagnostics & Info - -### /doctor - -Run the Coven Code diagnostics suite. Checks configuration integrity, provider connectivity, tool availability, MCP server health, and reports any issues. - -``` -/doctor -``` - ---- - -### /version -**Aliases:** `v` - -Display the current Coven Code version string and build metadata. - -``` -/version -/v -``` - ---- - -### /update -**Aliases:** `upgrade` - -Check for available updates. Queries the GitHub releases API and displays the latest version. If a newer version exists, prints the download URL or upgrade instructions. Does not auto-update. - -``` -/update -/upgrade -``` - ---- - -## Export & Sharing - -### /export - -Export the current session transcript. Supported formats include Markdown, JSON, and plain text. The output is written to a file or printed to stdout. - -``` -/export -/export --format markdown -/export --format json --output session.json -/export --stdout -``` - ---- - -### /copy - -Copy the most recent assistant response to the system clipboard. Pass a number to copy the Nth most-recent response. On Linux a `wl-clipboard` or `xclip` backend is used; on macOS and Windows the native clipboard API is used. - -``` -/copy — copy the most recent response -/copy 2 — copy the second most recent response -/copy N — copy the Nth most recent response -``` - ---- - -### /share - -Upload the current session as a secret GitHub gist and return a shareable URL. The session is rendered as a single self-contained HTML file and uploaded via the `gh` CLI; a viewer URL of the form `https://opencoven.github.io/coven-code/session/#` is printed. - -``` -/share -``` - -Requires the GitHub CLI (`gh`) installed and logged in (`gh auth login`). The viewer base URL can be overridden with `COVEN_CODE_SHARE_VIEWER_URL`. Secret gists are unlisted but readable by anyone who has the link. - ---- - -## Advanced & Internal - -### /thinking - -Documented above under [Model & Provider](#model--provider). - ---- - -### /connect - -Documented above under [Model & Provider](#model--provider). - ---- - -### /fork - -Documented above under [Session & Navigation](#session--navigation). - ---- - -### /effort - -Documented above under [Model & Provider](#model--provider). - ---- - -### /usage context - -Documented above under [Search & Files](#search--files). - ---- - -### /whisper -**Aliases:** `btw` - -Whisper a side question to your familiar without adding it to history. The question goes to the model out-of-band — the response is shown inline but does not become part of the main conversation context. Replaces the former `/btw` command. - -``` -/whisper -/whisper what is the capital of France? -``` - ---- - -### /sandbox -**Aliases:** `sandbox-toggle` - -Enable or disable sandboxed execution of shell commands. When sandbox mode is on, bash/shell commands run in an isolated environment to limit unintended side effects. Supported on macOS, Linux, and WSL2. - -``` -/sandbox — toggle sandbox mode on/off -/sandbox on — enable sandbox mode -/sandbox off — disable sandbox mode -/sandbox status — show current state and excluded patterns -/sandbox exclude — add a command pattern to the exclusion list -``` - -> A restart is recommended after toggling for full effect. On Windows (non-WSL), sandbox mode is not supported. - ---- - -### /think-back -**Aliases:** `thinkback` - -Display the extended-thinking traces from previous model responses in the current session. Only available when extended thinking was used for those responses. Pass a number to view the Nth most-recent trace. - -``` -/think-back — show the most recent thinking trace -/think-back 2 — show the second most recent thinking trace -/think-back play — replay the most recent trace as an animated walkthrough -/think-back play 2 — replay the second most recent trace -/thinkback — alias -``` - -`/think-back play` absorbs the former `/thinkback-play` command. Thinking traces appear when the model uses extended thinking mode (see `/thinking`). If no traces are found, Coven Code suggests enabling extended thinking. - ---- - -## Coven Substrate - -These commands integrate Coven Code with the local Coven daemon -(`~/.coven/coven.sock`, contract `coven.daemon.v1`). They degrade -gracefully when the daemon is absent — the daemon makes coven-code -richer; it is not required. - -### /coven - -Drive the local Coven daemon (sessions, harness runs, rituals, -familiars, capability discovery) without leaving the TUI. The -top-level `/coven` (or `/coven status`) prints daemon health and the -active session count. - -``` -/coven show daemon health -/coven status same as /coven -/coven capabilities daemon capability catalog -/coven familiars list familiar statuses -/coven doctor detect installed harness CLIs -/coven daemon start|status|stop|restart daemon lifecycle -``` - -#### Sessions — read-only - -``` -/coven sessions [--all] list active (or all) sessions -/coven info full session record -/coven log redacted log preview -/coven events [--after N] [--limit M] - paginate session events -``` - -`/coven events` defaults to `--limit 50` and prints -`End of events stream.` when there are no more events. Pass -`--limit 0` to fall back to the daemon's default cap. - -#### Sessions — live control - -``` -/coven run launch a new harness session -/coven send forward input to a live session -/coven kill terminate a live session -/coven attach replay/follow a running session -``` - -`send` and `kill` surface the daemon's structured error codes — when -a session is missing or no longer running you'll see -`Session is not running (409 session_not_live)` or -`Session not found (404 session_not_found)` rather than a generic -"daemon offline" message. - -#### Session rituals - -``` -/coven summon restore an archived session -/coven archive archive a non-running session -/coven sacrifice permanently delete a session -``` - -Sacrifice is irreversible. `/coven sacrifice` automatically passes -`--yes` to the underlying `coven sacrifice` command (mirroring how -the slash invocation acts as the confirmation). - -#### Control plane and integrations - -``` -/coven actions [json-args] POST /api/v1/actions -/coven calls [--limit N] read the Coven Calls - delegation ledger - (~/.coven/cave-coven-calls.json) -/coven claim acquire|release|status|heartbeat|canary [args] - parallel-work claim protocol -/coven hooks-install install pre-commit/pre-push - hooks for the claim protocol -/coven adapter list|doctor [id] inspect harness adapters -/coven logs prune [--days N] prune session logs -/coven wt | --list | --doctor | --prune-merged | --prune-stale [DAYS] - worktree management -/coven patch [name] [issue] open the OpenClaw repair flow -/coven pc [status|top|disk|...] macOS system diagnostics -``` - -#### Offline behaviour - -When `~/.coven/coven.sock` is missing, every `/coven` subcommand -returns the same hint: -`Coven daemon offline. Try /coven daemon start.` -The rest of coven-code keeps working — you just lose substrate -integration. - -#### Error surfacing - -Non-2xx responses from the daemon are parsed for the -`{ "error": { "code", "message" } }` envelope and surfaced as -` ( )`. See -[`docs/API-CONTRACT.md` in OpenCoven/coven](https://github.com/OpenCoven/coven/blob/main/docs/API-CONTRACT.md) -for the canonical error code list. - ---- - -### /handoff - -Hand off the current session context to a Coven familiar. Sends the -recent transcript to `~/.coven/coven.sock` as a new session under -the named familiar, returning the session id. - -``` -/handoff -``` - -Requires the Coven daemon to be running and the familiar id to be -defined in `~/.coven/familiars.toml`. See -[familiars.md](./familiars.md) for the full familiar concept. - ---- - -### /familiar -**Aliases:** `familiars` - -Set your active familiar — changes the TUI mascot live and updates -the persona that gets injected into the system prompt when launched -with `--agent `. - -``` -/familiar show current familiar -/familiar switch to a familiar by id -``` - -Press **F2** at any time to open the familiar switcher popup -interactively (the welcome screen's status block hints at this). - ---- - -## Additional Commands - -The following commands ship with Coven Code but do not have a full -section above. They are grouped by purpose. - -### Feedback & configuration - -| Command | Description | -|---------|-------------| -| `/feedback` (alias `bug`) | Submit feedback about Coven Code. `/feedback report` for a bug report. | -| `/import-config` | Import user-level Claude Code configuration (`CLAUDE.md`, `settings.json`) from `~/.claude` via an interactive dialog with preview and confirmation. | -| `/reload-plugins` | Reload the active session plugin registry, hooks, agents, skills, and MCP definitions. | - -### Workspace & GitHub - -| Command | Description | -|---------|-------------| -| `/add-dir` | Add a directory to Coven Code's allowed workspace paths. | -| `/branch` | Create a branch of the current conversation at this point. | -| `/tag` | Toggle a searchable tag on the current session. | -| `/pr-comments` | Get comments from a GitHub pull request. | - -### Named CLI commands - -These run as `coven-code ` from the shell. Most have slash -adapters (`/agents`, `/add-dir`, `/branch`, `/tag`, `/pr-comments`); -`ultraplan` and `stats` are CLI-only. - -| Command | Description | -|---------|-------------| -| `agents` | Manage and configure sub-agents. | -| `agent` | List or inspect named agents. | -| `add-dir` | Add a directory to the allowed workspace paths. | -| `branch` | Branch the current conversation. | -| `tag` | Toggle a searchable session tag. | -| `pr-comments` | Get comments from a GitHub PR. | -| `ultraplan` | Launch the Ultraplan agentic code planner with extended thinking. | -| `stats` | Aggregate token / cost / tool stats across saved sessions (in the TUI, `/stats` opens the stats dialog). | - ---- - -## Command Availability - -Not all commands are available in all contexts. - -### Remote Mode - -When running with `--remote`, only a restricted set of commands is available: - -`session`, `exit`, `clear`, `help`, `theme`, `config`, `usage`, `plan`, `keybindings` - -### Bridge Mode - -Over the Remote Control bridge (used by IDE integrations), only `local`-type commands are forwarded: - -`compact`, `clear`, `usage` - -### Availability-Restricted Commands - -Some commands are available only under certain account or platform conditions: - -| Command | Restriction | -|---------|-------------| -| `/fast` | Available when a fast-mode model is configured for the active provider | -| `/sandbox` | Functional on macOS, Linux, WSL2 only; no-op on native Windows | -| `/config voice` | Requires an audio backend plus `OPENAI_API_KEY` or `WHISPER_ENDPOINT_URL` for transcription | -| `/chrome` | Requires a running Chrome/Chromium instance launched with remote debugging enabled | +# Coven Code Slash Commands Reference + +This document is the reference for the visible slash commands available in Coven Code. Commands are invoked by typing `/command-name` at the REPL prompt. + +--- + +## Table of Contents + +1. [Command System Overview](#command-system-overview) +2. [Session & Navigation](#session--navigation) +3. [Model & Provider](#model--provider) — `/model`, `/providers`, `/connect`, `/thinking`, `/effort` +4. [Configuration & Settings](#configuration--settings) — `/config`, `/permissions`, `/hooks`, `/mcp` +5. [Code & Git](#code--git) — `/commit`, `/diff`, `/review`, `/init`, `/search` +6. [Search & Files](#search--files) +7. [Memory & Context](#memory--context) — `/memory`, `/usage`, `/status` +8. [Agents & Tasks](#agents--tasks) — `/agent`, `/tasks`, `/coven goal` +9. [Planning & Review](#planning--review) — `/plan`, `ultraplan` (CLI) +10. [MCP & Integrations](#mcp--integrations) — `/mcp`, `/skills`, `/plugin`, `/chrome` +11. [Authentication](#authentication) — `/login`, `/logout` +12. [Display & Terminal](#display--terminal) — `/incant`, `/config color` +13. [Diagnostics & Info](#diagnostics--info) — `/version`, `/update`, `/status doctor` +14. [Export & Sharing](#export--sharing) — `/export` +15. [Advanced & Internal](#advanced--internal) — `/whisper`, `/sandbox` +16. [Coven Substrate](#coven-substrate) — `/coven`, `/handoff`, `/familiar` +17. [Additional Commands](#additional-commands) — feedback, named CLI commands +18. [Deprecated Aliases](#deprecated-aliases) +19. [Command Availability](#command-availability) + +--- + +## Command System Overview + +Commands are resolved in a priority-ordered registry. When you type a command name, Coven Code checks: + +``` +built-in commands -> user command templates -> discovered skills -> plugin commands +``` + +Commands support aliases — for example `/h`, `/?`, and `/help` all invoke the same handler. + +### Usage Syntax + +``` +/command-name [arguments] +``` + +Arguments are passed as a single string after the command name. + +--- + +## Session & Navigation + +### /help +**Aliases:** `h`, `?` + +Display all available commands with their descriptions. Hidden and setup-only commands are suppressed from the default listing. + +``` +/help +/h +/? +``` + +--- + +### /clear +**Aliases:** `c`, `reset`, `new` + +Clear the current conversation history and start a fresh session. The session file is retained on disk; only the in-memory message list is cleared. + +``` +/clear +``` + +--- + +### /exit +**Aliases:** `quit`, `q` + +Exit the Coven Code REPL. Equivalent to pressing `Ctrl+D`. Unsaved session state is flushed before exit. + +``` +/exit +/quit +``` + +--- + +### /resume +**Aliases:** `r`, `continue` + +Resume a previous session from the session store. Displays a list of recent sessions with timestamps and summaries. Select one to restore its message history and file state. + +``` +/resume +/resume +``` + +--- + +### /session +**Aliases:** `remote` + +Show or manage conversation sessions. Without arguments, shows the current session status (including the remote session URL when a bridge is active). + +``` +/session — show current session status +/session list — list recent sessions +/session rename — rename the current session +/session fork [name] — fork into a new independent session +/session branch — create a branch of the conversation at this point +/session tag — toggle a searchable tag on the current session +/session add-dir — add a directory to the allowed workspace paths +``` + +`/session rename` absorbs the former standalone `/rename` command. The new name is used in session listings and exports. The former `/fork`, `/branch`, `/tag`, and `/add-dir` commands fold in here as subcommands (see [Deprecated Aliases](#deprecated-aliases)). + +--- + +### /session fork + +Fork the current session into a new independent session that begins from the current conversation state. Useful for exploring two different approaches without losing either. + +``` +/session fork +/session fork +``` + +--- + +### /rewind + +Single entry point for going back in time. Without arguments, opens an interactive overlay to pick the message to rewind the conversation to. With arguments, rolls back file changes recorded by the shadow-git snapshot system (absorbing the former `/undo` and `/revert`). + +``` +/rewind — interactive conversation rewind overlay +/rewind list — list assistant turns with recorded file changes +/rewind diff [n] — preview a turn's diff without reverting +/rewind last — revert the most recent assistant turn +/rewind — revert the n-th most recent assistant turn +/rewind — revert the turn whose message id starts with +``` + +`/undo` and `/revert` remain hidden compatibility aliases for one release. + +--- + +### /compact + +Summarize and compress the conversation history to reduce context window usage. The model is asked to produce a dense summary of the prior exchange; that summary replaces the raw messages. + +``` +/compact +``` + +--- + +## Model & Provider + +### /model + +Open the interactive model picker. Displays a searchable list of available models from all configured providers. The selected model is used for all subsequent inference in the current session. + +``` +/model +/model claude-opus-4-5 +/model claude-sonnet-4-6 +``` + +--- + +### /providers + +List all configured AI providers and their connection status. Shows provider name, base URL, and whether credentials are present. + +``` +/providers +``` + +--- + +### /connect + +Connect to a remote AI provider or configure a custom provider endpoint. Supports OpenAI-compatible APIs, Anthropic direct, and others. + +``` +/connect +/connect +/connect openai https://api.openai.com/v1 +``` + +--- + +### /thinking +**Aliases:** `think` + +Configure extended thinking for the current session. Extended thinking allows the model to reason through problems before responding, at the cost of additional tokens. + +``` +/thinking +/thinking on +/thinking off +/thinking back [play] [n] +``` + +See also `/effort` for a higher-level interface to thinking depth, and `/thinking back` below for viewing past thinking traces. + +--- + +### /thinking back + +Display the extended-thinking traces from previous model responses in the current session. Only available when extended thinking was used for those responses. Pass a number to view the Nth most-recent trace. Replaces the former `/think-back` command. + +``` +/thinking back — show the most recent thinking trace +/thinking back 2 — show the second most recent thinking trace +/thinking back play — replay the most recent trace as an animated walkthrough +/thinking back play 2 — replay the second most recent trace +``` + +`/thinking back play` absorbs the former `/thinkback-play` command. Thinking traces appear when the model uses extended thinking mode (see `/thinking`). If no traces are found, Coven Code suggests enabling extended thinking. + +--- + +### /effort + +Set the thinking effort level. This is a convenience wrapper over `/thinking` that maps human-readable levels to token budgets. + +| 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 +``` + +See also `/effort fast` below for switching to the provider's faster model. For a secondary advisor model, see [`/config advisor`](#config-advisor). + +--- + +### /effort fast + +Toggle fast mode. In fast mode, Coven Code switches to the active provider's smaller, faster model for quick responses. Useful when you want rapid answers and deep reasoning is not required. Replaces the former `/fast` command. + +``` +/effort fast — toggle fast mode on/off +/effort fast on — enable fast mode +/effort fast off — disable fast mode +``` + +Setting persists to `~/.coven-code/ui-settings.json`. + +--- + +## Configuration & Settings + +### /config +**Aliases:** `settings` + +View or modify Coven Code configuration values. Without arguments, renders an interactive settings panel. With arguments, acts as a key-value accessor. + +``` +/config +/config get +/config set +/config reset +``` + +Common keys: + +| Key | Description | +|-----|-------------| +| `model` | Default model name | +| `theme` | Color theme name | +| `vim` | Vim mode enabled (`true`/`false`) | +| `outputStyle` | Output rendering style | +| `autoApprove` | Auto-approve tool calls | + +Subcommands: `/config keybindings`, `/config theme [name]`, `/config output-style [style]`, `/config import`, `/config advisor [model|off]`, `/config color`, `/config vim`, `/config voice`, `/config statusline`, `/config terminal-setup` — each documented below or under [Display & Terminal](#display--terminal). + +`/config import` imports user-level Claude Code configuration (`CLAUDE.md`, `settings.json`) from `~/.claude` via an interactive dialog with preview and confirmation. It replaces the former `/import-config` command. + +--- + +### /config keybindings + +Open the interactive keybinding configurator. Displays all bound actions with their current shortcuts. Select an action to rebind it. Changes are written to `~/.coven-code/keybindings.json`. Replaces the former `/keybindings` command. + +``` +/config keybindings +``` + +See [keybindings.md](./keybindings.md) for the full keybindings reference. + +--- + +### /permissions + +View and manage tool permission rules. Permissions control which tools can run without prompting, which are blocked, and which always require confirmation. + +``` +/permissions +/permissions list +/permissions allow +/permissions deny +/permissions reset +``` + +--- + +### /hooks + +Manage event hooks. Hooks are shell commands or scripts that execute when lifecycle events fire (e.g., before/after tool calls, on session start/end). + +``` +/hooks +/hooks list +/hooks add +/hooks remove +``` + +Available events: `pre-tool`, `post-tool`, `session-start`, `session-end`, `message-send`, `message-receive`. + +--- + +### /mcp + +Inspect Model Context Protocol (MCP) servers and reconnect configured servers. MCP servers expose additional tools and resources to the agent. + +``` +/mcp +/mcp list +/mcp status +/mcp auth +/mcp connect +/mcp logs +/mcp resources [name] +/mcp prompts [name] +/mcp get-prompt [key=value ...] +``` + +Add or remove MCP servers by editing `~/.coven-code/settings.json`. + +--- + +### /config output-style + +Select how the model's output is rendered in the terminal. Choices include `auto`, `plain`, `markdown`, `streaming`, and others depending on terminal capabilities. Replaces the former `/output-style` command. + +``` +/config output-style +/config output-style plain +/config output-style markdown +``` + +--- + +### /config theme + +Open the interactive theme picker. Preview and select a color theme for the Coven Code TUI. Replaces the former `/theme` command. + +``` +/config theme +/config theme dark +/config theme light +/config theme solarized +``` + +--- + +### /config advisor + +Set or unset a secondary advisor model that provides supplementary suggestions alongside the main model. When set, the advisor model's context is available to improve main-model responses. Replaces the former `/advisor` command. + +``` +/config advisor — show current advisor setting +/config advisor claude-opus-4-6 — set advisor model by name +/config advisor provider/model — set advisor using provider/model format +/config advisor off — disable the advisor +/config advisor unset — disable the advisor +``` + +The advisor model persists to `~/.coven-code/settings.json` under `advisorModel`. Model IDs must start with `claude-` or contain a `/` (provider/model format). + +--- + +### /config statusline + +Configure the status line displayed at the bottom of the TUI. Toggle individual elements such as model name, token count, session name, and git branch. + +``` +/config statusline +/config statusline show model +/config statusline hide tokens +``` + +--- + +### /config vim + +Toggle vim keybinding mode on or off. In vim mode the input field behaves like a vim editor (normal/insert/visual modes). Persisted to config. + +``` +/config vim +/config vim on +/config vim off +``` + +--- + +### /config voice + +Configure voice input/output. Requires a supported audio backend. Subcommands control microphone selection, TTS voice, and push-to-talk behavior. + +``` +/config voice status +/config voice on +/config voice off +``` + +--- + +### /config terminal-setup + +Run the terminal capability detection and setup wizard. Checks for true-color support, font ligatures, Unicode rendering, and configures Coven Code accordingly. + +``` +/config terminal-setup +``` + +--- + +## Code & Git + +### /commit + +Stage and commit changes to the current git repository. The model drafts a commit message based on the diff. You can review and edit the message before confirming. + +``` +/commit +/commit "optional message override" +``` + +--- + +### /diff + +Show file diffs for changes made during the current session. Displays a unified diff of all files Coven Code has written or edited since the session started. + +``` +/diff +/diff +``` + +--- + +### /review + +Review code changes via the model and optionally post the review to the associated GitHub PR. Runs `git diff ...HEAD` (or `git diff --cached` when no base is given) and sends the diff for a structured review. + +``` +/review — review staged changes +/review main — review the diff from main..HEAD +/review origin/main — review against a remote base ref +``` + +Variants (the former `/security-review` and `/ultrareview` commands fold in here as subcommands): + +``` +/review security [path] — security-focused review: vulnerabilities, credential + exposure, injection risks, and other security concerns +/review ultra [path] — exhaustive multi-dimensional review covering security, + performance, maintainability, error handling, test + coverage, API design, and architecture; each finding + is tagged by category and severity +/review comments — fetch comments from the associated GitHub pull + request (replaces the former /pr-comments command) +``` + +GitHub posting requires `GITHUB_TOKEN` (a personal access token with repo scope); the PR number is auto-detected from `git remote` or supplied via `CLAUDE_PR_NUMBER`. + +--- + +### /init + +Initialize Coven Code project configuration in the current directory. Creates a `CLAUDE.md` file that acts as persistent project-level context injected at the start of every session. + +``` +/init +``` + +--- + +### /search + +Search the codebase using natural language or regex patterns. Wraps the GrepTool and GlobTool with a higher-level interface. + +``` +/search +/search "TODO" --type ts +/search "function.*export" --regex +``` + +--- + +## Search & Files + +### /usage context + +Analyze context window usage. Shows a breakdown of tokens consumed by system prompt, conversation history, file contents, and tool results. Helps identify what to compact or drop. + +``` +/usage context +``` + +--- + +## Memory & Context + +### /memory + +Manage session memory. Memory entries are short notes persisted across sessions. The model can read these at session start to maintain continuity. + +``` +/memory +/memory list +/memory add +/memory delete +/memory clear +``` + +--- + +### /usage + +Display a detailed token usage breakdown for the current session. Shows input tokens, output tokens, cache reads, cache writes, and estimated cost per API call. + +``` +/usage +/usage cost +/usage context +/usage stats +``` + +In the TUI, `/usage stats` opens the interactive session statistics dialog (replacing the former `/stats` command). + +--- + +### /usage cost + +Show the total token usage and estimated cost for the current session. Provides a quick summary without the full account/quota context of `/usage`. In the TUI, `/usage stats` opens the interactive stats dialog. + +``` +/usage cost +``` + +For aggregate token / cost / tool statistics across saved sessions, use the `stats` CLI command: `coven-code stats [summary|sessions|tools|daily|session ]`. + +--- + +### /status + +Show the current session status. Includes active model, permission mode, thinking config, connected MCP servers, and loaded plugins. + +``` +/status +/status doctor — run the diagnostics suite +``` + +See [`/status doctor`](#status-doctor) under Diagnostics & Info for the full diagnostics description. + +--- + +## Agents & Tasks + +### /agent + +Browse and manage named agents, saved workspace agents, and Coven familiars. Named agents are predefined configurations with their own system prompts, model bindings, and access levels. Absorbs the former `/agents` command. + +``` +/agent — open the agents/familiars menu +/agent list — list all visible named agents with access levels +/agent — show full details for a specific named agent +/agent create [name] — create a new agent +/agent edit — edit an existing agent +/agent delete — delete an agent +/agent reset — open reset confirmation +/agent managed ... — configure manager-executor agents (see below) +coven-code agents reset — erase saved user agents and familiar roster +``` + +The reset action removes `~/.coven/familiars.toml`, custom `*.md` agent files +from `~/.coven-code/agents/` and the current workspace's `.coven-code/agents/`, +and clears `agents`, `familiar`, and `managed_agents` settings. It does not +remove built-in agents, plugin packages, sessions, credentials, or history. + +To activate an agent, start Coven Code with `--agent `. See [agents.md](./agents.md) for defining custom agents. + +--- + +### /tasks +**Aliases:** `bashes` + +Manage tracked background tasks. Tasks are shell commands or model invocations running asynchronously. Monitor progress, fetch output, or stop tasks from this interface. + +``` +/tasks +/tasks list +/tasks output +/tasks stop +``` + +--- + +### /coven goal + +Set a durable multi-turn autonomous goal. When a goal is active, Coven Code continues working across turns until the goal is marked complete, paused, or a 200-turn runaway guard fires. Designed for complex, sustained tasks that would otherwise require repeated manual re-prompting. Replaces the former standalone `/goal` command (which remains a hidden compatibility alias for one release). + +``` +/coven goal — set a new goal and begin working autonomously +/coven goal --tokens 250K — set a goal with a soft token budget cap +/coven goal — show current goal status +/coven goal status — show current goal status +/coven goal pause — pause the active goal +/coven goal resume — resume a paused goal +/coven goal clear — delete the current goal +/coven goal complete — request a completion audit +``` + +When the model believes the goal has been achieved, it calls the `GoalComplete` tool with an audit summary and evidence. Goals can be disabled globally by setting `COVEN_CODE_GOALS=0` in your environment. + +See [Goal System](./advanced.md#goal-system) in the advanced guide. + +--- + +### /agent managed + +Configure the manager-executor agent architecture, where a manager model delegates subtasks to one or more executor agents working in parallel. Includes budget controls and isolation options. Replaces the former `/managed-agents` command. + +``` +/agent managed — show current configuration +/agent managed status — show current configuration +/agent managed presets — list built-in presets +/agent managed preset — apply a named preset +/agent managed setup — show setup instructions +/agent managed enable — enable managed agents +/agent managed disable — disable managed agents +/agent managed reset — remove all managed-agent configuration +/agent managed configure manager-model — set the manager model +/agent managed configure executor-model — set the executor model +/agent managed configure executor-turns — set executor max turns +/agent managed configure concurrent — set max concurrent executors +/agent managed configure isolation on|off — toggle executor isolation +/agent managed configure budget-split shared — shared token pool +/agent managed configure budget-split percentage: — percentage split (manager gets n%) +/agent managed configure budget-split fixed:: — fixed USD caps (manager / executor) +/agent managed budget — set total budget in USD (0 to clear) +``` + +Model format: `provider/model` (e.g., `anthropic/claude-opus-4-6`, `openai/gpt-4o`). Configuration persists to `~/.coven-code/settings.json` under `managed_agents`. + +> **Preview feature.** Behaviour may change across releases. + +See [Managed Agents](./advanced.md#managed-agents) in the advanced guide. + +--- + +## Planning & Review + +### /plan + +Enter plan mode (read-only). In plan mode the model can read files and reason about changes but cannot write, edit, or execute anything. Use this to draft an approach before allowing writes. + +``` +/plan +``` + +To exit plan mode, use `/plan off` or the `/exit-plan` internal action. + +--- + +### ultraplan (CLI) + +Launch the Ultraplan agentic code planner with extended thinking. Like `/plan` but with an elevated thinking budget to allow more thorough analysis before acting. Ultraplan is a named CLI command — it has no slash form. + +``` +coven-code ultraplan [--effort=medium|high|maximum] +``` + +For an exhaustive review pass, see [`/review ultra`](#review). + +--- + +## MCP & Integrations + +### /mcp + +Documented above under [Configuration & Settings](#configuration--settings). + +--- + +### /skills +**Aliases:** `skill` + +List and manage skills. Skills are bundled prompt-commands that extend Coven Code's capabilities without writing code. They appear alongside built-in commands in the registry. + +``` +/skills +/skills list +/skills enable +/skills disable +/skills reload +``` + +--- + +### /plugin +**Aliases:** `plugins` + +Manage plugins. Plugins are loadable modules that can register new commands, tools, hooks, agents, skills, and MCP server definitions. + +``` +/plugin +/plugin list +/plugin info +/plugin enable +/plugin disable +/plugin install +/plugin reload +``` + +`/plugin reload` refreshes the active session plugin registry, hook registry, plugin commands, agents, skills, and in-memory MCP server definitions. New plugin MCP servers are included in the initial MCP connection at startup; if a reload adds a new MCP server after startup, start a new session before expecting its tools in the model tool list. + +--- + +### /chrome + +Browser automation via Chrome DevTools Protocol (CDP). Connects to a running Chrome or Chromium instance and lets Coven Code control it — navigate pages, click elements, fill forms, evaluate JavaScript, and take screenshots. + +First, launch Chrome with remote debugging enabled: + +```bash +chrome --remote-debugging-port=9222 --no-first-run +``` + +Then: + +``` +/chrome connect [--port 9222] — connect to Chrome on the given port (default: 9222) +/chrome navigate — navigate to a URL +/chrome screenshot — take a screenshot, saved to a temp file +/chrome click — click a CSS selector +/chrome fill — fill an input field +/chrome eval — evaluate JavaScript and return the result +/chrome disconnect — disconnect from Chrome +``` + +Useful for testing web applications, scraping, or automating browser-based workflows without a separate browser-automation tool. + +--- + +## Authentication + +Coven Code supports **multiple named accounts per provider** — Anthropic (Claude.ai or Console) and Codex (OpenAI ChatGPT subscription). Each login creates a profile under `~/.coven-code/accounts///` and the registry at `~/.coven-code/accounts.json` tracks which one is active. + +See [Authentication Guide](./auth.md#multi-account-profiles) for the full story and on-disk layout. + +### /login + +Authenticate with Anthropic or Codex via OAuth PKCE. Opens a browser for the flow and saves tokens under the active profile (or creates a new profile if none exists). + +``` +/login — Claude.ai OAuth (Bearer token, default) +/login --console — Console OAuth (creates an API key) +/login --codex — Codex / ChatGPT OAuth +/login --label work — name the new profile "work" +/login --codex --label personal — Codex login, name the profile "personal" +``` + +If a profile matching the JWT's email or account_id already exists, that profile is refreshed in place — re-logging-in is idempotent. Use `--label` to either name a fresh profile or to disambiguate. + +Subcommands: `/login switch [name]` to change the active account and `/login refresh` to force a token refresh — both documented below. + +--- + +### /logout + +Remove credentials. By default removes only the **active** profile for the provider; other stored profiles remain switchable. + +``` +/logout — clear active Anthropic profile (drops it from registry) +/logout --codex — clear active Codex profile +/logout --all — purge every Anthropic profile + clear any API key in settings +/logout --codex --all — purge every Codex profile +``` + +--- + +### /login switch + +Switch the active account for a provider. Anthropic by default; pass `--codex` for Codex. Run `/login switch` with no arguments to list every stored account and see available profile ids — the active profile in each provider is marked with `*`. Replaces the former `/switch` command. + +``` +/login switch — list stored accounts across providers +/login switch work — set active Anthropic profile to "work" +/login switch --codex personal — set active Codex profile to "personal" +``` + +Sample listing output: + +``` +Anthropic: + * personal [pro] kuber@personal.example + work [max] kuber@company.example +Codex: + work kuber@company.example +``` + +--- + +### /login refresh + +Refresh the provider authentication state. Forces a token refresh without full re-authentication. Useful when a session token has expired mid-session. Replaces the former `/refresh` command. + +``` +/login refresh +``` + +--- + +## Display & Terminal + +Theme, output style, statusline, vim mode, and terminal setup are all `/config` subcommands documented under [Configuration & Settings](#configuration--settings). + +### /incant + +Cast a speech incantation — change the model's voice, trading flourish for tokens. The former `/caveman`, `/rocky`, and `/normal` commands fold in here: voices become arguments and `/incant off` replaces `/normal`. + +``` +/incant [lite|full|ultra] — cast an incantation at the given intensity +/incant off — lift the active incantation, return to normal speech +``` + +Voices: + +| Voice | Description | +|-------|-------------| +| `caveman` | Why use many token when few token do trick. Strips pleasantries, hedging, articles, and transitional phrases (~75% token reduction) | +| `rocky` | Eridian engineer from *Project Hail Mary*. Save big token. Good good good. | + +Intensity: + +| Level | Description | +|-------|-------------| +| `lite` | Light touch (~40% reduction) | +| `full` | The default (~75% reduction) | +| `ultra` | Maximum compression | + +``` +/incant caveman — full caveman mode +/incant rocky lite — Rocky grammar, light touch +/incant off — back to normal speech +``` + +--- + +### /config color + +Set the prompt bar color for the current session. Accepts standard color names or hex values. The color resets when the session ends unless saved via `/config`. + +``` +/config color — show the current prompt color +/config color — set to a named color (e.g., blue, red, green) +/config color #ff6b6b — set to a hex color value +/config color default — reset to the theme default +``` + +--- + +## Diagnostics & Info + +### /status doctor + +Run the Coven Code diagnostics suite. Checks configuration integrity, provider connectivity, tool availability, MCP server health, and reports any issues. Replaces the former `/doctor` command. + +``` +/status doctor +``` + +--- + +### /version +**Aliases:** `v` + +Display the current Coven Code version string and build metadata. + +``` +/version +/v +``` + +--- + +### /update + +Check for available updates. Queries the GitHub releases API and displays the latest version. If a newer version exists, prints the download URL or upgrade instructions. Does not auto-update. (`/upgrade` is a hidden compatibility alias.) + +``` +/update +``` + +--- + +## Export & Sharing + +### /export + +Export the current session transcript. Supported formats include Markdown, JSON, and plain text. The output is written to a file or printed to stdout. + +``` +/export +/export --format markdown +/export --format json --output session.json +/export --stdout +/export copy [n] — copy a recent response to the clipboard +/export share — upload the session as a shareable gist +``` + +The former `/copy` and `/share` commands fold in here as subcommands, documented below. + +--- + +### /export copy + +Copy the most recent assistant response to the system clipboard. Pass a number to copy the Nth most-recent response. On Linux a `wl-clipboard` or `xclip` backend is used; on macOS and Windows the native clipboard API is used. Replaces the former `/copy` command. + +``` +/export copy — copy the most recent response +/export copy 2 — copy the second most recent response +/export copy N — copy the Nth most recent response +``` + +--- + +### /export share + +Upload the current session as a secret GitHub gist and return a shareable URL. The session is rendered as a single self-contained HTML file and uploaded via the `gh` CLI; a viewer URL of the form `https://opencoven.github.io/coven-code/session/#` is printed. Replaces the former `/share` command. + +``` +/export share +``` + +Requires the GitHub CLI (`gh`) installed and logged in (`gh auth login`). The viewer base URL can be overridden with `COVEN_CODE_SHARE_VIEWER_URL`. Secret gists are unlisted but readable by anyone who has the link. + +--- + +## Advanced & Internal + +### /whisper +**Aliases:** `btw` + +Whisper a side question to your familiar without adding it to history. The question goes to the model out-of-band — the response is shown inline but does not become part of the main conversation context. Replaces the former `/btw` command. + +``` +/whisper +/whisper what is the capital of France? +``` + +--- + +### /sandbox +**Aliases:** `sandbox-toggle` + +Enable or disable sandboxed execution of shell commands. When sandbox mode is on, bash/shell commands run in an isolated environment to limit unintended side effects. Supported on macOS, Linux, and WSL2. + +``` +/sandbox — toggle sandbox mode on/off +/sandbox on — enable sandbox mode +/sandbox off — disable sandbox mode +/sandbox status — show current state and excluded patterns +/sandbox exclude — add a command pattern to the exclusion list +``` + +> A restart is recommended after toggling for full effect. On Windows (non-WSL), sandbox mode is not supported. + +--- + +## Coven Substrate + +These commands integrate Coven Code with the local Coven daemon +(`~/.coven/coven.sock`, contract `coven.daemon.v1`). They degrade +gracefully when the daemon is absent — the daemon makes coven-code +richer; it is not required. + +### /coven + +Drive the local Coven daemon (sessions, harness runs, rituals, +familiars, capability discovery) without leaving the TUI. The +top-level `/coven` (or `/coven status`) prints daemon health and the +active session count. + +``` +/coven show daemon health +/coven status same as /coven +/coven capabilities daemon capability catalog +/coven familiars list familiar statuses +/coven doctor detect installed harness CLIs +/coven daemon start|status|stop|restart daemon lifecycle +``` + +#### Sessions — read-only + +``` +/coven sessions [--all] list active (or all) sessions +/coven info full session record +/coven log redacted log preview +/coven events [--after N] [--limit M] + paginate session events +``` + +`/coven events` defaults to `--limit 50` and prints +`End of events stream.` when there are no more events. Pass +`--limit 0` to fall back to the daemon's default cap. + +#### Sessions — live control + +``` +/coven run launch a new harness session +/coven send forward input to a live session +/coven kill terminate a live session +/coven attach replay/follow a running session +``` + +`send` and `kill` surface the daemon's structured error codes — when +a session is missing or no longer running you'll see +`Session is not running (409 session_not_live)` or +`Session not found (404 session_not_found)` rather than a generic +"daemon offline" message. + +#### Session rituals + +``` +/coven summon restore an archived session +/coven archive archive a non-running session +/coven sacrifice permanently delete a session +``` + +Sacrifice is irreversible. `/coven sacrifice` automatically passes +`--yes` to the underlying `coven sacrifice` command (mirroring how +the slash invocation acts as the confirmation). + +#### Control plane and integrations + +``` +/coven actions [json-args] POST /api/v1/actions +/coven calls [--limit N] read the Coven Calls + delegation ledger + (~/.coven/cave-coven-calls.json) +/coven claim acquire|release|status|heartbeat|canary [args] + parallel-work claim protocol +/coven hooks-install install pre-commit/pre-push + hooks for the claim protocol +/coven adapter list|doctor [id] inspect harness adapters +/coven logs prune [--days N] prune session logs +/coven wt | --list | --doctor | --prune-merged | --prune-stale [DAYS] + worktree management +/coven patch [name] [issue] open the OpenClaw repair flow +/coven pc [status|top|disk|...] macOS system diagnostics +``` + +#### Offline behaviour + +When `~/.coven/coven.sock` is missing, every `/coven` subcommand +returns the same hint: +`Coven daemon offline. Try /coven daemon start.` +The rest of coven-code keeps working — you just lose substrate +integration. + +#### Error surfacing + +Non-2xx responses from the daemon are parsed for the +`{ "error": { "code", "message" } }` envelope and surfaced as +` ( )`. See +[`docs/API-CONTRACT.md` in OpenCoven/coven](https://github.com/OpenCoven/coven/blob/main/docs/API-CONTRACT.md) +for the canonical error code list. + +--- + +### /handoff + +Hand off the current session context to a Coven familiar. Sends the +recent transcript to `~/.coven/coven.sock` as a new session under +the named familiar, returning the session id. + +``` +/handoff +``` + +Requires the Coven daemon to be running and the familiar id to be +defined in `~/.coven/familiars.toml`. See +[familiars.md](./familiars.md) for the full familiar concept. + +--- + +### /familiar +**Aliases:** `familiars` + +Set your active familiar — changes the TUI mascot live and updates +the persona that gets injected into the system prompt when launched +with `--agent `. + +``` +/familiar show current familiar +/familiar switch to a familiar by id +``` + +Press **F2** at any time to open the familiar switcher popup +interactively (the welcome screen's status block hints at this). + +--- + +## Additional Commands + +The following commands ship with Coven Code but do not have a full +section above. They are grouped by purpose. + +### Feedback & configuration + +| Command | Description | +|---------|-------------| +| `/feedback` (alias `bug`) | Submit feedback about Coven Code. `/feedback report` for a bug report. | +| `/config import` | Import user-level Claude Code configuration (`CLAUDE.md`, `settings.json`) from `~/.claude` via an interactive dialog with preview and confirmation. | +| `/plugin reload` | Reload the active session plugin registry, hooks, agents, skills, and MCP definitions. | + +### Named CLI commands + +These run as `coven-code ` from the shell. Their old slash +adapters (`/agents`, `/add-dir`, `/branch`, `/tag`, `/pr-comments`) +are now hidden one-release aliases — in the TUI this functionality +is reached via `/session`, `/agent`, and `/review` (see +[Deprecated Aliases](#deprecated-aliases)). `ultraplan` and `stats` +are CLI-only. + +| Command | Description | +|---------|-------------| +| `agents` | Manage and configure sub-agents. | +| `agent` | List or inspect named agents. | +| `add-dir` | Add a directory to the allowed workspace paths. | +| `branch` | Branch the current conversation. | +| `tag` | Toggle a searchable session tag. | +| `pr-comments` | Get comments from a GitHub PR. | +| `ultraplan` | Launch the Ultraplan agentic code planner with extended thinking. | +| `stats` | Aggregate token / cost / tool stats across saved sessions (in the TUI, `/usage stats` opens the stats dialog). | + +--- + +## Deprecated Aliases + +The following top-level commands were folded into subcommands. These hidden aliases remain invocable for one release and will be removed afterwards. + +| Old command | New form | +|-------------|----------| +| `/fork` | `/session fork [name]` | +| `/branch` | `/session branch ...` | +| `/tag` | `/session tag ...` | +| `/add-dir` | `/session add-dir ` | +| `/copy` | `/export copy [n]` | +| `/share` | `/export share` | +| `/switch` | `/login switch [name]` | +| `/refresh` | `/login refresh` | +| `/think-back` | `/thinking back [play]` | +| `/fast` | `/effort fast [on\|off]` | +| `/keybindings` | `/config keybindings` | +| `/theme` | `/config theme [name]` | +| `/output-style` | `/config output-style [style]` | +| `/import-config` | `/config import` | +| `/advisor` | `/config advisor [model\|off]` | +| `/agents` | `/agent [list\|create\|edit\|delete\|reset] [name]` | +| `/managed-agents` | `/agent managed ...` | +| `/pr-comments` | `/review comments` | +| `/doctor` | `/status doctor` | +| `/stats` | `/usage stats` | +| `/reload-plugins` | `/plugin reload` | +| `/upgrade` | `/update` | + +--- + +## Command Availability + +Not all commands are available in all contexts. + +### Remote Mode + +When running with `--remote`, only a restricted set of commands is available: + +`session`, `exit`, `clear`, `help`, `theme`, `config`, `usage`, `plan`, `keybindings` + +### Bridge Mode + +Over the Remote Control bridge (used by IDE integrations), only `local`-type commands are forwarded: + +`compact`, `clear`, `usage` + +### Availability-Restricted Commands + +Some commands are available only under certain account or platform conditions: + +| Command | Restriction | +|---------|-------------| +| `/effort fast` | Available when a fast-mode model is configured for the active provider | +| `/sandbox` | Functional on macOS, Linux, WSL2 only; no-op on native Windows | +| `/config voice` | Requires an audio backend plus `OPENAI_API_KEY` or `WHISPER_ENDPOINT_URL` for transcription | +| `/chrome` | Requires a running Chrome/Chromium instance launched with remote debugging enabled | diff --git a/docs/index.md b/docs/index.md index 27489236..4d8ea2a4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -45,7 +45,7 @@ Anthropic Claude (default), OpenAI, Google Gemini, AWS Bedrock, Azure OpenAI, Ol A ratatui-based TUI with real-time streaming, syntax-highlighted code blocks, diff viewer, permission dialogs, slash command autocomplete, session browser, and a full keybinding system. ### Multi-account credentials -Store multiple named Anthropic (Claude.ai / Console) and Codex (ChatGPT) accounts in one install and switch between them instantly with `/switch` or `coven-code auth switch `. Identity is detected from the OAuth JWT, so re-logging-in the same account is idempotent. See [Authentication](auth#multi-account-profiles). +Store multiple named Anthropic (Claude.ai / Console) and Codex (ChatGPT) accounts in one install and switch between them instantly with `/login switch` or `coven-code auth switch `. Identity is detected from the OAuth JWT, so re-logging-in the same account is idempotent. See [Authentication](auth#multi-account-profiles). ### @file injection Type `@path/to/file` anywhere in a prompt to inject the file's contents inline. Typeahead autocomplete suggests paths as you type, with size/binary safety checks before submit. See [@file Injection](keybindings#file-injection-with-typeahead). @@ -57,10 +57,10 @@ Extend Coven Code with TOML-manifest plugins that add custom slash commands, MCP Run named agents (`build`, `plan`, `explore`) or spawn parallel sub-agents in coordinator mode. Agents communicate via a shared task registry and message channels. ### Goal system -Set a durable objective with `/goal` and Coven Code works autonomously across turns until the goal is verified complete — using the `GoalCompleteTool` for audited completion rather than just stopping. +Set a durable objective with `/coven goal` and Coven Code works autonomously across turns until the goal is verified complete — using the `GoalCompleteTool` for audited completion rather than just stopping. ### Managed agents (preview) -Configure a manager-executor architecture with `/managed-agents` where a manager model delegates subtasks to parallel executor agents with full budget split controls. +Configure a manager-executor architecture with `/agent managed` where a manager model delegates subtasks to parallel executor agents with full budget split controls. ### Speech incantations Cast `/incant caveman` or `/incant rocky` to compress model responses by 40–85%, saving tokens in long sessions. Lift the incantation with `/incant off`. @@ -164,7 +164,7 @@ When you launch `coven-code` interactively, the home screen opens with a single | `Provider` | Active provider id (`anthropic` when unset) | `provider` in [settings.json](configuration), see [Providers](providers) | | `Daemon` | `online` / `offline` from a cheap socket check — no RPC | Install `@opencoven/coven` to bring it online | | `Familiar` | Current familiar id, with an `(F2 to switch)` hint | `familiar` in settings, `/familiar`, or **F2** | -| `Goal` | Active autonomous goal (only shown when one is set) | `/goal ` | +| `Goal` | Active autonomous goal (only shown when one is set) | `/coven goal ` | Press **F2** at any time to open the familiar switcher popup. @@ -181,20 +181,20 @@ Inside the interactive TUI, type `/` to see all available commands. Common ones: | `/help` | Show all commands | | `/model` | Switch model or provider | | `/login` | OAuth login (Anthropic; `--codex` for ChatGPT, `--label ` to name) | -| `/switch []` | Switch active account; with no id, lists stored accounts (`--codex` for Codex) | +| `/login switch []` | Switch active account; with no id, lists stored accounts (`--codex` for Codex) | | `/logout` | Clear credentials for the active account (`--all` to purge) | -| `/goal ` | Set an autonomous multi-turn goal | -| `/managed-agents` | Configure manager-executor agents | +| `/coven goal ` | Set an autonomous multi-turn goal | +| `/agent managed` | Configure manager-executor agents | | `/compact` | Compress conversation history | | `/cost` | Token usage and cost for this session | | `/incant ` | Cast a speech incantation (`caveman`, `rocky`); `/incant off` lifts it | | `/whisper ` | Side question to your familiar, not kept in history | | `/rewind` | Go back to a previous message | -| `/copy` | Copy last response to clipboard | +| `/export copy` | Copy last response to clipboard | | `/export` | Save session transcript | -| `/think-back` | View thinking traces from previous responses | +| `/thinking back` | View thinking traces from previous responses | | `/review ultra` | Exhaustive multi-dimensional code review | -| `/advisor ` | Set a secondary advisor model | +| `/config advisor ` | Set a secondary advisor model | | `/sandbox` | Toggle sandboxed shell execution | | `/update` | Check for and download updates | | `/exit` | Quit | @@ -207,7 +207,7 @@ See [Slash Commands](commands) for the complete reference. Coven Code connects natively to the [Coven daemon](https://opencoven.ai/docs) when it is running on your machine. With the daemon active: -- **Familiars appear as agents** — every familiar you have configured in `~/.coven/familiars.toml` is automatically surfaced in the `/agents` overlay and the `coven-code agents` command. +- **Familiars appear as agents** — every familiar you have configured in `~/.coven/familiars.toml` is automatically surfaced in the `/agent` overlay and the `coven-code agents` command. - **Skills are visible** — daemon-registered skills are listed as awareness context so the model knows what capabilities are available. - **Familiar glyphs animate** in the welcome panel using the glyph that matches your configured `"familiar"` setting. diff --git a/docs/src/demos.js b/docs/src/demos.js index 086c1023..14bde4cf 100644 --- a/docs/src/demos.js +++ b/docs/src/demos.js @@ -231,7 +231,7 @@ export function registerDemos(Alpine) { { id: '/exit', category: 'Session', desc: 'Quit the session', keywords: 'quit q' }, { id: '/resume', category: 'Session', desc: 'Resume a previous session' }, { id: '/session', category: 'Session', desc: 'List or pick a session' }, - { id: '/fork', category: 'Session', desc: 'Branch the current session into a new one' }, + { id: '/session fork', category: 'Session', desc: 'Branch the current session into a new one' }, { id: '/rename', category: 'Session', desc: 'Rename the current session' }, { id: '/rewind', category: 'Session', desc: 'Go back to a previous message' }, { id: '/compact', category: 'Session', desc: 'Compress conversation history' }, @@ -241,8 +241,8 @@ export function registerDemos(Alpine) { { id: '/connect', category: 'Model', desc: 'Connect to a remote provider endpoint' }, { id: '/thinking', category: 'Model', desc: 'Toggle extended thinking display' }, { id: '/effort', category: 'Model', desc: 'Set extended-thinking effort level', keywords: 'low medium high max' }, - { id: '/advisor', category: 'Model', desc: 'Set a secondary advisor model' }, - { id: '/fast', category: 'Model', desc: 'Toggle fast mode (smaller, faster model)' }, + { id: '/config advisor', category: 'Model', desc: 'Set a secondary advisor model' }, + { id: '/effort fast', category: 'Model', desc: 'Toggle fast mode (smaller, faster model)' }, // Config { id: '/config', category: 'Config', desc: 'Open settings or adjust UI config' }, { id: '/config color', category: 'Config', desc: 'Set the prompt bar color' }, @@ -250,12 +250,12 @@ export function registerDemos(Alpine) { { id: '/config vim', category: 'Config', desc: 'Toggle vim mode' }, { id: '/config voice', category: 'Config', desc: 'Voice input mode' }, { id: '/config terminal-setup', category: 'Config', desc: 'Run terminal capability checks' }, - { id: '/keybindings', category: 'Config', desc: 'Open the interactive keybinding editor' }, + { id: '/config keybindings', category: 'Config', desc: 'Open the interactive keybinding editor' }, { id: '/permissions', category: 'Config', desc: 'Manage tool permission rules' }, { id: '/hooks', category: 'Config', desc: 'Inspect active hooks' }, { id: '/mcp', category: 'Config', desc: 'Manage MCP servers' }, - { id: '/output-style', category: 'Config', desc: 'Switch output style' }, - { id: '/theme', category: 'Config', desc: 'Switch visual theme' }, + { id: '/config output-style', category: 'Config', desc: 'Switch output style' }, + { id: '/config theme', category: 'Config', desc: 'Switch visual theme' }, // Code & Git { id: '/commit', category: 'Code & Git', desc: 'Stage and commit current changes', keywords: 'git' }, { id: '/diff', category: 'Code & Git', desc: 'Show working-tree diff', keywords: 'git' }, @@ -268,24 +268,24 @@ export function registerDemos(Alpine) { { id: '/usage context', category: 'Memory & Cost', desc: 'Show context window usage' }, { id: '/usage cost', category: 'Memory & Cost', desc: 'Token usage and dollar cost for the session', keywords: 'tokens money' }, { id: '/usage', category: 'Memory & Cost', desc: 'Session usage statistics' }, - { id: '/stats', category: 'Memory & Cost', desc: 'Session statistics' }, + { id: '/usage stats', category: 'Memory & Cost', desc: 'Session statistics' }, { id: '/insights', category: 'Memory & Cost', desc: 'Session statistics and tool usage report' }, { id: '/status', category: 'Memory & Cost', desc: 'Connection and daemon status' }, // Agents & Tasks - { id: '/agents', category: 'Agents & Tasks', desc: 'List built-in, custom, and familiar 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' }, { id: '/plan', category: 'Agents & Tasks', desc: 'Enter planning mode (read-only)' }, { id: '/ultraplan', category: 'Agents & Tasks', desc: 'Deep planning mode' }, { id: '/ultrareview', category: 'Agents & Tasks', desc: 'Exhaustive multi-dimensional code review' }, // Auth { id: '/login', category: 'Auth', desc: 'OAuth login (--codex for ChatGPT, --label to name)' }, { id: '/accounts', category: 'Auth', desc: 'List stored profiles' }, - { id: '/switch', category: 'Auth', desc: 'Switch active account' }, + { id: '/login switch', category: 'Auth', desc: 'Switch active account' }, { id: '/logout', category: 'Auth', desc: 'Clear credentials' }, - { id: '/refresh', category: 'Auth', desc: 'Refresh OAuth tokens' }, + { id: '/login refresh', category: 'Auth', desc: 'Refresh OAuth tokens' }, // Display { id: '/caveman', category: 'Display', desc: 'Telegraphic speech mode (saves 40–85% tokens)' }, { id: '/rocky', category: 'Display', desc: 'Rocky (Project Hail Mary) speech mode' }, @@ -297,12 +297,12 @@ export function registerDemos(Alpine) { { id: '/familiar', category: 'Coven', desc: 'Switch active familiar (also F2)' }, { id: '/handoff', category: 'Coven', desc: 'Hand off a session between familiars' }, // Diagnostics - { id: '/doctor', category: 'Diagnostics', desc: 'Environment and substrate health check' }, + { id: '/status doctor', category: 'Diagnostics', desc: 'Environment and substrate health check' }, { id: '/version', category: 'Diagnostics', desc: 'Show version info' }, { id: '/update', category: 'Diagnostics', desc: 'Check for and download updates' }, { id: '/export', category: 'Diagnostics', desc: 'Save session transcript' }, - { id: '/copy', category: 'Diagnostics', desc: 'Copy last response to clipboard', keywords: 'clipboard' }, - { id: '/think-back', category: 'Diagnostics', desc: 'View thinking traces from previous responses' }, + { id: '/export copy', category: 'Diagnostics', desc: 'Copy last response to clipboard', keywords: 'clipboard' }, + { id: '/thinking back', category: 'Diagnostics', desc: 'View thinking traces from previous responses' }, { id: '/sandbox-toggle', category: 'Diagnostics', desc: 'Toggle sandboxed shell execution' }, ], }) @@ -406,7 +406,7 @@ export function registerDemos(Alpine) { { id: 'SessionStart', category: 'Session', desc: 'Fires once when the session starts.', keywords: 'init begin' }, { id: 'SessionEnd', category: 'Session', desc: 'Fires once when the session ends (exit, crash, signal).', keywords: 'shutdown close exit' }, // Subagent lifecycle - { id: 'SubagentStart', category: 'Subagent', desc: 'Fires when a sub-agent is spawned (e.g., coordinator worker, /agents launch).', keywords: 'agent spawn worker' }, + { id: 'SubagentStart', category: 'Subagent', desc: 'Fires when a sub-agent is spawned (e.g., coordinator worker, /agent launch).', keywords: 'agent spawn worker' }, { id: 'SubagentStop', category: 'Subagent', desc: 'Fires when a sub-agent completes. Receives the final result payload.', keywords: 'agent stop worker' }, // Compaction { id: 'PreCompact', category: 'Compaction', desc: 'Fires before context compaction. Exit 2 blocks the compaction.', keywords: 'before compact summary' }, diff --git a/docs/src/palette-data.js b/docs/src/palette-data.js index ac45bf46..1d01a266 100644 --- a/docs/src/palette-data.js +++ b/docs/src/palette-data.js @@ -23,7 +23,7 @@ export const STATIC_PALETTE_ITEMS = [ ['/exit', 'Session', 'Quit the session'], ['/resume', 'Session', 'Resume a previous session'], ['/session', 'Session', 'List or pick a session'], - ['/fork', 'Session', 'Branch the current session into a new one'], + ['/session fork', 'Session', 'Branch the current session into a new one'], ['/rename', 'Session', 'Rename the current session'], ['/rewind', 'Session', 'Go back to a previous message'], ['/compact', 'Session', 'Compress conversation history'], @@ -32,20 +32,20 @@ export const STATIC_PALETTE_ITEMS = [ ['/connect', 'Model', 'Connect to a remote provider endpoint'], ['/thinking', 'Model', 'Toggle extended thinking display'], ['/effort', 'Model', 'Set extended-thinking effort level'], - ['/advisor', 'Model', 'Set a secondary advisor model'], - ['/fast', 'Model', 'Toggle fast mode (smaller, faster model)'], + ['/config advisor', 'Model', 'Set a secondary advisor model'], + ['/effort fast', 'Model', 'Toggle fast mode (smaller, faster model)'], ['/config', 'Config', 'Open settings or adjust UI config'], ['/config color', 'Config', 'Set the prompt bar color'], ['/config statusline','Config', 'Configure the TUI status line'], ['/config vim', 'Config', 'Toggle vim mode'], ['/config voice', 'Config', 'Voice input mode'], ['/config terminal-setup','Config', 'Run terminal capability checks'], - ['/keybindings', 'Config', 'Open the interactive keybinding editor'], + ['/config keybindings','Config', 'Open the interactive keybinding editor'], ['/permissions', 'Config', 'Manage tool permission rules'], ['/hooks', 'Config', 'Inspect active hooks'], ['/mcp', 'Config', 'Manage MCP servers'], - ['/output-style', 'Config', 'Switch output style'], - ['/theme', 'Config', 'Switch visual theme'], + ['/config output-style','Config', 'Switch output style'], + ['/config theme', 'Config', 'Switch visual theme'], ['/commit', 'Code & Git', 'Stage and commit current changes'], ['/diff', 'Code & Git', 'Show working-tree diff'], ['/review', 'Code & Git', 'Review a PR or current changes'], @@ -55,21 +55,21 @@ export const STATIC_PALETTE_ITEMS = [ ['/memory', 'Memory & Cost', 'Browse persistent memory entries'], ['/usage context', 'Memory & Cost', 'Show context window usage'], ['/usage cost', 'Memory & Cost', 'Token usage and dollar cost for the session'], - ['/stats', 'Memory & Cost', 'Open the interactive session statistics dialog'], + ['/usage stats', 'Memory & Cost', 'Open the interactive session statistics dialog'], ['/insights', 'Memory & Cost', 'Session statistics and tool usage report'], - ['/agents', 'Agents & Tasks', 'List built-in, custom, and familiar agents'], + ['/agent list', 'Agents & Tasks', 'List built-in, custom, and familiar agents'], ['/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'], ['/plan', 'Agents & Tasks', 'Enter planning mode (read-only)'], ['/ultraplan', 'Agents & Tasks', 'Deep planning mode'], ['/ultrareview', 'Agents & Tasks', 'Exhaustive multi-dimensional code review'], ['/login', 'Auth', 'OAuth login (--codex for ChatGPT)'], ['/accounts', 'Auth', 'List stored profiles'], - ['/switch', 'Auth', 'Switch active account'], + ['/login switch', 'Auth', 'Switch active account'], ['/logout', 'Auth', 'Clear credentials'], - ['/refresh', 'Auth', 'Refresh OAuth tokens'], + ['/login refresh', 'Auth', 'Refresh OAuth tokens'], ['/caveman', 'Display', 'Telegraphic speech mode (saves 40–85% tokens)'], ['/rocky', 'Display', 'Rocky (Project Hail Mary) speech mode'], ['/normal', 'Display', 'Deactivate speech modes'], @@ -77,12 +77,12 @@ export const STATIC_PALETTE_ITEMS = [ ['/coven', 'Coven', 'Substrate surface: kill, log, send, familiars'], ['/familiar', 'Coven', 'Switch active familiar (also F2)'], ['/handoff', 'Coven', 'Hand off a session between familiars'], - ['/doctor', 'Diagnostics', 'Environment and substrate health check'], + ['/status doctor', 'Diagnostics', 'Environment and substrate health check'], ['/version', 'Diagnostics', 'Show version info'], ['/update', 'Diagnostics', 'Check for and download updates'], ['/export', 'Diagnostics', 'Save session transcript'], - ['/copy', 'Diagnostics', 'Copy last response to clipboard'], - ['/think-back', 'Diagnostics', 'View thinking traces from previous responses'], + ['/export copy', 'Diagnostics', 'Copy last response to clipboard'], + ['/thinking back', 'Diagnostics', 'View thinking traces from previous responses'], ], '#commands'), // ---- Keybindings ----------------------------------------------------