UAT: agents invariant remove rich output shows only ID — spec requires Panel with text, scope, and ID fields #5478

Open
opened 2026-04-09 06:58:05 +00:00 by HAL9000 · 0 comments
Owner

Summary

The agents invariant remove command's rich output shows only the invariant ID on a single line. The spec requires a Panel with title "Invariant Removed" containing the invariant text, scope, and ID. Additionally, the confirmation prompt doesn't show the invariant text and scope as the spec requires.

Expected Behavior (from spec)

$ agents invariant remove inv_01HXM9A1C

Remove invariant inv_01HXM9A1C ("Payment processing must be idempotent", scope: global)? [y/N]: y

╭─ Invariant Removed ──────────────────────────────────────────────╮
│ Removed: Payment processing must be idempotent                   │
│ Scope: global                                                    │
│ ID: inv_01HXM9A1C                                                │
╰──────────────────────────────────────────────────────────────────╯

✓ OK Invariant removed

Actual Behavior

# src/cleveragents/cli/commands/invariant.py line 275
console.print(f"[green]Invariant removed:[/green] {inv.id}")

This produces:

Invariant removed: inv_01HXM9A1C

Problems:

  1. No Panel border — just a single line
  2. Missing invariant text (Removed: field)
  3. Missing scope field
  4. No ✓ OK Invariant removed success line
  5. Confirmation prompt doesn't include the invariant text and scope: Remove invariant inv_01HXM9A1C? instead of Remove invariant inv_01HXM9A1C ("Payment processing must be idempotent", scope: global)?

Code Location

  • File: src/cleveragents/cli/commands/invariant.py
  • Function: remove() at line 246
  • Lines: 259-275 (confirmation prompt and rich output)

Spec Reference

  • docs/specification.md lines 18200–18277: agents invariant remove section with Rich/Plain/JSON/YAML output examples

Impact

  • Rich output is inconsistent with the spec
  • Users don't see what invariant was removed (text and scope)
  • Confirmation prompt doesn't show enough context for the user to confirm safely

Subtasks

  • Fetch invariant details before removal to include in confirmation prompt
  • Update confirmation prompt to include invariant text and scope
  • Replace single-line output with Panel titled "Invariant Removed"
  • Panel should show Removed: (invariant text), Scope:, ID: fields
  • Add ✓ OK Invariant removed success line
  • Add unit tests for rich output format

Definition of Done

  • Confirmation prompt shows: Remove invariant <ID> ("<text>", scope: <scope>)? [y/N]:
  • Rich output uses Panel with title "Invariant Removed"
  • Panel shows Removed:, Scope:, ID: fields
  • Success line ✓ OK Invariant removed shown after panel
  • JSON/YAML/plain formats continue to work correctly

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

## Summary The `agents invariant remove` command's rich output shows only the invariant ID on a single line. The spec requires a `Panel` with title "Invariant Removed" containing the invariant text, scope, and ID. Additionally, the confirmation prompt doesn't show the invariant text and scope as the spec requires. ## Expected Behavior (from spec) ``` $ agents invariant remove inv_01HXM9A1C Remove invariant inv_01HXM9A1C ("Payment processing must be idempotent", scope: global)? [y/N]: y ╭─ Invariant Removed ──────────────────────────────────────────────╮ │ Removed: Payment processing must be idempotent │ │ Scope: global │ │ ID: inv_01HXM9A1C │ ╰──────────────────────────────────────────────────────────────────╯ ✓ OK Invariant removed ``` ## Actual Behavior ```python # src/cleveragents/cli/commands/invariant.py line 275 console.print(f"[green]Invariant removed:[/green] {inv.id}") ``` This produces: ``` Invariant removed: inv_01HXM9A1C ``` Problems: 1. No `Panel` border — just a single line 2. Missing invariant text (`Removed:` field) 3. Missing scope field 4. No `✓ OK Invariant removed` success line 5. Confirmation prompt doesn't include the invariant text and scope: `Remove invariant inv_01HXM9A1C?` instead of `Remove invariant inv_01HXM9A1C ("Payment processing must be idempotent", scope: global)?` ## Code Location - **File**: `src/cleveragents/cli/commands/invariant.py` - **Function**: `remove()` at line 246 - **Lines**: 259-275 (confirmation prompt and rich output) ## Spec Reference - `docs/specification.md` lines 18200–18277: `agents invariant remove` section with Rich/Plain/JSON/YAML output examples ## Impact - Rich output is inconsistent with the spec - Users don't see what invariant was removed (text and scope) - Confirmation prompt doesn't show enough context for the user to confirm safely ## Subtasks - [ ] Fetch invariant details before removal to include in confirmation prompt - [ ] Update confirmation prompt to include invariant text and scope - [ ] Replace single-line output with `Panel` titled "Invariant Removed" - [ ] Panel should show `Removed:` (invariant text), `Scope:`, `ID:` fields - [ ] Add `✓ OK Invariant removed` success line - [ ] Add unit tests for rich output format ## Definition of Done - Confirmation prompt shows: `Remove invariant <ID> ("<text>", scope: <scope>)? [y/N]:` - Rich output uses `Panel` with title "Invariant Removed" - Panel shows `Removed:`, `Scope:`, `ID:` fields - Success line `✓ OK Invariant removed` shown after panel - JSON/YAML/plain formats continue to work correctly --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
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#5478
No description provided.