Skip to content

[Feat]: Loader validates manifest.name matches skill folder path (#101 Option A) #200

Description

@rosspeili

Feature Description

Implement Option A from #101: the canonical registry ID is category/skill_name derived from the skill folder path; manifest.yaml name must match.

Behavior

  • On SkillLoader.load_skill(...), after resolving the skill directory and loading manifest.yaml, compute:
expected_id = f"{skill_dir.parent.name}/{skill_dir.name}"
actual = manifest.get("name", "")
  • If actual != expected_id: warn in v1 (deprecation period) or fail once legacy skills are migrated (see migration issue).
  • Inject or expose registry_id on the returned bundle (optional) so callers don't re-derive from YAML alone.

Also update

Out of scope

Rationale

Three identity sources today (folder path, CLI list ID, LLM tool name from manifest["name"]) still disagree for legacy skills (office/pdf_form_filler, defi/evm_tx_handler). #101 RFC should close with this as the v1 contract; loader validation prevents new drift and gives contributors a clear error at load time.

Implementation Idea

  1. Add _expected_registry_id(resolved_path: Path) -> str in loader.py.
  2. Call after YAML load; use warnings.warn(..., SkillwareIdentityWarning) initially.
  3. Flip to ValueError or ImportError after migration issue merges.
  4. Document registry ID vs provider tool name (slashes vs underscores) in docs/usage/agent_loops.md if not already complete.
  5. Depends on / coordinates with legacy manifest migration issue.

Blocks: consistent example tool dispatch (#178); unblocks alias design (#12).
Related: #101 (decision), migration issue below.

Metadata

Metadata

Assignees

Labels

core frameworkChanges to loader, env, base classes, or model adapters.enhancementNew feature or request.

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions