// Compact 3-layer architecture for the 2-pager appendix.
// External-facing labels — no schema-column or table-name vocabulary.
// Render: dot -Tsvg pager-arch-stack.dot -o pager-arch-stack.svg

digraph arch_stack {
    rankdir=BT
    ranksep=0.25
    nodesep=0.20
    node [shape=box, style="rounded,filled", fontname="Helvetica", fontsize=11]
    edge [fontname="Helvetica", fontsize=9]
    bgcolor="white"

    surface [label="Ingested documents\n(Wikipedia · HTML · TeX · git · claim-packs)\nchunked → hashed → full-text-indexed", fillcolor="#e9f3ff"]
    core    [label="Derived layers\n(summaries, indices, distillations)\nhash-bound back to source chunks", fillcolor="#dff5e7"]
    cache   [label="Answer cache\nverified Q&A · grounded / partly grounded / ungrounded\ncryptographic chain back to source bytes", fillcolor="#fff3d6"]

    audit [label="Audit chain\nevery write appends a hash-linked row;\na single tampered record breaks the chain", fillcolor="#fde7e9", shape=note]

    surface -> core   [label="distill", fontsize=9]
    core    -> cache  [label="verify → cache", fontsize=9]
    cache   -> audit  [style=dashed, color="#888888", label="every write", fontsize=9]
    core    -> audit  [style=dashed, color="#888888"]
    surface -> audit  [style=dashed, color="#888888"]
}
