{
  "name": "snowflake-cortex-code — 2 hooks",
  "slug": "source-hooks-f2449127c25074109244e0f5",
  "type": "hooks",
  "category": "developer-tools",
  "example": false,
  "evidence_state": "pinned_source_listing",
  "stamp": "Pinned source listing — machine-checked",
  "summary": "Pinned source declarations and file hashes were listed.",
  "outcome": "Listed 2 hook declarations. Ran 36 git commands; each one's exit status and output hash is in commands.json. Scope: acquisition and static inspection.",
  "rule_results": [
    "The retained source tree matches its acquisition manifest.",
    "Declared hook names (listing.json): SessionStart; UserPromptSubmit"
  ],
  "task": "What declarations and files are present in this pinned source?",
  "setup": "Git blob acquisition followed by static source inspection.",
  "limitations": "Scope: acquisition and static inspection. Command results: commands.json.",
  "source_url": "https://github.com/Snowflake-Labs/snowflake-ai-kit.git",
  "documentation_url": "https://github.com/Snowflake-Labs/snowflake-ai-kit.git",
  "commit": "e2a3cbb45a9a62b5648266c5777c1b2edb3f8579",
  "tree_sha256": "ee71423fad5b3e42dc5220a473fb1c20ccfc44d54c20d042780aacf9f7c4e7ea",
  "file_sha256": {
    "plugins/cortex-code/.claude-plugin/plugin.json": "02fc84a0f253975394f10bac68c4dd590bde1886b9c838770533ac4d2438f5f1",
    "plugins/cortex-code/.codex-plugin/plugin.json": "ed7892025bbcee88e0b5b3a82587000674c158509bd5ffc6cbb258019dd74623",
    "plugins/cortex-code/README.md": "2dae098dc630fb68625bb607dae5c0ebfe286be7b908f84ce9645dfd10947422",
    "plugins/cortex-code/hooks/hooks.json": "2ccb9a97d16000fe3ac518479deb02647b864b203bf05768cea52a42444bab9c",
    "plugins/cortex-code/scripts/router/config.yaml.example": "032b70d67e54bbecdf9c37eb9796a99ca19270bce2941f4e97012e740417bd57",
    "plugins/cortex-code/scripts/router/discover_cortex.py": "98ccf38f4b917a7a4604909bd486c370bfbf0614e35fba63c2b09fbc608808c8",
    "plugins/cortex-code/scripts/router/envelope_policy.py": "4946eb5ffb4ef1c8854f8885e1b1b477493a34c336416d3a2a1b3ed24a1075d2",
    "plugins/cortex-code/scripts/router/execute_cortex.py": "c54699b010c4b942669c935670700767b4d127235ab5029c7a954dfddfd151f0",
    "plugins/cortex-code/scripts/router/predict_tools.py": "38323363ddd1f3385fa945d067168f250aea02fcecb246ce53abfb3ac101511c",
    "plugins/cortex-code/scripts/router/prompt_filter.py": "e6f8ea0776e655394fb8333ea1b7f012c3191241802b95b79af048c8bef23fc5",
    "plugins/cortex-code/scripts/router/read_cortex_sessions.py": "8b62ea68f4cc6641c0aa7abab75b507a4d46b43d2e36f26dc7dcc58ce8549f00",
    "plugins/cortex-code/scripts/router/route_request.py": "4ccf35558a03945bfd6f515b1409d0ce037a1473662da1da3c831ce38627e0c3",
    "plugins/cortex-code/scripts/router/security/__init__.py": "8a0ec801965a67759a7dabae2f857fc9c51272b8b491fe393595cd116b872145",
    "plugins/cortex-code/scripts/router/security/approval_handler.py": "77228d5de59e220b5052866334e3b503c7d2c1eeb07e8b49fddc13f609611c29",
    "plugins/cortex-code/scripts/router/security/audit_logger.py": "ee4f860fcf65bdec93a09409a860e3f182c347abd7f4f88eb58f9712f532a3b7",
    "plugins/cortex-code/scripts/router/security/cache_manager.py": "b04a34d523526ccd55789faf788d95f401b9fec1298857f059f07b94daa728ff",
    "plugins/cortex-code/scripts/router/security/config_manager.py": "9ae85188c49dcb1ea0699391b9f14dee87aab708c2decd5379d458d986fdab6d",
    "plugins/cortex-code/scripts/router/security/policies/default_policy.yaml": "2c1db15b24eca2eacf4ca5db7e7e25fe6c652c120b0c89d6671e9e37b1041323",
    "plugins/cortex-code/scripts/router/security/prompt_sanitizer.py": "2f7da60542fbe766589caed553a9000c73a3212b924da50b77604cf01fb3290f",
    "plugins/cortex-code/scripts/router/security_wrapper.py": "89aa9e22554d55f9983291922ac027970c4a139c17b62da970f5cceedb7b57b8",
    "plugins/cortex-code/scripts/router/session_state.py": "11977a91b33707f2947c480129df6a5ab3b9bb286cc6fb1312174a16aae04fc1",
    "plugins/cortex-code/scripts/router/test_envelope_policy.py": "639f33813778ba6fdac3e09c1bcbc0be3eddd2d4f39a86cfc357955124619ec0",
    "plugins/cortex-code/scripts/router/test_integration.py": "715c3732c80a33a9c4527366f27917b59117e0ac994f92f7f4b10234330bb03e",
    "plugins/cortex-code/scripts/router/test_launcher_config.py": "6c3c8bf7783e20cfbd4004f0e0cd43f70e1765731227d974917c54d88dc3adf7",
    "plugins/cortex-code/scripts/router/test_plugin_units.py": "e7383fc7789457430734a0968bbed409ea6f2ea338a61ce56292a8073f6f89f6",
    "plugins/cortex-code/scripts/run_python.sh": "682bd2651dc51bbde2c155ce4d27660d36e0fe4f44b00b6573f7b1693d3c4186",
    "plugins/cortex-code/skills/cortex-router/SKILL.md": "31c00a9cca3f11db3f6e35c95726db79df659311aa37c3ed1b0a64a442cb9002",
    "plugins/cortex-code/skills/cortex-router/references/cortex-cli-reference.md": "2f73b3283c71b7b3bc1e95f2e2981c7048d8b2637c4d78c37dd51535e72dbfd1",
    "plugins/cortex-code/skills/cortex-router/references/routing-examples.md": "6f0d412e80cfdec3ebd2d578dcca18c07051a6908501edba1aeb269b1e27e133",
    "plugins/cortex-code/skills/cortex-run/SKILL.md": "451f65cddef9d0e14ba856abe6d0a013463779d5bbcec5bbc358b6f73b375bba",
    "plugins/cortex-code/skills/cortex-setup/SKILL.md": "d2d13fc0dfbc989e42bb7c82069b92986de20e46a0d2afb28c89040a173aacf3"
  },
  "lockfiles": [
    "LOCK.json"
  ],
  "utc_date": "2026-10-19T18:07:26Z",
  "source_date": "2026-10-16",
  "discovered_date": "2026-10-16",
  "retested_date": "2026-10-19",
  "reviewed_date": "2026-10-19",
  "published_date": "2026-10-19",
  "modified_date": "2026-10-19",
  "reviewer": "machine pipeline",
  "harness_version": "toolwitness harness at commit 11dde7217ae6f8e4ac4d18a6380b18ba01450122",
  "claude_code_version": "Not applicable: static source inspection (commands.json).",
  "model_id": "Not applicable: static source inspection (commands.json).",
  "scanner_version": "Not applicable: static source inspection.",
  "rulepack_version": "Not applicable: static source inspection.",
  "agents": [],
  "disclaimer": "This record lists declarations and file hashes from a pinned source tree. Git command results from acquisition and static inspection are retained in commands.json. Scope: acquisition and static inspection. It is not a security or quality verdict. Changed bytes are outside this record.",
  "commands": [
    "Ran 36 git commands; each one's exit status and output hash is in commands.json. Scope: acquisition and static inspection."
  ],
  "prompt_list": [
    "Not applicable: static source inspection (commands.json)."
  ],
  "history": [
    "2026-10-19T18:07:26Z: pinned source inspection"
  ],
  "application": {
    "name": "snowflake-cortex-code — 2 hooks",
    "softwareVersion": "e2a3cbb45a9a62b5648266c5777c1b2edb3f8579",
    "applicationCategory": "DeveloperApplication",
    "operatingSystem": "Not exercised"
  },
  "artifacts": {
    "transcript": "Ran 36 git commands; each one's exit status and output hash is in commands.json. Scope: acquisition and static inspection.",
    "sinkhole_log": "Not applicable: static source inspection (commands.json).",
    "canary_log": "Not applicable: static source inspection (commands.json).",
    "scanner_output": "Not applicable: static source inspection (commands.json).",
    "normalized_text": "{\n  \"listing\": {\n    \"skills\": [\n      {\n        \"path\": \"plugins/cortex-code/skills/cortex-router/SKILL.md\",\n        \"name\": \"cortex-router\",\n        \"description\": \"Auto-routing skill loaded by the prompt filter hook. Routes Snowflake-related operations to Cortex Code CLI. Not for direct invocation — use $cortex-run instead.\",\n        \"files\": {\n          \"plugins/cortex-code/skills/cortex-router/SKILL.md\": \"31c00a9cca3f11db3f6e35c95726db79df659311aa37c3ed1b0a64a442cb9002\",\n          \"plugins/cortex-code/skills/cortex-router/references/cortex-cli-reference.md\": \"2f73b3283c71b7b3bc1e95f2e2981c7048d8b2637c4d78c37dd51535e72dbfd1\",\n          \"plugins/cortex-code/skills/cortex-router/references/routing-examples.md\": \"6f0d412e80cfdec3ebd2d578dcca18c07051a6908501edba1aeb269b1e27e133\"\n        }\n      },\n      {\n        \"path\": \"plugins/cortex-code/skills/cortex-run/SKILL.md\",\n        \"name\": \"cortex-run\",\n        \"description\": \"ONLY load this skill when the user explicitly types $cortex-run or /cortex-run. NEVER load this skill from auto-routing hooks or keyword matching. For auto-routed prompts, use snowflake-cortex-code:cortex-router instead.\",\n        \"files\": {\n          \"plugins/cortex-code/skills/cortex-run/SKILL.md\": \"451f65cddef9d0e14ba856abe6d0a013463779d5bbcec5bbc358b6f73b375bba\"\n        }\n      },\n      {\n        \"path\": \"plugins/cortex-code/skills/cortex-setup/SKILL.md\",\n        \"name\": \"cortex-setup\",\n        \"description\": \"Install Snowflake CLI and Cortex Code CLI. Use when cortex is not installed, when the user asks to set up Cortex Code, or when routing fails because the CLI is missing. Triggers: setup cortex, install cortex, cortex not found, CLI not installed, set up snowflake.\",\n        \"files\": {\n          \"plugins/cortex-code/skills/cortex-setup/SKILL.md\": \"d2d13fc0dfbc989e42bb7c82069b92986de20e46a0d2afb28c89040a173aacf3\"\n        }\n      }\n    ],\n    \"hooks\": [\n      {\n        \"path\": \"plugins/cortex-code/hooks/hooks.json\",\n        \"sha256\": \"2ccb9a97d16000fe3ac518479deb02647b864b203bf05768cea52a42444bab9c\",\n        \"event\": \"SessionStart\",\n        \"matcher\": null,\n        \"declaration\": {\n          \"type\": \"command\",\n          \"command\": \"bash \\\"${CLAUDE_PLUGIN_ROOT}/scripts/run_python.sh\\\" \\\"${CLAUDE_PLUGIN_ROOT}/scripts/router/discover_cortex.py\\\"\"\n        },\n        \"executed\": false\n      },\n      {\n        \"path\": \"plugins/cortex-code/hooks/hooks.json\",\n        \"sha256\": \"2ccb9a97d16000fe3ac518479deb02647b864b203bf05768cea52a42444bab9c\",\n        \"event\": \"UserPromptSubmit\",\n        \"matcher\": null,\n        \"declaration\": {\n          \"type\": \"command\",\n          \"command\": \"bash \\\"${CLAUDE_PLUGIN_ROOT}/scripts/run_python.sh\\\" \\\"${CLAUDE_PLUGIN_ROOT}/scripts/router/prompt_filter.py\\\"\"\n        },\n        \"executed\": false\n      }\n    ],\n    \"executions\": []\n  }\n}"
  },
  "review_input": {
    "identity_artifact": "identity.json",
    "evidence_sha256": {
      "LOCK.json": "3c46fb9f7c54bc929e89a1f49546c7488761433ebc569b6034f46d8688bc667f",
      "commands.json": "b460b1af2adbdee9f7064181f7a2dc5df9d2db6d5d5b88ab3a268a06b9fa6287",
      "complete.json": "91b504b43905fdc009504d516c45eea831f39a1995b9e7d69987c9756c936d6f",
      "identity.json": "75aba306425adc9d9df6cab08e99da002ca2e445dc79907d56e79f0f9429496f",
      "listing.json": "2f1dbabcc34e2150ea6967b80d621d95b7efdd253701e45705e46cd09beb895f",
      "selection.json": "41766fd4a9c6175d70545cb5ea218f02b12fe89c6528308986313c43799abc62"
    },
    "claims": [
      {
        "id": "acquired",
        "field": "summary",
        "text": "Pinned source declarations and file hashes were listed.",
        "sources": [
          "LOCK.json",
          "listing.json",
          "commands.json"
        ]
      },
      {
        "id": "listed",
        "field": "outcome",
        "text": "Listed 2 hook declarations. Ran 36 git commands; each one's exit status and output hash is in commands.json. Scope: acquisition and static inspection.",
        "sources": [
          "LOCK.json",
          "listing.json",
          "commands.json"
        ]
      },
      {
        "id": "tree",
        "field": "rule_results.0",
        "text": "The retained source tree matches its acquisition manifest.",
        "sources": [
          "LOCK.json",
          "listing.json",
          "commands.json"
        ]
      },
      {
        "id": "declared",
        "field": "rule_results.1",
        "text": "Declared hook names (listing.json): SessionStart; UserPromptSubmit",
        "sources": [
          "LOCK.json",
          "listing.json",
          "commands.json"
        ]
      }
    ]
  },
  "review": {
    "kind": "machine-checked",
    "date": "2026-10-19",
    "reviewed_sha256": "875a2d46dd7adcd20e92599a1f880e6b5c522eb4c865e8a0b1d289aa1bff6272",
    "gates": "cfaae935a9a7cab69ebca48fb83aa842978809ed72d2e26152b78748b09e0644",
    "codex": "3d88236f6bed49a4f44ce9a1ca5410b1c6643ac5ce9d148ad8a3ad5d5cf9630c",
    "grok": "5bc4428ea0cc5d1f022da9fac1ce5f7c650667b56036831f53bc569122e90a59",
    "summary": "Deterministic gates passed; every claim rebuilt from evidence with a reviewed template; Grok reported no standing refutation."
  }
}
