UAT: All /plan:* TUI slash commands return "Unknown command" — TuiCommandRouter has no plan command handler #3656

Open
opened 2026-04-05 21:09:47 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/tui-command-router-plan-handler
  • Commit Message: fix(tui): add _plan_command() handler to TuiCommandRouter for all plan:* slash commands
  • Milestone: None (Backlog)
  • Parent Epic: #868

Backlog note: This issue was discovered during autonomous operation
on milestone v3.7.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Summary

TuiCommandRouter.handle() in src/cleveragents/tui/commands.py dispatches to only three handlers: persona, session, and help. Any /plan:* command falls through to return f"Unknown command: /{raw}". There is no _plan_command() method or any plan routing logic, making all 16+ spec-required plan lifecycle commands completely non-functional in the TUI.

What Was Tested

TUI slash command routing for all plan commands defined in the spec's Plan Commands table.

Expected Behavior (from spec)

Per docs/specification.md (Plan Commands table), the following TUI slash commands must be functional and route to the corresponding A2A facade methods (_cleveragents/plan/*):

Slash Command A2A Method
/plan:use _cleveragents/plan/use
/plan:execute _cleveragents/plan/execute
/plan:apply _cleveragents/plan/apply
/plan:status _cleveragents/plan/status
/plan:list _cleveragents/plan/list
/plan:cancel _cleveragents/plan/cancel
/plan:tree _cleveragents/plan/tree
/plan:explain _cleveragents/plan/explain
/plan:correct _cleveragents/plan/correct
/plan:diff _cleveragents/plan/diff
/plan:artifacts _cleveragents/plan/artifacts
/plan:prompt _cleveragents/plan/prompt
/plan:rollback _cleveragents/plan/rollback
/plan:errors _cleveragents/plan/errors
/plan:resume _cleveragents/plan/resume
/plan:revert _cleveragents/plan/revert
/plan:inspect _cleveragents/plan/inspect

The A2A facade already has all plan handlers implemented (_handle_plan_use, _handle_plan_execute, etc. in src/cleveragents/a2a/facade.py). The TUI router simply needs to be wired to call them.

Actual Behavior

TuiCommandRouter.handle() in src/cleveragents/tui/commands.py (lines 48–59) has no if tokens[0] == "plan": branch. All /plan:* commands fall through to:

return f"Unknown command: /{raw}"

There is no _plan_command() method anywhere in the file.

Steps to Reproduce

  1. Launch the TUI.
  2. In the conversation panel, type /plan:status and press Enter.
  3. Observe: the panel shows "Unknown command: /plan:status" instead of plan status output.
  4. Repeat for any other /plan:* command — all produce the same error.

Impact

All 16+ plan lifecycle commands are completely non-functional in the TUI. Users cannot use the TUI to manage plans at all. This is a core feature of the TUI as defined by the spec.

Code Location

  • src/cleveragents/tui/commands.pyTuiCommandRouter.handle() method (lines 48–59): no plan branch exists
  • src/cleveragents/a2a/facade.py_handle_plan_* methods already implemented and available to call

Subtasks

  • Add if tokens[0] == "plan": branch to TuiCommandRouter.handle() in src/cleveragents/tui/commands.py
  • Implement _plan_command(self, subcommand: str, args: list[str]) -> str method that dispatches each of the 17 plan sub-commands to the corresponding A2A facade method
  • Wire all 17 plan sub-commands: use, execute, apply, status, list, cancel, tree, explain, correct, diff, artifacts, prompt, rollback, errors, resume, revert, inspect
  • Return a user-friendly error string for unknown plan sub-commands (e.g. "Unknown plan command: /plan:{subcommand}")
  • Tests (Behave): Add scenarios asserting each /plan:* command routes correctly and does not return "Unknown command: ..."
  • Tests (Behave): Add TDD issue-capture test tagged @tdd_expected_fail demonstrating the missing routing before the fix
  • Run nox -e lint and nox -e typecheck, fix any errors
  • Verify coverage >= 97% via nox -e coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

  • TuiCommandRouter.handle() contains a plan branch that dispatches to _plan_command()
  • _plan_command() correctly routes all 17 spec-required plan sub-commands to the A2A facade
  • Typing /plan:status (and all other /plan:* commands) in the TUI no longer returns "Unknown command: /plan:status"
  • All subtasks above are completed and checked off
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (fix/tui-command-router-plan-handler)
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/tui-command-router-plan-handler` - **Commit Message**: `fix(tui): add _plan_command() handler to TuiCommandRouter for all plan:* slash commands` - **Milestone**: None (Backlog) - **Parent Epic**: #868 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.7.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Summary `TuiCommandRouter.handle()` in `src/cleveragents/tui/commands.py` dispatches to only three handlers: `persona`, `session`, and `help`. Any `/plan:*` command falls through to `return f"Unknown command: /{raw}"`. There is no `_plan_command()` method or any plan routing logic, making all 16+ spec-required plan lifecycle commands completely non-functional in the TUI. ## What Was Tested TUI slash command routing for all plan commands defined in the spec's Plan Commands table. ## Expected Behavior (from spec) Per `docs/specification.md` (Plan Commands table), the following TUI slash commands must be functional and route to the corresponding A2A facade methods (`_cleveragents/plan/*`): | Slash Command | A2A Method | |---|---| | `/plan:use` | `_cleveragents/plan/use` | | `/plan:execute` | `_cleveragents/plan/execute` | | `/plan:apply` | `_cleveragents/plan/apply` | | `/plan:status` | `_cleveragents/plan/status` | | `/plan:list` | `_cleveragents/plan/list` | | `/plan:cancel` | `_cleveragents/plan/cancel` | | `/plan:tree` | `_cleveragents/plan/tree` | | `/plan:explain` | `_cleveragents/plan/explain` | | `/plan:correct` | `_cleveragents/plan/correct` | | `/plan:diff` | `_cleveragents/plan/diff` | | `/plan:artifacts` | `_cleveragents/plan/artifacts` | | `/plan:prompt` | `_cleveragents/plan/prompt` | | `/plan:rollback` | `_cleveragents/plan/rollback` | | `/plan:errors` | `_cleveragents/plan/errors` | | `/plan:resume` | `_cleveragents/plan/resume` | | `/plan:revert` | `_cleveragents/plan/revert` | | `/plan:inspect` | `_cleveragents/plan/inspect` | The A2A facade already has all plan handlers implemented (`_handle_plan_use`, `_handle_plan_execute`, etc. in `src/cleveragents/a2a/facade.py`). The TUI router simply needs to be wired to call them. ## Actual Behavior `TuiCommandRouter.handle()` in `src/cleveragents/tui/commands.py` (lines 48–59) has no `if tokens[0] == "plan":` branch. All `/plan:*` commands fall through to: ```python return f"Unknown command: /{raw}" ``` There is no `_plan_command()` method anywhere in the file. ## Steps to Reproduce 1. Launch the TUI. 2. In the conversation panel, type `/plan:status` and press Enter. 3. Observe: the panel shows `"Unknown command: /plan:status"` instead of plan status output. 4. Repeat for any other `/plan:*` command — all produce the same error. ## Impact All 16+ plan lifecycle commands are completely non-functional in the TUI. Users cannot use the TUI to manage plans at all. This is a core feature of the TUI as defined by the spec. ## Code Location - `src/cleveragents/tui/commands.py` — `TuiCommandRouter.handle()` method (lines 48–59): no `plan` branch exists - `src/cleveragents/a2a/facade.py` — `_handle_plan_*` methods already implemented and available to call ## Subtasks - [ ] Add `if tokens[0] == "plan":` branch to `TuiCommandRouter.handle()` in `src/cleveragents/tui/commands.py` - [ ] Implement `_plan_command(self, subcommand: str, args: list[str]) -> str` method that dispatches each of the 17 plan sub-commands to the corresponding A2A facade method - [ ] Wire all 17 plan sub-commands: `use`, `execute`, `apply`, `status`, `list`, `cancel`, `tree`, `explain`, `correct`, `diff`, `artifacts`, `prompt`, `rollback`, `errors`, `resume`, `revert`, `inspect` - [ ] Return a user-friendly error string for unknown plan sub-commands (e.g. `"Unknown plan command: /plan:{subcommand}"`) - [ ] Tests (Behave): Add scenarios asserting each `/plan:*` command routes correctly and does not return `"Unknown command: ..."` - [ ] Tests (Behave): Add TDD issue-capture test tagged `@tdd_expected_fail` demonstrating the missing routing before the fix - [ ] Run `nox -e lint` and `nox -e typecheck`, fix any errors - [ ] Verify coverage >= 97% via `nox -e coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done - [ ] `TuiCommandRouter.handle()` contains a `plan` branch that dispatches to `_plan_command()` - [ ] `_plan_command()` correctly routes all 17 spec-required plan sub-commands to the A2A facade - [ ] Typing `/plan:status` (and all other `/plan:*` commands) in the TUI no longer returns `"Unknown command: /plan:status"` - [ ] All subtasks above are completed and checked off - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`fix/tui-command-router-plan-handler`) - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.7.0 milestone 2026-04-05 21:13:15 +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.

Blocks
Reference
cleveragents/cleveragents-core#3656
No description provided.