UAT: SkillConfigSchema uses inline_tools field name instead of spec-required anonymous_tools — spec-compliant skill YAML files are rejected #2112

Open
opened 2026-04-03 04:10:01 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/m8-skill-schema-anonymous-tools-field
  • Commit Message: fix(skills): rename inline_tools to anonymous_tools and add nested capability object in SkillConfigSchema
  • Milestone: v3.7.0
  • Parent Epic: #392

Problem

The SkillConfigSchema in src/cleveragents/skills/schema.py uses the field name inline_tools for anonymous inline tool definitions, but the specification defines this field as anonymous_tools. This means any skill YAML file written according to the specification will fail validation with a Pydantic extra="forbid" error.

Additionally, SkillInlineToolSchema uses flat writes and checkpointable fields instead of a nested capability object as the spec requires, and checkpoint_scope is not supported at all.

Expected Behavior (from spec)

The skill YAML configuration should accept anonymous_tools as the field name for inline tool definitions:

skill:
  name: local/devops-toolkit
  anonymous_tools:
    - description: "One-off data cleanup for this project"
      input_schema:
        type: object
        properties:
          table: { type: string }
      capability:
        writes: true
        checkpointable: true
      code: |
        return {"cleaned": count}

Actual Behavior

The SkillConfigSchema defines the field as inline_tools:

inline_tools: list[SkillInlineToolSchema] = Field(
    default_factory=list,
    description="Anonymous tool definitions within this skill.",
)

The camelCase mapping is inlineToolsinline_tools. A skill YAML using anonymous_tools: (as the spec requires) will fail with a Pydantic validation error because extra="forbid" is set on SkillConfigSchema.

Furthermore, SkillInlineToolSchema has flat capability fields:

writes: bool = Field(False, ...)
checkpointable: bool = Field(False, ...)

There is no capability nested object, and checkpoint_scope is not supported at all.

Steps to Reproduce

  1. Create a skill YAML file using the spec-compliant field name:
name: local/test-skill
description: Test skill
anonymous_tools:
  - description: "One-off cleanup"
    source: custom
    code: "return {}"
    capability:
      writes: true
  1. Call SkillConfigSchema.from_yaml(yaml_content)
  2. Observe: Pydantic raises ValidationError: Extra inputs are not permitted for the anonymous_tools field

Code Locations

  • src/cleveragents/skills/schema.py, SkillConfigSchema class, inline_tools field (~line 260)
  • src/cleveragents/skills/schema.py, _CAMEL_TO_SNAKE dict — maps inlineToolsinline_tools but spec uses anonymous_tools
  • src/cleveragents/skills/schema.py, SkillInlineToolSchema class — missing capability nested object and checkpoint_scope field

Severity

High — Any user following the specification to write skill YAML files with inline tools will have their files rejected. The field name mismatch is a fundamental schema incompatibility between the implementation and the specification.

Subtasks

  • Rename inline_tools field to anonymous_tools in SkillConfigSchema
  • Update _CAMEL_TO_SNAKE mapping dict: replace inlineToolsinline_tools with anonymousToolsanonymous_tools
  • Create a new SkillCapabilitySchema Pydantic model with writes: bool, checkpointable: bool, and checkpoint_scope: str | None fields
  • Replace flat writes and checkpointable fields in SkillInlineToolSchema with a nested capability: SkillCapabilitySchema field
  • Update any internal references to inline_tools throughout the codebase (e.g., compiler, loader, serializer)
  • Write Behave unit tests (features/) covering spec-compliant YAML round-trip for anonymous_tools with nested capability
  • Verify nox -e typecheck passes (Pyright)
  • Verify nox -e lint passes
  • Verify nox -e unit_tests passes
  • Verify nox -e coverage_report shows coverage >= 97%

Definition of Done

  • SkillConfigSchema accepts anonymous_tools as the field name per the specification
  • SkillInlineToolSchema uses a nested capability object with writes, checkpointable, and checkpoint_scope fields
  • All existing skill YAML round-trip tests pass without modification
  • New Behave scenarios cover the spec-compliant anonymous_tools + capability structure
  • All nox stages pass (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e integration_tests, nox -e coverage_report)
  • Coverage >= 97%
  • PR merged and this issue closed

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

