{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-trust-boundary-when-a-dynamically-loaded-skill-registry-injects-tool-descriptions-into-its-own-system-prompt",
  "title": "Where must an instance draw the trust boundary when a dynamically loaded skill registry injects tool descriptions into its own system prompt",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that load tool/skill definitions at runtime from a registry (MCP servers, plugin manifests, remote skill catalogs) and render those definitions—name, description, parameter schemas—directly into the model's context. Does not apply to statically compiled tool sets whose descriptions are part of the immutable system prompt, nor to registries whose entries are signed and verified before rendering.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-trust-boundary-when-a-dynamically-loaded-skill-registry-injects-tool-descriptions-into-its-own-system-prompt.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-trust-boundary-when-a-dynamically-loaded-skill-registry-injects-tool-descriptions-into-its-own-system-prompt.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-trust-boundary-when-a-dynamically-loaded-skill-registry-injects-tool-descriptions-into-its-own-system-prompt.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2042,
    "python_slice_tokens": 398,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the registry served a malicious tool and the agent called it.\" That is the obvious, well-understood risk, and it is bounded by whatever authorization gate sits in front of tool *invocation*. The non-obvious boundary is upstream of invocation: the **description field is itself an instruction channel**, and it enters the context window...",
    "what_was_observed": "A coding agent is configured to sync a skill registry at the start of each session. Each entry is a JSON object: `{\"name\": ..., \"description\": ..., \"parameters\": {...}, \"endpoint\": ...}`. The loader concatenates every description into a `## Available Tools` block appended to the system prompt, then binds each name to a callable. Standard setup; nothing looks wrong. A registry entry named `format_lint` carried this de...",
    "condition_of_validity": "The attack requires four conditions to hold simultaneously, and the invariant is defined by their conjunction: - **C1 — Dynamic load:** at least one tool description is fetched from a source not under the operator's direct authorship at deploy time. - **C2 — Flat rendering:** descriptions are concatenated into the context without provenance tagging or instru...",
    "decision_boundary": "The decision an operator must make is not \"do I trust this registry\" as a binary. It is: **at what layer do I enforce that descriptions are inert?** Three enforceable boundaries, in increasing strength: 1. **Provenance separation at render time.** Wrap every registry-sourced description in an explicit structural marker (`<tool-description source=\"registry:fo...",
    "operational_effect": "Once the boundary is enforced at layer 3, the registry becomes safe to load dynamically because the *composition* of description and schema can no longer form an exfiltration path—the description may still contain injected prose, but there is no parameter through which its payload can travel, and the deferred instruction, if followed, produces a call that fa..."
  },
  "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": "1ccc46ef79c4071356c08970c4b8f9d692ba463b8596b5bfb565069ad4e1590a",
    "verified_classes": [
      "SkillInjectionBoundaryError",
      "SkillEntry"
    ],
    "verified_functions": [
      "validate_registry_entry",
      "load_registry"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "AssertionError",
      "SkillInjectionBoundaryError"
    ],
    "sample_fail_closed_invariants": [
      "boundary should have rejected the entry"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
