UAT: Actor domain model has no skills field — actors cannot reference skills by name at the domain model level #2918

Open
opened 2026-04-05 02:48:22 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/actor-domain-model-skills-field
  • Commit Message: fix(actors): add typed skills field to Actor domain model for skill reference tracking
  • Milestone: v3.7.0
  • Parent Epic: #392

Bug Report

Feature Area

Skills System — actors referencing skills by name to acquire capabilities

What Was Tested

The Actor domain model in src/cleveragents/domain/models/core/actor.py was analyzed against the spec requirement that "Actors reference skills by name to acquire capabilities."

Expected Behavior (from spec)

The specification states: "Actors reference skills by name to acquire capabilities." The CLI supports agents actor run ... [--skill <SKILL>]... <NAME> <PROMPT>. This implies actors have a typed association with skills.

The Actor domain model should have a skills: list[str] field (or similar) that stores the namespaced skill names the actor is configured to use.

Actual Behavior

The Actor domain model in src/cleveragents/domain/models/core/actor.py has NO skills field:

class Actor(BaseModel):
    id: int | None
    name: str
    provider: str
    model: str
    config_blob: dict[str, Any]  # Generic blob — skills may be buried here
    config_hash: str
    graph_descriptor: dict[str, Any] | None
    yaml_text: str | None
    schema_version: str
    compiled_metadata: dict[str, Any] | None
    unsafe: bool
    is_built_in: bool
    is_default: bool
    created_at: datetime
    updated_at: datetime

