{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "Vòng phản hồi Agentic Engineering (Google)",
    "quality_profile": "showcase",
    "views": [
      {
        "id": "happy-path",
        "label": "Spec tới review",
        "focus": [
          "spec",
          "context",
          "impl",
          "validate",
          "staging",
          "slo",
          "review"
        ],
        "note": "Đường chính: người viết spec và context (song song), agent làm, build system kiểm, rồi mới tới người review."
      },
      {
        "id": "retry-loop",
        "label": "Vòng sửa lại",
        "focus": [
          "impl",
          "validate",
          "slo"
        ],
        "note": "Test hoặc SLO không qua thì quay lại agent."
      }
    ],
    "legend": {
      "mode": "hidden"
    }
  },
  "lanes": [
    {
      "id": "human",
      "label": "Con người: What & When"
    },
    {
      "id": "agents",
      "label": "Agent: How"
    },
    {
      "id": "verify",
      "label": "Kiểm chứng tự động",
      "variant": "exception"
    }
  ],
  "phases": [
    {
      "id": "prep",
      "label": "Preparation",
      "fromCol": 0,
      "toCol": 1
    },
    {
      "id": "build",
      "label": "Implement + validate",
      "fromCol": 2,
      "toCol": 3,
      "variant": "emphasis"
    },
    {
      "id": "ship",
      "label": "Deploy + verify",
      "fromCol": 4,
      "toCol": 5,
      "variant": "dashed"
    }
  ],
  "mainPath": [
    "spec",
    "impl",
    "validate",
    "staging",
    "slo",
    "review"
  ],
  "nodes": [
    {
      "id": "spec",
      "lane": "human",
      "col": 0,
      "type": "frontend",
      "label": "Specification",
      "sublabel": "design doc + test",
      "width": 132
    },
    {
      "id": "context",
      "lane": "human",
      "col": 1,
      "type": "database",
      "label": "Context Baseline",
      "sublabel": "GEMINI.md",
      "width": 132
    },
    {
      "id": "impl",
      "lane": "agents",
      "col": 2,
      "type": "backend",
      "label": "Agentic Impl.",
      "sublabel": "4–6 agent song song",
      "width": 132
    },
    {
      "id": "validate",
      "lane": "verify",
      "col": 3,
      "type": "security",
      "label": "Validation",
      "sublabel": "bazel test",
      "width": 132
    },
    {
      "id": "staging",
      "lane": "verify",
      "col": 4,
      "type": "cloud",
      "label": "Deploy (Staging)",
      "sublabel": "môi trường thử",
      "width": 132
    },
    {
      "id": "slo",
      "lane": "verify",
      "col": 5,
      "type": "security",
      "label": "Verification",
      "sublabel": "SLOs",
      "width": 132
    },
    {
      "id": "review",
      "lane": "human",
      "col": 5,
      "type": "frontend",
      "label": "Code Review",
      "sublabel": "taste + judgment",
      "width": 132
    }
  ],
  "edges": [
    {
      "id": "spec-impl",
      "from": "spec",
      "to": "impl",
      "variant": "emphasis"
    },
    {
      "id": "context-impl",
      "from": "context",
      "to": "impl"
    },
    {
      "id": "impl-validate",
      "from": "impl",
      "to": "validate"
    },
    {
      "id": "validate-fail",
      "from": "validate",
      "to": "impl",
      "label": "fails",
      "variant": "security",
      "role": "error"
    },
    {
      "id": "validate-pass",
      "from": "validate",
      "to": "staging",
      "label": "passes",
      "variant": "emphasis"
    },
    {
      "id": "staging-slo",
      "from": "staging",
      "to": "slo"
    },
    {
      "id": "slo-fail",
      "from": "slo",
      "to": "impl",
      "label": "SLO fail",
      "variant": "security",
      "role": "error"
    },
    {
      "id": "slo-review",
      "from": "slo",
      "to": "review",
      "variant": "emphasis"
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "Verifiers",
      "items": [
        "Test coverage từ lúc viết spec",
        "Build tất định, linter nghiêm, integration test"
      ]
    },
    {
      "dot": "rose",
      "title": "Khi agent sai",
      "items": [
        "Sửa prompt, tool, trajectory",
        "Không revert: lái agent fix forward"
      ]
    }
  ]
}