UAT: agents invariant remove rich output does not match spec — missing panel and invariant details #3196

Open
opened 2026-04-05 07:38:12 +00:00 by freemo · 3 comments
Owner

Metadata

  • Branch: fix/invariant-remove-rich-output
  • Commit Message: fix(cli): fix agents invariant remove rich output to match spec panel format
  • Milestone: (none — backlog)
  • Parent Epic: #394

Background and Context

The agents invariant remove command's rich output format does not match the specification (§18108–18185). The current implementation outputs a bare Rich markup string instead of the bordered panel with full invariant details that the spec requires. This was discovered during UAT testing of the invariant management CLI commands.

Current Behavior

The remove() function in src/cleveragents/cli/commands/invariant.py outputs only a single line:

[green]Invariant removed:[/green] {inv.id}

Issues:

  1. No rich panel with border titled "Invariant Removed"
  2. No display of the removed invariant's constraint text (Removed: field)
  3. No display of the scope (Scope: field)
  4. No properly formatted ID with inv_ prefix (ID: field)
  5. No ✓ OK Invariant removed confirmation line after the panel
  6. The confirmation prompt does not include the invariant text and scope as the spec requires: Remove invariant {id} ("{text}", scope: {scope})?
# Actual output (incorrect):
$ agents invariant remove inv_01HXM9A1C --yes
Invariant removed: inv_01HXM9A1C

Expected Behavior

Per spec §18108–18185, the rich output should display a bordered panel titled "Invariant Removed" containing the removed invariant's text, scope, and formatted ID, followed by a ✓ OK Invariant removed confirmation line. The confirmation prompt must also include the invariant text and scope.

$ 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

Steps to Reproduce

  1. Add an invariant: agents invariant add --global "Test constraint"
  2. Remove it: agents invariant remove <ID> --yes
  3. Observe the output format — only shows Invariant removed: <raw-ULID> with no panel, no constraint text, no scope, and no ✓ OK confirmation line.

Affected Code Location

File Location Issue
src/cleveragents/cli/commands/invariant.py remove() function Missing rich panel, missing invariant details in output, non-spec-compliant confirmation prompt

Subtasks

  • Update the confirmation prompt in remove() to include invariant text and scope: Remove invariant {id} ("{text}", scope: {scope})?
  • Replace the bare [green]Invariant removed:[/green] {inv.id} output with a Rich Panel titled "Invariant Removed"
  • Add Removed: field (constraint text) inside the panel
  • Add Scope: field (scope value) inside the panel
  • Add ID: field (invariant ID with inv_ prefix) inside the panel
  • Add ✓ OK Invariant removed confirmation line after the panel
  • Tests (Behave): Add/update scenarios for agents invariant remove rich output format
  • Tests (Robot): Add/update integration test for agents invariant remove output
  • Verify coverage ≥97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • The agents invariant remove rich output exactly matches the spec §18108–18185 panel format: bordered panel titled "Invariant Removed" with Removed:, Scope:, and ID: fields, followed by ✓ OK Invariant removed.
  • The confirmation prompt includes the invariant text and scope as specified.
  • 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.
  • 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%.

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


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

