bug(cli): agents resource type add missing spec-required "New subcommand available" info message #2532

Open
opened 2026-04-03 18:49:14 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/resource-type-add-new-subcommand-message
  • Commit Message: fix(cli): print "New subcommand available" info message after resource type add
  • Milestone: v3.6.0
  • Parent Epic: #398

Description

The specification (line 9924) requires that after successfully registering a custom resource type via agents resource type add, the CLI prints an informational message:

ℹ New subcommand available: agents resource add local/svn

The current implementation in /app/src/cleveragents/cli/commands/resource.py in the type_add() function only prints:

console.print(f"[green]Registered resource type:[/green] {spec.name}")
_print_type_panel(spec)

The "New subcommand available" info message is never printed, leaving users unaware that they can now use agents resource add <type> to add resources of the newly registered type.

Expected Behavior (from spec, line 9924)

After agents resource type add --config ./resource-types/svn.yaml, the output should include:

Registered resource type: local/svn
...
ℹ New subcommand available: agents resource add local/svn

Actual Behavior

The "New subcommand available" info message is absent from the output. Users are not informed that they can now use agents resource add local/svn to add resources of the new type.

Code Location

/app/src/cleveragents/cli/commands/resource.py, type_add() function:

console.print(f"[green]Registered resource type:[/green] {spec.name}")
_print_type_panel(spec)

The info message should be added after the panel display, e.g.:

if spec.user_addable:
    console.print(f"[blue]ℹ[/blue] New subcommand available: agents resource add {spec.name}")

Subtasks

  • Locate type_add() function in /app/src/cleveragents/cli/commands/resource.py
  • Add conditional info message print after _print_type_panel(spec) when spec.user_addable is True
  • Write Behave unit test scenario covering the new info message output
  • Write Robot Framework integration test verifying the message appears in CLI output
  • Verify all nox stages pass

Definition of Done

  • type_add() prints ℹ New subcommand available: agents resource add <name> after successful registration when the type is user-addable
  • Behave unit test added covering the new message (in features/)
  • Robot Framework integration test added verifying CLI output (in robot/)
  • All nox stages pass (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e integration_tests)
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/resource-type-add-new-subcommand-message` - **Commit Message**: `fix(cli): print "New subcommand available" info message after resource type add` - **Milestone**: v3.6.0 - **Parent Epic**: #398 ## Description The specification (line 9924) requires that after successfully registering a custom resource type via `agents resource type add`, the CLI prints an informational message: ``` ℹ New subcommand available: agents resource add local/svn ``` The current implementation in `/app/src/cleveragents/cli/commands/resource.py` in the `type_add()` function only prints: ```python console.print(f"[green]Registered resource type:[/green] {spec.name}") _print_type_panel(spec) ``` The "New subcommand available" info message is never printed, leaving users unaware that they can now use `agents resource add <type>` to add resources of the newly registered type. ## Expected Behavior (from spec, line 9924) After `agents resource type add --config ./resource-types/svn.yaml`, the output should include: ``` Registered resource type: local/svn ... ℹ New subcommand available: agents resource add local/svn ``` ## Actual Behavior The "New subcommand available" info message is absent from the output. Users are not informed that they can now use `agents resource add local/svn` to add resources of the new type. ## Code Location `/app/src/cleveragents/cli/commands/resource.py`, `type_add()` function: ```python console.print(f"[green]Registered resource type:[/green] {spec.name}") _print_type_panel(spec) ``` The info message should be added after the panel display, e.g.: ```python if spec.user_addable: console.print(f"[blue]ℹ[/blue] New subcommand available: agents resource add {spec.name}") ``` ## Subtasks - [ ] Locate `type_add()` function in `/app/src/cleveragents/cli/commands/resource.py` - [ ] Add conditional info message print after `_print_type_panel(spec)` when `spec.user_addable` is `True` - [ ] Write Behave unit test scenario covering the new info message output - [ ] Write Robot Framework integration test verifying the message appears in CLI output - [ ] Verify all nox stages pass ## Definition of Done - [ ] `type_add()` prints `ℹ New subcommand available: agents resource add <name>` after successful registration when the type is user-addable - [ ] Behave unit test added covering the new message (in `features/`) - [ ] Robot Framework integration test added verifying CLI output (in `robot/`) - [ ] All nox stages pass (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e integration_tests`) - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.6.0 milestone 2026-04-03 18:49:20 +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
#398 Epic: Post-MVP Resources
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2532
No description provided.