{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "Failing forward (slide 11)",
    "quality_profile": "showcase",
    "legend": {
      "mode": "hidden"
    },
    "views": [
      {
        "id": "forward",
        "label": "Sửa tiến",
        "focus": [
          "error",
          "steer",
          "fixed"
        ],
        "note": "Lỗi khi refactor: không revert mà lái agent sửa trajectory tới bản đúng."
      },
      {
        "id": "support",
        "label": "Điều kiện",
        "focus": [
          "workspace",
          "steer"
        ],
        "note": "Workspace dùng một lần cho cách ly rẻ; chỉ thư mục có sẵn làm tiền lệ để dạy agent."
      }
    ]
  },
  "lanes": [
    {
      "id": "main",
      "label": "Dòng thời gian"
    },
    {
      "id": "aid",
      "label": "Hỗ trợ"
    }
  ],
  "phases": [
    {
      "id": "p1",
      "label": "Gặp lỗi",
      "fromCol": 0,
      "toCol": 0
    },
    {
      "id": "p2",
      "label": "Fix forward",
      "fromCol": 1,
      "toCol": 2,
      "variant": "emphasis"
    }
  ],
  "mainPath": [
    "error",
    "steer",
    "fixed"
  ],
  "nodes": [
    {
      "id": "error",
      "lane": "main",
      "col": 0,
      "type": "external",
      "label": "Lỗi refactor",
      "sublabel": "không revert",
      "width": 160
    },
    {
      "id": "steer",
      "lane": "main",
      "col": 1,
      "type": "backend",
      "label": "Lái agent",
      "sublabel": "sửa trajectory",
      "width": 160
    },
    {
      "id": "fixed",
      "lane": "main",
      "col": 2,
      "type": "frontend",
      "label": "Bản đúng",
      "sublabel": "correction",
      "width": 150
    },
    {
      "id": "workspace",
      "lane": "aid",
      "col": 1,
      "type": "database",
      "label": "Workspace + tiền lệ",
      "sublabel": "dùng một lần; chỉ thư mục có sẵn",
      "width": 240
    }
  ],
  "edges": [
    {
      "id": "e1",
      "from": "error",
      "to": "steer",
      "variant": "emphasis"
    },
    {
      "id": "e2",
      "from": "steer",
      "to": "fixed",
      "variant": "emphasis"
    },
    {
      "id": "e3",
      "from": "workspace",
      "to": "steer",
      "variant": "dashed"
    }
  ]
}
