Skip to content

skills: define a shared safe metadata projection for the model index #1826

Description

@Aaronontheweb

Outcome

Netclaw uses one safe model-facing metadata projection for every skill source.

The projection covers local, system, server-feed, external, and MCP prompt skills.

Raw source metadata remains available for storage, diagnostics, and source protocol calls.

Context

SkillRegistry.GenerateIndex truncates each description to 120 characters.

It does not normalize line breaks, tabs, pipe delimiters, categories, or argument hints.

This is a shared skill-index gap. The MCP prompt work in #1806 must not create a separate metadata sanitizer.

Issue #1809 owns the common invocable descriptor contract. This issue owns the model-facing index projection.

Requirements

  • Apply one internal projection policy at the shared skill-index boundary.
  • Cover the logical name, description, category, and argument hint.
  • Normalize model-visible whitespace and structural delimiters.
  • Define explicit limits for each model-visible field.
  • Never truncate an identity field.
  • Reject an invalid or ambiguous identity with a clear diagnostic.
  • Detect normalized name collisions before index publication.
  • Preserve the current source-precedence rules.
  • Preserve raw MCP server and prompt names for prompts/get.
  • Do not add a silent fallback or silently omit an accepted skill.
  • Keep the first implementation internal unless a second consumer requires a public contract.

Acceptance criteria

  • An xUnit theory covers local, server-feed, external, system, and MCP prompt entries.
  • A line break cannot add a false skill row or category.
  • A pipe character cannot add a false index control field.
  • Descriptions and argument hints have deterministic bounds.
  • An over-limit identity fails without truncation.
  • Two source identities cannot resolve through one logical skill name.
  • Index output remains deterministic across source order.
  • MCP prompt source identifiers remain unchanged for prompts/get.
  • The relevant OpenSpec capability defines the shared projection contract.

Non-goals

Metadata

Metadata

Assignees

No one assigned

    Labels

    context-pipelineLLM context assembly: prompt layers, dynamic injection, memory recall, temporal groundingenhancementNew feature or requestsecuritySecurity-related changesskillsSkill loading, handling, authoring, indexing, and evals.testsAll issues related to testing, quality assurance, and smoke testing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions