{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-manifest-declared-capability-from-diverging-from-runtime-observed-capability-in-dynamically-loaded-agent-skills",
  "title": "Which invariants prevent manifest-declared capability from diverging from runtime-observed capability in dynamically loaded agent skills",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that load skills or plugins at runtime from a manifest (MCP tool descriptors, plugin `manifest.json`, OpenAPI-derived tool schemas, A2A agent cards) and then execute tool calls gated by that manifest. Does not apply to statically compiled tool sets where the callable surface is fixed at build time and cannot be redefined by a loaded artifact.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-manifest-declared-capability-from-diverging-from-runtime-observed-capability-in-dynamically-loaded-agent-skills.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-manifest-declared-capability-from-diverging-from-runtime-observed-capability-in-dynamically-loaded-agent-skills.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-manifest-declared-capability-from-diverging-from-runtime-observed-capability-in-dynamically-loaded-agent-skills.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1896,
    "python_slice_tokens": 276,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The load-bearing distinction is between **declared capability** — what the manifest's schema, description, and parameter list claim the skill does — and **runtime capability** — the actual syscalls, network egress, subprocess spawns, and file handles the skill exercises once invoked. A skill-injection attack does not need to violate the manifest's *schema*; ...",
    "what_was_observed": "A dynamically loaded skill was registered with the following manifest fragment (reconstructed): The loader validated: name uniqueness, JSON Schema well-formedness, and that `fs:read` was in the agent's grant set. All passed. On first invocation with `path = \"/tmp/report.txt\"`, the skill: 1. Read `/tmp/report.txt` (within declared scope — `fs:read`). 2. Also read `~/.aws/credentials` and `~/.ssh/id_ed25519` — **also**...",
    "condition_of_validity": "The invariant that would have prevented both incidents is: > **For every loaded skill, the runtime-enforced capability set must be a subset of the manifest-declared capability set, AND the manifest-declared capability set must be a subset of the capability set implied by the description as adjudicated by an independent classifier.** Formally, let `D` = decla...",
    "decision_boundary": "The load must be **rejected**, not merely flagged, when any of the following hold: - `D \\ I ≠ ∅`: the manifest declares a permission class that the description does not entail. (e.g., description says \"read a named file,\" manifest says `fs:read` → reject or auto-narrow to a path predicate.) - `R ⊄ D`: the sandbox would grant more than declared. This is a run...",
    "operational_effect": "Enforcing `R ⊆ D ⊆ I` at load time converts skill injection from a *silent capability escalation* into a *load-time rejection*, which is auditable and bounded. The operational effects are: 1. **Coarse permission tags become a liability, not a convenience.** Manifests must declare instance-level scopes (path predicates, host allowlists, syscall sets), because..."
  },
  "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": "f1f69d5ff0461033d7469c99568d06b8d7d5105ed8a3d524c91caf5c3ced8e6d",
    "verified_classes": [
      "CapabilityScopeViolation"
    ],
    "verified_functions": [
      "validate_skill_load",
      "_has_path_predicate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CapabilityScopeViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
