Improve A2A Facade Consistency and Documentation #1320

Open
opened 2026-04-02 16:49:19 +00:00 by freemo · 1 comment
Owner

The A2aLocalFacade in src/cleveragents/a2a/facade.py has some inconsistencies and areas for improvement:

  1. Inconsistent Operation Naming: The new extension operations use the _cleveragents/ prefix and slashes (e.g., _cleveragents/plan/use), while legacy operations use dot notation (e.g., plan.create). A clear plan for deprecating and removing the legacy operations should be established.
  2. Missing Documentation: The docstring at the top of the file only lists the service dependencies for the legacy operations. It should be updated to include the dependencies for the new extension operations.
  3. Magic Strings for Service Names: Service names are passed as strings, which is error-prone. A more structured approach, like a service container or dataclass, would be better.

Recommendation:

  • Establish a clear deprecation path for legacy A2A operations.
  • Update the docstring in facade.py to include all service dependencies.
  • Consider refactoring the service dependency mechanism to avoid using magic strings.
The `A2aLocalFacade` in `src/cleveragents/a2a/facade.py` has some inconsistencies and areas for improvement: 1. **Inconsistent Operation Naming:** The new extension operations use the `_cleveragents/` prefix and slashes (e.g., `_cleveragents/plan/use`), while legacy operations use dot notation (e.g., `plan.create`). A clear plan for deprecating and removing the legacy operations should be established. 2. **Missing Documentation:** The docstring at the top of the file only lists the service dependencies for the legacy operations. It should be updated to include the dependencies for the new extension operations. 3. **Magic Strings for Service Names:** Service names are passed as strings, which is error-prone. A more structured approach, like a service container or dataclass, would be better. **Recommendation:** * Establish a clear deprecation path for legacy A2A operations. * Update the docstring in `facade.py` to include all service dependencies. * Consider refactoring the service dependency mechanism to avoid using magic strings.
freemo self-assigned this 2026-04-02 18:45:23 +00:00
Author
Owner

Label compliance fix applied:

  • Removed duplicate label: Type/Task
  • Reason: This issue has both Type/Refactor and Type/Task. Per CONTRIBUTING.md, each issue should have exactly one Type/* label. Since the issue is clearly a refactoring task, Type/Refactor is the more specific and accurate label. Type/Task has been removed.

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

Label compliance fix applied: - Removed duplicate label: `Type/Task` - Reason: This issue has both `Type/Refactor` and `Type/Task`. Per CONTRIBUTING.md, each issue should have exactly one `Type/*` label. Since the issue is clearly a refactoring task, `Type/Refactor` is the more specific and accurate label. `Type/Task` has been removed. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
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.

Dependencies

No dependencies set.

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