## Metadata - **Branch**: `fix/invariant-remove-rich-output` - **Commit Message**: `fix(cli): fix agents invariant remove rich output to match spec panel format` - **Milestone**: *(none — backlog)* - **Parent Epic**: #394 ## Background and Context The `agents invariant remove` command's rich output format does not match the specification (§18108–18185). The current implementation outputs a bare Rich markup string instead of the bordered panel with full invariant details that the spec requires. This was discovered during UAT testing of the invariant management CLI commands. ## Current Behavior The `remove()` function in `src/cleveragents/cli/commands/invariant.py` outputs only a single line: ``` [green]Invariant removed:[/green] {inv.id} ``` Issues: 1. No rich panel with border titled "Invariant Removed" 2. No display of the removed invariant's constraint text (`Removed:` field) 3. No display of the scope (`Scope:` field) 4. No properly formatted ID with `inv_` prefix (`ID:` field) 5. No `✓ OK Invariant removed` confirmation line after the panel 6. The confirmation prompt does not include the invariant text and scope as the spec requires: `Remove invariant {id} ("{text}", scope: {scope})?` ```bash # Actual output (incorrect): $ agents invariant remove inv_01HXM9A1C --yes Invariant removed: inv_01HXM9A1C ``` ## Expected Behavior Per spec §18108–18185, the rich output should display a bordered panel titled "Invariant Removed" containing the removed invariant's text, scope, and formatted ID, followed by a `✓ OK Invariant removed` confirmation line. The confirmation prompt must also include the invariant text and scope. ``` $ 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 ``` ## Steps to Reproduce 1. Add an invariant: `agents invariant add --global "Test constraint"` 2. Remove it: `agents invariant remove <ID> --yes` 3. Observe the output format — only shows `Invariant removed: <raw-ULID>` with no panel, no constraint text, no scope, and no `✓ OK` confirmation line. ## Affected Code Location | File | Location | Issue | |------|----------|-------| | `src/cleveragents/cli/commands/invariant.py` | `remove()` function | Missing rich panel, missing invariant details in output, non-spec-compliant confirmation prompt | ## Subtasks - [ ] Update the confirmation prompt in `remove()` to include invariant text and scope: `Remove invariant {id} ("{text}", scope: {scope})?` - [ ] Replace the bare `[green]Invariant removed:[/green] {inv.id}` output with a Rich `Panel` titled "Invariant Removed" - [ ] Add `Removed:` field (constraint text) inside the panel - [ ] Add `Scope:` field (scope value) inside the panel - [ ] Add `ID:` field (invariant ID with `inv_` prefix) inside the panel - [ ] Add `✓ OK Invariant removed` confirmation line after the panel - [ ] Tests (Behave): Add/update scenarios for `agents invariant remove` rich output format - [ ] Tests (Robot): Add/update integration test for `agents invariant remove` output - [ ] Verify coverage ≥97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - The `agents invariant remove` rich output exactly matches the spec §18108–18185 panel format: bordered panel titled "Invariant Removed" with `Removed:`, `Scope:`, and `ID:` fields, followed by `✓ OK Invariant removed`. - The confirmation prompt includes the invariant text and scope as specified. - 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. - 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%. > **Backlog note:** This issue was discovered during autonomous operation > on milestone <M>. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.2.0 milestone 2026-04-05 07:49:43 +00:00
freemo modified the milestone from v3.2.0 to v3.5.0 2026-04-05 08:06:11 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified — clear spec-vs-implementation mismatch with specific section references
  • Priority: Backlog (unchanged) — CLI output formatting issue, does not affect functionality
  • Milestone: v3.5.0 — invariant management is part of the Autonomy Hardening milestone scope
  • MoSCoW: Could Have — output formatting polish. The command works correctly; the output just doesn't match the spec's panel format. Desirable but not blocking.
  • Parent Epic: #394 (referenced in issue body)

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

Issue triaged by project owner: - **State**: Verified — clear spec-vs-implementation mismatch with specific section references - **Priority**: Backlog (unchanged) — CLI output formatting issue, does not affect functionality - **Milestone**: v3.5.0 — invariant management is part of the Autonomy Hardening milestone scope - **MoSCoW**: Could Have — output formatting polish. The command works correctly; the output just doesn't match the spec's panel format. Desirable but not blocking. - **Parent Epic**: #394 (referenced in issue body) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Milestone Triage Decision: Moved to Backlog

This CLI output formatting issue has been moved out of v3.5.0 during aggressive milestone triage. While important for spec compliance, it does not block core autonomy hardening functionality.

Reasoning:

  • v3.5.0 focus: Essential autonomy hardening (guard enforcement, A2A facade, plan lifecycle)
  • This issue: CLI output formatting (invariant remove) - low usage feature
  • Impact: UX consistency, not functional capability

Will be addressed in a future milestone focused on CLI polish and spec compliance.

**Milestone Triage Decision: Moved to Backlog** This CLI output formatting issue has been moved out of v3.5.0 during aggressive milestone triage. While important for spec compliance, it does not block core autonomy hardening functionality. **Reasoning:** - v3.5.0 focus: Essential autonomy hardening (guard enforcement, A2A facade, plan lifecycle) - This issue: CLI output formatting (`invariant remove`) - low usage feature - Impact: UX consistency, not functional capability Will be addressed in a future milestone focused on CLI polish and spec compliance.
freemo removed this from the v3.5.0 milestone 2026-04-06 22:39:52 +00:00
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
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#3196
No description provided.