UAT: agents invariant add/remove output missing rich Panel format — uses plain text instead of bordered panel #3523

Open
opened 2026-04-05 18:54:35 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/invariant-cli-rich-panel-output
  • Commit Message: fix(cli): use rich Panel format for invariant add/remove output
  • Milestone: Backlog (no milestone — see backlog note below)
  • Parent Epic: #394

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

Background and Context

The agents invariant add and agents invariant remove CLI commands output plain text instead of the spec-required rich bordered panel format. All other CLI commands (e.g., action.py, plan.py, project.py) correctly use from rich.panel import Panelinvariant.py does not import Panel at all.

Current Behavior

agents invariant add outputs:

Invariant added: <id>
  Text:   <text>
  Scope:  <scope>
  Source: <source>

agents invariant remove outputs:

Invariant removed: <id>

No bordered panel, no ✓ OK confirmation line, no scope-specific context fields (e.g., Project:, Plan:, Action: labels).

Expected Behavior (from spec §17792-17856 and §18108-18136)

agents invariant add --global "All public APIs must maintain backward compatibility" should produce:

╭─ Invariant Added ──────────────────────────────────────────────────────╮
│ Invariant: All public APIs must maintain backward compatibility        │
│ Scope: global                                                          │
│ ID: inv_01HXM9A1B                                                      │
╰────────────────────────────────────────────────────────────────────────╯

✓ OK Invariant added

agents invariant remove inv_01HXM9A1C should produce:

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

✓ OK Invariant removed

Code Location

  • src/cleveragents/cli/commands/invariant.py lines 140–143 (add command rich output)
  • src/cleveragents/cli/commands/invariant.py line 275 (remove command rich output)
  • Other CLI commands (e.g., action.py, plan.py, project.py) correctly use from rich.panel import Panelinvariant.py does not import Panel at all.

Steps to Reproduce

  1. Run agents invariant add --global "test invariant"
  2. Observe output is plain text, not a bordered panel

Impact

Visual inconsistency with all other CLI commands. The spec explicitly shows the panel format as the expected rich output.

Subtasks

  • Import Panel from rich.panel in invariant.py
  • Refactor add command output (lines 140–143) to use a rich Panel with Invariant, Scope, ID fields and a ✓ OK Invariant added confirmation line
  • Refactor remove command output (line 275) to use a rich Panel with Removed, Scope, ID fields and a ✓ OK Invariant removed confirmation line
  • Add scope-specific context fields (e.g., Project:, Plan:, Action:) where applicable, matching spec §17792-17856
  • Write or update unit tests to assert panel output format for add and remove commands

Definition of Done

  • agents invariant add produces a rich bordered panel matching the spec format
  • agents invariant remove produces a rich bordered panel matching the spec format
  • Output is visually consistent with all other CLI commands
  • All subtasks completed
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/invariant-cli-rich-panel-output` - **Commit Message**: `fix(cli): use rich Panel format for invariant add/remove output` - **Milestone**: Backlog (no milestone — see backlog note below) - **Parent Epic**: #394 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.3.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Background and Context The `agents invariant add` and `agents invariant remove` CLI commands output plain text instead of the spec-required rich bordered panel format. All other CLI commands (e.g., `action.py`, `plan.py`, `project.py`) correctly use `from rich.panel import Panel` — `invariant.py` does not import `Panel` at all. ## Current Behavior `agents invariant add` outputs: ``` Invariant added: <id> Text: <text> Scope: <scope> Source: <source> ``` `agents invariant remove` outputs: ``` Invariant removed: <id> ``` No bordered panel, no `✓ OK` confirmation line, no scope-specific context fields (e.g., `Project:`, `Plan:`, `Action:` labels). ## Expected Behavior (from spec §17792-17856 and §18108-18136) `agents invariant add --global "All public APIs must maintain backward compatibility"` should produce: ``` ╭─ Invariant Added ──────────────────────────────────────────────────────╮ │ Invariant: All public APIs must maintain backward compatibility │ │ Scope: global │ │ ID: inv_01HXM9A1B │ ╰────────────────────────────────────────────────────────────────────────╯ ✓ OK Invariant added ``` `agents invariant remove inv_01HXM9A1C` should produce: ``` ╭─ Invariant Removed ──────────────────────────────────────────────╮ │ Removed: Payment processing must be idempotent │ │ Scope: global │ │ ID: inv_01HXM9A1C │ ╰──────────────────────────────────────────────────────────────────╯ ✓ OK Invariant removed ``` ## Code Location - `src/cleveragents/cli/commands/invariant.py` lines 140–143 (`add` command rich output) - `src/cleveragents/cli/commands/invariant.py` line 275 (`remove` command rich output) - Other CLI commands (e.g., `action.py`, `plan.py`, `project.py`) correctly use `from rich.panel import Panel` — `invariant.py` does not import `Panel` at all. ## Steps to Reproduce 1. Run `agents invariant add --global "test invariant"` 2. Observe output is plain text, not a bordered panel ## Impact Visual inconsistency with all other CLI commands. The spec explicitly shows the panel format as the expected rich output. ## Subtasks - [ ] Import `Panel` from `rich.panel` in `invariant.py` - [ ] Refactor `add` command output (lines 140–143) to use a rich `Panel` with `Invariant`, `Scope`, `ID` fields and a `✓ OK Invariant added` confirmation line - [ ] Refactor `remove` command output (line 275) to use a rich `Panel` with `Removed`, `Scope`, `ID` fields and a `✓ OK Invariant removed` confirmation line - [ ] Add scope-specific context fields (e.g., `Project:`, `Plan:`, `Action:`) where applicable, matching spec §17792-17856 - [ ] Write or update unit tests to assert panel output format for `add` and `remove` commands ## Definition of Done - [ ] `agents invariant add` produces a rich bordered panel matching the spec format - [ ] `agents invariant remove` produces a rich bordered panel matching the spec format - [ ] Output is visually consistent with all other CLI commands - [ ] All subtasks completed - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 20:05:39 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Low — agents invariant add/remove output uses plain text instead of spec-required rich Panel format. Visual inconsistency with other CLI commands.
  • Milestone: v3.7.0
  • Story Points: 2 — S — Import Panel, refactor output formatting for add and remove commands. Straightforward template change.
  • MoSCoW: Could Have — Pure output formatting polish. The commands work correctly; the output just doesn't match the spec's visual format. Can be deferred without functional impact.
  • Parent Epic: #394 (dependency link already exists)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Low — `agents invariant add/remove` output uses plain text instead of spec-required rich Panel format. Visual inconsistency with other CLI commands. - **Milestone**: v3.7.0 - **Story Points**: 2 — S — Import Panel, refactor output formatting for add and remove commands. Straightforward template change. - **MoSCoW**: Could Have — Pure output formatting polish. The commands work correctly; the output just doesn't match the spec's visual format. Can be deferred without functional impact. - **Parent Epic**: #394 (dependency link already exists) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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
#394 Epic: Decision Framework
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3523
No description provided.