{
  "$defs": {
    "FactorKind": {
      "description": "The kind of edit an experiment factor makes on each of its nodes.\n\n``agent`` answers an llm node with another agent of the project, ``prompt`` replaces the prompt text of an llm\nnode, ``use`` replaces a node with an alternative node of the experiment, ``flow`` points a call node at\nanother flow.",
      "enum": [
        "agent",
        "prompt",
        "use",
        "flow"
      ],
      "title": "FactorKind",
      "type": "string"
    },
    "FindingChange": {
      "additionalProperties": false,
      "description": "One value of the experiment factor the variant set: ``what`` kind of edit on node ``node_id``.\n\n``value`` reads by ``what``: an agent id (``agent``), a prompt name of the experiment ``prompts/`` folder\n(``prompt``), an alternative id of its ``nodes/`` folder (``use``) or a flow id (``flow``).",
      "properties": {
        "node_id": {
          "title": "Node Id",
          "type": "string"
        },
        "value": {
          "title": "Value",
          "type": "string"
        },
        "what": {
          "$ref": "#/$defs/FactorKind"
        }
      },
      "required": [
        "node_id",
        "what",
        "value"
      ],
      "title": "FindingChange",
      "type": "object"
    },
    "FindingEstimate": {
      "additionalProperties": false,
      "description": "A point estimate with its 95 % interval, as the series computed it on the holdout cases.\n\n``method`` names the interval (``wilson``, ``paired_t`` and so on); ``p_adjusted`` is the Benjamini\u2013Hochberg\nvalue over the primary cells of the series. ``cases`` and ``attempts`` count the data behind the estimate.",
      "properties": {
        "attempts": {
          "minimum": 0,
          "title": "Attempts",
          "type": "integer"
        },
        "cases": {
          "minimum": 0,
          "title": "Cases",
          "type": "integer"
        },
        "high": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "High"
        },
        "low": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Low"
        },
        "method": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Method"
        },
        "p_adjusted": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "P Adjusted"
        },
        "p_value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "P Value"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        }
      },
      "required": [
        "value",
        "low",
        "high",
        "method",
        "cases",
        "attempts"
      ],
      "title": "FindingEstimate",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "A variant as it ran: the factor values it set, the agents on its nodes, the models and the hash of its flow.\n\n``changes`` lists the factor values of the variant, empty for the subject as written. ``agents`` names the agent\nthat answered on every llm node, changed or not. ``models`` lists the models recorded on the attempts, which may\ndiffer from the declared ones when a model profile routes the call. ``metrics`` holds the variant's own estimate\nof every metric of the series. ``arm`` is read only in findings written before ADR-0056, which have no\n``changes``; a new finding never writes it.",
  "properties": {
    "agents": {
      "additionalProperties": {
        "type": "string"
      },
      "title": "Agents",
      "type": "object"
    },
    "changes": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/FindingChange"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Changes"
    },
    "flow_hash": {
      "title": "Flow Hash",
      "type": "string"
    },
    "id": {
      "title": "Id",
      "type": "string"
    },
    "metrics": {
      "additionalProperties": {
        "$ref": "#/$defs/FindingEstimate"
      },
      "title": "Metrics",
      "type": "object"
    },
    "models": {
      "items": {
        "type": "string"
      },
      "title": "Models",
      "type": "array"
    }
  },
  "required": [
    "id",
    "agents",
    "models",
    "flow_hash",
    "metrics"
  ],
  "title": "FindingVariant",
  "type": "object"
}