Skills are presumably stored somewhere in config_blob as untyped JSON, but:

  1. There is no typed skills: list[str] field on the domain model
  2. There is no validation that skill names in config_blob are valid namespaced names
  3. SkillService.get_dependents() (already filed as #2824) cannot find actors referencing a skill because there is no typed field to query
  4. The Actor model uses extra="ignore" which means any skills key in YAML would be silently ignored if not in the model

This means the spec requirement "Actors reference skills by name" is not enforced at the domain model level. The SkillService.get_dependents() bug (#2824) is a symptom of this root cause.

Code Locations

  • src/cleveragents/domain/models/core/actor.pyActor class (missing skills field)
  • src/cleveragents/application/services/skill_service.pyget_dependents() returns empty actors list because there's no typed field to query
  • src/cleveragents/cli/commands/actor.pyactor run --skill flag (skills passed at runtime, not stored on actor)

Steps to Reproduce

  1. Create an actor YAML with skills:
name: local/code-assistant
provider: anthropic
model: claude-3-5-sonnet
skills:
  - local/file-reader
  - local/git-tools
  1. Register: agents actor add --config code-assistant.yaml
  2. Check: agents skill show local/file-reader — observe that the actor is NOT listed as a dependent
  3. The skills key in the YAML is silently ignored due to extra="ignore" on the Actor model

Severity

Medium — The spec explicitly requires actors to reference skills by name. Without a typed skills field on the Actor domain model, skill dependency tracking is impossible and the get_dependents() method (already filed as #2824) cannot be fixed without this root cause being addressed first.

Subtasks

  • Add skills: list[str] field (defaulting to []) to the Actor domain model in src/cleveragents/domain/models/core/actor.py
  • Add a validator on the skills field to ensure each entry is a valid namespaced skill name (e.g., namespace/name format)
  • Update the actor compiler / YAML parser to populate the skills field from the actor YAML skills: key
  • Update the actor persistence layer (ORM model / repository) to persist and load the skills field
  • Verify that SkillService.get_dependents() (see #2824) can now query actors via the typed skills field
  • Add Behave BDD unit test scenarios covering: actor with skills field populated, actor with empty skills list, actor YAML with invalid skill name rejected by validator
  • Add/update Robot Framework integration test for agents actor add with a skills: key in YAML — verify the field is persisted and retrievable
  • Ensure all nox stages pass

Definition of Done

  • Actor domain model has a typed skills: list[str] field with namespaced-name validation
  • Actor YAML with a skills: key correctly populates the Actor.skills field (not silently ignored)
  • The skills field is persisted to and loaded from the database via the actor repository
  • SkillService.get_dependents() (#2824) is unblocked and can query actors via the typed skills field
  • Behave BDD scenarios cover the skills field with ≥3 scenarios (populated, empty, invalid name rejected)
  • Robot Framework integration tests validate end-to-end actor registration with skills
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/actor-domain-model-skills-field` - **Commit Message**: `fix(actors): add typed skills field to Actor domain model for skill reference tracking` - **Milestone**: v3.7.0 - **Parent Epic**: #392 ## Bug Report ### Feature Area Skills System — actors referencing skills by name to acquire capabilities ### What Was Tested The `Actor` domain model in `src/cleveragents/domain/models/core/actor.py` was analyzed against the spec requirement that "Actors reference skills by name to acquire capabilities." ### Expected Behavior (from spec) The specification states: "Actors reference skills by name to acquire capabilities." The CLI supports `agents actor run ... [--skill <SKILL>]... <NAME> <PROMPT>`. This implies actors have a typed association with skills. The `Actor` domain model should have a `skills: list[str]` field (or similar) that stores the namespaced skill names the actor is configured to use. ### Actual Behavior The `Actor` domain model in `src/cleveragents/domain/models/core/actor.py` has **NO `skills` field**: ```python class Actor(BaseModel): id: int | None name: str provider: str model: str config_blob: dict[str, Any] # Generic blob — skills may be buried here config_hash: str graph_descriptor: dict[str, Any] | None yaml_text: str | None schema_version: str compiled_metadata: dict[str, Any] | None unsafe: bool is_built_in: bool is_default: bool created_at: datetime updated_at: datetime ``` Skills are presumably stored somewhere in `config_blob` as untyped JSON, but: 1. There is no typed `skills: list[str]` field on the domain model 2. There is no validation that skill names in `config_blob` are valid namespaced names 3. `SkillService.get_dependents()` (already filed as #2824) cannot find actors referencing a skill because there is no typed field to query 4. The `Actor` model uses `extra="ignore"` which means any `skills` key in YAML would be silently ignored if not in the model This means the spec requirement "Actors reference skills by name" is not enforced at the domain model level. The `SkillService.get_dependents()` bug (#2824) is a symptom of this root cause. ### Code Locations - `src/cleveragents/domain/models/core/actor.py` — `Actor` class (missing `skills` field) - `src/cleveragents/application/services/skill_service.py` — `get_dependents()` returns empty actors list because there's no typed field to query - `src/cleveragents/cli/commands/actor.py` — `actor run --skill` flag (skills passed at runtime, not stored on actor) ### Steps to Reproduce 1. Create an actor YAML with skills: ```yaml name: local/code-assistant provider: anthropic model: claude-3-5-sonnet skills: - local/file-reader - local/git-tools ``` 2. Register: `agents actor add --config code-assistant.yaml` 3. Check: `agents skill show local/file-reader` — observe that the actor is NOT listed as a dependent 4. The `skills` key in the YAML is silently ignored due to `extra="ignore"` on the Actor model ### Severity **Medium** — The spec explicitly requires actors to reference skills by name. Without a typed `skills` field on the Actor domain model, skill dependency tracking is impossible and the `get_dependents()` method (already filed as #2824) cannot be fixed without this root cause being addressed first. ## Subtasks - [ ] Add `skills: list[str]` field (defaulting to `[]`) to the `Actor` domain model in `src/cleveragents/domain/models/core/actor.py` - [ ] Add a validator on the `skills` field to ensure each entry is a valid namespaced skill name (e.g., `namespace/name` format) - [ ] Update the actor compiler / YAML parser to populate the `skills` field from the actor YAML `skills:` key - [ ] Update the actor persistence layer (ORM model / repository) to persist and load the `skills` field - [ ] Verify that `SkillService.get_dependents()` (see #2824) can now query actors via the typed `skills` field - [ ] Add Behave BDD unit test scenarios covering: actor with skills field populated, actor with empty skills list, actor YAML with invalid skill name rejected by validator - [ ] Add/update Robot Framework integration test for `agents actor add` with a `skills:` key in YAML — verify the field is persisted and retrievable - [ ] Ensure all nox stages pass ## Definition of Done - [ ] `Actor` domain model has a typed `skills: list[str]` field with namespaced-name validation - [ ] Actor YAML with a `skills:` key correctly populates the `Actor.skills` field (not silently ignored) - [ ] The `skills` field is persisted to and loaded from the database via the actor repository - [ ] `SkillService.get_dependents()` (#2824) is unblocked and can query actors via the typed `skills` field - [ ] Behave BDD scenarios cover the `skills` field with ≥3 scenarios (populated, empty, invalid name rejected) - [ ] Robot Framework integration tests validate end-to-end actor registration with skills - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.7.0 milestone 2026-04-05 02:48:26 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium (confirmed)
  • MoSCoW: Should Have — Actor domain model missing skills field

Valid UAT finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium (confirmed) - **MoSCoW**: Should Have — Actor domain model missing skills field Valid UAT finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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#2918
No description provided.