{
  "schemaVersion": 1,
  "generatedAt": "2026-08-17T18:34:57.016Z",
  "generationKey": "72793a88216a4524d6c700b63182c7a957ca008880eddc3c7c91e28de0356356",
  "metadataPayloadSha256": "da1ed071e039931c3c3650042bab391050cf541bd913adac9c67ce5c5ddb22c2",
  "diagram": {
    "id": "lens-system-architecture-ad1f57d8",
    "title": "Lens — system architecture",
    "description": "Rectangles are API routes and services, rounded nodes are model dependencies resolved per call, and cylinders are workspace tables under row-level security. The pipeline stages degrade independently; the policy gates and the decision log sit only on the answer path.",
    "status": "current",
    "canonicalAppearanceKey": "tsx:src/app/(docs)/docs/modules/lens/page.tsx:systemArchitectureChart#1"
  },
  "aliases": [],
  "concepts": [
    "System architecture",
    "Public surface",
    "Retrieval pipeline",
    "Answer path",
    "Modules",
    "Lens"
  ],
  "keywords": [
    "eli_query + kb_search (MCP tools)",
    "POST (API)",
    "GET (API)",
    "GET * + (API)",
    "model: judge",
    "Graph fusion (service)",
    "model: reranker",
    "model: chat",
    "model: embeddings",
    "store, append-only",
    "Hybrid retrieve: fts + vector (service)",
    "Context assembly: token budget + MMR (service)",
    "Structured-answer orchestrator (service)",
    "Semantic cache (service)",
    "Policy pre-gate (service)",
    "Policy post-gate (service)",
    "Data bridge to governed queries (service)",
    "/api/v1/query",
    "/api/v1/search",
    "/api/v1/policy",
    "/api/v1/cache/stats",
    "store"
  ],
  "mermaid": {
    "type": "flowchart",
    "direction": "TB",
    "sourceSha256": "ad1f57d8f0572c48796c97b8702c4ec7b4817807226d0f74d53d278d27bc6199"
  },
  "provenance": [
    {
      "appearanceKey": "tsx:src/app/(docs)/docs/modules/lens/page.tsx:systemArchitectureChart#1",
      "surface": "route",
      "sourcePath": "src/app/(docs)/docs/modules/lens/page.tsx",
      "line": 59,
      "route": "/docs/modules/lens",
      "symbol": "systemArchitectureChart",
      "caption": "Rectangles are API routes and services, rounded nodes are model dependencies resolved per call, and cylinders are workspace tables under row-level security. The pipeline stages degrade independently; the policy gates and the decision log sit only on the answer path."
    }
  ],
  "embeddedMetadata": [
    {
      "sourcePath": "src/app/(docs)/docs/modules/lens/page.tsx",
      "caption": "Rectangles are API routes and services, rounded nodes are model dependencies resolved per call, and cylinders are workspace tables under row-level security. The pipeline stages degrade independently; the policy gates and the decision log sit only on the answer path."
    }
  ],
  "generation": {
    "application": {
      "name": "eli-ai",
      "version": "0.1.0"
    },
    "environment": {
      "node": "v26.3.1",
      "yarn": "4.17.1",
      "platform": "linux",
      "architecture": "x64",
      "containerImage": "playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109"
    },
    "packages": {
      "mermaid": "11.16.0",
      "mermaidCli": "11.16.0",
      "playwright": "1.62.1",
      "playwrightCore": "1.62.1",
      "puppeteer": "25.6.0",
      "puppeteerCore": "25.6.0"
    },
    "renderer": {
      "mermaidConfigSha256": "68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101",
      "themeCssSha256": "c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033",
      "browser": {
        "name": "chromium",
        "revision": "1234",
        "version": "151.0.7922.34",
        "executableSha256": "0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71"
      },
      "font": {
        "family": "Eli Diagram Inter Variable",
        "fileSha256": "3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62",
        "licenseSha256": "3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345"
      }
    },
    "adapterVersions": {
      "diagramGenerator": "2",
      "drawioFlowchart": "1",
      "drawioSequence": "1",
      "drawioState": "1",
      "drawioGantt": "1"
    }
  },
  "artifacts": {
    "mmd": "/diagrams/lens-system-architecture-ad1f57d8/lens-system-architecture-ad1f57d8.mmd",
    "svg": "/diagrams/lens-system-architecture-ad1f57d8/lens-system-architecture-ad1f57d8.svg",
    "png": "/diagrams/lens-system-architecture-ad1f57d8/lens-system-architecture-ad1f57d8.png",
    "drawio": "/diagrams/lens-system-architecture-ad1f57d8/lens-system-architecture-ad1f57d8.drawio",
    "json": "/diagrams/lens-system-architecture-ad1f57d8/lens-system-architecture-ad1f57d8.json"
  },
  "artifactSha256": {
    "mmd": "7e9849d5ed0ad0e9952af824916c0449eb4639374eb666ad69c31f38f9a03aea",
    "svg": "ad90bd17adad8ef5839c78a6a83225acbdeb71667c26c2343acb1e94f3550f6e",
    "png": "5b0e352d1a6f6c4ed318c1502f7f1cef56e2ccd6627d4904f8816c8a87fe2b2f",
    "drawio": "9938ea56b1dd1b057b5b57a4a88e9cecc60738a6709942e83444e624750a7889"
  }
}
