Skip to content

[Feat]: Manifest param validation and standardize outputs key in registry skills #125

@rosspeili

Description

@rosspeili

Feature Description

Two manifest contract gaps in the registry after v0.3.1:

  1. BaseSkill.validate_params() is a stub, always returns True (skillware/core/base_skill.py). Agent loops can call skills with missing or wrong-typed args, basically failures happen inside execute() instead of upfront.

  2. output vs outputs drift, finance/wallet_screening uses output:; template and newer skills use outputs: (novelty_extractor, tos_evaluator, issue_resolver).

Deliver in one PR:

  • Implement validate_params() using each skill's manifest.yaml parameters JSON Schema (fail with a clear error on missing required fields / wrong types).
  • Standardize on outputs everywhere; fix wallet_screening/manifest.yaml.
  • Extend tests/test_skill_issuer.py to reject manifests that use output instead of outputs.
  • Add tests for validate_params() (valid params pass, missing required fail).

Out of scope: loader API changes; adding outputs blocks to skills that never declared them (fix the wrong key name only).

Rationale

Agents and contributors rely on manifest.yaml as the tool contract. Validation at the framework level catches bad tool calls before skill logic runs, especially important as the registry grows (e.g. novelty_extractor in 0.3.1).

The output/outputs split is small but causes confusion when reading manifests, catalog pages, and tests. One standard key reduces noise for humans and autonomous contributors.

Implementation Idea

  • Add jsonschema as a dependency (core or [dev] only for tests first, prefer core if validation runs at runtime in validate_params).
  • In BaseSkill.validate_params(), load schema from the skill bundle manifest (subclasses may override to read from disk like tests do today).
  • Optional: call validate_params() at the start of execute() in a shared helper or document that agent loops should call it before execute(), pick one pattern and test it.
  • Issuer test: assert "output" not in manifest (or only allow outputs).
  • Fix skills/finance/wallet_screening/manifest.yaml: rename outputoutputs (same structure).

Metadata

Metadata

Assignees

No one assigned

    Labels

    core frameworkChanges to loader, env, or base classes.enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions