{
  "openapi": "3.1.0",
  "info": {
    "title": "Trevo API",
    "version": "1",
    "description": "The routes the Trevo dashboard uses, authenticated with a workspace API key. Make a key under Settings → API access; it opens one workspace, reads everything in it, and writes what its scopes allow. Generated from the schemas the API parses — do not edit by hand."
  },
  "servers": [
    {
      "url": "https://api.trevosdk.com/v1"
    }
  ],
  "security": [
    {
      "workspaceApiKey": []
    }
  ],
  "paths": {
    "/experiments": {
      "get": {
        "summary": "List experiments and proposals",
        "description": "Proposals are experiments at `status=proposed`.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "experimentRunId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "rejectedStage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pr",
                "outcome"
              ]
            }
          },
          {
            "name": "hasPr",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              ]
            }
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "experiment",
                "feature"
              ]
            }
          },
          {
            "name": "testType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "dom",
                "message"
              ]
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "default": "createdAt",
              "type": "string",
              "enum": [
                "createdAt",
                "updatedAt",
                "startedAt",
                "usersExposed",
                "name",
                "estimatedLift",
                "confidence",
                "priority"
              ]
            }
          },
          {
            "name": "sortDir",
            "in": "query",
            "required": false,
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentList"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Declare an experiment yourself",
        "description": "Requires experiments.manage. Send an `Idempotency-Key` header so a retry replays the first result instead of opening a second pull request.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "8–128 URL-safe characters. Replayed for about ten minutes.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExperimentBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentWithPr"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/counts": {
      "get": {
        "summary": "Per-status counts",
        "responses": {
          "200": {
            "description": "Counts by status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentCounts"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/generate": {
      "post": {
        "summary": "Ask for a fresh batch of proposals",
        "description": "Requires proposals.review. Accepted, not awaited — poll `GET /experiments?status=proposed`. Refuses GENERATION_IN_FLIGHT while a batch is already running.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateBody"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Generation started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateAccepted"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A batch is already being generated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/{id}": {
      "get": {
        "summary": "One experiment, with results and pull-request status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The experiment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentDetail"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Edit an experiment",
        "description": "Requires experiments.manage. Proposal fields while proposed; measurement before the pull request is written, or after it failed.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateExperimentBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated experiment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experiment"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/{id}/status": {
      "get": {
        "summary": "Just the status — what CI polls",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The current status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentStatus"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/{id}/conversion-targets": {
      "put": {
        "summary": "Replace the measurement targets",
        "description": "Requires experiments.manage. Allowed before the pull request is written, or after it failed.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversionTargetsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated experiment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experiment"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/{id}/approve": {
      "post": {
        "summary": "Approve a proposal; Trevo writes the pull request",
        "description": "Requires proposals.review. Refuses SURFACE_OVERLAP until `acknowledgeOverlap` is true, PROPOSAL_FILES_MISSING when a file the plan edits is gone, and PROPOSAL_SNAPSHOT_STALE when the code it relies on has changed.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Approved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperimentWithPr"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Overlap, missing files, or a stale snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/{id}/dismiss": {
      "post": {
        "summary": "Dismiss a proposal (terminal)",
        "description": "Requires proposals.review. An optional `note` is kept as a team note that later proposals and pull requests read.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DismissBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dismissed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experiment"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/{id}/refine": {
      "post": {
        "summary": "Revise a proposal under your own instructions",
        "description": "Requires proposals.review. Accepted, not awaited.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefineBody"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Revision started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refinement"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "The latest revision, while it runs",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The latest revision, or null.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LatestRefinement"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/{id}/generate-pr": {
      "post": {
        "summary": "Write the pull request for an approved experiment",
        "description": "Requires experiments.manage.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Generation started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneratePrAccepted"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/{id}/decide": {
      "post": {
        "summary": "Ship or reject a finished experiment",
        "description": "Requires experiments.decide. Opens the cleanup pull request.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecideBody"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Decision recorded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecideAccepted"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiments/{id}/{action}": {
      "post": {
        "summary": "Move an experiment through its lifecycle",
        "description": "Requires experiments.manage. `start` refuses EVENT_HISTORY_UNAVAILABLE when the primary event cannot be verified — measurement fails closed rather than starting blind.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The experiment id, or its key.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "start",
                "pause",
                "resume",
                "end",
                "ship"
              ]
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransitionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The transitioned experiment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experiment"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "That transition is not legal from this status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/learnings": {
      "get": {
        "summary": "List experiment decisions and write-ups",
        "description": "The durable growth memory for this workspace. Historical rows without a review state are returned as approved.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "decision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ship",
                "reject",
                "conclude"
              ]
            }
          },
          {
            "name": "reviewStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "approved"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearningList"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/learnings/{id}": {
      "get": {
        "summary": "One experiment decision and its frozen evidence",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The learning record id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The learning record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearningDetail"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Edit or approve a learning write-up",
        "description": "Requires experiments.decide. Only the interpretation and review state are editable; measured evidence remains frozen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The learning record id.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLearningBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated learning record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LearningDetail"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiment-runs": {
      "get": {
        "summary": "Generation runs, newest first",
        "description": "What `POST /experiments/generate` started, and how it went.",
        "responses": {
          "200": {
            "description": "A page of runs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationRunList"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/experiment-runs/{runId}": {
      "get": {
        "summary": "One generation run",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationRun"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/funnel": {
      "get": {
        "summary": "This workspace's funnels",
        "responses": {
          "200": {
            "description": "Every funnel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunnelList"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a funnel",
        "description": "Requires funnels.manage.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFunnelBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunnelDefinition"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/funnel/events": {
      "get": {
        "summary": "Event names this workspace has received",
        "responses": {
          "200": {
            "description": "The vocabulary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunnelEvents"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/funnel/{funnelId}": {
      "get": {
        "summary": "One funnel definition",
        "parameters": [
          {
            "name": "funnelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The funnel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunnelDefinition"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Edit a funnel",
        "description": "Requires funnels.manage.",
        "parameters": [
          {
            "name": "funnelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFunnelBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated funnel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunnelDefinition"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a funnel",
        "description": "Requires funnels.manage.",
        "parameters": [
          {
            "name": "funnelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/funnel/{funnelId}/query": {
      "post": {
        "summary": "Conversion rates for a funnel",
        "parameters": [
          {
            "name": "funnelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FunnelQueryBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Step-by-step conversion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunnelMetrics"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me": {
      "get": {
        "summary": "Which workspace this key opens, and who it acts as",
        "description": "The only way a script can tell one workspace’s key from another’s. A key acts as the person who made it.",
        "responses": {
          "200": {
            "description": "The caller.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/readiness": {
      "get": {
        "summary": "Whether this workspace can generate and run experiments",
        "responses": {
          "200": {
            "description": "What is connected, and what is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Readiness"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events": {
      "get": {
        "summary": "Ingested events, newest first",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "default": "receivedAt",
              "type": "string",
              "enum": [
                "receivedAt",
                "event"
              ]
            }
          },
          {
            "name": "sortDir",
            "in": "query",
            "required": false,
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventsList"
                }
              }
            }
          },
          "401": {
            "description": "The key is unknown or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the scope this write needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such row in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "workspaceApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "tsk_api_…",
        "description": "A workspace API key. Scopes: proposals.review, experiments.manage, experiments.decide, funnels.manage. SDK keys (tsk_live_, tsk_secret_) are refused here, and a key is refused outside /me, /experiments, /learnings, /experiment-runs, /funnel, /readiness, /events with API_KEY_NOT_ALLOWED_HERE."
      }
    },
    "schemas": {
      "CreateExperimentBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "mechanism": {
            "type": "string",
            "maxLength": 1000
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "variants": {
            "minItems": 2,
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "displayName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "trafficSplit": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100
                }
              },
              "required": [
                "displayName",
                "trafficSplit"
              ]
            }
          },
          "conversionTargets": {
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "guardrail"
                  ]
                }
              },
              "required": [
                "eventName"
              ]
            }
          },
          "changeDescription": {
            "type": "object",
            "properties": {
              "summary": {
                "type": "string",
                "minLength": 5,
                "maxLength": 300
              },
              "rationale": {
                "type": "string",
                "minLength": 10,
                "maxLength": 800
              },
              "files": {
                "minItems": 1,
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "change": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "create": {
                      "type": "boolean"
                    },
                    "required": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "path",
                    "change"
                  ]
                }
              }
            },
            "required": [
              "summary",
              "rationale",
              "files"
            ]
          },
          "generatePr": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "variants",
          "conversionTargets"
        ]
      },
      "UpdateExperimentBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "settlingHours": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 720
              },
              {
                "type": "null"
              }
            ]
          },
          "maxRuntimeDays": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 365
              },
              {
                "type": "null"
              }
            ]
          },
          "mechanism": {
            "type": "string",
            "minLength": 30,
            "maxLength": 800
          },
          "segment": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "affectedArea": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedOutcome": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          },
          "northStarMetric": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "businessThesis": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 600
              },
              {
                "type": "null"
              }
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "conversionTargets": {
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "guardrail"
                  ]
                }
              },
              "required": [
                "eventName"
              ]
            }
          },
          "attributionWindowDays": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 365
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ConversionTargetsBody": {
        "type": "object",
        "properties": {
          "targets": {
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "guardrail"
                  ]
                }
              },
              "required": [
                "eventName"
              ]
            }
          }
        },
        "required": [
          "targets"
        ]
      },
      "ApproveBody": {
        "type": "object",
        "properties": {
          "acknowledgeOverlap": {
            "default": false,
            "type": "boolean"
          }
        }
      },
      "DismissBody": {
        "type": "object",
        "properties": {
          "reasons": {
            "minItems": 1,
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "not_relevant",
                "too_risky",
                "tried_before",
                "wrong_metric",
                "does_not_match_code",
                "not_feasible",
                "wrong_area",
                "superseded"
              ]
            }
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          }
        },
        "required": [
          "reasons"
        ]
      },
      "RefineBody": {
        "type": "object",
        "properties": {
          "instructions": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          }
        },
        "required": [
          "instructions"
        ]
      },
      "GenerateBody": {
        "type": "object",
        "properties": {
          "replacePending": {
            "default": false,
            "type": "boolean"
          },
          "instructions": {
            "type": "string",
            "maxLength": 1000
          },
          "intent": {
            "default": "experiments",
            "type": "string",
            "enum": [
              "experiments",
              "features"
            ]
          }
        }
      },
      "DecideBody": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "ship",
              "reject"
            ]
          },
          "winnerVariantName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "reason": {
            "type": "string",
            "maxLength": 500
          },
          "force": {
            "type": "boolean"
          }
        },
        "required": [
          "decision"
        ]
      },
      "TransitionBody": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "stopReason": {
                "type": "string",
                "maxLength": 500
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "winnerVariantName": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "winnerVariantName"
            ]
          }
        ]
      },
      "CreateFunnelBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "steps": {
            "minItems": 2,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "stepOrder": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "eventName",
                "stepOrder"
              ]
            }
          }
        },
        "required": [
          "name",
          "steps"
        ]
      },
      "UpdateFunnelBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "steps": {
            "minItems": 2,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "stepOrder": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "eventName",
                "stepOrder"
              ]
            }
          }
        }
      },
      "FunnelQueryBody": {
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "filters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "property": {
                  "type": "string",
                  "minLength": 1
                },
                "operator": {
                  "type": "string",
                  "enum": [
                    "equals",
                    "notEquals",
                    "contains",
                    "notContains"
                  ]
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                }
              },
              "required": [
                "property",
                "operator",
                "value"
              ]
            }
          },
          "breakdown": {
            "type": "string"
          }
        },
        "required": [
          "startDate",
          "endDate"
        ]
      },
      "UpdateLearningBody": {
        "type": "object",
        "properties": {
          "summary": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "keyTakeaway": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "caveats": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "nextStep": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewStatus": {
            "type": "string",
            "enum": [
              "draft",
              "approved"
            ]
          }
        }
      },
      "Experiment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "legacyHypothesisId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "experimentRunId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "sourceSnapshotId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "running",
              "paused",
              "ended",
              "shipped",
              "pr_generating",
              "pr_open",
              "pr_failed",
              "decided",
              "cleanup_generating",
              "cleanup_open",
              "rejected",
              "proposed",
              "approved",
              "dismissed"
            ]
          },
          "origin": {
            "default": "ai",
            "type": "string",
            "enum": [
              "ai",
              "custom"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "mechanism": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "segment": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "affectedArea": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "changeDescription": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 300
                  },
                  "component": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "element",
                      "component",
                      "section",
                      "page",
                      "flow"
                    ]
                  },
                  "surface": {
                    "type": "string",
                    "enum": [
                      "client",
                      "server",
                      "fullstack"
                    ]
                  },
                  "files": {
                    "minItems": 1,
                    "maxItems": 25,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "change": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000
                        },
                        "create": {
                          "type": "boolean"
                        },
                        "required": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "path",
                        "change"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "rationale": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 800
                  },
                  "layout": {
                    "type": "object",
                    "properties": {
                      "blocks": {
                        "minItems": 1,
                        "maxItems": 12,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "block": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "component": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "change": {
                              "type": "string",
                              "enum": [
                                "kept",
                                "moved",
                                "new",
                                "removed"
                              ]
                            },
                            "placement": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            }
                          },
                          "required": [
                            "block",
                            "change",
                            "placement"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "wide": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "small": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "blocks",
                      "wide",
                      "small"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "summary",
                  "component",
                  "files",
                  "rationale"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedOutcome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "northStarMetric": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "exposureEvent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "businessThesis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "signals": {
            "type": "array"
          },
          "testType": {
            "type": "string",
            "enum": [
              "dom",
              "message"
            ]
          },
          "estimatedLift": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "estimatedDaysToSignificance": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "sampleNeeded": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "beliefsConditioned": {
            "default": false,
            "type": "boolean"
          },
          "readiness": {
            "default": "ready",
            "type": "string",
            "enum": [
              "ready",
              "needsReview"
            ]
          },
          "readinessFlags": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reason": {
                  "type": "string",
                  "enum": [
                    "fabricatedQuotes",
                    "unverifiedStat",
                    "promisedDuration",
                    "unsafeImplementationClaim",
                    "unbackedQuantityClaim",
                    "redundantAddition",
                    "hedgedLanguage",
                    "mechanismTemplate",
                    "readerJargon",
                    "decisionPointMissing",
                    "unwiredDecision",
                    "metricInterference",
                    "changeContractInvalid",
                    "liveExperimentConflict",
                    "unreachableMetric",
                    "identityChangeBundled",
                    "underpowered",
                    "layoutUngrounded"
                  ]
                },
                "evidence": {
                  "type": "string",
                  "maxLength": 300
                }
              },
              "required": [
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "processingStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "building_variants",
                  "rendering",
                  "ready",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "failureStep": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "variant_build",
                  "preview_render"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "failureReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversionTargets": {
            "maxItems": 3,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "existing"
                    },
                    "eventName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "guardrail"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "eventName"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "proposed"
                    },
                    "eventName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "guardrail"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "eventName"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "attributionWindowDays": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 365
              },
              {
                "type": "null"
              }
            ]
          },
          "settlingHours": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 720
              },
              {
                "type": "null"
              }
            ]
          },
          "maxRuntimeDays": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 365
              },
              {
                "type": "null"
              }
            ]
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "trafficSplit": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "edits": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "selector": {
                            "type": "string",
                            "minLength": 1
                          },
                          "newOuterHtml": {
                            "type": "string",
                            "maxLength": 15000
                          },
                          "editId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "selector",
                          "newOuterHtml"
                        ],
                        "additionalProperties": false
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sortOrder": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "id",
                "name",
                "displayName",
                "trafficSplit",
                "edits",
                "sortOrder"
              ],
              "additionalProperties": false
            }
          },
          "editedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "approvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "dismissedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "dismissReasons": {
            "anyOf": [
              {
                "minItems": 1,
                "maxItems": 8,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "not_relevant",
                    "too_risky",
                    "tried_before",
                    "wrong_metric",
                    "does_not_match_code",
                    "not_feasible",
                    "wrong_area",
                    "superseded"
                  ]
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "endedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "endedBy": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "winnerVariantName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "stopReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "results": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "variantStats": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "exposures": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "conversions": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "conversionRate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "liftPercent": {
                            "type": "number"
                          },
                          "pValue": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "isSignificant": {
                            "type": "boolean"
                          },
                          "confidenceInterval": {
                            "type": "object",
                            "properties": {
                              "lower": {
                                "type": "number"
                              },
                              "upper": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "lower",
                              "upper"
                            ],
                            "additionalProperties": false
                          },
                          "estimatedDaysRemaining": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "exposures",
                          "conversions",
                          "conversionRate",
                          "liftPercent",
                          "pValue",
                          "isSignificant",
                          "confidenceInterval",
                          "estimatedDaysRemaining"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "srm": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "pValue": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "detected": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "pValue",
                          "detected"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "collisions": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "experimentId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "experimentKey": {
                              "type": "string"
                            },
                            "reason": {
                              "type": "string",
                              "enum": [
                                "files",
                                "target"
                              ]
                            }
                          },
                          "required": [
                            "experimentId",
                            "experimentKey",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "computedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "variantStats",
                  "computedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "learning": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "winnerVariantName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "liftPercent": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "totalExposures": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "durationDays": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mechanism": {
                    "type": "string"
                  },
                  "conversionTargets": {
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "existing"
                            },
                            "eventName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "guardrail"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "eventName"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "proposed"
                            },
                            "eventName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "guardrail"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "eventName"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "decision": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ship",
                          "reject",
                          "conclude"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "decisionSource": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "human",
                          "trevo",
                          "runtime"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reviewStatus": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "draft",
                          "approved"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "summary": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "keyTakeaway": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "caveats": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "nextStep": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reviewedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "winnerVariantName",
                  "liftPercent",
                  "totalExposures",
                  "durationDays",
                  "mechanism",
                  "conversionTargets",
                  "createdAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "workspaceId",
          "legacyHypothesisId",
          "experimentRunId",
          "sourceSnapshotId",
          "key",
          "name",
          "notes",
          "status",
          "origin",
          "priority",
          "mechanism",
          "segment",
          "affectedArea",
          "changeDescription",
          "expectedOutcome",
          "northStarMetric",
          "businessThesis",
          "signals",
          "testType",
          "estimatedLift",
          "confidence",
          "estimatedDaysToSignificance",
          "sampleNeeded",
          "beliefsConditioned",
          "readiness",
          "readinessFlags",
          "processingStatus",
          "failureStep",
          "failureReason",
          "conversionTargets",
          "attributionWindowDays",
          "settlingHours",
          "maxRuntimeDays",
          "variants",
          "editedAt",
          "approvedAt",
          "dismissedAt",
          "dismissReasons",
          "startedAt",
          "endedAt",
          "endedBy",
          "winnerVariantName",
          "stopReason",
          "createdAt",
          "results",
          "learning"
        ],
        "additionalProperties": false
      },
      "ExperimentDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "legacyHypothesisId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "experimentRunId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "sourceSnapshotId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "running",
              "paused",
              "ended",
              "shipped",
              "pr_generating",
              "pr_open",
              "pr_failed",
              "decided",
              "cleanup_generating",
              "cleanup_open",
              "rejected",
              "proposed",
              "approved",
              "dismissed"
            ]
          },
          "origin": {
            "default": "ai",
            "type": "string",
            "enum": [
              "ai",
              "custom"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "mechanism": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "segment": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "affectedArea": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "changeDescription": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 300
                  },
                  "component": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "element",
                      "component",
                      "section",
                      "page",
                      "flow"
                    ]
                  },
                  "surface": {
                    "type": "string",
                    "enum": [
                      "client",
                      "server",
                      "fullstack"
                    ]
                  },
                  "files": {
                    "minItems": 1,
                    "maxItems": 25,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "maxLength": 500
                        },
                        "change": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000
                        },
                        "create": {
                          "type": "boolean"
                        },
                        "required": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "path",
                        "change"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "rationale": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 800
                  },
                  "layout": {
                    "type": "object",
                    "properties": {
                      "blocks": {
                        "minItems": 1,
                        "maxItems": 12,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "block": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "component": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "change": {
                              "type": "string",
                              "enum": [
                                "kept",
                                "moved",
                                "new",
                                "removed"
                              ]
                            },
                            "placement": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            }
                          },
                          "required": [
                            "block",
                            "change",
                            "placement"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "wide": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "small": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "blocks",
                      "wide",
                      "small"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "summary",
                  "component",
                  "files",
                  "rationale"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedOutcome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "northStarMetric": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "exposureEvent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "businessThesis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "signals": {
            "type": "array"
          },
          "testType": {
            "type": "string",
            "enum": [
              "dom",
              "message"
            ]
          },
          "estimatedLift": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "estimatedDaysToSignificance": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "sampleNeeded": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "beliefsConditioned": {
            "default": false,
            "type": "boolean"
          },
          "readiness": {
            "default": "ready",
            "type": "string",
            "enum": [
              "ready",
              "needsReview"
            ]
          },
          "readinessFlags": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reason": {
                  "type": "string",
                  "enum": [
                    "fabricatedQuotes",
                    "unverifiedStat",
                    "promisedDuration",
                    "unsafeImplementationClaim",
                    "unbackedQuantityClaim",
                    "redundantAddition",
                    "hedgedLanguage",
                    "mechanismTemplate",
                    "readerJargon",
                    "decisionPointMissing",
                    "unwiredDecision",
                    "metricInterference",
                    "changeContractInvalid",
                    "liveExperimentConflict",
                    "unreachableMetric",
                    "identityChangeBundled",
                    "underpowered",
                    "layoutUngrounded"
                  ]
                },
                "evidence": {
                  "type": "string",
                  "maxLength": 300
                }
              },
              "required": [
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "processingStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "building_variants",
                  "rendering",
                  "ready",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "failureStep": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "variant_build",
                  "preview_render"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "failureReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversionTargets": {
            "maxItems": 3,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "existing"
                    },
                    "eventName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "guardrail"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "eventName"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "proposed"
                    },
                    "eventName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "guardrail"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "eventName"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "attributionWindowDays": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 365
              },
              {
                "type": "null"
              }
            ]
          },
          "settlingHours": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 720
              },
              {
                "type": "null"
              }
            ]
          },
          "maxRuntimeDays": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 365
              },
              {
                "type": "null"
              }
            ]
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "trafficSplit": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "edits": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "selector": {
                            "type": "string",
                            "minLength": 1
                          },
                          "newOuterHtml": {
                            "type": "string",
                            "maxLength": 15000
                          },
                          "editId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "selector",
                          "newOuterHtml"
                        ],
                        "additionalProperties": false
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sortOrder": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "id",
                "name",
                "displayName",
                "trafficSplit",
                "edits",
                "sortOrder"
              ],
              "additionalProperties": false
            }
          },
          "editedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "approvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "dismissedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "dismissReasons": {
            "anyOf": [
              {
                "minItems": 1,
                "maxItems": 8,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "not_relevant",
                    "too_risky",
                    "tried_before",
                    "wrong_metric",
                    "does_not_match_code",
                    "not_feasible",
                    "wrong_area",
                    "superseded"
                  ]
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "endedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "endedBy": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "winnerVariantName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "stopReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "results": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "variantStats": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "exposures": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "conversions": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "conversionRate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "liftPercent": {
                            "type": "number"
                          },
                          "pValue": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "isSignificant": {
                            "type": "boolean"
                          },
                          "confidenceInterval": {
                            "type": "object",
                            "properties": {
                              "lower": {
                                "type": "number"
                              },
                              "upper": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "lower",
                              "upper"
                            ],
                            "additionalProperties": false
                          },
                          "estimatedDaysRemaining": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "exposures",
                          "conversions",
                          "conversionRate",
                          "liftPercent",
                          "pValue",
                          "isSignificant",
                          "confidenceInterval",
                          "estimatedDaysRemaining"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "srm": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "pValue": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "detected": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "pValue",
                          "detected"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "collisions": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "experimentId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "experimentKey": {
                              "type": "string"
                            },
                            "reason": {
                              "type": "string",
                              "enum": [
                                "files",
                                "target"
                              ]
                            }
                          },
                          "required": [
                            "experimentId",
                            "experimentKey",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "computedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "variantStats",
                  "computedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "learning": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "winnerVariantName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "liftPercent": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "totalExposures": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "durationDays": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mechanism": {
                    "type": "string"
                  },
                  "conversionTargets": {
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "existing"
                            },
                            "eventName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "guardrail"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "eventName"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "proposed"
                            },
                            "eventName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "guardrail"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "eventName"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "decision": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ship",
                          "reject",
                          "conclude"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "decisionSource": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "human",
                          "trevo",
                          "runtime"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reviewStatus": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "draft",
                          "approved"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "summary": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "keyTakeaway": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "caveats": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "nextStep": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reviewedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "winnerVariantName",
                  "liftPercent",
                  "totalExposures",
                  "durationDays",
                  "mechanism",
                  "conversionTargets",
                  "createdAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "sourceSnapshot": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "commitSha": {
                    "type": "string"
                  },
                  "capturedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "commitSha",
                  "capturedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "generationInstructions": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "diagnosisBasis": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "measured",
                  "heuristic"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "snapshotStale": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "fileCheck": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "checkedSha": {
                    "type": "string"
                  },
                  "checkedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "present",
                            "missing",
                            "renamed"
                          ]
                        },
                        "renamedTo": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "path",
                        "status"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "checkedSha",
                  "checkedAt",
                  "files"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "significanceStatus": {
            "type": "string",
            "enum": [
              "not_significant",
              "significant",
              "inconclusive"
            ]
          },
          "instrumentationStatus": {
            "type": "string",
            "enum": [
              "ready",
              "pending_instrumentation",
              "stale",
              "verification_unavailable"
            ]
          },
          "exposures": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "byVariant": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              }
            },
            "required": [
              "total",
              "byVariant"
            ],
            "additionalProperties": false
          },
          "liveness": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "live",
                  "no_sdk_connection",
                  "connection_silent",
                  "no_exposures",
                  "gate_missing",
                  "exposures_stalled"
                ]
              },
              "lastConfigFetchAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "gateMissingSince": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "exposuresStalledSince": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "state",
              "lastConfigFetchAt"
            ],
            "additionalProperties": false
          },
          "readBeforeReady": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "visitors": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "windowDays": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "visitors",
                  "windowDays"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "timeseries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "variantName": {
                  "type": "string"
                },
                "points": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "day": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "cumulativeExposures": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "cumulativeConversions": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "conversionRate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "day",
                      "cumulativeExposures",
                      "cumulativeConversions",
                      "conversionRate"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "variantName",
                "points"
              ],
              "additionalProperties": false
            }
          },
          "prs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "experimentId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "contextRepoId": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "experiment",
                    "cleanup",
                    "setup",
                    "instrumentation"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "generating",
                    "open",
                    "merged",
                    "closed",
                    "failed"
                  ]
                },
                "decision": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "ship",
                        "reject"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "branchName": {
                  "type": "string"
                },
                "prNumber": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "prUrl": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "verification": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "verifying",
                            "passed",
                            "failed"
                          ]
                        },
                        "checkedAt": {
                          "type": "string"
                        },
                        "observationVersion": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "headSha": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "parentHeadSha": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unconfirmedHeadSha": {
                          "type": "string"
                        },
                        "requiredCheckNames": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "failingChecks": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "minLength": 1
                              },
                              "name": {
                                "type": "string"
                              },
                              "summary": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detailsUrl": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "summary",
                              "detailsUrl"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "state",
                        "checkedAt",
                        "failingChecks"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "envVarName": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "wiredEvents": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "generationError": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "failureReason": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "openedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "mergedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "closedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "experimentId",
                "contextRepoId",
                "kind",
                "status",
                "decision",
                "branchName",
                "prNumber",
                "prUrl",
                "verification",
                "envVarName",
                "wiredEvents",
                "generationError",
                "failureReason",
                "openedAt",
                "mergedAt",
                "closedAt",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvedBy": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "image": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "image"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "dismissedBy": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "image": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "image"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "decidedBy": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "image": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "image"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "cleanupVerification": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "verifiedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "residueFiles": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "verifiedAt",
                  "residueFiles"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "surfaces": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "repoFullName": {
                  "type": "string"
                },
                "role": {
                  "anyOf": [
                    {
                      "type": "string",
                      "const": "primary"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "frontend",
                        "backend",
                        "mobile",
                        "other"
                      ]
                    }
                  ]
                },
                "requiredForActivation": {
                  "type": "boolean"
                },
                "appRoot": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "repoFullName",
                "role",
                "requiredForActivation",
                "appRoot"
              ],
              "additionalProperties": false
            }
          },
          "changeContractPlan": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "surfaces": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "repoFullName": {
                          "type": "string"
                        },
                        "role": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "primary"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "frontend",
                                "backend",
                                "mobile",
                                "other"
                              ]
                            }
                          ]
                        },
                        "requiredForActivation": {
                          "type": "boolean"
                        },
                        "appRoot": {
                          "default": null,
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "files": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "instructions": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "repoFullName",
                        "role",
                        "requiredForActivation",
                        "appRoot",
                        "files",
                        "instructions"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "apiDelta": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "method": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        },
                        "addedFields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "required": {
                                "type": "boolean",
                                "const": false
                              }
                            },
                            "required": [
                              "name",
                              "type",
                              "required"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "method",
                        "path",
                        "addedFields"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "eventName": {
                          "type": "string"
                        },
                        "emittedBy": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "eventName",
                        "emittedBy"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "surfaces",
                  "apiDelta",
                  "events"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "workspaceId",
          "legacyHypothesisId",
          "experimentRunId",
          "sourceSnapshotId",
          "key",
          "name",
          "notes",
          "status",
          "origin",
          "priority",
          "mechanism",
          "segment",
          "affectedArea",
          "changeDescription",
          "expectedOutcome",
          "northStarMetric",
          "businessThesis",
          "signals",
          "testType",
          "estimatedLift",
          "confidence",
          "estimatedDaysToSignificance",
          "sampleNeeded",
          "beliefsConditioned",
          "readiness",
          "readinessFlags",
          "processingStatus",
          "failureStep",
          "failureReason",
          "conversionTargets",
          "attributionWindowDays",
          "settlingHours",
          "maxRuntimeDays",
          "variants",
          "editedAt",
          "approvedAt",
          "dismissedAt",
          "dismissReasons",
          "startedAt",
          "endedAt",
          "endedBy",
          "winnerVariantName",
          "stopReason",
          "createdAt",
          "results",
          "learning",
          "generationInstructions",
          "diagnosisBasis",
          "significanceStatus",
          "instrumentationStatus",
          "exposures",
          "liveness",
          "readBeforeReady",
          "timeseries",
          "prs",
          "approvedBy",
          "dismissedBy",
          "decidedBy",
          "cleanupVerification",
          "surfaces",
          "changeContractPlan"
        ],
        "additionalProperties": false
      },
      "ExperimentListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "running",
              "paused",
              "ended",
              "shipped",
              "pr_generating",
              "pr_open",
              "pr_failed",
              "decided",
              "cleanup_generating",
              "cleanup_open",
              "rejected",
              "proposed",
              "approved",
              "dismissed"
            ]
          },
          "experimentRunId": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "origin": {
            "default": "ai",
            "type": "string",
            "enum": [
              "ai",
              "custom"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "affectedArea": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "mechanism": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "primaryMetricEvent": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "primaryMetricKind": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "existing",
                  "proposed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "northStarMetric": {
            "default": null,
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "exposureEvent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "signalCount": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "surface": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "client",
                  "server",
                  "fullstack"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "testType": {
            "default": "dom",
            "type": "string",
            "enum": [
              "dom",
              "message"
            ]
          },
          "lifecycleEmail": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "trigger": {
                    "type": "object",
                    "properties": {
                      "afterEvent": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "pattern": "^[A-Za-z0-9_.$-]+$"
                      },
                      "delayMinutes": {
                        "type": "integer",
                        "minimum": 15,
                        "maximum": 43200
                      },
                      "unlessEvent": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200,
                            "pattern": "^[A-Za-z0-9_.$-]+$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "afterEvent",
                      "delayMinutes",
                      "unlessEvent"
                    ],
                    "additionalProperties": false
                  },
                  "eligiblePerWeek": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subjects": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    }
                  },
                  "promotedVariantName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "enrolled": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "sent": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "delivered": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "trigger",
                  "eligiblePerWeek",
                  "subjects",
                  "promotedVariantName",
                  "enrolled",
                  "sent",
                  "delivered"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "readiness": {
            "default": "ready",
            "type": "string",
            "enum": [
              "ready",
              "needsReview"
            ]
          },
          "readinessFlags": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reason": {
                  "type": "string",
                  "enum": [
                    "fabricatedQuotes",
                    "unverifiedStat",
                    "promisedDuration",
                    "unsafeImplementationClaim",
                    "unbackedQuantityClaim",
                    "redundantAddition",
                    "hedgedLanguage",
                    "mechanismTemplate",
                    "readerJargon",
                    "decisionPointMissing",
                    "unwiredDecision",
                    "metricInterference",
                    "changeContractInvalid",
                    "liveExperimentConflict",
                    "unreachableMetric",
                    "identityChangeBundled",
                    "underpowered",
                    "layoutUngrounded"
                  ]
                },
                "evidence": {
                  "type": "string",
                  "maxLength": 300
                }
              },
              "required": [
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "pr": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "number",
                  "url"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "estimatedLift": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "estimatedDaysToSignificance": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "processingStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "building_variants",
                  "rendering",
                  "ready",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "readinessStale": {
            "default": false,
            "type": "boolean"
          },
          "betKind": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "experiment",
                  "feature"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "endedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "durationDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "usersExposed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "summary": {
            "type": "object",
            "properties": {
              "hasResults": {
                "type": "boolean"
              },
              "significanceStatus": {
                "type": "string",
                "enum": [
                  "not_significant",
                  "significant",
                  "inconclusive"
                ]
              },
              "winnerVariantName": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bestLiftPercent": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "evidenceState": {
                "default": "no-data",
                "type": "string",
                "enum": [
                  "no-data",
                  "collecting",
                  "flat",
                  "proven-up",
                  "proven-down"
                ]
              }
            },
            "required": [
              "hasResults",
              "significanceStatus",
              "winnerVariantName",
              "bestLiftPercent",
              "evidenceState"
            ],
            "additionalProperties": false
          },
          "missingFileCount": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "experimentRunId",
          "origin",
          "priority",
          "affectedArea",
          "mechanism",
          "primaryMetricEvent",
          "primaryMetricKind",
          "northStarMetric",
          "signalCount",
          "surface",
          "testType",
          "readiness",
          "readinessFlags",
          "pr",
          "estimatedLift",
          "confidence",
          "estimatedDaysToSignificance",
          "processingStatus",
          "readinessStale",
          "betKind",
          "startedAt",
          "endedAt",
          "durationDays",
          "usersExposed",
          "summary",
          "missingFileCount",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ExperimentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExperimentListItem"
            }
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "hasMore"
        ],
        "additionalProperties": false
      },
      "ExperimentCounts": {
        "type": "object",
        "properties": {
          "proposed": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "approved": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "dismissed": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "draft": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "pr_generating": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "pr_open": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "pr_failed": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "running": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "paused": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "decided": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "cleanup_generating": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "cleanup_open": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "ended": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "shipped": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "rejected": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "rejectedBeforeLaunch": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "replaceableProposals": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "proposed",
          "approved",
          "dismissed",
          "draft",
          "pr_generating",
          "pr_open",
          "pr_failed",
          "running",
          "paused",
          "decided",
          "cleanup_generating",
          "cleanup_open",
          "ended",
          "shipped",
          "rejected",
          "rejectedBeforeLaunch",
          "replaceableProposals"
        ],
        "additionalProperties": false
      },
      "ExperimentStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "running",
              "paused",
              "ended",
              "shipped",
              "pr_generating",
              "pr_open",
              "pr_failed",
              "decided",
              "cleanup_generating",
              "cleanup_open",
              "rejected",
              "proposed",
              "approved",
              "dismissed"
            ]
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "ExperimentWithPr": {
        "type": "object",
        "properties": {
          "experiment": {
            "$ref": "#/components/schemas/Experiment"
          },
          "pr": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "experimentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contextRepoId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "experiment",
                      "cleanup",
                      "setup",
                      "instrumentation"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "generating",
                      "open",
                      "merged",
                      "closed",
                      "failed"
                    ]
                  },
                  "decision": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ship",
                          "reject"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "branchName": {
                    "type": "string"
                  },
                  "prNumber": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "verification": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "verifying",
                              "passed",
                              "failed"
                            ]
                          },
                          "checkedAt": {
                            "type": "string"
                          },
                          "observationVersion": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "headSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "parentHeadSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unconfirmedHeadSha": {
                            "type": "string"
                          },
                          "requiredCheckNames": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "failingChecks": {
                            "default": [],
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                },
                                "summary": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "detailsUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "summary",
                                "detailsUrl"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "state",
                          "checkedAt",
                          "failingChecks"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "envVarName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "wiredEvents": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "generationError": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "failureReason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "openedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mergedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "closedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "experimentId",
                  "contextRepoId",
                  "kind",
                  "status",
                  "decision",
                  "branchName",
                  "prNumber",
                  "prUrl",
                  "verification",
                  "envVarName",
                  "wiredEvents",
                  "generationError",
                  "failureReason",
                  "openedAt",
                  "mergedAt",
                  "closedAt",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "prError": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "experiment",
          "pr",
          "prError"
        ],
        "additionalProperties": false
      },
      "GeneratePrAccepted": {
        "type": "object",
        "properties": {
          "experiment": {
            "$ref": "#/components/schemas/Experiment"
          },
          "pr": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "experimentId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "contextRepoId": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "experiment",
                  "cleanup",
                  "setup",
                  "instrumentation"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "generating",
                  "open",
                  "merged",
                  "closed",
                  "failed"
                ]
              },
              "decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "ship",
                      "reject"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "branchName": {
                "type": "string"
              },
              "prNumber": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "prUrl": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verification": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "verifying",
                          "passed",
                          "failed"
                        ]
                      },
                      "checkedAt": {
                        "type": "string"
                      },
                      "observationVersion": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "headSha": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "parentHeadSha": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "unconfirmedHeadSha": {
                        "type": "string"
                      },
                      "requiredCheckNames": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "failingChecks": {
                        "default": [],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string"
                            },
                            "summary": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "detailsUrl": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "summary",
                            "detailsUrl"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "state",
                      "checkedAt",
                      "failingChecks"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "envVarName": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "wiredEvents": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "generationError": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "failureReason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "openedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "mergedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "closedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "experimentId",
              "contextRepoId",
              "kind",
              "status",
              "decision",
              "branchName",
              "prNumber",
              "prUrl",
              "verification",
              "envVarName",
              "wiredEvents",
              "generationError",
              "failureReason",
              "openedAt",
              "mergedAt",
              "closedAt",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "experiment",
          "pr"
        ],
        "additionalProperties": false
      },
      "GenerateAccepted": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "scanning",
              "generating"
            ]
          },
          "jobId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "replacing": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "status",
          "replacing"
        ],
        "additionalProperties": false
      },
      "DecideAccepted": {
        "type": "object",
        "properties": {
          "experiment": {
            "$ref": "#/components/schemas/Experiment"
          },
          "pr": {
            "default": null,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "experimentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contextRepoId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "experiment",
                      "cleanup",
                      "setup",
                      "instrumentation"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "generating",
                      "open",
                      "merged",
                      "closed",
                      "failed"
                    ]
                  },
                  "decision": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ship",
                          "reject"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "branchName": {
                    "type": "string"
                  },
                  "prNumber": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "verification": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "verifying",
                              "passed",
                              "failed"
                            ]
                          },
                          "checkedAt": {
                            "type": "string"
                          },
                          "observationVersion": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "headSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "parentHeadSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unconfirmedHeadSha": {
                            "type": "string"
                          },
                          "requiredCheckNames": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "failingChecks": {
                            "default": [],
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                },
                                "summary": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "detailsUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "summary",
                                "detailsUrl"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "state",
                          "checkedAt",
                          "failingChecks"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "envVarName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "wiredEvents": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "generationError": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "failureReason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "openedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mergedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "closedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "experimentId",
                  "contextRepoId",
                  "kind",
                  "status",
                  "decision",
                  "branchName",
                  "prNumber",
                  "prUrl",
                  "verification",
                  "envVarName",
                  "wiredEvents",
                  "generationError",
                  "failureReason",
                  "openedAt",
                  "mergedAt",
                  "closedAt",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "experiment",
          "pr"
        ],
        "additionalProperties": false
      },
      "Refinement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "experimentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "instructions": {
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "finishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "experimentId",
          "status",
          "instructions",
          "error",
          "createdAt",
          "startedAt",
          "finishedAt"
        ],
        "additionalProperties": false
      },
      "LatestRefinement": {
        "type": "object",
        "properties": {
          "refinement": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Refinement"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "refinement"
        ],
        "additionalProperties": false
      },
      "FunnelDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "manual",
              "ai",
              "provider_import"
            ]
          },
          "sourceProvider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "activationFit": {
            "type": "string",
            "enum": [
              "primary",
              "secondary",
              "not_activation",
              "unknown"
            ]
          },
          "activationScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "activationReason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "stepOrder": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "eventName",
                "stepOrder"
              ],
              "additionalProperties": false
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "name",
          "source",
          "sourceProvider",
          "steps",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "FunnelList": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "name": {
              "type": "string"
            },
            "source": {
              "type": "string",
              "enum": [
                "manual",
                "ai",
                "provider_import"
              ]
            },
            "sourceProvider": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "activationFit": {
              "type": "string",
              "enum": [
                "primary",
                "secondary",
                "not_activation",
                "unknown"
              ]
            },
            "activationScore": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100
                },
                {
                  "type": "null"
                }
              ]
            },
            "activationReason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            },
            "stepCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "stepEventNames": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "createdAt": {
              "type": "string",
              "format": "date-time"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time"
            }
          },
          "required": [
            "id",
            "name",
            "source",
            "sourceProvider",
            "stepCount",
            "stepEventNames",
            "createdAt",
            "updatedAt"
          ],
          "additionalProperties": false
        }
      },
      "FunnelEvents": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "plannedEvents": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "events",
          "plannedEvents"
        ],
        "additionalProperties": false
      },
      "FunnelMetrics": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stepOrder": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "eventName": {
                  "type": "string"
                },
                "userCount": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "conversionRate": {
                  "type": "number"
                },
                "dropOffRate": {
                  "type": "number"
                }
              },
              "required": [
                "stepOrder",
                "eventName",
                "userCount",
                "conversionRate",
                "dropOffRate"
              ],
              "additionalProperties": false
            }
          },
          "untrackedSteps": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cappedAt": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "name",
          "steps",
          "untrackedSteps",
          "cappedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "Readiness": {
        "type": "object",
        "properties": {
          "githubConnected": {
            "type": "boolean"
          },
          "githubRepo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "repoScanned": {
            "type": "boolean"
          },
          "appSelectionRequired": {
            "type": "boolean"
          },
          "pipelineStatus": {
            "type": "string",
            "enum": [
              "idle",
              "crawling",
              "generating",
              "done",
              "failed"
            ]
          },
          "snapshotSummary": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "routes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "components": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "ctas": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "routes",
                  "components",
                  "ctas"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "setupPr": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "experimentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contextRepoId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "experiment",
                      "cleanup",
                      "setup",
                      "instrumentation"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "generating",
                      "open",
                      "merged",
                      "closed",
                      "failed"
                    ]
                  },
                  "decision": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ship",
                          "reject"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "branchName": {
                    "type": "string"
                  },
                  "prNumber": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "verification": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "verifying",
                              "passed",
                              "failed"
                            ]
                          },
                          "checkedAt": {
                            "type": "string"
                          },
                          "observationVersion": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "headSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "parentHeadSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unconfirmedHeadSha": {
                            "type": "string"
                          },
                          "requiredCheckNames": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "failingChecks": {
                            "default": [],
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                },
                                "summary": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "detailsUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "summary",
                                "detailsUrl"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "state",
                          "checkedAt",
                          "failingChecks"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "envVarName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "wiredEvents": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "generationError": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "failureReason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "openedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mergedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "closedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "experimentId",
                  "contextRepoId",
                  "kind",
                  "status",
                  "decision",
                  "branchName",
                  "prNumber",
                  "prUrl",
                  "verification",
                  "envVarName",
                  "wiredEvents",
                  "generationError",
                  "failureReason",
                  "openedAt",
                  "mergedAt",
                  "closedAt",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "instrumentationPr": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "experimentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contextRepoId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "experiment",
                      "cleanup",
                      "setup",
                      "instrumentation"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "generating",
                      "open",
                      "merged",
                      "closed",
                      "failed"
                    ]
                  },
                  "decision": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ship",
                          "reject"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "branchName": {
                    "type": "string"
                  },
                  "prNumber": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "verification": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "verifying",
                              "passed",
                              "failed"
                            ]
                          },
                          "checkedAt": {
                            "type": "string"
                          },
                          "observationVersion": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "headSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "parentHeadSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unconfirmedHeadSha": {
                            "type": "string"
                          },
                          "requiredCheckNames": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "failingChecks": {
                            "default": [],
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                },
                                "summary": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "detailsUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "summary",
                                "detailsUrl"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "state",
                          "checkedAt",
                          "failingChecks"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "envVarName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "wiredEvents": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "generationError": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "failureReason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "openedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mergedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "closedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "experimentId",
                  "contextRepoId",
                  "kind",
                  "status",
                  "decision",
                  "branchName",
                  "prNumber",
                  "prUrl",
                  "verification",
                  "envVarName",
                  "wiredEvents",
                  "generationError",
                  "failureReason",
                  "openedAt",
                  "mergedAt",
                  "closedAt",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "firstExperiment": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "key": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "running",
                      "paused",
                      "ended",
                      "shipped",
                      "pr_generating",
                      "pr_open",
                      "pr_failed",
                      "decided",
                      "cleanup_generating",
                      "cleanup_open",
                      "rejected",
                      "proposed",
                      "approved",
                      "dismissed"
                    ]
                  }
                },
                "required": [
                  "id",
                  "key",
                  "name",
                  "status"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "proposalsWritten": {
            "type": "boolean"
          },
          "appScope": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "appRoot": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "appRoot",
                  "note"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "firstExperimentPr": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "experimentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contextRepoId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "experiment",
                      "cleanup",
                      "setup",
                      "instrumentation"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "generating",
                      "open",
                      "merged",
                      "closed",
                      "failed"
                    ]
                  },
                  "decision": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "ship",
                          "reject"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "branchName": {
                    "type": "string"
                  },
                  "prNumber": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "prUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "verification": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "verifying",
                              "passed",
                              "failed"
                            ]
                          },
                          "checkedAt": {
                            "type": "string"
                          },
                          "observationVersion": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "headSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "parentHeadSha": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unconfirmedHeadSha": {
                            "type": "string"
                          },
                          "requiredCheckNames": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "failingChecks": {
                            "default": [],
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string"
                                },
                                "summary": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "detailsUrl": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "summary",
                                "detailsUrl"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "state",
                          "checkedAt",
                          "failingChecks"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "envVarName": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "wiredEvents": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "generationError": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "failureReason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "openedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mergedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "closedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "experimentId",
                  "contextRepoId",
                  "kind",
                  "status",
                  "decision",
                  "branchName",
                  "prNumber",
                  "prUrl",
                  "verification",
                  "envVarName",
                  "wiredEvents",
                  "generationError",
                  "failureReason",
                  "openedAt",
                  "mergedAt",
                  "closedAt",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "receivingEvents": {
            "type": "boolean"
          },
          "firstEventAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "githubConnected",
          "githubRepo",
          "repoScanned",
          "appSelectionRequired",
          "pipelineStatus",
          "snapshotSummary",
          "setupPr",
          "instrumentationPr",
          "firstExperiment",
          "proposalsWritten",
          "appScope",
          "firstExperimentPr",
          "receivingEvents",
          "firstEventAt"
        ],
        "additionalProperties": false
      },
      "Identity": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          },
          "organizationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "actor": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "api_key"
                ]
              },
              "userId": {
                "type": "string"
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "apiKey": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "type",
              "userId",
              "name",
              "email",
              "apiKey"
            ],
            "additionalProperties": false
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "proposals.review",
                "experiments.manage",
                "experiments.decide",
                "funnels.manage"
              ]
            }
          }
        },
        "required": [
          "workspace",
          "organizationId",
          "actor",
          "scopes"
        ],
        "additionalProperties": false
      },
      "GenerationRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "triggeredByUserId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "funnelId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed"
            ]
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "errorMessage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "errorStep": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "preflight",
                  "prompt",
                  "llm",
                  "provider-outage",
                  "validation",
                  "persist",
                  "stalled",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "inputTokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "outputTokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "imageTokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "costUsd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "durationMs": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "hypothesesGenerated": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "hypothesesAfterFilter": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "filterReasons": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "zodFail": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "duplicate": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "pastTitleDuplicate": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "fabricatedContent": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "fabricatedFiles": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "fabricatedQuotes": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "hedgedLanguage": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "mechanismTemplate": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "readerJargon": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "decisionPointUnknown": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "decisionPointMissing": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "cosmeticSurplus": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "primaryMetricInvalid": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "changeContractInvalid": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "outOfAppScope": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "siblingAppSurface": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "inFlightDuplicate": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "liveExperimentConflict": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "metricInterference": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "proposedEventConflict": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "repositoryPolicyConflict": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "openPullRequestConflict": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "semanticReviewRejected": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unwiredDecision": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "eventHistoryUnavailable": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unverifiedStat": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "promisedDuration": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unsafeImplementationClaim": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unbackedQuantityClaim": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "redundantAddition": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unreachableMetric": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "identityNotCarried": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "identityChangeBundled": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "underpowered": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "layoutUngrounded": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "readinessReviewVersion": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "zodFail",
                  "duplicate",
                  "pastTitleDuplicate",
                  "fabricatedContent",
                  "fabricatedFiles",
                  "fabricatedQuotes",
                  "hedgedLanguage",
                  "mechanismTemplate",
                  "readerJargon",
                  "decisionPointUnknown",
                  "decisionPointMissing",
                  "cosmeticSurplus",
                  "primaryMetricInvalid",
                  "changeContractInvalid",
                  "outOfAppScope",
                  "siblingAppSurface",
                  "inFlightDuplicate",
                  "liveExperimentConflict",
                  "metricInterference",
                  "proposedEventConflict",
                  "repositoryPolicyConflict",
                  "openPullRequestConflict",
                  "semanticReviewRejected",
                  "unwiredDecision",
                  "eventHistoryUnavailable",
                  "unverifiedStat",
                  "promisedDuration",
                  "unsafeImplementationClaim",
                  "unbackedQuantityClaim",
                  "redundantAddition",
                  "unreachableMetric",
                  "identityNotCarried",
                  "identityChangeBundled",
                  "underpowered",
                  "layoutUngrounded"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "pendingCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "launchedCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "dismissedCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "triggeredByUserId",
          "funnelId",
          "status",
          "completedAt",
          "errorMessage",
          "errorStep",
          "model",
          "inputTokens",
          "outputTokens",
          "imageTokens",
          "costUsd",
          "durationMs",
          "hypothesesGenerated",
          "hypothesesAfterFilter",
          "filterReasons",
          "pendingCount",
          "launchedCount",
          "dismissedCount",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "GenerationRunList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GenerationRun"
            }
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "hasMore"
        ],
        "additionalProperties": false
      },
      "EventsList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "event": {
                  "type": "string"
                },
                "userId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "anonymousId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "receivedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "event",
                "userId",
                "anonymousId",
                "receivedAt"
              ],
              "additionalProperties": false
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "cappedAt": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "hasMore",
          "cappedAt"
        ],
        "additionalProperties": false
      },
      "LearningList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "summary": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 5000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "keyTakeaway": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 5000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "caveats": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 5000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "nextStep": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 5000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "experimentId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "experimentKey": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "mechanism": {
                  "type": "string"
                },
                "affectedArea": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "primaryMetric": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "winnerVariantName": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "liftPercent": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "totalExposures": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "durationDays": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "ship",
                    "reject",
                    "conclude"
                  ]
                },
                "decisionSource": {
                  "type": "string",
                  "enum": [
                    "human",
                    "trevo",
                    "runtime"
                  ]
                },
                "reviewStatus": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "approved"
                  ]
                },
                "deliveryStatus": {
                  "type": "string",
                  "enum": [
                    "not_applicable",
                    "generating",
                    "open",
                    "merged",
                    "closed",
                    "failed",
                    "live"
                  ]
                },
                "reviewedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "summary",
                "keyTakeaway",
                "caveats",
                "nextStep",
                "id",
                "experimentId",
                "experimentKey",
                "name",
                "mechanism",
                "affectedArea",
                "primaryMetric",
                "winnerVariantName",
                "liftPercent",
                "totalExposures",
                "durationDays",
                "decision",
                "decisionSource",
                "reviewStatus",
                "deliveryStatus",
                "reviewedAt",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "hasMore"
        ],
        "additionalProperties": false
      },
      "LearningDetail": {
        "type": "object",
        "properties": {
          "summary": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "keyTakeaway": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "caveats": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "nextStep": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "experimentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "experimentKey": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "mechanism": {
            "type": "string"
          },
          "affectedArea": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "primaryMetric": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "winnerVariantName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "liftPercent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "totalExposures": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "durationDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "decision": {
            "type": "string",
            "enum": [
              "ship",
              "reject",
              "conclude"
            ]
          },
          "decisionSource": {
            "type": "string",
            "enum": [
              "human",
              "trevo",
              "runtime"
            ]
          },
          "reviewStatus": {
            "type": "string",
            "enum": [
              "draft",
              "approved"
            ]
          },
          "deliveryStatus": {
            "type": "string",
            "enum": [
              "not_applicable",
              "generating",
              "open",
              "merged",
              "closed",
              "failed",
              "live"
            ]
          },
          "reviewedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "conversionTargets": {
            "maxItems": 3,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "existing"
                    },
                    "eventName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "guardrail"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "eventName"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "proposed"
                    },
                    "eventName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "guardrail"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "eventName"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "expectedOutcome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "businessThesis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "summary",
          "keyTakeaway",
          "caveats",
          "nextStep",
          "id",
          "experimentId",
          "experimentKey",
          "name",
          "mechanism",
          "affectedArea",
          "primaryMetric",
          "winnerVariantName",
          "liftPercent",
          "totalExposures",
          "durationDays",
          "decision",
          "decisionSource",
          "reviewStatus",
          "deliveryStatus",
          "reviewedAt",
          "createdAt",
          "updatedAt",
          "conversionTargets",
          "expectedOutcome",
          "businessThesis"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "statusCode": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "code": {
            "type": "string"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "path",
                "message"
              ],
              "additionalProperties": false
            }
          },
          "details": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "error",
          "statusCode"
        ],
        "additionalProperties": false
      }
    }
  }
}
