UAT: SkillConfigSchema uses inline_tools field name but spec requires anonymous_tools — skill YAML files following spec are silently rejected #2487

Open
opened 2026-04-03 18:38:01 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: fix/skill-anonymous-tools-field-name
  • Commit Message: fix(skills): rename inline_tools to anonymous_tools in SkillConfigSchema to match spec
  • Milestone: v3.6.0
  • Parent Epic: #392

Summary

SkillConfigSchema (in src/cleveragents/skills/schema.py) uses the field name inline_tools for anonymous inline tool definitions within a skill. However, the specification consistently uses the term anonymous_tools for this concept. This naming mismatch means that skill YAML files written according to the spec (using anonymous_tools:) will fail validation with extra="forbid", while the correct field inline_tools: is not documented in the spec.

Expected Behavior (from spec)

The specification (docs/specification.md, Skill Configuration section) shows:

skill:
  name: local/devops-toolkit
  
  # ── Anonymous Tools ──────────────────────────────────────────────────────
  # Inline tool definitions for one-off, skill-specific operations.
  # Same format as a named tool YAML body but without a name.
  # These are NOT registered in the Tool Registry and are NOT reusable.
  anonymous_tools:
    - description: "One-off cleanup for legacy migration artifacts"
      input_schema:
        type: object
        properties:
          directory: { type: string }
      capability:
        writes: true
        checkpointable: true
      code: |
        # ... Python code ...
        return {"cleaned": count}

The spec glossary also defines:

Anonymous Tool: An inline tool definition embedded in a skill YAML or actor graph node. Same schema as a named tool but unregistered, unnamespaced, and scoped only to its defining context.

Actual Behavior

SkillConfigSchema defines the field as inline_tools:

class SkillConfigSchema(BaseModel):
    # ─── Inline Tools ───────────────────────────────────────────
    inline_tools: list[SkillInlineToolSchema] = Field(
        default_factory=list,
        description="Anonymous tool definitions within this skill.",
    )

A skill YAML using anonymous_tools: (as per spec) will fail:

pydantic.ValidationError: 1 validation error for SkillConfigSchema
anonymous_tools
  Extra inputs are not permitted [type=extra_forbidden]

Additional Discrepancy: SkillInlineToolSchema requires name field

The spec says anonymous tools have "Same schema as a named tool but without a name" (they are "unnamespaced"). However, SkillInlineToolSchema has a required name field:

class SkillInlineToolSchema(BaseModel):
    name: str = Field(..., min_length=1, ...)  # Required — but spec says no name!

The spec's anonymous tool format does not include a name: field.

Code Locations

  • src/cleveragents/skills/schema.pySkillConfigSchema.inline_tools field and SkillInlineToolSchema
  • src/cleveragents/domain/models/core/skill.pySkill.anonymous_tools (domain model uses correct name)

Note: The domain model Skill correctly uses anonymous_tools — the inconsistency is only in SkillConfigSchema.

Subtasks

  • Rename SkillConfigSchema.inline_tools to anonymous_tools
  • Add inline_tools as a deprecated alias in _CAMEL_TO_SNAKE for backward compatibility
  • Remove the required name field from SkillInlineToolSchema (anonymous tools have no name per spec)
  • Update SkillService._schema_to_skill_dict() to map anonymous_tools correctly
  • Add Behave unit tests for spec-compliant anonymous tool YAML

Definition of Done

  • Skill YAML with anonymous_tools: (no name: field per tool) parses correctly
  • SkillConfigSchema field is named anonymous_tools
  • Domain model Skill.anonymous_tools is populated correctly from schema
  • nox -e unit_tests passes

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

## Metadata - **Branch**: `fix/skill-anonymous-tools-field-name` - **Commit Message**: `fix(skills): rename inline_tools to anonymous_tools in SkillConfigSchema to match spec` - **Milestone**: v3.6.0 - **Parent Epic**: #392 ## Summary `SkillConfigSchema` (in `src/cleveragents/skills/schema.py`) uses the field name `inline_tools` for anonymous inline tool definitions within a skill. However, the specification consistently uses the term `anonymous_tools` for this concept. This naming mismatch means that skill YAML files written according to the spec (using `anonymous_tools:`) will fail validation with `extra="forbid"`, while the correct field `inline_tools:` is not documented in the spec. ## Expected Behavior (from spec) The specification (`docs/specification.md`, Skill Configuration section) shows: ```yaml skill: name: local/devops-toolkit # ── Anonymous Tools ────────────────────────────────────────────────────── # Inline tool definitions for one-off, skill-specific operations. # Same format as a named tool YAML body but without a name. # These are NOT registered in the Tool Registry and are NOT reusable. anonymous_tools: - description: "One-off cleanup for legacy migration artifacts" input_schema: type: object properties: directory: { type: string } capability: writes: true checkpointable: true code: | # ... Python code ... return {"cleaned": count} ``` The spec glossary also defines: > **Anonymous Tool**: An inline tool definition embedded in a skill YAML or actor graph node. Same schema as a named tool but unregistered, unnamespaced, and scoped only to its defining context. ## Actual Behavior `SkillConfigSchema` defines the field as `inline_tools`: ```python class SkillConfigSchema(BaseModel): # ─── Inline Tools ─────────────────────────────────────────── inline_tools: list[SkillInlineToolSchema] = Field( default_factory=list, description="Anonymous tool definitions within this skill.", ) ``` A skill YAML using `anonymous_tools:` (as per spec) will fail: ``` pydantic.ValidationError: 1 validation error for SkillConfigSchema anonymous_tools Extra inputs are not permitted [type=extra_forbidden] ``` ## Additional Discrepancy: `SkillInlineToolSchema` requires `name` field The spec says anonymous tools have "Same schema as a named tool but **without a name**" (they are "unnamespaced"). However, `SkillInlineToolSchema` has a required `name` field: ```python class SkillInlineToolSchema(BaseModel): name: str = Field(..., min_length=1, ...) # Required — but spec says no name! ``` The spec's anonymous tool format does not include a `name:` field. ## Code Locations - `src/cleveragents/skills/schema.py` — `SkillConfigSchema.inline_tools` field and `SkillInlineToolSchema` - `src/cleveragents/domain/models/core/skill.py` — `Skill.anonymous_tools` (domain model uses correct name) Note: The domain model `Skill` correctly uses `anonymous_tools` — the inconsistency is only in `SkillConfigSchema`. ## Subtasks - [ ] Rename `SkillConfigSchema.inline_tools` to `anonymous_tools` - [ ] Add `inline_tools` as a deprecated alias in `_CAMEL_TO_SNAKE` for backward compatibility - [ ] Remove the required `name` field from `SkillInlineToolSchema` (anonymous tools have no name per spec) - [ ] Update `SkillService._schema_to_skill_dict()` to map `anonymous_tools` correctly - [ ] Add Behave unit tests for spec-compliant anonymous tool YAML ## Definition of Done - Skill YAML with `anonymous_tools:` (no `name:` field per tool) parses correctly - `SkillConfigSchema` field is named `anonymous_tools` - Domain model `Skill.anonymous_tools` is populated correctly from schema - `nox -e unit_tests` passes --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have — Spec compliance or quality improvement that should be included in the milestone.

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have — Spec compliance or quality improvement that should be included in the milestone. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have (already set)

Valid finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have (already set) Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo added this to the v3.7.0 milestone 2026-04-05 05:07:08 +00:00
freemo removed this from the v3.7.0 milestone 2026-04-07 00:49:54 +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.

Dependencies

No dependencies set.

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