{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "Build system là chân lý (slide 10)",
    "quality_profile": "showcase",
    "legend": {
      "mode": "hidden"
    },
    "views": [
      {
        "id": "gate",
        "label": "Submit hay retry",
        "focus": [
          "spec",
          "agent",
          "bazel",
          "submit"
        ],
        "note": "IF (bazel test == PASS) THEN Submit ELSE Retry; nhu cầu test được xác định từ lúc viết spec."
      }
    ]
  },
  "lanes": [
    {
      "id": "work",
      "label": "Làm"
    },
    {
      "id": "check",
      "label": "Kiểm tất định"
    }
  ],
  "phases": [
    {
      "id": "p1",
      "label": "Spec",
      "fromCol": 0,
      "toCol": 0
    },
    {
      "id": "p2",
      "label": "Viết và kiểm",
      "fromCol": 1,
      "toCol": 2,
      "variant": "emphasis"
    },
    {
      "id": "p3",
      "label": "Nhận",
      "fromCol": 3,
      "toCol": 3,
      "variant": "dashed"
    }
  ],
  "mainPath": [
    "spec",
    "agent",
    "bazel",
    "submit"
  ],
  "nodes": [
    {
      "id": "spec",
      "lane": "work",
      "col": 0,
      "type": "frontend",
      "label": "Spec",
      "sublabel": "định trước cần test gì",
      "width": 170
    },
    {
      "id": "agent",
      "lane": "work",
      "col": 1,
      "type": "backend",
      "label": "Agent viết code",
      "sublabel": "implementer",
      "width": 170
    },
    {
      "id": "bazel",
      "lane": "check",
      "col": 2,
      "type": "security",
      "label": "bazel test",
      "sublabel": "build + test",
      "width": 160
    },
    {
      "id": "submit",
      "lane": "check",
      "col": 3,
      "type": "frontend",
      "label": "Submit",
      "sublabel": "PASS",
      "width": 140
    }
  ],
  "edges": [
    {
      "id": "e1",
      "from": "spec",
      "to": "agent",
      "variant": "emphasis"
    },
    {
      "id": "e2",
      "from": "agent",
      "to": "bazel",
      "variant": "emphasis"
    },
    {
      "id": "e3",
      "from": "bazel",
      "to": "submit",
      "label": "PASS",
      "variant": "emphasis"
    },
    {
      "id": "e4",
      "from": "bazel",
      "to": "agent",
      "label": "Retry",
      "variant": "dashed",
      "role": "return"
    }
  ],
  "cards": [
    {
      "dot": "rose",
      "title": "Các lớp verifier",
      "items": [
        "0 độ phủ test từ spec; 1 build tất định; 2 linter, formatter",
        "3 integration test; 4 semantic search (no grep)"
      ]
    }
  ]
}