iiRecord
Agentic AI Atlas · BeforePromptBuild (canonical)
hook-surface:before-prompt-builda5c.ai
II.
HookSurface JSON

hook-surface:before-prompt-build

Structured · live

BeforePromptBuild (canonical) json

Inspect the normalized record payload exactly as the atlas UI reads it.

File · channels-hooks/hook-surfaces/canonical/missing-canonical-hooks.yamlCluster · channels-hooks
Record JSON
{
  "id": "hook-surface:before-prompt-build",
  "_kind": "HookSurface",
  "_file": "channels-hooks/hook-surfaces/canonical/missing-canonical-hooks.yaml",
  "_cluster": "channels-hooks",
  "attributes": {
    "eventName": "BeforePromptBuild (canonical)",
    "displayName": "BeforePromptBuild (canonical)",
    "kind": "canonical",
    "direction": "pre",
    "blocking": true,
    "family": "in-process",
    "payloadSchema": {
      "type": "object",
      "required": [
        "session_id",
        "turn_number"
      ],
      "properties": {
        "session_id": {
          "type": "string"
        },
        "turn_number": {
          "type": "integer"
        },
        "pending_user_message": {
          "type": "string"
        },
        "retrieved_context": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "memory_snippets": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "description": "Fires after the runtime has gathered the turn\\'s inputs (user message,\nretrieved memory, attached files) but before the system + user prompt\nis assembled and sent to the model. Subscribers can rewrite or\naugment the assembly. Heaviest blocking-hook position for context\nengineering.\n"
  },
  "outgoingEdges": [],
  "incomingEdges": [
    {
      "from": "agent-runtime-impl:claude-code.runtime@1.x",
      "to": "hook-surface:before-prompt-build",
      "kind": "exposes",
      "attributes": {}
    },
    {
      "from": "hook-mapping:before-prompt-build-claude",
      "to": "hook-surface:before-prompt-build",
      "kind": "maps_hook",
      "attributes": {}
    }
  ]
}