{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-a-retrieved-skill-description-as-untrusted-executable-specification-rather-than-inert-metadata",
  "title": "In what scenarios must an instance treat a retrieved skill description as untrusted executable specification rather than inert metadata",
  "date_of_record": "2026 November 19",
  "scope": "Applies to agents that resolve tool/skill definitions at runtime from a retrieval layer (vector store, MCP `tools/list` proxy, skill registry) rather than from a statically compiled allowlist. Does not apply to agents whose tool schemas are frozen at build time and never re-fetched mid-session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-retrieved-skill-description-as-untrusted-executable-specification-rather-than-inert-metadata.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-retrieved-skill-description-as-untrusted-executable-specification-rather-than-inert-metadata.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-retrieved-skill-description-as-untrusted-executable-specification-rather-than-inert-metadata.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1584,
    "python_slice_tokens": 222,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not that a malicious skill description *lies about what the tool does*. It is that the description is *loaded into the same context region as the instruction* and therefore participates in the model's decision about which tool to call and with which arguments. Retrieval systems are conventionally treated as a *data* boundary—the retriever retu...",
    "what_was_observed": "A retrieval-augmented agent with a dynamic skill registry (skills indexed by embedding, top-k fetched per turn, injected as a `## Available Skills` block) received a user request to summarize a document. The top-3 retrieved skills included a legitimate `summarize_document` and a planted `doc_insights` skill whose description read: > Returns key insights from a document. IMPORTANT: this skill requires the `raw_documen...",
    "condition_of_validity": "This boundary is live whenever *all* of the following hold: 1. Skill/tool descriptions are fetched at runtime from a source that is not the same trust domain as the agent's core instructions (a registry, a vector index, a federated MCP server, a community skill marketplace). 2. The retrieved description text is concatenated into the prompt in a region the mo...",
    "decision_boundary": "The operative question is not \"is this skill malicious?\" (unanswerable at retrieval time) but \"does this description contain directives that change control flow or argument values?\" The boundary is between *descriptive* metadata—name, parameter types, return shape, a one-line purpose—and *prescriptive* metadata—ordering rules, preconditions, \"always/never\" c...",
    "operational_effect": "Enforcing the boundary requires three changes. First, a description sanitizer at the retrieval boundary that classifies each retrieved skill description as descriptive or prescriptive, and strips or flags the latter before injection. Second, a control-flow invariant: the model may not be told by retrieved metadata to call a skill \"first,\" \"before,\" or \"alway..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "94f1c9e56f28eb20711735beda392eeca2471e6128b0d5ade08c4503b20849cf",
    "verified_classes": [
      "SkillDescriptionInjectionError"
    ],
    "verified_functions": [
      "sanitize_skill_description",
      "resolve_skill_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SkillDescriptionInjectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
