UAT: agents tool add --update missing "Changes" and "References" panels in rich output #3504

Open
opened 2026-04-05 18:42:43 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/tool-add-update-missing-panels
  • Commit Message: fix(cli): render Changes and References panels for agents tool add --update
  • Milestone: Backlog
  • Parent Epic: #392

Backlog note: This issue was discovered during autonomous operation
on milestone v3.2.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 spec defines that agents tool add --update should display a "Tool Updated" panel plus "Changes" and "References" panels:

╭─ Tool Updated ─────────────────────────────╮
│ Name: local/db-migrate                     │
│ Source: custom (Python)                    │
│ Status: updated (was version 1 → now 2)    │
╰────────────────────────────────────────────╯

╭─ Changes ─────────────────────────────────────╮
│ Input Schema: modified (added batch_size)     │
│ Capabilities: unchanged (writes, checkpoint)  │
│ Description: updated                          │
╰───────────────────────────────────────────────╯

╭─ References ──────────────────╮
│ Skills: 1 (local/db-tools)    │
│ Actors: 0                     │
│ Referencing skills will use   │
│ the updated definition.       │
╰───────────────────────────────╯

✓ OK Tool updated

Problem

The add command in src/cleveragents/cli/commands/tool.py calls _print_tool(registered, title="Tool Updated", fmt=fmt) when --update is used and the tool already exists. The _print_tool() function shows only a single generic panel — it does NOT:

  1. Show a Changes panel comparing old vs new configuration
  2. Show a References panel listing skills and actors that use this tool
  3. Print ✓ OK Tool updated as a success line

Steps to Reproduce

  1. Register a tool: agents tool add --config ./tools/db-migrate.yaml
  2. Modify the tool config
  3. Update: agents tool add --config ./tools/db-migrate.yaml --update
  4. Expected: "Tool Updated" panel + "Changes" panel + "References" panel
  5. Actual: Single generic panel without Changes or References panels

Code Location

  • src/cleveragents/cli/commands/tool.py, add() function and _print_tool() function
  • The fix requires:
    1. Fetching the existing tool state before updating
    2. Computing a diff (input schema, capabilities, description changes)
    3. Querying which skills and actors reference this tool
    4. Rendering "Changes" and "References" panels
    5. Adding ✓ OK Tool updated success line

Subtasks

  • Fetch existing tool state before performing the update in add()
  • Compute diff between old and new tool configuration (input schema, capabilities, description)
  • Query registry for skills and actors that reference this tool
  • Implement _print_tool_update() (or extend _print_tool()) to render "Changes" and "References" panels
  • Add ✓ OK Tool updated success line after panels
  • Write/update unit tests covering the new panel output

Definition of Done

  • agents tool add --config <path> --update renders "Tool Updated", "Changes", and "References" panels as specified
  • "Changes" panel correctly reflects modified vs unchanged fields (input schema, capabilities, description)
  • "References" panel lists all skills and actors that reference the tool
  • ✓ OK Tool updated success line is printed after the panels
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/tool-add-update-missing-panels` - **Commit Message**: `fix(cli): render Changes and References panels for agents tool add --update` - **Milestone**: Backlog - **Parent Epic**: #392 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.2.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 spec defines that `agents tool add --update` should display a "Tool Updated" panel plus "Changes" and "References" panels: ``` ╭─ Tool Updated ─────────────────────────────╮ │ Name: local/db-migrate │ │ Source: custom (Python) │ │ Status: updated (was version 1 → now 2) │ ╰────────────────────────────────────────────╯ ╭─ Changes ─────────────────────────────────────╮ │ Input Schema: modified (added batch_size) │ │ Capabilities: unchanged (writes, checkpoint) │ │ Description: updated │ ╰───────────────────────────────────────────────╯ ╭─ References ──────────────────╮ │ Skills: 1 (local/db-tools) │ │ Actors: 0 │ │ Referencing skills will use │ │ the updated definition. │ ╰───────────────────────────────╯ ✓ OK Tool updated ``` ## Problem The `add` command in `src/cleveragents/cli/commands/tool.py` calls `_print_tool(registered, title="Tool Updated", fmt=fmt)` when `--update` is used and the tool already exists. The `_print_tool()` function shows only a single generic panel — it does NOT: 1. Show a **Changes** panel comparing old vs new configuration 2. Show a **References** panel listing skills and actors that use this tool 3. Print `✓ OK Tool updated` as a success line ## Steps to Reproduce 1. Register a tool: `agents tool add --config ./tools/db-migrate.yaml` 2. Modify the tool config 3. Update: `agents tool add --config ./tools/db-migrate.yaml --update` 4. **Expected**: "Tool Updated" panel + "Changes" panel + "References" panel 5. **Actual**: Single generic panel without Changes or References panels ## Code Location - `src/cleveragents/cli/commands/tool.py`, `add()` function and `_print_tool()` function - The fix requires: 1. Fetching the existing tool state before updating 2. Computing a diff (input schema, capabilities, description changes) 3. Querying which skills and actors reference this tool 4. Rendering "Changes" and "References" panels 5. Adding `✓ OK Tool updated` success line ## Subtasks - [ ] Fetch existing tool state before performing the update in `add()` - [ ] Compute diff between old and new tool configuration (input schema, capabilities, description) - [ ] Query registry for skills and actors that reference this tool - [ ] Implement `_print_tool_update()` (or extend `_print_tool()`) to render "Changes" and "References" panels - [ ] Add `✓ OK Tool updated` success line after panels - [ ] Write/update unit tests covering the new panel output ## Definition of Done - [ ] `agents tool add --config <path> --update` renders "Tool Updated", "Changes", and "References" panels as specified - [ ] "Changes" panel correctly reflects modified vs unchanged fields (input schema, capabilities, description) - [ ] "References" panel lists all skills and actors that reference the tool - [ ] `✓ OK Tool updated` success line is printed after the panels - [ ] 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:36:10 +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
#392 Epic: Actor YAML & Compiler
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3504
No description provided.