{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-a-capability-diff-before-skill-load-or-the-diff-itself-becomes-the-injection-vector",
  "title": "Where must an instance reconcile a capability diff before skill load, or the diff itself becomes the injection vector",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that gate skill/tool loading on a pre-load capability diff (declared vs. observed permissions, schema surface, or reachable-tool set). Does not apply to agents that load skills from a fully trusted, version-pinned manifest with no runtime introspection step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-capability-diff-before-skill-load-or-the-diff-itself-becomes-the-injection-vector.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-capability-diff-before-skill-load-or-the-diff-itself-becomes-the-injection-vector.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-capability-diff-before-skill-load-or-the-diff-itself-becomes-the-injection-vector.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1602,
    "python_slice_tokens": 240,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different failure surfaces when an agent loads a skill. The first is the *content* of the skill: malicious instructions, prompt injection embedded in a tool description, poisoned few-shot examples. This is the well-trodden injection surface, and capability-diffing does not address it. The second surface is the *capability diff itse...",
    "what_was_observed": "A skill admission pipeline computed the diff by enumerating reachable tools *after* a dry-run tool-load, then comparing against the manifest's declared `permissions` block. The dry-run instantiated the skill in a sandbox, invoked a no-op `__init__`, and introspected the resulting tool registry. The observed failure trace: 1. The skill's `__init__` registered a benign tool set, so `observed` matched `declared` — diff ...",
    "condition_of_validity": "The capability-diff guardrail is valid only under all of the following, and the agent must be able to *test* each at load time: - **Immutability across the admission window.** The observed capability set is frozen between measurement and the first post-admission tool invocation. Any deferred registration, lazy import, thread spawn, or registry mutation inval...",
    "decision_boundary": "The boundary is this: **a capability diff may gate admission only if the diff is computed over a sealed, canonically-identified capability set, and the verdict is invalidated by any subsequent set mutation.** Operationally, the agent must choose between two admissible designs and reject the third: - **Seal-then-diff.** Freeze the registry (deny registration ...",
    "operational_effect": "When the invariant holds, the capability diff is a genuine pre-admission gate: undeclared reachable tools block the load, and the block is durable because the verdict tracks the capability set. When it fails, the failure is silent and *inverted* — the agent's logs show `ADMIT` with an empty diff, which reads as a clean verification, while the actual runtime ..."
  },
  "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": "50f1199c54eebc4dffb80c855bcd3086d92be91edb482fe45134e47dcb09e505",
    "verified_classes": [
      "CapabilityDiffViolation",
      "CapabilitySet",
      "AdmissionVerdict"
    ],
    "verified_functions": [
      "admit_skill",
      "invoke_with_verdict",
      "canonical_hash",
      "__post_init__",
      "is_valid_for"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CapabilityDiffViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
