UAT: TUI persona slash commands /persona:create, /persona:edit, /persona:delete, /persona:export, /persona:import not handled in TuiCommandRouter #4717

Open
opened 2026-04-08 18:11:28 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: TUI persona system — slash command routing
Severity: Medium — 5 of 7 persona slash commands are unimplemented stubs
Source: src/cleveragents/tui/commands.py _persona_command()
Spec reference: docs/specification.md §29413–29423 (Persona Commands)


What Was Tested

Code-level analysis of TuiCommandRouter._persona_command() in src/cleveragents/tui/commands.py against the spec's Persona Commands table.

Expected Behavior (from spec §29413–29423)

The spec defines 7 persona slash commands:

Command Args Description
/persona:list Display all personas
/persona:set <name> <name> Switch to persona
/persona:create Open PersonaEditorModal
/persona:edit [name] [name] Edit persona
/persona:delete <name> <name> Delete persona
/persona:export <name> <name> Export persona YAML
/persona:import <path> <path> Import persona YAML

Actual Behavior

src/cleveragents/tui/commands.py _persona_command() (lines ~115–125):

def _persona_command(self, tokens: list[str], *, session_id: str) -> str:
    if not tokens or tokens[0] == "list":
        names = [persona.name for persona in self.persona_registry.list_personas()]
        return ", ".join(names) if names else "No personas"
    if tokens[0] == "set":
        if len(tokens) < 2:
            return "Usage: /persona set <name>"
        persona = self.persona_state.set_active_persona(session_id, tokens[1])
        return f"Active persona: {persona.name}"
    return f"Unknown persona command: {' '.join(tokens)}"

Only list and set are handled. The remaining 5 commands (create, edit, delete, export, import) all fall through to the "Unknown persona command" error response.

Note: The slash catalog (slash_catalog.py) correctly lists all 7 persona commands, so they appear in the / overlay autocomplete — but selecting them produces an error response.

Additionally, the command routing uses space-separated tokens (/persona list, /persona set) rather than the colon-separated format (/persona:list, /persona:set) shown in the spec. The handle() method splits on the first token persona and passes the rest as sub-tokens, but the slash catalog registers commands as persona:list, persona:set, etc. This means the routing format is inconsistent with the catalog format.

Code Location

  • src/cleveragents/tui/commands.py lines ~115–125 — _persona_command() missing 5 sub-commands
  • src/cleveragents/tui/commands.py lines ~60–70 — handle() routes persona but catalog uses persona:list

Impact

  • /persona:create → "Unknown persona command: create" (PersonaEditorModal never opens)
  • /persona:edit → "Unknown persona command: edit"
  • /persona:delete → "Unknown persona command: delete"
  • /persona:export → "Unknown persona command: export"
  • /persona:import → "Unknown persona command: import"

Users cannot create, edit, delete, export, or import personas via slash commands.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** TUI persona system — slash command routing **Severity:** Medium — 5 of 7 persona slash commands are unimplemented stubs **Source:** `src/cleveragents/tui/commands.py` `_persona_command()` **Spec reference:** docs/specification.md §29413–29423 (Persona Commands) --- ## What Was Tested Code-level analysis of `TuiCommandRouter._persona_command()` in `src/cleveragents/tui/commands.py` against the spec's Persona Commands table. ## Expected Behavior (from spec §29413–29423) The spec defines 7 persona slash commands: | Command | Args | Description | |---------|------|-------------| | `/persona:list` | — | Display all personas | | `/persona:set <name>` | `<name>` | Switch to persona | | `/persona:create` | — | Open PersonaEditorModal | | `/persona:edit [name]` | `[name]` | Edit persona | | `/persona:delete <name>` | `<name>` | Delete persona | | `/persona:export <name>` | `<name>` | Export persona YAML | | `/persona:import <path>` | `<path>` | Import persona YAML | ## Actual Behavior `src/cleveragents/tui/commands.py` `_persona_command()` (lines ~115–125): ```python def _persona_command(self, tokens: list[str], *, session_id: str) -> str: if not tokens or tokens[0] == "list": names = [persona.name for persona in self.persona_registry.list_personas()] return ", ".join(names) if names else "No personas" if tokens[0] == "set": if len(tokens) < 2: return "Usage: /persona set <name>" persona = self.persona_state.set_active_persona(session_id, tokens[1]) return f"Active persona: {persona.name}" return f"Unknown persona command: {' '.join(tokens)}" ``` Only `list` and `set` are handled. The remaining 5 commands (`create`, `edit`, `delete`, `export`, `import`) all fall through to the `"Unknown persona command"` error response. **Note:** The slash catalog (`slash_catalog.py`) correctly lists all 7 persona commands, so they appear in the `/` overlay autocomplete — but selecting them produces an error response. Additionally, the command routing uses space-separated tokens (`/persona list`, `/persona set`) rather than the colon-separated format (`/persona:list`, `/persona:set`) shown in the spec. The `handle()` method splits on the first token `persona` and passes the rest as sub-tokens, but the slash catalog registers commands as `persona:list`, `persona:set`, etc. This means the routing format is inconsistent with the catalog format. ## Code Location - `src/cleveragents/tui/commands.py` lines ~115–125 — `_persona_command()` missing 5 sub-commands - `src/cleveragents/tui/commands.py` lines ~60–70 — `handle()` routes `persona` but catalog uses `persona:list` ## Impact - `/persona:create` → "Unknown persona command: create" (PersonaEditorModal never opens) - `/persona:edit` → "Unknown persona command: edit" - `/persona:delete` → "Unknown persona command: delete" - `/persona:export` → "Unknown persona command: export" - `/persona:import` → "Unknown persona command: import" Users cannot create, edit, delete, export, or import personas via slash commands. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — spec compliance bug identified by UAT testing
  • Story Points: 3 (M) — targeted fix to align implementation with spec
  • MoSCoW: Must Have — spec compliance is required for correct system behavior

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — spec compliance bug identified by UAT testing - **Story Points**: 3 (M) — targeted fix to align implementation with spec - **MoSCoW**: Must Have — spec compliance is required for correct system behavior --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
HAL9000 added this to the v3.7.0 milestone 2026-04-09 03:06:08 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#4717
No description provided.