{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "Vault: nguồn được giữ lại",
    "quality_profile": "showcase",
    "legend": {
      "mode": "hidden"
    },
    "views": [
      {
        "id": "store",
        "label": "Lưu",
        "focus": [
          "fetch",
          "notes",
          "index"
        ],
        "note": "Trang tải về được lưu nguyên thành markdown; SQLite chỉ là chỉ mục dựng lại được."
      },
      {
        "id": "reuse",
        "label": "Dùng lại",
        "focus": [
          "index",
          "fence",
          "next"
        ],
        "note": "Khi phục vụ (note show, search), nội dung web được bọc untrusted-source; phiên sau tìm trong kho trước khi tải mới."
      }
    ]
  },
  "lanes": [
    {
      "id": "web",
      "label": "Tải nguồn"
    },
    {
      "id": "vault",
      "label": "Vault"
    },
    {
      "id": "use",
      "label": "Dùng lại"
    }
  ],
  "phases": [
    {
      "id": "p1",
      "label": "Tải và lưu",
      "fromCol": 0,
      "toCol": 2,
      "variant": "emphasis"
    },
    {
      "id": "p2",
      "label": "Phục vụ",
      "fromCol": 3,
      "toCol": 4,
      "variant": "dashed"
    }
  ],
  "mainPath": [
    "fetch",
    "notes",
    "index",
    "fence",
    "next"
  ],
  "nodes": [
    {
      "id": "fetch",
      "lane": "web",
      "col": 0,
      "type": "cloud",
      "label": "Trang web, bài báo",
      "sublabel": "fetcher song song",
      "width": 180
    },
    {
      "id": "fence",
      "lane": "use",
      "col": 3,
      "type": "security",
      "label": "untrusted-source",
      "sublabel": "bọc khi phục vụ",
      "width": 180
    },
    {
      "id": "notes",
      "lane": "vault",
      "col": 1,
      "type": "database",
      "label": "Ghi chú markdown",
      "sublabel": "lưu bản thô, nguồn sự thật",
      "width": 180
    },
    {
      "id": "index",
      "lane": "vault",
      "col": 2,
      "type": "database",
      "label": "Chỉ mục SQLite",
      "sublabel": "dựng lại được",
      "width": 170
    },
    {
      "id": "next",
      "lane": "use",
      "col": 4,
      "type": "frontend",
      "label": "Phiên sau, MCP, web UI",
      "sublabel": "tìm trong kho trước",
      "width": 210
    }
  ],
  "edges": [
    {
      "id": "e1",
      "from": "fetch",
      "to": "notes",
      "variant": "emphasis"
    },
    {
      "id": "e2",
      "from": "notes",
      "to": "index",
      "variant": "emphasis"
    },
    {
      "id": "e3",
      "from": "index",
      "to": "fence",
      "label": "note show, search",
      "variant": "emphasis"
    },
    {
      "id": "e4",
      "from": "fence",
      "to": "next",
      "variant": "emphasis"
    }
  ]
}