Figure 02 · Enforcement walk · For healthcare security leaders
Three enforcement layers between your clinical AI agents and a HIPAA breach. Every gate writes to the audit chain HHS can read.
The governance runtime sits in the path of every tool call. PHI is classified and redacted at the ingress layer before the agent sees it, per the HIPAA and HITECH pack bindings. The agent's intent is verified against a tamper-evident governance hash and filtered through the permission table. Every outbound action passes an egress guard stack. A named compliance officer is engaged when the policy requires it, with an SLA clock running against both the 60-day HIPAA breach notification window and the 72-hour GDPR path. Every gate writes to the SHA-256 hash-linked audit chain. The diagram below walks four scenarios in a loop: one approved clinical request and three blocked policy violations.
01 · AGENT
Under governance
Claude Code, CrewAI, AutoGen, Semantic Kernel, OpenAI Agents, Continue, Copilot. One hook surface, any agent.
02 · SUBSTRATE
Three enforcement layers
Ingress classifies and tags. Verification confirms the governance hash and filters by permission table. Egress runs the guard stack and engages human review.
03 · LLM
Any provider
Anthropic, OpenAI, Google Gemini, Bedrock, Azure OpenAI, Ollama. The governance posture does not change with the model.
04 · AUDIT
Chain seals everything
Every gate writes a named event to a SHA-256 linked chain anchored to an out-of-band reference. Retention runs per bound compliance pack.
Why three layers.
Prompt-based safety instructions fire 50 to 80 percent of the time under independent measurement. Shell hooks fire 100 percent because they are not in the LLM's context window; they are in the runtime's execution path.
The substrate separates ingress from verification from egress deliberately. Ingress decides what the agent is allowed to see. Verification decides whether the policy file itself has been tampered with, whether the tool is allowlisted, and whether the agent has budget to proceed. Egress is the last line before any side effect reaches the world.
What the scenarios prove.
Safe request. The green pulse walks every gate. The action is released and the chain records it.
PHI at ingress. The classifier fires. The request is refused before the agent ever sees the sensitive field.
Governance hash mismatch. Verification refuses the tool because the policy file on disk no longer matches the sealed hash.
Prompt injection at egress. The egress guard stack catches a tool call the agent should not make. ACTION BLOCKED is logged with the gate that fired it.
The Nine Guards · Egress Layer
Nine guards run in sequence on every outbound action.
Any guard returning BLOCK terminates the call. Any guard returning ROUTE_TO_APPROVAL suspends the call and hands it to a named human reviewer. Only when all nine return ALLOW does the action reach the real tool, LLM, or filesystem. Every outcome writes a SHA-256 linked event to the audit chain with the reason code, the verdict, and the compliance pack binding that was in force.
01 · G1
Data Exfiltration Scanner
Inspects every outbound text, tool argument, file write, and LLM message for PHI, PII, and PAN patterns. HIPAA, HITECH, PCI, and GDPR bindings expand the pattern set. Classification tags set at ingress are re-checked here as defense in depth.
BLOCK on match
02 · G2
Secret Leak Scanner
Detects provider-shaped API keys, bearer tokens, private-key material, database connection strings, and environment variables named like secrets. Triggers a rotation recommendation event on block.
BLOCK on match
03 · G3
File Boundary Guard
Rejects path traversal, symlink escape, writes outside the approved workspace, writes to governance-config files, and writes that would overwrite another tenant in a shared-FS deployment.
BLOCK on violation
04 · G4
Destructive Command Guard
Blocks rm -rf, DROP TABLE, unguarded DELETE, force-push to protected branches, terraform destroy, kubectl delete on production namespaces, and other non-reversible commands. Hard-list of patterns, updated per pack release cadence.
BLOCK, rare override
05 · G5
Web Access Gate
Refuses outbound HTTP and HTTPS to any host not on the active pack allowlist. Blocks IP literals, private-range destinations, metadata endpoints, non-standard ports, and plain HTTP where TLS is required. LLM calls validate against a signed destination manifest.
BLOCK on disallow
06 · G6
Cost and Budget Guard
Enforces per-cycle token budget, per-tool rate limit, per-cycle wall-clock timeout, and per-agent daily financial cap. HIPAA, MRPC, and FDA-SaMD bindings default to 100k tokens per cycle with terminate-on-exceed.
BLOCK on exceed
07 · G7
Prohibited-Practices Guard
Applies EU AI Act Article 5 prohibited practices, healthcare-specific prohibited inferences, ECOA protected-bases rules, and pack-level forbidden action tables. Denial is unconditional for this guard category.
BLOCK, no override
08 · G8
Confidence Gate
Compares the agent's self-reported confidence score against the pack floor. HIPAA, MRPC, and FDA-SaMD require 0.95. Strict missing-confidence policy fails closed. Bimodal or flipping scores raise a confidence-poisoning hint.
BLOCK or ROUTE
09 · G9
Approval Queue (HITL T2)
Suspends actions flagged by earlier guards or matching a mandatory-review rule. Assigns a named human reviewer with approval authority for the relevant control. Reviewer identity is derived from authenticated session claims; client-supplied identity is rejected as spoofing. Default 4-hour SLA, then escalate.
WAIT for verdict
Full reference with regulatory mapping per guard and known bypass vectors is shared with design partners under NDA. Internal pen-test coverage per guard is tracked against our adversarial test suite and summarized in our Trust Center.