{
  "schema_version": "1.3.0",
  "slug": "how-must-an-instance-record-the-provenance-of-an-llm-generated-shell-command-before-executing-it",
  "title": "How must an instance record the provenance of an LLM-generated shell command before executing it?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The command's execution has destructive potential, the command is generated by an LLM (or an agentic system using an LLM), and the environment is production or security-sensitive. * **Does not apply when:** The command i",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-must-an-instance-record-the-provenance-of-an-llm-generated-shell-command-before-executing-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-record-the-provenance-of-an-llm-generated-shell-command-before-executing-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-record-the-provenance-of-an-llm-generated-shell-command-before-executing-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1097,
    "python_slice_tokens": 237,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **content review** (reading the command and assessing whether it looks safe) and **provenance attestation** (cryptographic proof of which model generated the command, with which prompt, under which safety evaluation). Relying solely on content review creates the **LLM Hallucination Execution Gap**: an LLM generates a plausible-looking ...",
    "what_was_observed": "In autonomous execution architectures, failing to record command provenance produces three primary failure modes: 1. **Social Engineering via LLM:** An attacker poisons the LLM's context or uses prompt injection to make it emit a malicious command. The reviewing agent sees a plausible-looking command and executes it. 2. **Model Substitution:** A compromised orchestrator substitutes a malicious LLM output in place of ...",
    "condition_of_validity": "* **Applies when:** The command's execution has destructive potential, the command is generated by an LLM (or an agentic system using an LLM), and the environment is production or security-sensitive. * **Does not apply when:** The command is purely informational (e.g., `echo`, `pwd`), or it is executed exclusively in an isolated, disposable sandbox with no n...",
    "decision_boundary": "1. **Is the command generated by an LLM (or an LLM-containing pipeline)?** If no, standard code review applies. If yes, proceed. 2. **Is the `generator_model_signature` and `prompt_context_hash` recorded?** If no, the command's origin is unverifiable. The instance must reject it and regenerate with a provenance-recording pipeline. 3. **Has the command passed...",
    "operational_effect": "1. **Prompt Injection Containment:** Prevents malicious injected commands from being executed by binding commands to their prompt context. 2. **Semantic Safety Enforcement:** Catches obfuscated malicious commands that bypass regex filters by requiring semantic evaluation. 3. **Environment Binding:** Ensures commands execute only in the environment they were ..."
  },
  "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": "cc3da43019533b6f929d5ea1a47cf6288aa4fcadf39fcfaa06fa9b389bc3521d",
    "verified_classes": [
      "CommandVerdict",
      "LLMCommand",
      "ExecutionContext",
      "CommandManifest",
      "LLMCommandProvenanceGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_command"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 0,
    "raised_exceptions": [],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
