feat(skill): add skill domain model and resolver #282

Closed
opened 2026-02-22 23:40:53 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit: feat(skill): add skill domain model and resolver
  • Branch: feature/m3-skill-domain

Subtasks

  • Add Skill, SkillItem, SkillToolRef, SkillInclude, and SkillInlineTool models in src/cleveragents/domain/models/core/skill.py with namespaced naming rules. (475 lines; models: SkillToolRef, SkillInclude, SkillInlineTool, SkillMcpSource, SkillAgentSource, SkillCapabilitySummary, Skill, ResolvedToolEntry, SkillResolver)
  • Implement SkillResolver to flatten includes into ordered tool lists, de-duplicate tools, and reject cycles with path traces.
  • Add Skill.resolve_tools() returning resolved tool/validation names plus inline tool definitions for compiler use. (Implemented as SkillResolver.resolve() returning list[ResolvedToolEntry])
  • Add docs/reference/skill_model.md and docs/reference/skill_resolution.md with resolution order examples.
  • Tests (Behave): Add features/skill_resolution.feature for include ordering, de-dupe rules, and cycle detection. (42 scenarios)
  • Tests (ASV): Add asv/benchmarks/skill_resolution_bench.py for resolver performance.
  • Run nox (all default sessions, including benchmark). NOTE: lint 0 findings, typecheck 0 errors, unit_tests 2335 scenarios passed (0 failures).
  • Verify coverage >=97% via nox -s coverage_report. Coverage 97% overall (skill.py 98%).

Section: ### Section 5: Actors, Skills & Tool Execution [WORKSTREAM C - Aditya Lead]
Status: Completed

## Metadata - **Commit**: `feat(skill): add skill domain model and resolver` - **Branch**: `feature/m3-skill-domain` ## Subtasks - [x] Add `Skill`, `SkillItem`, `SkillToolRef`, `SkillInclude`, and `SkillInlineTool` models in `src/cleveragents/domain/models/core/skill.py` with namespaced naming rules. (475 lines; models: SkillToolRef, SkillInclude, SkillInlineTool, SkillMcpSource, SkillAgentSource, SkillCapabilitySummary, Skill, ResolvedToolEntry, SkillResolver) - [x] Implement `SkillResolver` to flatten includes into ordered tool lists, de-duplicate tools, and reject cycles with path traces. - [x] Add `Skill.resolve_tools()` returning resolved tool/validation names plus inline tool definitions for compiler use. (Implemented as SkillResolver.resolve() returning list[ResolvedToolEntry]) - [x] Add `docs/reference/skill_model.md` and `docs/reference/skill_resolution.md` with resolution order examples. - [x] Tests (Behave): Add `features/skill_resolution.feature` for include ordering, de-dupe rules, and cycle detection. (42 scenarios) - [x] Tests (ASV): Add `asv/benchmarks/skill_resolution_bench.py` for resolver performance. - [x] Run `nox` (all default sessions, including benchmark). NOTE: lint 0 findings, typecheck 0 errors, unit_tests 2335 scenarios passed (0 failures). - [x] Verify coverage >=97% via `nox -s coverage_report`. Coverage 97% overall (skill.py 98%). **Section**: ### Section 5: Actors, Skills & Tool Execution [WORKSTREAM C - Aditya Lead] **Status**: Completed
freemo added this to the v3.1.0 milestone 2026-02-22 23:40:53 +00:00
freemo self-assigned this 2026-02-22 23:40:53 +00:00
Author
Owner

Implementation Notes — C0.skill.domain: Skill Domain Model and Resolver

2026-02-13: Stage C0.skill.domain Complete - Skill Domain Model and Resolver

  • Created skill.py (475 lines) with 9 Pydantic models. SkillResolver.resolve() flattens includes, de-duplicates tools, rejects cycles with path traces.
  • Key decision: SkillResolver is a standalone class (not a method on Skill) to support registry-backed resolution.
  • Key decision: ResolvedToolEntry includes source tracking for compiler diagnostics.

(Migrated from docs/implementation-notes.md)

## Implementation Notes — C0.skill.domain: Skill Domain Model and Resolver **2026-02-13**: Stage C0.skill.domain Complete - Skill Domain Model and Resolver - Created `skill.py` (475 lines) with 9 Pydantic models. `SkillResolver.resolve()` flattens includes, de-duplicates tools, rejects cycles with path traces. - Key decision: `SkillResolver` is a standalone class (not a method on Skill) to support registry-backed resolution. - Key decision: `ResolvedToolEntry` includes source tracking for compiler diagnostics. *(Migrated from `docs/implementation-notes.md`)*
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
#354 Epic: Actor & Skill Schema + CLI (C0)
cleveragents/cleveragents-core
Depends on
#56 feature/m3-skill-domain
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#282
No description provided.