graph LR
  linkStyle default fill:#ffffff

  subgraph diagram ["Container View: Assay MCP Policy Stack"]
    style diagram fill:#ffffff,stroke:#ffffff

    1["<div style='font-weight: bold'>Agent / MCP Client</div><div style='font-size: 70%; margin-top: 0px'>[Person]</div><div style='font-size: 80%; margin-top:10px'>An agent or MCP client that<br />issues tool calls through<br />Assay-governed runtime paths.</div>"]
    style 1 fill:#1168bd,stroke:#0b4884,color:#ffffff
    2["<div style='font-weight: bold'>Transport Auth / Resource Server</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>Owns transport authentication<br />and resource-server concerns<br />outside Assay.</div>"]
    style 2 fill:#999999,stroke:#6b6b6b,color:#ffffff
    3["<div style='font-weight: bold'>Approval Artifact Source</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>Provides approval artifacts<br />and approval-state inputs to<br />the runtime path.</div>"]
    style 3 fill:#999999,stroke:#6b6b6b,color:#ffffff
    4["<div style='font-weight: bold'>Policy Bundle Source</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>Provides typed policy bundles<br />and bounded obligation<br />declarations consumed by<br />Assay.</div>"]
    style 4 fill:#999999,stroke:#6b6b6b,color:#ffffff
    5["<div style='font-weight: bold'>Replay / Consumer Readers</div><div style='font-size: 70%; margin-top: 0px'>[Software System]</div><div style='font-size: 80%; margin-top:10px'>CLI, replay, reporting, and<br />downstream readers that<br />consume decision and evidence<br />payloads.</div>"]
    style 5 fill:#999999,stroke:#6b6b6b,color:#ffffff

    subgraph 6 ["Assay MCP Policy Stack"]
      style 6 fill:#ffffff,stroke:#074f5d,color:#074f5d

      15["<div style='font-weight: bold'>Evidence and Replay Layer</div><div style='font-size: 70%; margin-top: 0px'>[Container: Rust runtime / library path]</div><div style='font-size: 80%; margin-top:10px'>Normalizes evidence, builds<br />replay basis payloads, and<br />supports deterministic<br />downstream reads.</div>"]
      style 15 fill:#438dd5,stroke:#2e6295,color:#ffffff
      7["<div style='font-weight: bold'>Policy Runtime</div><div style='font-size: 70%; margin-top: 0px'>[Container: Rust runtime / library path]</div><div style='font-size: 80%; margin-top:10px'>Intercepts MCP tool-call<br />paths, evaluates policy,<br />executes bounded obligations,<br />and produces typed decisions.</div>"]
      style 7 fill:#438dd5,stroke:#2e6295,color:#ffffff
    end

    1-. "<div>Issues MCP tool calls through<br />governed runtime paths</div><div style='font-size: 70%'>[MCP]</div>" .->7
    2-. "<div>Supplies transport-auth<br />summaries and runtime auth<br />context</div><div style='font-size: 70%'>[Context summary]</div>" .->7
    3-. "<div>Supplies approval state and<br />artifact-bound inputs</div><div style='font-size: 70%'>[Approval state]</div>" .->7
    4-. "<div>Supplies typed rules and<br />obligations</div><div style='font-size: 70%'>[Policy bundle]</div>" .->7
    7-. "<div>Projects normalized<br />decision/evidence payloads</div><div style='font-size: 70%'>[In-process call]</div>" .->15
    15-. "<div>Supplies replay and diff<br />payloads</div><div style='font-size: 70%'>[JSON evidence]</div>" .->5

  end
