{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "JAZ: một viên gạch, hai năng lực",
    "quality_profile": "showcase",
    "legend": { "mode": "hidden" },
    "views": [
      { "id": "core", "label": "invoke", "focus": ["code", "invoke"], "note": "invoke = agent viết code + gọi agent con như gọi hàm + lịch sử là biến __history__ trong REPL." },
      { "id": "use", "label": "Hai năng lực", "focus": ["invoke", "deleg", "meta", "stu", "app"], "note": "Chỉ bằng prompt: bàn giao kèm lịch sử để nhớ xa (StuLife), trưởng nhóm đọc lịch sử để tự cải thiện (AppWorld)." }
    ]
  },
  "lanes": [
    { "id": "core", "label": "Viên gạch invoke" },
    { "id": "mem", "label": "Nhớ lâu" },
    { "id": "self", "label": "Tự cải thiện" }
  ],
  "phases": [
    { "id": "p1", "label": "Cơ chế", "fromCol": 0, "toCol": 1, "variant": "emphasis" },
    { "id": "p2", "label": "Dựng bằng prompt", "fromCol": 2, "toCol": 2 },
    { "id": "p3", "label": "Kết quả", "fromCol": 3, "toCol": 3, "variant": "dashed" }
  ],
  "mainPath": ["code", "invoke", "deleg", "stu"],
  "nodes": [
    { "id": "code", "lane": "core", "col": 0, "type": "backend", "label": "Viết code + agent con", "sublabel": "như CodeAct, RLM", "width": 190 },
    { "id": "invoke", "lane": "core", "col": 1, "type": "backend", "label": "invoke", "sublabel": "lịch sử là biến __history__", "width": 200 },
    { "id": "deleg", "lane": "mem", "col": 2, "type": "frontend", "label": "Bàn giao kèm hồ sơ", "sublabel": "tail-recursive delegation", "width": 200 },
    { "id": "stu", "lane": "mem", "col": 3, "type": "database", "label": "StuLife nhớ xa", "sublabel": "69.9% (Letta 61.8%)", "width": 180 },
    { "id": "meta", "lane": "self", "col": 2, "type": "frontend", "label": "Trưởng nhóm, nhân viên", "sublabel": "meta-agent, solver", "width": 200 },
    { "id": "app", "lane": "self", "col": 3, "type": "database", "label": "AppWorld TGC", "sublabel": "74.2% (ACE 69.9%)", "width": 180 }
  ],
  "edges": [
    { "id": "e1", "from": "code", "to": "invoke", "variant": "emphasis" },
    { "id": "e2", "from": "invoke", "to": "deleg", "variant": "emphasis" },
    { "id": "e3", "from": "deleg", "to": "stu", "variant": "emphasis" },
    { "id": "e4", "from": "invoke", "to": "meta" },
    { "id": "e5", "from": "meta", "to": "app" }
  ],
  "cards": [
    { "dot": "cyan", "title": "Chi phí", "items": ["StuLife: $18.3 so với Letta $42.1", "AppWorld: $20.9 so với ACE $30.6"] },
    { "dot": "rose", "title": "Giới hạn", "items": ["Chỉ GPT-5.4, hai benchmark", "Đối thủ do tác giả cài lại hoặc chỉnh"] }
  ]
}
