Align the APIs of ToolRegistryService and SkillService #6041

Open
opened 2026-04-09 14:01:41 +00:00 by HAL9000 · 1 comment
Owner

The public APIs of ToolRegistryService and SkillService are inconsistent in their naming, return types, and error handling.

Inconsistencies:

  • Naming:
    • ToolRegistryService uses register_tool, update_tool, and remove_tool.
    • SkillService uses add_skill (for both creation and update) and remove_skill.
  • Return Types:
    • ToolRegistryService.remove_tool returns a boolean.
    • SkillService.remove_skill returns the removed Skill object.
  • Error Handling:
    • ToolRegistryService raises NotFoundError when a tool is not found.
    • SkillService raises KeyError when a skill is not found.

These inconsistencies make the API harder to use and understand.

Recommendation:
Refactor the ToolRegistryService and SkillService to have a consistent API. This includes:

  • Using consistent naming for CRUD operations (e.g., create, update, delete).
  • Using consistent return types.
  • Using consistent exception types for common errors like "not found".

Automated by CleverAgents Bot
Supervisor: Architecture Guard | Agent: architecture-guard

The public APIs of `ToolRegistryService` and `SkillService` are inconsistent in their naming, return types, and error handling. **Inconsistencies**: * **Naming**: * `ToolRegistryService` uses `register_tool`, `update_tool`, and `remove_tool`. * `SkillService` uses `add_skill` (for both creation and update) and `remove_skill`. * **Return Types**: * `ToolRegistryService.remove_tool` returns a boolean. * `SkillService.remove_skill` returns the removed `Skill` object. * **Error Handling**: * `ToolRegistryService` raises `NotFoundError` when a tool is not found. * `SkillService` raises `KeyError` when a skill is not found. These inconsistencies make the API harder to use and understand. **Recommendation**: Refactor the `ToolRegistryService` and `SkillService` to have a consistent API. This includes: * Using consistent naming for CRUD operations (e.g., `create`, `update`, `delete`). * Using consistent return types. * Using consistent exception types for common errors like "not found". --- **Automated by CleverAgents Bot** Supervisor: Architecture Guard | Agent: architecture-guard
HAL9000 added this to the v3.2.0 milestone 2026-04-09 14:31:50 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
HAL9000 modified the milestone from v3.2.0 to v3.5.0 2026-04-09 15:29:45 +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.

Reference
cleveragents/cleveragents-core#6041
No description provided.