{
  "openapi": "3.1.0",
  "info": {
    "title": "OSPRI Platform integration API",
    "version": "1.0.0",
    "description": "Generated runtime input and wire-output schemas. This reference is not deployment certification. Human OAuth scopes never replace live tenant/app authorization. Zod cross-field refinements remain authoritative. Browser-session Admin endpoints are intentionally excluded."
  },
  "servers": [
    {
      "url": "https://registry-staging.ospribrain.com",
      "description": "Controlled staging pilot; not production"
    }
  ],
  "paths": {
    "/v1/product/access/evaluate": {
      "post": {
        "summary": "Evaluate one product permission using both a scoped service credential and product access token",
        "operationId": "post_v1_product_access_evaluate",
        "security": [
          {
            "serviceBearer": []
          }
        ],
        "x-required-permission": "policy:evaluate",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/productAccess"
              },
              "example": {
                "organizationId": "11111111-1111-4111-8111-111111111111",
                "workspaceId": "11111111-1111-4111-8111-111111111111",
                "appId": "dimeriq",
                "permission": "dimeriq:records:read",
                "accessToken": "REPLACE_WITH_PRODUCT_ACCESS_TOKEN"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "allowed": {
                      "type": "boolean"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userId": {
                      "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)$"
                    },
                    "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)$"
                    },
                    "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)$"
                    },
                    "appId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "allowed",
                    "permissions",
                    "userId",
                    "organizationId",
                    "workspaceId",
                    "appId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/access/evaluate": {
      "post": {
        "summary": "Evaluate your own live product permission; a denied decision can return 200 with allowed=false",
        "operationId": "post_v1_access_evaluate",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/access"
              },
              "example": {
                "organizationId": "11111111-1111-4111-8111-111111111111",
                "workspaceId": "11111111-1111-4111-8111-111111111111",
                "appId": "brain",
                "permission": "brain:records:read"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "allowed": {
                      "type": "boolean"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userId": {
                      "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)$"
                    },
                    "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)$"
                    },
                    "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)$"
                    },
                    "appId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "allowed",
                    "permissions",
                    "userId",
                    "organizationId",
                    "workspaceId",
                    "appId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/launcher": {
      "post": {
        "summary": "List authorized surfaces in one workspace",
        "operationId": "post_v1_workspaces_launcher",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/launcher"
              },
              "example": {
                "organizationId": "11111111-1111-4111-8111-111111111111",
                "workspaceId": "11111111-1111-4111-8111-111111111111"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "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)$"
                    },
                    "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)$"
                    },
                    "userId": {
                      "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)$"
                    },
                    "organization_name": {
                      "type": "string"
                    },
                    "workspace_name": {
                      "type": "string"
                    },
                    "checkedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "apps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "appId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "moduleId": {
                            "type": "string"
                          },
                          "sections": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "permission": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "label",
                                "permission",
                                "description"
                              ]
                            }
                          },
                          "mountPath": {
                            "type": "string"
                          },
                          "integrationStatus": {
                            "type": "string",
                            "const": "not-installed"
                          },
                          "documentationUrl": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "appId",
                          "name",
                          "description",
                          "moduleId",
                          "sections",
                          "mountPath",
                          "integrationStatus"
                        ]
                      }
                    }
                  },
                  "required": [
                    "organizationId",
                    "workspaceId",
                    "userId",
                    "organization_name",
                    "workspace_name",
                    "checkedAt",
                    "apps"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/mcp/access/evaluate": {
      "post": {
        "summary": "Evaluate a permission through OAuth scope, live connection policy and role",
        "operationId": "post_v1_mcp_access_evaluate",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/mcpAccess"
              },
              "example": {
                "organizationId": "11111111-1111-4111-8111-111111111111",
                "workspaceId": "11111111-1111-4111-8111-111111111111",
                "appId": "brain",
                "permission": "brain:records:read"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "allowed": {
                      "type": "boolean"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userId": {
                      "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)$"
                    },
                    "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)$"
                    },
                    "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)$"
                    },
                    "appId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "allowed",
                    "permissions",
                    "userId",
                    "organizationId",
                    "workspaceId",
                    "appId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "summary": "Read your identity ID and active workspace grants",
        "operationId": "get_v1_me",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "userId": {
                      "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)$"
                    },
                    "memberships": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "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)$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "grants": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "workspace_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)$"
                                },
                                "app_id": {
                                  "type": "string"
                                },
                                "role": {
                                  "type": "string"
                                },
                                "permissions": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "workspace_name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "workspace_id",
                                "app_id",
                                "role",
                                "permissions",
                                "workspace_name"
                              ],
                              "additionalProperties": {}
                            }
                          }
                        },
                        "required": [
                          "organizationId",
                          "name",
                          "grants"
                        ]
                      }
                    }
                  },
                  "required": [
                    "userId",
                    "memberships"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage/events": {
      "post": {
        "summary": "Ingest one version-2 usage event; accepted does not mean scientific work completed",
        "operationId": "post_v1_usage_events",
        "security": [
          {
            "serviceBearer": []
          }
        ],
        "x-required-permission": "usage:write",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/usage"
              },
              "example": {
                "schemaVersion": 2,
                "eventId": "11111111-1111-4111-8111-111111111111",
                "operationId": "11111111-1111-4111-8111-111111111111",
                "organizationId": "11111111-1111-4111-8111-111111111111",
                "workspaceId": "11111111-1111-4111-8111-111111111111",
                "appId": "brain",
                "environment": "staging",
                "actorId": null,
                "actorKind": "service",
                "channel": "api",
                "transport": "api",
                "attribution": "server_route",
                "measurementKind": "operation",
                "operation": "synthetic.example",
                "provider": null,
                "model": null,
                "tool": null,
                "inputTokens": 0,
                "outputTokens": 0,
                "durationMs": 100,
                "firstTokenMs": null,
                "costMicros": null,
                "costBasis": "unknown",
                "currency": "USD",
                "outcome": "succeeded",
                "occurredAt": "2026-10-09T12:00:00Z"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "boolean",
                      "const": true
                    },
                    "duplicate": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "accepted",
                    "duplicate"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/budgets/reserve": {
      "post": {
        "summary": "Reserve budget before work; operationId makes exact retries idempotent",
        "operationId": "post_v1_budgets_reserve",
        "security": [
          {
            "serviceBearer": []
          }
        ],
        "x-required-permission": "budget:reserve",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reserve"
              },
              "example": {
                "organizationId": "11111111-1111-4111-8111-111111111111",
                "appId": "brain",
                "operationId": "11111111-1111-4111-8111-111111111111",
                "estimateMicros": 125000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "org_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)$"
                    },
                    "operation_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)$"
                    },
                    "app_id": {
                      "type": "string"
                    },
                    "month": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}$"
                    },
                    "reserved_micros": {
                      "type": "string",
                      "pattern": "^\\d+$"
                    },
                    "settled_micros": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d+$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "reserved",
                        "settled"
                      ]
                    }
                  },
                  "required": [
                    "org_id",
                    "operation_id",
                    "app_id",
                    "month",
                    "reserved_micros",
                    "settled_micros",
                    "state"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/budgets/settle": {
      "post": {
        "summary": "Settle one reservation with actual cost; changed retries conflict",
        "operationId": "post_v1_budgets_settle",
        "security": [
          {
            "serviceBearer": []
          }
        ],
        "x-required-permission": "budget:settle",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/settle"
              },
              "example": {
                "organizationId": "11111111-1111-4111-8111-111111111111",
                "appId": "brain",
                "operationId": "11111111-1111-4111-8111-111111111111",
                "costMicros": 100000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "settled": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "settled"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/evidence/workspaces": {
      "get": {
        "summary": "List your authorized evidence workspaces",
        "operationId": "get_v1_evidence_workspaces",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "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)$"
                      },
                      "organizationName": {
                        "type": "string"
                      },
                      "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)$"
                      },
                      "workspaceName": {
                        "type": "string"
                      },
                      "permissions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "organizationId",
                      "organizationName",
                      "workspaceId",
                      "workspaceName",
                      "permissions"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/evidence/{org}/{workspace}": {
      "get": {
        "summary": "Read an authorized evidence dossier and scorecard",
        "operationId": "get_v1_evidence__org___workspace_",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "object",
                      "properties": {
                        "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)$"
                        },
                        "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)$"
                        }
                      },
                      "required": [
                        "organizationId",
                        "workspaceId"
                      ]
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_permitted",
                            "report_limit",
                            "available",
                            "no_events"
                          ]
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "app_id": {
                                "type": "string"
                              },
                              "channel": {
                                "type": "string"
                              },
                              "user_id": {
                                "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"
                                  }
                                ]
                              },
                              "events": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "completions": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "errors": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "unknown_cost_events": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "estimated_cost_events": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "cost_micros": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tokens": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "duration_ms": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "last_event_at": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "app_id",
                              "channel",
                              "user_id",
                              "events",
                              "completions",
                              "errors",
                              "unknown_cost_events",
                              "estimated_cost_events",
                              "cost_micros",
                              "tokens",
                              "duration_ms",
                              "last_event_at"
                            ]
                          }
                        },
                        "days": {
                          "type": "number",
                          "const": 30
                        },
                        "coverage": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "rows"
                      ]
                    },
                    "userId": {
                      "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)$"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "generatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "environment": {
                      "type": "string",
                      "enum": [
                        "local",
                        "staging",
                        "production"
                      ]
                    },
                    "records": {
                      "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)$"
                          },
                          "org_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)$"
                          },
                          "workspace_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)$"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "workflow",
                              "observation",
                              "source",
                              "interview",
                              "connection"
                            ]
                          },
                          "data": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "workflow"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "product": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "scientificOwner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "cohort": {
                                    "minItems": 1,
                                    "maxItems": 200,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  },
                                  "baselineStart": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "baselineEnd": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "assistedStart": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "assistedEnd": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "acceptanceCriteria": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "method": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "benchmark": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "annualVolume": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 100000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "loadedHourlyUsd": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 100000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "productiveHoursPerFte": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "exclusiveMinimum": 0,
                                        "maximum": 8760
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "assumptionsSource": {
                                    "type": "string",
                                    "maxLength": 8000
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "product",
                                  "owner",
                                  "scientificOwner",
                                  "cohort",
                                  "baselineStart",
                                  "baselineEnd",
                                  "assistedStart",
                                  "assistedEnd",
                                  "acceptanceCriteria",
                                  "method",
                                  "benchmark",
                                  "annualVolume",
                                  "loadedHourlyUsd",
                                  "productiveHoursPerFte",
                                  "assumptionsSource"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "observation"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "operationReference": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "workflowId": {
                                    "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)$"
                                  },
                                  "sourceId": {
                                    "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)$"
                                  },
                                  "phase": {
                                    "type": "string",
                                    "enum": [
                                      "baseline",
                                      "assisted"
                                    ]
                                  },
                                  "participant": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "occurredOn": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "started",
                                      "completed",
                                      "failed",
                                      "cancelled"
                                    ]
                                  },
                                  "productVersion": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "laborMinutes": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 10000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "cycleMinutes": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 10000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "runtimeMinutes": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 10000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "timeBasis": {
                                    "type": "string",
                                    "enum": [
                                      "observed",
                                      "estimate"
                                    ]
                                  },
                                  "costUsd": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 100000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "materialRework": {
                                    "type": "boolean"
                                  },
                                  "materialError": {
                                    "type": "boolean"
                                  },
                                  "notes": {
                                    "type": "string",
                                    "maxLength": 8000
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "operationReference",
                                  "workflowId",
                                  "sourceId",
                                  "phase",
                                  "participant",
                                  "occurredOn",
                                  "status",
                                  "productVersion",
                                  "laborMinutes",
                                  "cycleMinutes",
                                  "runtimeMinutes",
                                  "timeBasis",
                                  "costUsd",
                                  "materialRework",
                                  "materialError",
                                  "notes"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "source"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "sourceType": {
                                    "type": "string",
                                    "enum": [
                                      "workflow_record",
                                      "interview",
                                      "repository",
                                      "public_research",
                                      "finance",
                                      "other"
                                    ]
                                  },
                                  "url": {
                                    "type": "string",
                                    "maxLength": 1500
                                  },
                                  "locator": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "capturedOn": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "summary": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "limitations": {
                                    "type": "string",
                                    "maxLength": 8000
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "sourceType",
                                  "url",
                                  "locator",
                                  "capturedOn",
                                  "owner",
                                  "summary",
                                  "limitations"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "interview"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "sourceId": {
                                    "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)$"
                                  },
                                  "account": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "buyerRole": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "conductedOn": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "stage": {
                                    "type": "string",
                                    "enum": [
                                      "candidate",
                                      "interviewed",
                                      "qualified",
                                      "pilot_interest",
                                      "pilot_agreed",
                                      "closed"
                                    ]
                                  },
                                  "hypothesis": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "finding": {
                                    "type": "string",
                                    "maxLength": 8000
                                  },
                                  "contradictions": {
                                    "type": "string",
                                    "maxLength": 8000
                                  },
                                  "nextAction": {
                                    "type": "string",
                                    "maxLength": 8000
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "sourceId",
                                  "account",
                                  "buyerRole",
                                  "conductedOn",
                                  "stage",
                                  "hypothesis",
                                  "finding",
                                  "contradictions",
                                  "nextAction",
                                  "owner"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "connection"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "posthog",
                                      "github",
                                      "crm",
                                      "research",
                                      "auth0",
                                      "aws",
                                      "other"
                                    ]
                                  },
                                  "purpose": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "requestedResources": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "requested",
                                      "configuring",
                                      "reported_ready",
                                      "blocked"
                                    ]
                                  },
                                  "dependency": {
                                    "type": "string",
                                    "enum": [
                                      "jill",
                                      "platform",
                                      "account_owner",
                                      "scientific_owner",
                                      "finance"
                                    ]
                                  },
                                  "nextAction": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "evidenceUrl": {
                                    "type": "string",
                                    "maxLength": 1500
                                  },
                                  "checkedOn": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "provider",
                                  "purpose",
                                  "requestedResources",
                                  "owner",
                                  "status",
                                  "dependency",
                                  "nextAction",
                                  "evidenceUrl",
                                  "checkedOn"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "created_by": {
                            "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)$"
                          },
                          "updated_by": {
                            "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)$"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "review": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "decision": {
                                    "type": "string",
                                    "enum": [
                                      "accepted",
                                      "rejected"
                                    ]
                                  },
                                  "validateTime": {
                                    "type": "boolean"
                                  },
                                  "note": {
                                    "type": "string"
                                  },
                                  "reviewer": {
                                    "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)$"
                                  },
                                  "at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                  }
                                },
                                "required": [
                                  "decision",
                                  "validateTime",
                                  "note",
                                  "reviewer",
                                  "at"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "org_id",
                          "workspace_id",
                          "kind",
                          "data",
                          "version",
                          "created_by",
                          "updated_by",
                          "created_at",
                          "updated_at",
                          "review"
                        ],
                        "additionalProperties": {}
                      }
                    },
                    "scorecards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "workflowId": {
                            "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)$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "product": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "baselineApproved": {
                            "type": "boolean"
                          },
                          "phases": {
                            "minItems": 2,
                            "maxItems": 2,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "phase": {
                                  "type": "string",
                                  "enum": [
                                    "baseline",
                                    "assisted"
                                  ]
                                },
                                "start": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "end": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "initiated": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "technicalCompletions": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "accepted": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "reviewed": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "awaitingReview": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "open": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "failed": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "errors": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "activeUsers": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "eligibleUsers": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "validatedLaborRecords": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "unknownCostRecords": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "completionRate": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "firstPassAcceptance": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "reworkRate": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "adoption": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "repeatUse": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "laborMinutesPerAccepted": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "laborUsdPerAccepted": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "apiUsdPerAccepted": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "meanCycleMinutes": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "laborComplete": {
                                  "type": "boolean"
                                },
                                "allOutputsReviewed": {
                                  "type": "boolean"
                                },
                                "validatedLaborMinutes": {
                                  "type": "number",
                                  "minimum": 0
                                },
                                "knownApiUsd": {
                                  "type": "number",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "phase",
                                "start",
                                "end",
                                "initiated",
                                "technicalCompletions",
                                "accepted",
                                "reviewed",
                                "awaitingReview",
                                "open",
                                "failed",
                                "errors",
                                "activeUsers",
                                "eligibleUsers",
                                "validatedLaborRecords",
                                "unknownCostRecords",
                                "completionRate",
                                "firstPassAcceptance",
                                "reworkRate",
                                "adoption",
                                "repeatUse",
                                "laborMinutesPerAccepted",
                                "laborUsdPerAccepted",
                                "apiUsdPerAccepted",
                                "meanCycleMinutes",
                                "laborComplete",
                                "allOutputsReviewed",
                                "validatedLaborMinutes",
                                "knownApiUsd"
                              ]
                            }
                          },
                          "projectedAnnualHours": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "projectedAnnualLaborUsd": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "projectedFteCapacity": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "minutesSavedPerAccepted": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "excludedOutsidePeriods": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "limitations": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "workflowId",
                          "title",
                          "product",
                          "version",
                          "baselineApproved",
                          "phases",
                          "projectedAnnualHours",
                          "projectedAnnualLaborUsd",
                          "projectedFteCapacity",
                          "minutesSavedPerAccepted",
                          "excludedOutsidePeriods",
                          "limitations"
                        ]
                      }
                    },
                    "prompts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "title",
                          "text"
                        ]
                      }
                    },
                    "coverage": {
                      "type": "object",
                      "properties": {
                        "collection": {
                          "type": "string",
                          "const": "manual_evidence"
                        },
                        "productTelemetry": {
                          "type": "string",
                          "const": "separate_30_day_aggregate"
                        },
                        "research": {
                          "type": "string",
                          "const": "prompt_only"
                        },
                        "externalConnections": {
                          "type": "string",
                          "const": "requests_only"
                        }
                      },
                      "required": [
                        "collection",
                        "productTelemetry",
                        "research",
                        "externalConnections"
                      ]
                    },
                    "interviewsCompleted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "scope",
                    "usage",
                    "userId",
                    "permissions",
                    "generatedAt",
                    "environment",
                    "records",
                    "scorecards",
                    "prompts",
                    "coverage",
                    "interviewsCompleted"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/evidence/{org}/{workspace}/records": {
      "post": {
        "summary": "Save a versioned sourced record; requires evidence write role and resets review",
        "operationId": "post_v1_evidence__org___workspace__records",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/evidenceSave"
              },
              "example": {
                "id": "11111111-1111-4111-8111-111111111111",
                "expectedVersion": 0,
                "data": {
                  "kind": "source",
                  "title": "Synthetic acceptance source",
                  "sourceType": "other",
                  "url": "https://example.org/evidence",
                  "locator": "Synthetic fixture",
                  "capturedOn": "2026-10-09",
                  "owner": "Test owner",
                  "summary": "Test evidence, not a scientific result.",
                  "limitations": "Synthetic only."
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "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)$"
                    },
                    "org_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)$"
                    },
                    "workspace_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)$"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "workflow",
                        "observation",
                        "source",
                        "interview",
                        "connection"
                      ]
                    },
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "workflow"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "product": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "owner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "scientificOwner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "cohort": {
                              "minItems": 1,
                              "maxItems": 200,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "baselineStart": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "baselineEnd": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "assistedStart": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "assistedEnd": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "acceptanceCriteria": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "method": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "benchmark": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "annualVolume": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 100000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "loadedHourlyUsd": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 100000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "productiveHoursPerFte": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 8760
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "assumptionsSource": {
                              "type": "string",
                              "maxLength": 8000
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "product",
                            "owner",
                            "scientificOwner",
                            "cohort",
                            "baselineStart",
                            "baselineEnd",
                            "assistedStart",
                            "assistedEnd",
                            "acceptanceCriteria",
                            "method",
                            "benchmark",
                            "annualVolume",
                            "loadedHourlyUsd",
                            "productiveHoursPerFte",
                            "assumptionsSource"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "observation"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "operationReference": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "workflowId": {
                              "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)$"
                            },
                            "sourceId": {
                              "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)$"
                            },
                            "phase": {
                              "type": "string",
                              "enum": [
                                "baseline",
                                "assisted"
                              ]
                            },
                            "participant": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "occurredOn": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "started",
                                "completed",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "productVersion": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "laborMinutes": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "cycleMinutes": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "runtimeMinutes": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "timeBasis": {
                              "type": "string",
                              "enum": [
                                "observed",
                                "estimate"
                              ]
                            },
                            "costUsd": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 100000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "materialRework": {
                              "type": "boolean"
                            },
                            "materialError": {
                              "type": "boolean"
                            },
                            "notes": {
                              "type": "string",
                              "maxLength": 8000
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "operationReference",
                            "workflowId",
                            "sourceId",
                            "phase",
                            "participant",
                            "occurredOn",
                            "status",
                            "productVersion",
                            "laborMinutes",
                            "cycleMinutes",
                            "runtimeMinutes",
                            "timeBasis",
                            "costUsd",
                            "materialRework",
                            "materialError",
                            "notes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "source"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "sourceType": {
                              "type": "string",
                              "enum": [
                                "workflow_record",
                                "interview",
                                "repository",
                                "public_research",
                                "finance",
                                "other"
                              ]
                            },
                            "url": {
                              "type": "string",
                              "maxLength": 1500
                            },
                            "locator": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "capturedOn": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "owner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "summary": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "limitations": {
                              "type": "string",
                              "maxLength": 8000
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "sourceType",
                            "url",
                            "locator",
                            "capturedOn",
                            "owner",
                            "summary",
                            "limitations"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "interview"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "sourceId": {
                              "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)$"
                            },
                            "account": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "buyerRole": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "conductedOn": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "candidate",
                                "interviewed",
                                "qualified",
                                "pilot_interest",
                                "pilot_agreed",
                                "closed"
                              ]
                            },
                            "hypothesis": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "finding": {
                              "type": "string",
                              "maxLength": 8000
                            },
                            "contradictions": {
                              "type": "string",
                              "maxLength": 8000
                            },
                            "nextAction": {
                              "type": "string",
                              "maxLength": 8000
                            },
                            "owner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "sourceId",
                            "account",
                            "buyerRole",
                            "conductedOn",
                            "stage",
                            "hypothesis",
                            "finding",
                            "contradictions",
                            "nextAction",
                            "owner"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "connection"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "posthog",
                                "github",
                                "crm",
                                "research",
                                "auth0",
                                "aws",
                                "other"
                              ]
                            },
                            "purpose": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "requestedResources": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "owner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "requested",
                                "configuring",
                                "reported_ready",
                                "blocked"
                              ]
                            },
                            "dependency": {
                              "type": "string",
                              "enum": [
                                "jill",
                                "platform",
                                "account_owner",
                                "scientific_owner",
                                "finance"
                              ]
                            },
                            "nextAction": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "evidenceUrl": {
                              "type": "string",
                              "maxLength": 1500
                            },
                            "checkedOn": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "provider",
                            "purpose",
                            "requestedResources",
                            "owner",
                            "status",
                            "dependency",
                            "nextAction",
                            "evidenceUrl",
                            "checkedOn"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "created_by": {
                      "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)$"
                    },
                    "updated_by": {
                      "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)$"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "review": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "decision": {
                              "type": "string",
                              "enum": [
                                "accepted",
                                "rejected"
                              ]
                            },
                            "validateTime": {
                              "type": "boolean"
                            },
                            "note": {
                              "type": "string"
                            },
                            "reviewer": {
                              "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)$"
                            },
                            "at": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            }
                          },
                          "required": [
                            "decision",
                            "validateTime",
                            "note",
                            "reviewer",
                            "at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "org_id",
                    "workspace_id",
                    "kind",
                    "data",
                    "version",
                    "created_by",
                    "updated_by",
                    "created_at",
                    "updated_at",
                    "review"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/evidence/{org}/{workspace}/records/{id}/review": {
      "post": {
        "summary": "Review an evidence record; requires reviewer authorization",
        "operationId": "post_v1_evidence__org___workspace__records__id__review",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/evidenceReview"
              },
              "example": {
                "expectedVersion": 1,
                "decision": "accepted",
                "validateTime": false,
                "note": "Synthetic review example; requires a reviewer role."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "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)$"
                    },
                    "org_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)$"
                    },
                    "workspace_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)$"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "workflow",
                        "observation",
                        "source",
                        "interview",
                        "connection"
                      ]
                    },
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "workflow"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "product": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "owner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "scientificOwner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "cohort": {
                              "minItems": 1,
                              "maxItems": 200,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "baselineStart": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "baselineEnd": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "assistedStart": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "assistedEnd": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "acceptanceCriteria": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "method": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "benchmark": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "annualVolume": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 100000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "loadedHourlyUsd": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 100000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "productiveHoursPerFte": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 8760
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "assumptionsSource": {
                              "type": "string",
                              "maxLength": 8000
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "product",
                            "owner",
                            "scientificOwner",
                            "cohort",
                            "baselineStart",
                            "baselineEnd",
                            "assistedStart",
                            "assistedEnd",
                            "acceptanceCriteria",
                            "method",
                            "benchmark",
                            "annualVolume",
                            "loadedHourlyUsd",
                            "productiveHoursPerFte",
                            "assumptionsSource"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "observation"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "operationReference": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "workflowId": {
                              "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)$"
                            },
                            "sourceId": {
                              "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)$"
                            },
                            "phase": {
                              "type": "string",
                              "enum": [
                                "baseline",
                                "assisted"
                              ]
                            },
                            "participant": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "occurredOn": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "started",
                                "completed",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "productVersion": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "laborMinutes": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "cycleMinutes": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "runtimeMinutes": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 10000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "timeBasis": {
                              "type": "string",
                              "enum": [
                                "observed",
                                "estimate"
                              ]
                            },
                            "costUsd": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 100000000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "materialRework": {
                              "type": "boolean"
                            },
                            "materialError": {
                              "type": "boolean"
                            },
                            "notes": {
                              "type": "string",
                              "maxLength": 8000
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "operationReference",
                            "workflowId",
                            "sourceId",
                            "phase",
                            "participant",
                            "occurredOn",
                            "status",
                            "productVersion",
                            "laborMinutes",
                            "cycleMinutes",
                            "runtimeMinutes",
                            "timeBasis",
                            "costUsd",
                            "materialRework",
                            "materialError",
                            "notes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "source"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "sourceType": {
                              "type": "string",
                              "enum": [
                                "workflow_record",
                                "interview",
                                "repository",
                                "public_research",
                                "finance",
                                "other"
                              ]
                            },
                            "url": {
                              "type": "string",
                              "maxLength": 1500
                            },
                            "locator": {
                              "type": "string",
                              "maxLength": 200
                            },
                            "capturedOn": {
                              "type": "string",
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            "owner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "summary": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "limitations": {
                              "type": "string",
                              "maxLength": 8000
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "sourceType",
                            "url",
                            "locator",
                            "capturedOn",
                            "owner",
                            "summary",
                            "limitations"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "interview"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "sourceId": {
                              "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)$"
                            },
                            "account": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "buyerRole": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "conductedOn": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stage": {
                              "type": "string",
                              "enum": [
                                "candidate",
                                "interviewed",
                                "qualified",
                                "pilot_interest",
                                "pilot_agreed",
                                "closed"
                              ]
                            },
                            "hypothesis": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "finding": {
                              "type": "string",
                              "maxLength": 8000
                            },
                            "contradictions": {
                              "type": "string",
                              "maxLength": 8000
                            },
                            "nextAction": {
                              "type": "string",
                              "maxLength": 8000
                            },
                            "owner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "sourceId",
                            "account",
                            "buyerRole",
                            "conductedOn",
                            "stage",
                            "hypothesis",
                            "finding",
                            "contradictions",
                            "nextAction",
                            "owner"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "connection"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "posthog",
                                "github",
                                "crm",
                                "research",
                                "auth0",
                                "aws",
                                "other"
                              ]
                            },
                            "purpose": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "requestedResources": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "owner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "requested",
                                "configuring",
                                "reported_ready",
                                "blocked"
                              ]
                            },
                            "dependency": {
                              "type": "string",
                              "enum": [
                                "jill",
                                "platform",
                                "account_owner",
                                "scientific_owner",
                                "finance"
                              ]
                            },
                            "nextAction": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8000
                            },
                            "evidenceUrl": {
                              "type": "string",
                              "maxLength": 1500
                            },
                            "checkedOn": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "provider",
                            "purpose",
                            "requestedResources",
                            "owner",
                            "status",
                            "dependency",
                            "nextAction",
                            "evidenceUrl",
                            "checkedOn"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "created_by": {
                      "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)$"
                    },
                    "updated_by": {
                      "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)$"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "review": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "decision": {
                              "type": "string",
                              "enum": [
                                "accepted",
                                "rejected"
                              ]
                            },
                            "validateTime": {
                              "type": "boolean"
                            },
                            "note": {
                              "type": "string"
                            },
                            "reviewer": {
                              "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)$"
                            },
                            "at": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            }
                          },
                          "required": [
                            "decision",
                            "validateTime",
                            "note",
                            "reviewer",
                            "at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "org_id",
                    "workspace_id",
                    "kind",
                    "data",
                    "version",
                    "created_by",
                    "updated_by",
                    "created_at",
                    "updated_at",
                    "review"
                  ],
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/evidence/{org}/{workspace}/records/{id}/history": {
      "get": {
        "summary": "Read authorized record history",
        "operationId": "get_v1_evidence__org___workspace__records__id__history",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "data": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "workflow"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "product": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "owner": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "scientificOwner": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "cohort": {
                                "minItems": 1,
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              },
                              "baselineStart": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "baselineEnd": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "assistedStart": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "assistedEnd": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "acceptanceCriteria": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "method": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "benchmark": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "annualVolume": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 100000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "loadedHourlyUsd": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 100000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "productiveHoursPerFte": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 8760
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "assumptionsSource": {
                                "type": "string",
                                "maxLength": 8000
                              }
                            },
                            "required": [
                              "kind",
                              "title",
                              "product",
                              "owner",
                              "scientificOwner",
                              "cohort",
                              "baselineStart",
                              "baselineEnd",
                              "assistedStart",
                              "assistedEnd",
                              "acceptanceCriteria",
                              "method",
                              "benchmark",
                              "annualVolume",
                              "loadedHourlyUsd",
                              "productiveHoursPerFte",
                              "assumptionsSource"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "observation"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "operationReference": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "workflowId": {
                                "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)$"
                              },
                              "sourceId": {
                                "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)$"
                              },
                              "phase": {
                                "type": "string",
                                "enum": [
                                  "baseline",
                                  "assisted"
                                ]
                              },
                              "participant": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "occurredOn": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "started",
                                  "completed",
                                  "failed",
                                  "cancelled"
                                ]
                              },
                              "productVersion": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "laborMinutes": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 10000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "cycleMinutes": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 10000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "runtimeMinutes": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 10000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "timeBasis": {
                                "type": "string",
                                "enum": [
                                  "observed",
                                  "estimate"
                                ]
                              },
                              "costUsd": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 100000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "materialRework": {
                                "type": "boolean"
                              },
                              "materialError": {
                                "type": "boolean"
                              },
                              "notes": {
                                "type": "string",
                                "maxLength": 8000
                              }
                            },
                            "required": [
                              "kind",
                              "title",
                              "operationReference",
                              "workflowId",
                              "sourceId",
                              "phase",
                              "participant",
                              "occurredOn",
                              "status",
                              "productVersion",
                              "laborMinutes",
                              "cycleMinutes",
                              "runtimeMinutes",
                              "timeBasis",
                              "costUsd",
                              "materialRework",
                              "materialError",
                              "notes"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "source"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "sourceType": {
                                "type": "string",
                                "enum": [
                                  "workflow_record",
                                  "interview",
                                  "repository",
                                  "public_research",
                                  "finance",
                                  "other"
                                ]
                              },
                              "url": {
                                "type": "string",
                                "maxLength": 1500
                              },
                              "locator": {
                                "type": "string",
                                "maxLength": 200
                              },
                              "capturedOn": {
                                "type": "string",
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                              },
                              "owner": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "summary": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "limitations": {
                                "type": "string",
                                "maxLength": 8000
                              }
                            },
                            "required": [
                              "kind",
                              "title",
                              "sourceType",
                              "url",
                              "locator",
                              "capturedOn",
                              "owner",
                              "summary",
                              "limitations"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "interview"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "sourceId": {
                                "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)$"
                              },
                              "account": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "buyerRole": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "conductedOn": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stage": {
                                "type": "string",
                                "enum": [
                                  "candidate",
                                  "interviewed",
                                  "qualified",
                                  "pilot_interest",
                                  "pilot_agreed",
                                  "closed"
                                ]
                              },
                              "hypothesis": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "finding": {
                                "type": "string",
                                "maxLength": 8000
                              },
                              "contradictions": {
                                "type": "string",
                                "maxLength": 8000
                              },
                              "nextAction": {
                                "type": "string",
                                "maxLength": 8000
                              },
                              "owner": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "required": [
                              "kind",
                              "title",
                              "sourceId",
                              "account",
                              "buyerRole",
                              "conductedOn",
                              "stage",
                              "hypothesis",
                              "finding",
                              "contradictions",
                              "nextAction",
                              "owner"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "connection"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "provider": {
                                "type": "string",
                                "enum": [
                                  "posthog",
                                  "github",
                                  "crm",
                                  "research",
                                  "auth0",
                                  "aws",
                                  "other"
                                ]
                              },
                              "purpose": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "requestedResources": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "owner": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "requested",
                                  "configuring",
                                  "reported_ready",
                                  "blocked"
                                ]
                              },
                              "dependency": {
                                "type": "string",
                                "enum": [
                                  "jill",
                                  "platform",
                                  "account_owner",
                                  "scientific_owner",
                                  "finance"
                                ]
                              },
                              "nextAction": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "evidenceUrl": {
                                "type": "string",
                                "maxLength": 1500
                              },
                              "checkedOn": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "kind",
                              "title",
                              "provider",
                              "purpose",
                              "requestedResources",
                              "owner",
                              "status",
                              "dependency",
                              "nextAction",
                              "evidenceUrl",
                              "checkedOn"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "review": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "decision": {
                                "type": "string",
                                "enum": [
                                  "accepted",
                                  "rejected"
                                ]
                              },
                              "validateTime": {
                                "type": "boolean"
                              },
                              "note": {
                                "type": "string"
                              },
                              "reviewer": {
                                "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)$"
                              },
                              "at": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "decision",
                              "validateTime",
                              "note",
                              "reviewer",
                              "at"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "actor": {
                        "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)$"
                      },
                      "occurred_at": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      }
                    },
                    "required": [
                      "version",
                      "data",
                      "review",
                      "actor",
                      "occurred_at"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/evidence/{org}/{workspace}/export": {
      "get": {
        "summary": "Export authorized evidence as JSON, CSV or Markdown",
        "operationId": "get_v1_evidence__org___workspace__export",
        "security": [
          {
            "humanOAuth": [
              "platform:access"
            ]
          }
        ],
        "x-required-permission": "platform:access",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv",
                "brief"
              ]
            },
            "description": "Omitted or unrecognized values return JSON."
          }
        ],
        "responses": {
          "200": {
            "description": "Validated wire response. Integer strings preserve PostgreSQL bigint precision; null costs remain unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "object",
                      "properties": {
                        "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)$"
                        },
                        "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)$"
                        }
                      },
                      "required": [
                        "organizationId",
                        "workspaceId"
                      ]
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_permitted",
                            "report_limit",
                            "available",
                            "no_events"
                          ]
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "app_id": {
                                "type": "string"
                              },
                              "channel": {
                                "type": "string"
                              },
                              "user_id": {
                                "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"
                                  }
                                ]
                              },
                              "events": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "completions": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "errors": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "unknown_cost_events": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "estimated_cost_events": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "cost_micros": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tokens": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "duration_ms": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "last_event_at": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "app_id",
                              "channel",
                              "user_id",
                              "events",
                              "completions",
                              "errors",
                              "unknown_cost_events",
                              "estimated_cost_events",
                              "cost_micros",
                              "tokens",
                              "duration_ms",
                              "last_event_at"
                            ]
                          }
                        },
                        "days": {
                          "type": "number",
                          "const": 30
                        },
                        "coverage": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "rows"
                      ]
                    },
                    "userId": {
                      "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)$"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "generatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "environment": {
                      "type": "string",
                      "enum": [
                        "local",
                        "staging",
                        "production"
                      ]
                    },
                    "records": {
                      "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)$"
                          },
                          "org_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)$"
                          },
                          "workspace_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)$"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "workflow",
                              "observation",
                              "source",
                              "interview",
                              "connection"
                            ]
                          },
                          "data": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "workflow"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "product": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "scientificOwner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "cohort": {
                                    "minItems": 1,
                                    "maxItems": 200,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  },
                                  "baselineStart": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "baselineEnd": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "assistedStart": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "assistedEnd": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "acceptanceCriteria": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "method": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "benchmark": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "annualVolume": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 100000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "loadedHourlyUsd": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 100000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "productiveHoursPerFte": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "exclusiveMinimum": 0,
                                        "maximum": 8760
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "assumptionsSource": {
                                    "type": "string",
                                    "maxLength": 8000
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "product",
                                  "owner",
                                  "scientificOwner",
                                  "cohort",
                                  "baselineStart",
                                  "baselineEnd",
                                  "assistedStart",
                                  "assistedEnd",
                                  "acceptanceCriteria",
                                  "method",
                                  "benchmark",
                                  "annualVolume",
                                  "loadedHourlyUsd",
                                  "productiveHoursPerFte",
                                  "assumptionsSource"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "observation"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "operationReference": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "workflowId": {
                                    "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)$"
                                  },
                                  "sourceId": {
                                    "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)$"
                                  },
                                  "phase": {
                                    "type": "string",
                                    "enum": [
                                      "baseline",
                                      "assisted"
                                    ]
                                  },
                                  "participant": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "occurredOn": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "started",
                                      "completed",
                                      "failed",
                                      "cancelled"
                                    ]
                                  },
                                  "productVersion": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "laborMinutes": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 10000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "cycleMinutes": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 10000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "runtimeMinutes": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 10000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "timeBasis": {
                                    "type": "string",
                                    "enum": [
                                      "observed",
                                      "estimate"
                                    ]
                                  },
                                  "costUsd": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 100000000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "materialRework": {
                                    "type": "boolean"
                                  },
                                  "materialError": {
                                    "type": "boolean"
                                  },
                                  "notes": {
                                    "type": "string",
                                    "maxLength": 8000
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "operationReference",
                                  "workflowId",
                                  "sourceId",
                                  "phase",
                                  "participant",
                                  "occurredOn",
                                  "status",
                                  "productVersion",
                                  "laborMinutes",
                                  "cycleMinutes",
                                  "runtimeMinutes",
                                  "timeBasis",
                                  "costUsd",
                                  "materialRework",
                                  "materialError",
                                  "notes"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "source"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "sourceType": {
                                    "type": "string",
                                    "enum": [
                                      "workflow_record",
                                      "interview",
                                      "repository",
                                      "public_research",
                                      "finance",
                                      "other"
                                    ]
                                  },
                                  "url": {
                                    "type": "string",
                                    "maxLength": 1500
                                  },
                                  "locator": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "capturedOn": {
                                    "type": "string",
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "summary": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "limitations": {
                                    "type": "string",
                                    "maxLength": 8000
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "sourceType",
                                  "url",
                                  "locator",
                                  "capturedOn",
                                  "owner",
                                  "summary",
                                  "limitations"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "interview"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "sourceId": {
                                    "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)$"
                                  },
                                  "account": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "buyerRole": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "conductedOn": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "stage": {
                                    "type": "string",
                                    "enum": [
                                      "candidate",
                                      "interviewed",
                                      "qualified",
                                      "pilot_interest",
                                      "pilot_agreed",
                                      "closed"
                                    ]
                                  },
                                  "hypothesis": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "finding": {
                                    "type": "string",
                                    "maxLength": 8000
                                  },
                                  "contradictions": {
                                    "type": "string",
                                    "maxLength": 8000
                                  },
                                  "nextAction": {
                                    "type": "string",
                                    "maxLength": 8000
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "sourceId",
                                  "account",
                                  "buyerRole",
                                  "conductedOn",
                                  "stage",
                                  "hypothesis",
                                  "finding",
                                  "contradictions",
                                  "nextAction",
                                  "owner"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "connection"
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "provider": {
                                    "type": "string",
                                    "enum": [
                                      "posthog",
                                      "github",
                                      "crm",
                                      "research",
                                      "auth0",
                                      "aws",
                                      "other"
                                    ]
                                  },
                                  "purpose": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "requestedResources": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "requested",
                                      "configuring",
                                      "reported_ready",
                                      "blocked"
                                    ]
                                  },
                                  "dependency": {
                                    "type": "string",
                                    "enum": [
                                      "jill",
                                      "platform",
                                      "account_owner",
                                      "scientific_owner",
                                      "finance"
                                    ]
                                  },
                                  "nextAction": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 8000
                                  },
                                  "evidenceUrl": {
                                    "type": "string",
                                    "maxLength": 1500
                                  },
                                  "checkedOn": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "title",
                                  "provider",
                                  "purpose",
                                  "requestedResources",
                                  "owner",
                                  "status",
                                  "dependency",
                                  "nextAction",
                                  "evidenceUrl",
                                  "checkedOn"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "created_by": {
                            "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)$"
                          },
                          "updated_by": {
                            "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)$"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "review": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "decision": {
                                    "type": "string",
                                    "enum": [
                                      "accepted",
                                      "rejected"
                                    ]
                                  },
                                  "validateTime": {
                                    "type": "boolean"
                                  },
                                  "note": {
                                    "type": "string"
                                  },
                                  "reviewer": {
                                    "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)$"
                                  },
                                  "at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                  }
                                },
                                "required": [
                                  "decision",
                                  "validateTime",
                                  "note",
                                  "reviewer",
                                  "at"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "org_id",
                          "workspace_id",
                          "kind",
                          "data",
                          "version",
                          "created_by",
                          "updated_by",
                          "created_at",
                          "updated_at",
                          "review"
                        ],
                        "additionalProperties": {}
                      }
                    },
                    "scorecards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "workflowId": {
                            "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)$"
                          },
                          "title": {
                            "type": "string"
                          },
                          "product": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "baselineApproved": {
                            "type": "boolean"
                          },
                          "phases": {
                            "minItems": 2,
                            "maxItems": 2,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "phase": {
                                  "type": "string",
                                  "enum": [
                                    "baseline",
                                    "assisted"
                                  ]
                                },
                                "start": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "end": {
                                  "type": "string",
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                                },
                                "initiated": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "technicalCompletions": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "accepted": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "reviewed": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "awaitingReview": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "open": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "failed": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "errors": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "activeUsers": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "eligibleUsers": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "validatedLaborRecords": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "unknownCostRecords": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "completionRate": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "firstPassAcceptance": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "reworkRate": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "adoption": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "repeatUse": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "laborMinutesPerAccepted": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "laborUsdPerAccepted": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "apiUsdPerAccepted": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "meanCycleMinutes": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "laborComplete": {
                                  "type": "boolean"
                                },
                                "allOutputsReviewed": {
                                  "type": "boolean"
                                },
                                "validatedLaborMinutes": {
                                  "type": "number",
                                  "minimum": 0
                                },
                                "knownApiUsd": {
                                  "type": "number",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "phase",
                                "start",
                                "end",
                                "initiated",
                                "technicalCompletions",
                                "accepted",
                                "reviewed",
                                "awaitingReview",
                                "open",
                                "failed",
                                "errors",
                                "activeUsers",
                                "eligibleUsers",
                                "validatedLaborRecords",
                                "unknownCostRecords",
                                "completionRate",
                                "firstPassAcceptance",
                                "reworkRate",
                                "adoption",
                                "repeatUse",
                                "laborMinutesPerAccepted",
                                "laborUsdPerAccepted",
                                "apiUsdPerAccepted",
                                "meanCycleMinutes",
                                "laborComplete",
                                "allOutputsReviewed",
                                "validatedLaborMinutes",
                                "knownApiUsd"
                              ]
                            }
                          },
                          "projectedAnnualHours": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "projectedAnnualLaborUsd": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "projectedFteCapacity": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "minutesSavedPerAccepted": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "excludedOutsidePeriods": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "limitations": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "workflowId",
                          "title",
                          "product",
                          "version",
                          "baselineApproved",
                          "phases",
                          "projectedAnnualHours",
                          "projectedAnnualLaborUsd",
                          "projectedFteCapacity",
                          "minutesSavedPerAccepted",
                          "excludedOutsidePeriods",
                          "limitations"
                        ]
                      }
                    },
                    "prompts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "title",
                          "text"
                        ]
                      }
                    },
                    "coverage": {
                      "type": "object",
                      "properties": {
                        "collection": {
                          "type": "string",
                          "const": "manual_evidence"
                        },
                        "productTelemetry": {
                          "type": "string",
                          "const": "separate_30_day_aggregate"
                        },
                        "research": {
                          "type": "string",
                          "const": "prompt_only"
                        },
                        "externalConnections": {
                          "type": "string",
                          "const": "requests_only"
                        }
                      },
                      "required": [
                        "collection",
                        "productTelemetry",
                        "research",
                        "externalConnections"
                      ]
                    },
                    "interviewsCompleted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "notice": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "scope",
                    "usage",
                    "userId",
                    "permissions",
                    "generatedAt",
                    "environment",
                    "records",
                    "scorecards",
                    "prompts",
                    "coverage",
                    "interviewsCompleted",
                    "notice"
                  ]
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing credential",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Scope, tenant, role or policy denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Resource unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Version or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Budget exhausted or rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Required dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "productAccess": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "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)$"
          },
          "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)$"
          },
          "appId": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,63}$"
          },
          "permission": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "accessToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16000
          },
          "transport": {
            "default": "api",
            "type": "string",
            "enum": [
              "api",
              "mcp"
            ]
          }
        },
        "required": [
          "organizationId",
          "workspaceId",
          "appId",
          "permission",
          "accessToken"
        ],
        "additionalProperties": false
      },
      "access": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "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)$"
          },
          "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)$"
          },
          "appId": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,63}$"
          },
          "permission": {
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "organizationId",
          "workspaceId",
          "appId",
          "permission"
        ],
        "additionalProperties": false
      },
      "launcher": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "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)$"
          },
          "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)$"
          }
        },
        "required": [
          "organizationId",
          "workspaceId"
        ],
        "additionalProperties": false
      },
      "mcpAccess": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "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)$"
          },
          "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)$"
          },
          "appId": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,63}$"
          },
          "permission": {
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "organizationId",
          "workspaceId",
          "appId",
          "permission"
        ],
        "additionalProperties": false
      },
      "reserve": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "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)$"
          },
          "appId": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,63}$"
          },
          "operationId": {
            "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)$"
          },
          "estimateMicros": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "organizationId",
          "appId",
          "operationId",
          "estimateMicros"
        ],
        "additionalProperties": false
      },
      "settle": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "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)$"
          },
          "appId": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,63}$"
          },
          "operationId": {
            "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)$"
          },
          "costMicros": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "organizationId",
          "appId",
          "operationId",
          "costMicros"
        ],
        "additionalProperties": false
      },
      "usage": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 2
          },
          "eventId": {
            "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)$"
          },
          "operationId": {
            "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)$"
          },
          "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)$"
          },
          "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)$"
          },
          "appId": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9-]{1,63}$"
          },
          "environment": {
            "type": "string",
            "enum": [
              "local",
              "staging",
              "production"
            ]
          },
          "actorId": {
            "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"
              }
            ]
          },
          "actorKind": {
            "type": "string",
            "enum": [
              "human",
              "service"
            ]
          },
          "channel": {
            "type": "string",
            "enum": [
              "brain",
              "chatgpt",
              "claude",
              "excel",
              "web",
              "api",
              "mcp",
              "background",
              "macos",
              "ios",
              "android",
              "windows"
            ]
          },
          "surface": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.:-]{1,80}$"
          },
          "transport": {
            "type": "string",
            "enum": [
              "web",
              "api",
              "mcp",
              "background"
            ]
          },
          "attribution": {
            "type": "string",
            "enum": [
              "verified_client",
              "server_route",
              "unattributed"
            ]
          },
          "clientId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "measurementKind": {
            "type": "string",
            "enum": [
              "request",
              "operation",
              "model",
              "tool"
            ]
          },
          "operation": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_.:-]{1,100}$"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "tool": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "inputTokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "outputTokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "durationMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          },
          "firstTokenMs": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "costMicros": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "costBasis": {
            "type": "string",
            "enum": [
              "provider",
              "estimate",
              "unknown"
            ]
          },
          "currency": {
            "type": "string",
            "const": "USD"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "schemaVersion",
          "eventId",
          "operationId",
          "organizationId",
          "workspaceId",
          "appId",
          "environment",
          "actorId",
          "actorKind",
          "channel",
          "operation",
          "provider",
          "model",
          "tool",
          "inputTokens",
          "outputTokens",
          "durationMs",
          "firstTokenMs",
          "costMicros",
          "costBasis",
          "currency",
          "outcome",
          "occurredAt"
        ],
        "additionalProperties": false
      },
      "evidenceSave": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "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)$"
          },
          "expectedVersion": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "data": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "workflow"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "product": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "owner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "scientificOwner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "cohort": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "baselineStart": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "baselineEnd": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "assistedStart": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "assistedEnd": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "acceptanceCriteria": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "method": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "benchmark": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "annualVolume": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "loadedHourlyUsd": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "productiveHoursPerFte": {
                    "anyOf": [
                      {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 8760
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "assumptionsSource": {
                    "type": "string",
                    "maxLength": 8000
                  }
                },
                "required": [
                  "kind",
                  "title",
                  "product",
                  "owner",
                  "scientificOwner",
                  "cohort",
                  "baselineStart",
                  "baselineEnd",
                  "assistedStart",
                  "assistedEnd",
                  "acceptanceCriteria",
                  "method",
                  "benchmark",
                  "annualVolume",
                  "loadedHourlyUsd",
                  "productiveHoursPerFte",
                  "assumptionsSource"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "observation"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "operationReference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "workflowId": {
                    "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)$"
                  },
                  "sourceId": {
                    "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)$"
                  },
                  "phase": {
                    "type": "string",
                    "enum": [
                      "baseline",
                      "assisted"
                    ]
                  },
                  "participant": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "occurredOn": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "started",
                      "completed",
                      "failed",
                      "cancelled"
                    ]
                  },
                  "productVersion": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "laborMinutes": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 10000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "cycleMinutes": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 10000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "runtimeMinutes": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 10000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "timeBasis": {
                    "type": "string",
                    "enum": [
                      "observed",
                      "estimate"
                    ]
                  },
                  "costUsd": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "materialRework": {
                    "type": "boolean"
                  },
                  "materialError": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 8000
                  }
                },
                "required": [
                  "kind",
                  "title",
                  "operationReference",
                  "workflowId",
                  "sourceId",
                  "phase",
                  "participant",
                  "occurredOn",
                  "status",
                  "productVersion",
                  "laborMinutes",
                  "cycleMinutes",
                  "runtimeMinutes",
                  "timeBasis",
                  "costUsd",
                  "materialRework",
                  "materialError",
                  "notes"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "source"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "sourceType": {
                    "type": "string",
                    "enum": [
                      "workflow_record",
                      "interview",
                      "repository",
                      "public_research",
                      "finance",
                      "other"
                    ]
                  },
                  "url": {
                    "type": "string",
                    "maxLength": 1500
                  },
                  "locator": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "capturedOn": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "owner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "limitations": {
                    "type": "string",
                    "maxLength": 8000
                  }
                },
                "required": [
                  "kind",
                  "title",
                  "sourceType",
                  "url",
                  "locator",
                  "capturedOn",
                  "owner",
                  "summary",
                  "limitations"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "interview"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "sourceId": {
                    "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)$"
                  },
                  "account": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "buyerRole": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "conductedOn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stage": {
                    "type": "string",
                    "enum": [
                      "candidate",
                      "interviewed",
                      "qualified",
                      "pilot_interest",
                      "pilot_agreed",
                      "closed"
                    ]
                  },
                  "hypothesis": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "finding": {
                    "type": "string",
                    "maxLength": 8000
                  },
                  "contradictions": {
                    "type": "string",
                    "maxLength": 8000
                  },
                  "nextAction": {
                    "type": "string",
                    "maxLength": 8000
                  },
                  "owner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "kind",
                  "title",
                  "sourceId",
                  "account",
                  "buyerRole",
                  "conductedOn",
                  "stage",
                  "hypothesis",
                  "finding",
                  "contradictions",
                  "nextAction",
                  "owner"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "connection"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "posthog",
                      "github",
                      "crm",
                      "research",
                      "auth0",
                      "aws",
                      "other"
                    ]
                  },
                  "purpose": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "requestedResources": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "owner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "requested",
                      "configuring",
                      "reported_ready",
                      "blocked"
                    ]
                  },
                  "dependency": {
                    "type": "string",
                    "enum": [
                      "jill",
                      "platform",
                      "account_owner",
                      "scientific_owner",
                      "finance"
                    ]
                  },
                  "nextAction": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "evidenceUrl": {
                    "type": "string",
                    "maxLength": 1500
                  },
                  "checkedOn": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kind",
                  "title",
                  "provider",
                  "purpose",
                  "requestedResources",
                  "owner",
                  "status",
                  "dependency",
                  "nextAction",
                  "evidenceUrl",
                  "checkedOn"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "id",
          "expectedVersion",
          "data"
        ],
        "additionalProperties": false
      },
      "evidenceReview": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "expectedVersion": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "decision": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected"
            ]
          },
          "validateTime": {
            "type": "boolean"
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          }
        },
        "required": [
          "expectedVersion",
          "decision",
          "validateTime",
          "note"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "humanOAuth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://dev-bxm8q47vnubdddzh.us.auth0.com/authorize",
            "tokenUrl": "https://dev-bxm8q47vnubdddzh.us.auth0.com/oauth/token",
            "scopes": {
              "platform:access": "Call human API routes; role checks still apply"
            }
          }
        }
      },
      "serviceBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Managed OSPRI credential scoped to one environment, app, organization and allowed operations. Never place in a browser or native client."
      }
    }
  }
}