## Metadata - **Branch**: `fix/m8-skill-schema-anonymous-tools-field` - **Commit Message**: `fix(skills): rename inline_tools to anonymous_tools and add nested capability object in SkillConfigSchema` - **Milestone**: v3.7.0 - **Parent Epic**: #392 ## Problem The `SkillConfigSchema` in `src/cleveragents/skills/schema.py` uses the field name `inline_tools` for anonymous inline tool definitions, but the specification defines this field as `anonymous_tools`. This means any skill YAML file written according to the specification will fail validation with a Pydantic `extra="forbid"` error. Additionally, `SkillInlineToolSchema` uses flat `writes` and `checkpointable` fields instead of a nested `capability` object as the spec requires, and `checkpoint_scope` is not supported at all. ### Expected Behavior (from spec) The skill YAML configuration should accept `anonymous_tools` as the field name for inline tool definitions: ```yaml skill: name: local/devops-toolkit anonymous_tools: - description: "One-off data cleanup for this project" input_schema: type: object properties: table: { type: string } capability: writes: true checkpointable: true code: | return {"cleaned": count} ``` ### Actual Behavior The `SkillConfigSchema` defines the field as `inline_tools`: ```python inline_tools: list[SkillInlineToolSchema] = Field( default_factory=list, description="Anonymous tool definitions within this skill.", ) ``` The camelCase mapping is `inlineTools` → `inline_tools`. A skill YAML using `anonymous_tools:` (as the spec requires) will fail with a Pydantic validation error because `extra="forbid"` is set on `SkillConfigSchema`. Furthermore, `SkillInlineToolSchema` has flat capability fields: ```python writes: bool = Field(False, ...) checkpointable: bool = Field(False, ...) ``` There is no `capability` nested object, and `checkpoint_scope` is not supported at all. ### Steps to Reproduce 1. Create a skill YAML file using the spec-compliant field name: ```yaml name: local/test-skill description: Test skill anonymous_tools: - description: "One-off cleanup" source: custom code: "return {}" capability: writes: true ``` 2. Call `SkillConfigSchema.from_yaml(yaml_content)` 3. Observe: Pydantic raises `ValidationError: Extra inputs are not permitted` for the `anonymous_tools` field ### Code Locations - `src/cleveragents/skills/schema.py`, `SkillConfigSchema` class, `inline_tools` field (~line 260) - `src/cleveragents/skills/schema.py`, `_CAMEL_TO_SNAKE` dict — maps `inlineTools` → `inline_tools` but spec uses `anonymous_tools` - `src/cleveragents/skills/schema.py`, `SkillInlineToolSchema` class — missing `capability` nested object and `checkpoint_scope` field ### Severity **High** — Any user following the specification to write skill YAML files with inline tools will have their files rejected. The field name mismatch is a fundamental schema incompatibility between the implementation and the specification. ## Subtasks - [ ] Rename `inline_tools` field to `anonymous_tools` in `SkillConfigSchema` - [ ] Update `_CAMEL_TO_SNAKE` mapping dict: replace `inlineTools` → `inline_tools` with `anonymousTools` → `anonymous_tools` - [ ] Create a new `SkillCapabilitySchema` Pydantic model with `writes: bool`, `checkpointable: bool`, and `checkpoint_scope: str | None` fields - [ ] Replace flat `writes` and `checkpointable` fields in `SkillInlineToolSchema` with a nested `capability: SkillCapabilitySchema` field - [ ] Update any internal references to `inline_tools` throughout the codebase (e.g., compiler, loader, serializer) - [ ] Write Behave unit tests (features/) covering spec-compliant YAML round-trip for `anonymous_tools` with nested `capability` - [ ] Verify `nox -e typecheck` passes (Pyright) - [ ] Verify `nox -e lint` passes - [ ] Verify `nox -e unit_tests` passes - [ ] Verify `nox -e coverage_report` shows coverage >= 97% ## Definition of Done - [ ] `SkillConfigSchema` accepts `anonymous_tools` as the field name per the specification - [ ] `SkillInlineToolSchema` uses a nested `capability` object with `writes`, `checkpointable`, and `checkpoint_scope` fields - [ ] All existing skill YAML round-trip tests pass without modification - [ ] New Behave scenarios cover the spec-compliant `anonymous_tools` + `capability` structure - [ ] All nox stages pass (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e integration_tests`, `nox -e coverage_report`) - [ ] Coverage >= 97% - [ ] PR merged and this issue closed --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.7.0 milestone 2026-04-03 04:10:05 +00:00
freemo self-assigned this 2026-04-03 16:58:05 +00:00
Author
Owner

MoSCoW classification: Should Have

Rationale: This issue addresses a spec requirement or important quality improvement. It should be included in the milestone if possible.


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

MoSCoW classification: **Should Have** Rationale: This issue addresses a spec requirement or important quality improvement. It should be included in the milestone if possible. --- **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.

Blocks
#392 Epic: Actor YAML & Compiler
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2112
No description provided.