UAT: agents actor remove missing --format flag — spec requires JSON/YAML/plain output support #5457

Open
opened 2026-04-09 06:54:47 +00:00 by HAL9000 · 1 comment
Owner

Summary

The agents actor remove command does not accept a --format flag, making it impossible to get machine-readable output. The spec shows JSON and YAML output examples for this command.

Expected Behavior (from spec)

The spec at docs/specification.md line 5270 shows agents actor remove with JSON output:

{
  "command": "agents actor remove local/reviewer",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "actor_removed": {
      "name": "local/reviewer",
      "provider": "openai",
      "model": "gpt-4"
    },
    "impact": {
      "sessions": 0,
      "active_plans": 0,
      "actions_referencing": 0
    },
    "cleanup": {
      "config": "kept on disk",
      "contexts": "1 orphaned"
    }
  },
  "timing": { "duration_ms": 65 },
  "messages": [{ "level": "ok", "text": "Actor removed" }]
}

Actual Behavior

# src/cleveragents/cli/commands/actor.py line 781-840
@app.command()
def remove(name: Annotated[str, typer.Argument(help="Actor name to remove")]) -> None:
    """Remove a custom actor."""
    # No --format option defined
    # Always outputs Rich panels, no JSON/YAML support

The remove command signature has no --format parameter. All other actor commands (add, update, list, show) support --format. The remove command is the only one missing it.

Code Location

  • File: src/cleveragents/cli/commands/actor.py
  • Function: remove() at line 781
  • Missing: fmt: Annotated[str, typer.Option("--format", "-f", ...)] = "rich" parameter

Spec Reference

  • docs/specification.md lines 5270–5385: agents actor remove section with JSON/YAML/Plain output examples

Impact

  • Scripts and automation cannot get machine-readable output from agents actor remove
  • Inconsistent UX: all other actor commands support --format but remove does not
  • CI/CD pipelines that parse actor removal output will fail

Subtasks

  • Add --format/-f option to agents actor remove command
  • Implement JSON/YAML/plain output using format_output() with spec-required envelope
  • Ensure output includes actor_removed, impact, and cleanup sections
  • Add unit tests for format output variants

Definition of Done

  • agents actor remove local/reviewer --format json produces valid JSON envelope
  • agents actor remove local/reviewer --format yaml produces valid YAML envelope
  • agents actor remove local/reviewer --format plain produces plain text
  • Default (no --format) continues to show Rich panels
  • Unit tests cover all format variants

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

## Summary The `agents actor remove` command does not accept a `--format` flag, making it impossible to get machine-readable output. The spec shows JSON and YAML output examples for this command. ## Expected Behavior (from spec) The spec at `docs/specification.md` line 5270 shows `agents actor remove` with JSON output: ```json { "command": "agents actor remove local/reviewer", "status": "ok", "exit_code": 0, "data": { "actor_removed": { "name": "local/reviewer", "provider": "openai", "model": "gpt-4" }, "impact": { "sessions": 0, "active_plans": 0, "actions_referencing": 0 }, "cleanup": { "config": "kept on disk", "contexts": "1 orphaned" } }, "timing": { "duration_ms": 65 }, "messages": [{ "level": "ok", "text": "Actor removed" }] } ``` ## Actual Behavior ```python # src/cleveragents/cli/commands/actor.py line 781-840 @app.command() def remove(name: Annotated[str, typer.Argument(help="Actor name to remove")]) -> None: """Remove a custom actor.""" # No --format option defined # Always outputs Rich panels, no JSON/YAML support ``` The `remove` command signature has no `--format` parameter. All other actor commands (`add`, `update`, `list`, `show`) support `--format`. The `remove` command is the only one missing it. ## Code Location - **File**: `src/cleveragents/cli/commands/actor.py` - **Function**: `remove()` at line 781 - **Missing**: `fmt: Annotated[str, typer.Option("--format", "-f", ...)] = "rich"` parameter ## Spec Reference - `docs/specification.md` lines 5270–5385: `agents actor remove` section with JSON/YAML/Plain output examples ## Impact - Scripts and automation cannot get machine-readable output from `agents actor remove` - Inconsistent UX: all other actor commands support `--format` but `remove` does not - CI/CD pipelines that parse actor removal output will fail ## Subtasks - [ ] Add `--format/-f` option to `agents actor remove` command - [ ] Implement JSON/YAML/plain output using `format_output()` with spec-required envelope - [ ] Ensure output includes `actor_removed`, `impact`, and `cleanup` sections - [ ] Add unit tests for format output variants ## Definition of Done - `agents actor remove local/reviewer --format json` produces valid JSON envelope - `agents actor remove local/reviewer --format yaml` produces valid YAML envelope - `agents actor remove local/reviewer --format plain` produces plain text - Default (no `--format`) continues to show Rich panels - Unit tests cover all format variants --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 06:59:19 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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.

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