Normalize policy-enforcement context inputs into stable schemas before routing and rule evaluation.
env-normalize.sh and those extracted from JWT claims need to be merged into a single stable object before rule evaluationNot for: normalizing tool input payloads (use hook-payload-canonicalizer) or trimming oversized context (use hook-context-pruning-patterns).
{
"session_id": "sess_abc123",
"plugin": "opspal-salesforce",
"agent": "sfdc-revops-auditor",
"org_alias": "acme-prod",
"tier": "enterprise",
"event_type": "PreToolUse",
"tool_name": "Bash",
"source": "session_token | env | inferred"
}
CLAUDE_SESSION_ID, ORG_SLUG, JWT claims, plugin.json metadata, and env vars from env-normalize.sh../context-schema.md as the reference, list required vs optional fields and their expected types."source": "inferred" flag and log a warning — never silently trust inferred values for high-stakes policy decisions; see ./inference-guards.md.session_id, event_type, tool_name) are missing after normalization, emit a degraded decision rather than crashing; reference ./fail-mode-policy.md for the canonical degraded envelope.