{
  "openapi": "3.1.0",
  "info": {
    "title": "TicketX API",
    "version": "0.1.0",
    "description": "TicketX \u2014 turn any spec into an accurate, reviewed ticket tree."
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Liveness probe",
        "operationId": "health_liveness_health_get",
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/health/live": {
      "get": {
        "summary": "Liveness probe",
        "operationId": "health_live_health_live_get",
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "summary": "Database connectivity probe",
        "operationId": "health_db_health_ready_get",
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/signup": {
      "post": {
        "operationId": "signup_api_v1_auth_signup_post",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "operationId": "login_api_v1_auth_login_post",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/magic-link": {
      "post": {
        "operationId": "magic_link_api_v1_auth_magic-link_post",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MagicLinkRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/magic-link/consume": {
      "post": {
        "operationId": "magic_link_consume_api_v1_auth_magic-link_consume_post",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsumeTokenRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/token/refresh": {
      "post": {
        "operationId": "refresh_api_v1_auth_token_refresh_post",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "logout_api_v1_auth_logout_post",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/sso/discover": {
      "post": {
        "operationId": "sso_discover_api_v1_auth_sso_discover_post",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSODiscoverRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/sso/callback": {
      "post": {
        "operationId": "sso_callback_api_v1_auth_sso_callback_post",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOCallbackRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "operationId": "me_api_v1_auth_me_get",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects": {
      "get": {
        "operationId": "list_projects_api_v1_projects_get",
        "tags": [
          "TicketX \u00b7 Projects"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "post": {
        "operationId": "create_project_api_v1_projects_post",
        "tags": [
          "TicketX \u00b7 Projects"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/settings": {
      "put": {
        "operationId": "update_settings_api_v1_projects_project_id_settings_put",
        "tags": [
          "TicketX \u00b7 Projects"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectSettingsRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/repos": {
      "post": {
        "operationId": "attach_repo_api_v1_projects_project_id_repos_post",
        "tags": [
          "TicketX \u00b7 Repos"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachRepoRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_repos_api_v1_projects_project_id_repos_get",
        "tags": [
          "TicketX \u00b7 Repos"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/index": {
      "post": {
        "operationId": "build_index_api_v1_projects_project_id_index_post",
        "tags": [
          "TicketX \u00b7 Code Index"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndexRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "index_status_api_v1_projects_project_id_index_get",
        "tags": [
          "TicketX \u00b7 Code Index"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/index/map": {
      "get": {
        "operationId": "index_map_api_v1_projects_project_id_index_map_get",
        "tags": [
          "TicketX \u00b7 Code Index"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/index/refresh": {
      "post": {
        "operationId": "index_refresh_api_v1_projects_project_id_index_refresh_post",
        "tags": [
          "TicketX \u00b7 Code Index"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/search": {
      "post": {
        "operationId": "code_search_api_v1_projects_project_id_search_post",
        "tags": [
          "TicketX \u00b7 Code Index"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeSearchRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/conventions": {
      "get": {
        "operationId": "conventions_api_v1_projects_project_id_conventions_get",
        "tags": [
          "TicketX \u00b7 Code Index"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/glossary": {
      "put": {
        "operationId": "set_glossary_api_v1_projects_project_id_glossary_put",
        "tags": [
          "TicketX \u00b7 Glossary"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetGlossaryRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_glossary_api_v1_projects_project_id_glossary_get",
        "tags": [
          "TicketX \u00b7 Glossary"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/integrations": {
      "post": {
        "operationId": "connect_api_v1_projects_project_id_integrations_post",
        "tags": [
          "TicketX \u00b7 Integrations"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectIntegrationRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_integrations_api_v1_projects_project_id_integrations_get",
        "tags": [
          "TicketX \u00b7 Integrations"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/connections": {
      "get": {
        "operationId": "list_api_v1_connections_get",
        "tags": [
          "TicketX \u00b7 Connections"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/connections/{provider}": {
      "get": {
        "operationId": "status_api_v1_connections_provider_get",
        "tags": [
          "TicketX \u00b7 Connections"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      },
      "delete": {
        "operationId": "disconnect_api_v1_connections_provider_delete",
        "tags": [
          "TicketX \u00b7 Connections"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/connections/{provider}/authorize": {
      "get": {
        "operationId": "authorize_api_v1_connections_provider_authorize_get",
        "tags": [
          "TicketX \u00b7 Connections"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/connections/{provider}/resources": {
      "get": {
        "operationId": "resources_api_v1_connections_provider_resources_get",
        "tags": [
          "TicketX \u00b7 Connections"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/push": {
      "post": {
        "operationId": "push_api_v1_projects_project_id_push_post",
        "tags": [
          "TicketX \u00b7 Push"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/sync": {
      "post": {
        "operationId": "sync_api_v1_projects_project_id_sync_post",
        "tags": [
          "TicketX \u00b7 Push"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/oauth/{provider}/authorize": {
      "get": {
        "operationId": "authorize_api_v1_integrations_oauth_provider_authorize_get",
        "tags": [
          "TicketX \u00b7 Integrations"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/oauth/callback": {
      "get": {
        "operationId": "callback_api_v1_integrations_oauth_callback_get",
        "tags": [
          "TicketX \u00b7 Integrations"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/integrations/{integration_id}/resources": {
      "get": {
        "operationId": "list_resources_api_v1_integrations_integration_id_resources_get",
        "tags": [
          "TicketX \u00b7 Integrations"
        ],
        "parameters": [
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/assets": {
      "post": {
        "operationId": "upload_api_v1_projects_project_id_assets_post",
        "tags": [
          "TicketX \u00b7 Assets"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadAssetRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_assets_api_v1_projects_project_id_assets_get",
        "tags": [
          "TicketX \u00b7 Assets"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/assets/{asset_id}": {
      "get": {
        "operationId": "get_asset_api_v1_assets_asset_id_get",
        "tags": [
          "TicketX \u00b7 Assets"
        ],
        "parameters": [
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/assets/{asset_id}/download": {
      "get": {
        "operationId": "download_asset_api_v1_assets_asset_id_download_get",
        "tags": [
          "TicketX \u00b7 Assets"
        ],
        "parameters": [
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/agents/linear/webhook": {
      "post": {
        "operationId": "linear_webhook_api_v1_agents_linear_webhook_post",
        "tags": [
          "TicketX \u00b7 Agents"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/agents/github/webhook": {
      "post": {
        "operationId": "github_webhook_api_v1_agents_github_webhook_post",
        "tags": [
          "TicketX \u00b7 Agents"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/analyze": {
      "post": {
        "operationId": "analyze_api_v1_analyze_post",
        "tags": [
          "TicketX \u00b7 Analyze"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/analyze/async": {
      "post": {
        "summary": "Fire-and-poll: create a pending `analysis_run`, return its id instantly,",
        "operationId": "analyze_async_api_v1_analyze_async_post",
        "tags": [
          "TicketX \u00b7 Analyze"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/analyze/stream": {
      "post": {
        "summary": "Server-Sent Events: one `agent` event per agent as it finishes, then a",
        "operationId": "analyze_stream_api_v1_analyze_stream_post",
        "tags": [
          "TicketX \u00b7 Analyze"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/analyze/runs/{run_id:int}/cancel": {
      "post": {
        "summary": "Cancel a pending analysis run. Revokes Celery task if running.",
        "operationId": "cancel_run_api_v1_analyze_runs_run_id:int_cancel_post",
        "tags": [
          "TicketX \u00b7 Analyze"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/analyze/runs/{run_id:int}/chat": {
      "post": {
        "summary": "Conversational HITL: chat with the ClarifierAgent to resolve ambiguities turn-by-turn.",
        "operationId": "chat_run_api_v1_analyze_runs_run_id:int_chat_post",
        "tags": [
          "TicketX \u00b7 Analyze"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunChatRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/publish": {
      "post": {
        "operationId": "publish_api_v1_publish_post",
        "tags": [
          "TicketX \u00b7 Publish"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/prds/draft": {
      "post": {
        "summary": "Write a full PRD from a short brief, grounded in the project's codebase \u2014",
        "operationId": "draft_api_v1_prds_draft_post",
        "tags": [
          "TicketX \u00b7 PRDs"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrdDraftRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/prds": {
      "get": {
        "summary": "Every PRD for a project (newest first), each with its latest run + count.",
        "operationId": "list_prds_api_v1_prds_get",
        "tags": [
          "TicketX \u00b7 PRDs"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/prds/{prd_id}": {
      "get": {
        "summary": "A single PRD with all of its runs.",
        "operationId": "get_prd_api_v1_prds_prd_id_get",
        "tags": [
          "TicketX \u00b7 PRDs"
        ],
        "parameters": [
          {
            "name": "prd_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/prds/{prd_id}/rerun": {
      "post": {
        "summary": "Re-process the PRD's stored spec into a new run linked to the same PRD.",
        "operationId": "rerun_api_v1_prds_prd_id_rerun_post",
        "tags": [
          "TicketX \u00b7 PRDs"
        ],
        "parameters": [
          {
            "name": "prd_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RerunRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs": {
      "get": {
        "summary": "The PRD history for a project (newest first, lightweight cards).",
        "operationId": "list_runs_api_v1_runs_get",
        "tags": [
          "TicketX \u00b7 Review"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}": {
      "get": {
        "operationId": "get_run_api_v1_runs_run_id_get",
        "tags": [
          "TicketX \u00b7 Review"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/traces": {
      "get": {
        "summary": "Per-agent thinking + transcript for a run (for eval + debugging).",
        "operationId": "get_traces_api_v1_runs_run_id_traces_get",
        "tags": [
          "TicketX \u00b7 Review"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/pipeline": {
      "get": {
        "summary": "The self-contained pipeline record for a run (one training/eval example).",
        "operationId": "get_pipeline_api_v1_runs_run_id_pipeline_get",
        "tags": [
          "TicketX \u00b7 Review"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/approve": {
      "post": {
        "operationId": "approve_api_v1_runs_run_id_approve_post",
        "tags": [
          "TicketX \u00b7 Review"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/reject": {
      "post": {
        "operationId": "reject_api_v1_runs_run_id_reject_post",
        "tags": [
          "TicketX \u00b7 Review"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/nodes/review": {
      "post": {
        "summary": "Approve/reject a single epic, story, or task in the run's tree.",
        "operationId": "review_node_api_v1_runs_run_id_nodes_review_post",
        "tags": [
          "TicketX \u00b7 Review"
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NodeReviewRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/feedback": {
      "get": {
        "operationId": "feedback_summary_api_v1_projects_project_id_feedback_get",
        "tags": [
          "TicketX \u00b7 Learning"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/golden-candidates": {
      "get": {
        "operationId": "golden_candidates_api_v1_projects_project_id_golden-candidates_get",
        "tags": [
          "TicketX \u00b7 Learning"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/export/pipelines": {
      "get": {
        "summary": "Bulk training/eval corpus: every run's self-contained pipeline record as",
        "operationId": "export_pipelines_api_v1_projects_project_id_export_pipelines_get",
        "tags": [
          "TicketX \u00b7 Learning"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/api-keys": {
      "post": {
        "operationId": "create_api_v1_api-keys_post",
        "tags": [
          "TicketX \u00b7 API Keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_keys_api_v1_api-keys_get",
        "tags": [
          "TicketX \u00b7 API Keys"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/api-keys/{key_id}": {
      "delete": {
        "operationId": "revoke_api_v1_api-keys_key_id_delete",
        "tags": [
          "TicketX \u00b7 API Keys"
        ],
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/usage": {
      "get": {
        "operationId": "usage_api_v1_usage_get",
        "tags": [
          "TicketX \u00b7 Usage"
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/audit": {
      "get": {
        "operationId": "audit_api_v1_audit_get",
        "tags": [
          "TicketX \u00b7 Ops"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/benchmark": {
      "get": {
        "operationId": "benchmark_api_v1_benchmark_get",
        "tags": [
          "TicketX \u00b7 Ops"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations": {
      "post": {
        "operationId": "create_api_v1_organizations_post",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrgRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_orgs_api_v1_organizations_get",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/members": {
      "post": {
        "operationId": "add_member_api_v1_organizations_org_id_members_post",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddMemberRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_members_api_v1_organizations_org_id_members_get",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/members/{member_id}": {
      "put": {
        "operationId": "set_member_role_api_v1_organizations_org_id_members_member_id_put",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMemberRoleRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/integrations": {
      "post": {
        "operationId": "connect_integration_api_v1_organizations_org_id_integrations_post",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectIntegrationRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_integrations_api_v1_organizations_org_id_integrations_get",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/integrations/{integration_id}": {
      "delete": {
        "operationId": "disconnect_integration_api_v1_organizations_org_id_integrations_integration_id_delete",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/integrations/oauth/{provider}/authorize": {
      "get": {
        "operationId": "oauth_authorize_api_v1_organizations_org_id_integrations_oauth_provider_authorize_get",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/repos": {
      "post": {
        "operationId": "register_repo_api_v1_organizations_org_id_repos_post",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterOrgRepoRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_repos_api_v1_organizations_org_id_repos_get",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/repos/{repo_id}": {
      "delete": {
        "operationId": "remove_repo_api_v1_organizations_org_id_repos_repo_id_delete",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "repo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/people": {
      "get": {
        "operationId": "list_people_api_v1_organizations_org_id_people_get",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/people/{member_id}/role": {
      "put": {
        "operationId": "set_role_api_v1_organizations_org_id_people_member_id_role_put",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMemberRoleRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/people/{member_id}": {
      "delete": {
        "operationId": "remove_api_v1_organizations_org_id_people_member_id_delete",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/invitations": {
      "post": {
        "operationId": "invite_api_v1_organizations_org_id_invitations_post",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_invites_api_v1_organizations_org_id_invitations_get",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/invitations/{invite_id}": {
      "delete": {
        "operationId": "revoke_invite_api_v1_organizations_org_id_invitations_invite_id_delete",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "invite_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/members/{member_id}/repos": {
      "post": {
        "operationId": "grant_api_v1_organizations_org_id_members_member_id_repos_post",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantRepoAccessRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_grants_api_v1_organizations_org_id_members_member_id_repos_get",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/members/{member_id}/repos/{repo_id}": {
      "delete": {
        "operationId": "revoke_api_v1_organizations_org_id_members_member_id_repos_repo_id_delete",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "repo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/organizations/{org_id}/my-repos": {
      "get": {
        "operationId": "my_repos_api_v1_organizations_org_id_my-repos_get",
        "tags": [
          "TicketX \u00b7 Organizations"
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/invitations/preview": {
      "get": {
        "operationId": "preview_api_v1_invitations_preview_get",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/invitations/accept": {
      "post": {
        "operationId": "accept_api_v1_invitations_accept_post",
        "tags": [
          "TicketX \u00b7 Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInviteRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/sso/config": {
      "post": {
        "operationId": "configure_api_v1_sso_config_post",
        "tags": [
          "TicketX \u00b7 SSO"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigureSSORequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      },
      "get": {
        "operationId": "list_configs_api_v1_sso_config_get",
        "tags": [
          "TicketX \u00b7 SSO"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/sso/config/{config_id}": {
      "delete": {
        "operationId": "delete_config_api_v1_sso_config_config_id_delete",
        "tags": [
          "TicketX \u00b7 SSO"
        ],
        "parameters": [
          {
            "name": "config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/sso/{config_id}/login": {
      "get": {
        "operationId": "login_api_v1_sso_config_id_login_get",
        "tags": [
          "TicketX \u00b7 SSO"
        ],
        "parameters": [
          {
            "name": "config_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/sso/callback": {
      "get": {
        "operationId": "callback_api_v1_sso_callback_get",
        "tags": [
          "TicketX \u00b7 SSO"
        ],
        "parameters": [
          {
            "name": "config_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/sso/idp/authorize": {
      "get": {
        "operationId": "idp_authorize_api_v1_sso_idp_authorize_get",
        "tags": [
          "TicketX \u00b7 SSO"
        ],
        "parameters": [
          {
            "name": "login_hint",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "dev@example.com"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/sso/idp/token": {
      "post": {
        "operationId": "idp_token_api_v1_sso_idp_token_post",
        "tags": [
          "TicketX \u00b7 SSO"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/sso/idp/userinfo": {
      "get": {
        "operationId": "idp_userinfo_api_v1_sso_idp_userinfo_get",
        "tags": [
          "TicketX \u00b7 SSO"
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/compliance/standards": {
      "get": {
        "operationId": "standards_api_v1_projects_project_id_compliance_standards_get",
        "tags": [
          "TicketX \u00b7 Compliance"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/compliance/matrix": {
      "get": {
        "operationId": "matrix_api_v1_projects_project_id_compliance_matrix_get",
        "tags": [
          "TicketX \u00b7 Compliance"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/compliance/export": {
      "post": {
        "operationId": "export_api_v1_projects_project_id_compliance_export_post",
        "tags": [
          "TicketX \u00b7 Compliance"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComplianceExportRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/compliance/exports": {
      "get": {
        "operationId": "list_exports_api_v1_projects_project_id_compliance_exports_get",
        "tags": [
          "TicketX \u00b7 Compliance"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/projects/{project_id}/tickets": {
      "get": {
        "operationId": "list_tickets_api_v1_projects_project_id_tickets_get",
        "tags": [
          "TicketX \u00b7 Merge verification"
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/tickets/{ticket_id}/code-links": {
      "post": {
        "operationId": "link_code_api_v1_tickets_ticket_id_code-links_post",
        "tags": [
          "TicketX \u00b7 Merge verification"
        ],
        "parameters": [
          {
            "name": "ticket_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkCodeRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/tickets/{ticket_id}/verify-merge": {
      "post": {
        "operationId": "verify_merge_api_v1_tickets_ticket_id_verify-merge_post",
        "tags": [
          "TicketX \u00b7 Merge verification"
        ],
        "parameters": [
          {
            "name": "ticket_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyMergeRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/tickets/{ticket_id}/merge-verifications": {
      "get": {
        "operationId": "list_verifications_api_v1_tickets_ticket_id_merge-verifications_get",
        "tags": [
          "TicketX \u00b7 Merge verification"
        ],
        "parameters": [
          {
            "name": "ticket_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    },
    "/api/v1/webhooks/scm/{provider}": {
      "post": {
        "operationId": "scm_webhook_api_v1_webhooks_scm_provider_post",
        "tags": [
          "TicketX \u00b7 Merge verification"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScmWebhookDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Health"
    },
    {
      "name": "TicketX \u00b7 API Keys"
    },
    {
      "name": "TicketX \u00b7 Agents"
    },
    {
      "name": "TicketX \u00b7 Analyze"
    },
    {
      "name": "TicketX \u00b7 Assets"
    },
    {
      "name": "TicketX \u00b7 Auth"
    },
    {
      "name": "TicketX \u00b7 Code Index"
    },
    {
      "name": "TicketX \u00b7 Compliance"
    },
    {
      "name": "TicketX \u00b7 Connections"
    },
    {
      "name": "TicketX \u00b7 Glossary"
    },
    {
      "name": "TicketX \u00b7 Integrations"
    },
    {
      "name": "TicketX \u00b7 Learning"
    },
    {
      "name": "TicketX \u00b7 Merge verification"
    },
    {
      "name": "TicketX \u00b7 Ops"
    },
    {
      "name": "TicketX \u00b7 Organizations"
    },
    {
      "name": "TicketX \u00b7 PRDs"
    },
    {
      "name": "TicketX \u00b7 Projects"
    },
    {
      "name": "TicketX \u00b7 Publish"
    },
    {
      "name": "TicketX \u00b7 Push"
    },
    {
      "name": "TicketX \u00b7 Repos"
    },
    {
      "name": "TicketX \u00b7 Review"
    },
    {
      "name": "TicketX \u00b7 SSO"
    },
    {
      "name": "TicketX \u00b7 Usage"
    }
  ],
  "components": {
    "schemas": {
      "SignupRequestDTO": {
        "description": "Self-serve signup creates a new company + its first admin.",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "company_name": {
            "maxLength": 160,
            "minLength": 2,
            "title": "Company Name",
            "type": "string"
          },
          "full_name": {
            "anyOf": [
              {
                "maxLength": 160,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Full Name"
          },
          "email": {
            "maxLength": 320,
            "minLength": 3,
            "title": "Email",
            "type": "string"
          },
          "password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "company_name",
          "email",
          "password"
        ],
        "title": "SignupRequestDTO",
        "type": "object"
      },
      "LoginRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "minLength": 3,
            "title": "Email",
            "type": "string"
          },
          "password": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "title": "LoginRequestDTO",
        "type": "object"
      },
      "MagicLinkRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "minLength": 3,
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "MagicLinkRequestDTO",
        "type": "object"
      },
      "ConsumeTokenRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "token": {
            "maxLength": 512,
            "minLength": 8,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "title": "ConsumeTokenRequestDTO",
        "type": "object"
      },
      "SSODiscoverRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "minLength": 3,
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "SSODiscoverRequestDTO",
        "type": "object"
      },
      "SSOCallbackRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "config_id": {
            "title": "Config Id",
            "type": "integer"
          },
          "code": {
            "maxLength": 4096,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "State"
          }
        },
        "required": [
          "config_id",
          "code"
        ],
        "title": "SSOCallbackRequestDTO",
        "type": "object"
      },
      "CreateProjectRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "name": {
            "maxLength": 160,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "key": {
            "maxLength": 12,
            "minLength": 2,
            "pattern": "^[A-Z][A-Z0-9]+$",
            "title": "Key",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Organization Id"
          }
        },
        "required": [
          "name",
          "key"
        ],
        "title": "CreateProjectRequestDTO",
        "type": "object"
      },
      "ProjectSettingsRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "auto_mode": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Auto Mode"
          },
          "auto_publish_min_coverage": {
            "anyOf": [
              {
                "maximum": 100,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Auto Publish Min Coverage"
          },
          "auto_index": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Auto Index"
          },
          "auto_index_interval_minutes": {
            "anyOf": [
              {
                "maximum": 10080,
                "minimum": 5,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Auto Index Interval Minutes"
          }
        },
        "title": "ProjectSettingsRequestDTO",
        "type": "object"
      },
      "AttachRepoRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "repo_url": {
            "maxLength": 400,
            "minLength": 5,
            "title": "Repo Url",
            "type": "string"
          },
          "default_branch": {
            "default": "main",
            "title": "Default Branch",
            "type": "string"
          }
        },
        "required": [
          "repo_url"
        ],
        "title": "AttachRepoRequestDTO",
        "type": "object"
      },
      "ChangedFileDTO": {
        "properties": {
          "path": {
            "maxLength": 400,
            "minLength": 1,
            "title": "Path",
            "type": "string"
          },
          "content": {
            "default": "",
            "maxLength": 200000,
            "title": "Content",
            "type": "string"
          }
        },
        "required": [
          "path"
        ],
        "title": "ChangedFileDTO",
        "type": "object"
      },
      "IndexRequestDTO": {
        "description": "Triggered by the GitHub Action on push.\n\n- `mode=\"full\"` (default): `code_context` is the whole bundled source (or the\n  server fetches the attached repo).\n- `mode=\"incremental\"`: only `changed_files` are re-embedded and `deleted_files`\n  removed \u2014 the rest of the index (and its vectors) is kept intact.",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "branch": {
            "default": "main",
            "title": "Branch",
            "type": "string"
          },
          "commit_sha": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Commit Sha"
          },
          "mode": {
            "default": "full",
            "title": "Mode",
            "type": "string"
          },
          "code_context": {
            "anyOf": [
              {
                "maxLength": 2000000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Code Context"
          },
          "changed_files": {
            "items": {
              "$ref": "#/$defs/ChangedFileDTO"
            },
            "title": "Changed Files",
            "type": "array"
          },
          "deleted_files": {
            "items": {
              "maxLength": 400,
              "type": "string"
            },
            "title": "Deleted Files",
            "type": "array"
          }
        },
        "title": "IndexRequestDTO",
        "type": "object"
      },
      "CodeSearchRequestDTO": {
        "properties": {
          "query": {
            "maxLength": 2000,
            "minLength": 2,
            "title": "Query",
            "type": "string"
          },
          "k": {
            "default": 8,
            "maximum": 50,
            "minimum": 1,
            "title": "K",
            "type": "integer"
          }
        },
        "required": [
          "query"
        ],
        "title": "CodeSearchRequestDTO",
        "type": "object"
      },
      "GlossaryTermDTO": {
        "properties": {
          "term": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Term",
            "type": "string"
          },
          "definition": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Definition"
          }
        },
        "required": [
          "term"
        ],
        "title": "GlossaryTermDTO",
        "type": "object"
      },
      "SetGlossaryRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "terms": {
            "items": {
              "$ref": "#/$defs/GlossaryTermDTO"
            },
            "title": "Terms",
            "type": "array"
          }
        },
        "title": "SetGlossaryRequestDTO",
        "type": "object"
      },
      "IntegrationProvider": {
        "enum": [
          "github",
          "gitlab",
          "bitbucket",
          "jira",
          "azure_devops",
          "linear",
          "shortcut",
          "clickup",
          "asana",
          "taskx",
          "dryrun"
        ],
        "title": "IntegrationProvider",
        "type": "string"
      },
      "ConnectIntegrationRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "provider": {
            "$ref": "#/$defs/IntegrationProvider"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 120,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "config": {
            "additionalProperties": true,
            "title": "Config",
            "type": "object"
          },
          "token": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Token"
          }
        },
        "required": [
          "provider"
        ],
        "title": "ConnectIntegrationRequestDTO",
        "type": "object"
      },
      "PushRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "integration_id": {
            "title": "Integration Id",
            "type": "integer"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Run Id"
          },
          "dry_run": {
            "default": false,
            "title": "Dry Run",
            "type": "boolean"
          }
        },
        "required": [
          "integration_id"
        ],
        "title": "PushRequestDTO",
        "type": "object"
      },
      "SyncRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "integration_id": {
            "title": "Integration Id",
            "type": "integer"
          },
          "dry_run": {
            "default": false,
            "title": "Dry Run",
            "type": "boolean"
          }
        },
        "required": [
          "integration_id"
        ],
        "title": "SyncRequestDTO",
        "type": "object"
      },
      "AssetKind": {
        "description": "What an uploaded/stored file is, so storage + retrieval can branch on intent.",
        "enum": [
          "spec",
          "attachment",
          "code_bundle",
          "export",
          "image",
          "other"
        ],
        "title": "AssetKind",
        "type": "string"
      },
      "UploadAssetRequestDTO": {
        "description": "Upload any file as a base64 blob (works through any JSON client incl. the TestClient).\n\n`content_base64` is the file's bytes, base64-encoded; everything else is metadata.",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "filename": {
            "maxLength": 400,
            "minLength": 1,
            "title": "Filename",
            "type": "string"
          },
          "content_type": {
            "default": "application/octet-stream",
            "maxLength": 160,
            "title": "Content Type",
            "type": "string"
          },
          "kind": {
            "$ref": "#/$defs/AssetKind",
            "default": "attachment"
          },
          "content_base64": {
            "maxLength": 80000000,
            "minLength": 1,
            "title": "Content Base64",
            "type": "string"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Run Id"
          }
        },
        "required": [
          "filename",
          "content_base64"
        ],
        "title": "UploadAssetRequestDTO",
        "type": "object"
      },
      "SourceType": {
        "description": "What kind of spec was fed in.",
        "enum": [
          "prd",
          "rfc",
          "transcript",
          "issue",
          "freeform"
        ],
        "title": "SourceType",
        "type": "string"
      },
      "AnalyzeRequestDTO": {
        "description": "Input to the spec-to-ticket engine.\n\nPhase 0: stateless preview \u2014 `analyze()` returns a tree, it does not persist\ntickets. `repo_context` is the (optional) grounding blob; in later phases the\ngrounding service produces it from a linked repo/URL/upload.",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "source_type": {
            "$ref": "#/$defs/SourceType",
            "default": "prd"
          },
          "spec_content": {
            "maxLength": 200000,
            "minLength": 10,
            "title": "Spec Content",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Project Id"
          },
          "repo_url": {
            "anyOf": [
              {
                "maxLength": 400,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Repo Url"
          },
          "repo_branch": {
            "default": "main",
            "title": "Repo Branch",
            "type": "string"
          },
          "github_token": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Github Token"
          },
          "repo_context": {
            "anyOf": [
              {
                "maxLength": 500000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Repo Context"
          },
          "doc_urls": {
            "items": {
              "maxLength": 400,
              "type": "string"
            },
            "title": "Doc Urls",
            "type": "array"
          },
          "related_context": {
            "anyOf": [
              {
                "maxLength": 500000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Related Context"
          },
          "clarification_answers": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clarification Answers"
          }
        },
        "required": [
          "spec_content"
        ],
        "title": "AnalyzeRequestDTO",
        "type": "object"
      },
      "RunChatRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "RunChatRequestDTO",
        "type": "object"
      },
      "ApiContract": {
        "description": "The request/response contract for a ticket that builds or changes an HTTP API\nendpoint \u2014 so an \"implement endpoint\" ticket carries the actual payload shapes\ninstead of describing them in prose. Optional: only API-development tickets carry\nit. Payloads are stored as text (a JSON example or schema); if the model emits a\nraw object/array it's serialized to JSON so the field stays a forgiving string.",
        "properties": {
          "endpoint": {
            "default": "",
            "title": "Endpoint",
            "type": "string"
          },
          "request_payload": {
            "default": "",
            "title": "Request Payload",
            "type": "string"
          },
          "response_payload": {
            "default": "",
            "title": "Response Payload",
            "type": "string"
          },
          "status_codes": {
            "items": {
              "type": "string"
            },
            "title": "Status Codes",
            "type": "array"
          },
          "param_validations": {
            "items": {
              "$ref": "#/$defs/ParamValidation"
            },
            "title": "Param Validations",
            "type": "array"
          }
        },
        "title": "ApiContract",
        "type": "object"
      },
      "BlueprintStep": {
        "description": "One step of an API ticket's implementation blueprint \u2014 what to do at one\nlayer of the codebase, grounded in the project's learned conventions. Produced\nby the ApiDesignerAgent from the CodePatternMemory.",
        "properties": {
          "layer": {
            "default": "",
            "title": "Layer",
            "type": "string"
          },
          "action": {
            "default": "",
            "title": "Action",
            "type": "string"
          },
          "refs": {
            "items": {
              "type": "string"
            },
            "title": "Refs",
            "type": "array"
          }
        },
        "title": "BlueprintStep",
        "type": "object"
      },
      "EpicNode": {
        "properties": {
          "title": {
            "maxLength": 200,
            "minLength": 3,
            "title": "Title",
            "type": "string"
          },
          "description": {
            "maxLength": 50000,
            "minLength": 10,
            "title": "Description",
            "type": "string"
          },
          "priority": {
            "default": "medium",
            "title": "Priority",
            "type": "string"
          },
          "objective": {
            "default": "",
            "title": "Objective",
            "type": "string"
          },
          "input": {
            "default": "",
            "title": "Input",
            "type": "string"
          },
          "expected_output": {
            "default": "",
            "title": "Expected Output",
            "type": "string"
          },
          "timeline": {
            "default": "",
            "title": "Timeline",
            "type": "string"
          },
          "api_contract": {
            "anyOf": [
              {
                "$ref": "#/$defs/ApiContract"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "implementation_blueprint": {
            "items": {
              "$ref": "#/$defs/BlueprintStep"
            },
            "title": "Implementation Blueprint",
            "type": "array"
          },
          "design_conformance": {
            "items": {
              "type": "string"
            },
            "title": "Design Conformance",
            "type": "array"
          },
          "domain_guidance": {
            "items": {
              "type": "string"
            },
            "title": "Domain Guidance",
            "type": "array"
          },
          "requirement_refs": {
            "items": {
              "type": "string"
            },
            "title": "Requirement Refs",
            "type": "array"
          },
          "confidence": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Confidence"
          },
          "stories": {
            "items": {
              "$ref": "#/$defs/StoryNode"
            },
            "minItems": 1,
            "title": "Stories",
            "type": "array"
          }
        },
        "required": [
          "title",
          "description",
          "stories"
        ],
        "title": "EpicNode",
        "type": "object"
      },
      "ParamValidation": {
        "description": "Per-parameter validation rules for an API-development ticket \u2014 the concrete\nchecks the endpoint must perform on one request parameter, as a bullet list. The\nApiBuilderAgent fills these; the model may also author them inline on decompose.",
        "properties": {
          "param": {
            "default": "",
            "title": "Param",
            "type": "string"
          },
          "location": {
            "default": "body",
            "title": "Location",
            "type": "string"
          },
          "required": {
            "default": true,
            "title": "Required",
            "type": "boolean"
          },
          "rules": {
            "items": {
              "type": "string"
            },
            "title": "Rules",
            "type": "array"
          }
        },
        "title": "ParamValidation",
        "type": "object"
      },
      "StoryNode": {
        "properties": {
          "title": {
            "maxLength": 200,
            "minLength": 3,
            "title": "Title",
            "type": "string"
          },
          "description": {
            "maxLength": 50000,
            "minLength": 10,
            "title": "Description",
            "type": "string"
          },
          "priority": {
            "default": "medium",
            "title": "Priority",
            "type": "string"
          },
          "objective": {
            "default": "",
            "title": "Objective",
            "type": "string"
          },
          "input": {
            "default": "",
            "title": "Input",
            "type": "string"
          },
          "expected_output": {
            "default": "",
            "title": "Expected Output",
            "type": "string"
          },
          "timeline": {
            "default": "",
            "title": "Timeline",
            "type": "string"
          },
          "api_contract": {
            "anyOf": [
              {
                "$ref": "#/$defs/ApiContract"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "implementation_blueprint": {
            "items": {
              "$ref": "#/$defs/BlueprintStep"
            },
            "title": "Implementation Blueprint",
            "type": "array"
          },
          "design_conformance": {
            "items": {
              "type": "string"
            },
            "title": "Design Conformance",
            "type": "array"
          },
          "domain_guidance": {
            "items": {
              "type": "string"
            },
            "title": "Domain Guidance",
            "type": "array"
          },
          "requirement_refs": {
            "items": {
              "type": "string"
            },
            "title": "Requirement Refs",
            "type": "array"
          },
          "confidence": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Confidence"
          },
          "acceptance_criteria": {
            "items": {
              "type": "string"
            },
            "title": "Acceptance Criteria",
            "type": "array"
          },
          "story_points": {
            "anyOf": [
              {
                "maximum": 100,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Story Points"
          },
          "tasks": {
            "items": {
              "$ref": "#/$defs/TaskNode"
            },
            "minItems": 1,
            "title": "Tasks",
            "type": "array"
          }
        },
        "required": [
          "title",
          "description",
          "tasks"
        ],
        "title": "StoryNode",
        "type": "object"
      },
      "TaskNode": {
        "properties": {
          "title": {
            "maxLength": 200,
            "minLength": 3,
            "title": "Title",
            "type": "string"
          },
          "description": {
            "maxLength": 50000,
            "minLength": 10,
            "title": "Description",
            "type": "string"
          },
          "priority": {
            "default": "medium",
            "title": "Priority",
            "type": "string"
          },
          "objective": {
            "default": "",
            "title": "Objective",
            "type": "string"
          },
          "input": {
            "default": "",
            "title": "Input",
            "type": "string"
          },
          "expected_output": {
            "default": "",
            "title": "Expected Output",
            "type": "string"
          },
          "timeline": {
            "default": "",
            "title": "Timeline",
            "type": "string"
          },
          "api_contract": {
            "anyOf": [
              {
                "$ref": "#/$defs/ApiContract"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "implementation_blueprint": {
            "items": {
              "$ref": "#/$defs/BlueprintStep"
            },
            "title": "Implementation Blueprint",
            "type": "array"
          },
          "design_conformance": {
            "items": {
              "type": "string"
            },
            "title": "Design Conformance",
            "type": "array"
          },
          "domain_guidance": {
            "items": {
              "type": "string"
            },
            "title": "Domain Guidance",
            "type": "array"
          },
          "requirement_refs": {
            "items": {
              "type": "string"
            },
            "title": "Requirement Refs",
            "type": "array"
          },
          "confidence": {
            "anyOf": [
              {
                "maximum": 1.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Confidence"
          },
          "acceptance_criteria": {
            "items": {
              "type": "string"
            },
            "title": "Acceptance Criteria",
            "type": "array"
          },
          "estimated_effort": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Estimated Effort"
          },
          "story_points": {
            "anyOf": [
              {
                "maximum": 100,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Story Points"
          }
        },
        "required": [
          "title",
          "description"
        ],
        "title": "TaskNode",
        "type": "object"
      },
      "PublishRequestDTO": {
        "description": "A reviewed (possibly edited) tree to persist as tickets under a project.\n\n`epics` is validated against the same schema `analyze()` returns, so an edited\ntree can't drift out of contract. `run_id` links the published tickets back to\nthe analysis run that produced them (and guards double-publish).",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "project_id": {
            "exclusiveMinimum": 0,
            "title": "Project Id",
            "type": "integer"
          },
          "epics": {
            "items": {
              "$ref": "#/$defs/EpicNode"
            },
            "minItems": 1,
            "title": "Epics",
            "type": "array"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Run Id"
          },
          "skip_existing": {
            "default": false,
            "title": "Skip Existing",
            "type": "boolean"
          },
          "integration_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Integration Ids"
          }
        },
        "required": [
          "project_id",
          "epics"
        ],
        "title": "PublishRequestDTO",
        "type": "object"
      },
      "PrdDraftRequestDTO": {
        "description": "A short brief to expand into a full PRD. `project_id` (optional) grounds the PRD\nin that project's learned codebase conventions (CodePatternMemory).",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "brief": {
            "minLength": 3,
            "title": "Brief",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Project Id"
          }
        },
        "required": [
          "brief"
        ],
        "title": "PrdDraftRequestDTO",
        "type": "object"
      },
      "RerunRequestDTO": {
        "description": "Input to re-running a PRD with custom clarification answers.",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "clarification_answers": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clarification Answers"
          }
        },
        "title": "RerunRequestDTO",
        "type": "object"
      },
      "NodeReviewRequestDTO": {
        "description": "Approve or reject a single node in a run's ticket tree.\n\n`path` addresses the node by array index: \"e\" (epic), \"e/s\" (story), or\n\"e/s/t\" (task) \u2014 e.g. \"0/1/2\" is the 3rd task of the 2nd story of the 1st epic.\n`decision` of None clears any existing decision on that node.",
        "properties": {
          "path": {
            "maxLength": 32,
            "minLength": 1,
            "pattern": "^\\d+(/\\d+){0,2}$",
            "title": "Path",
            "type": "string"
          },
          "decision": {
            "anyOf": [
              {
                "enum": [
                  "approved",
                  "rejected"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Decision"
          }
        },
        "required": [
          "path"
        ],
        "title": "NodeReviewRequestDTO",
        "type": "object"
      },
      "CreateApiKeyRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Organization Id"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Project Id"
          },
          "role": {
            "default": "member",
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateApiKeyRequestDTO",
        "type": "object"
      },
      "CreateOrgRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "name": {
            "maxLength": 160,
            "minLength": 2,
            "title": "Name",
            "type": "string"
          },
          "slug": {
            "maxLength": 64,
            "minLength": 2,
            "pattern": "^[a-z0-9][a-z0-9-]+$",
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "name",
          "slug"
        ],
        "title": "CreateOrgRequestDTO",
        "type": "object"
      },
      "AddMemberRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "minLength": 3,
            "title": "Email",
            "type": "string"
          },
          "role": {
            "default": "member",
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "AddMemberRequestDTO",
        "type": "object"
      },
      "SetMemberRoleRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "role": {
            "default": "member",
            "title": "Role",
            "type": "string"
          }
        },
        "title": "SetMemberRoleRequestDTO",
        "type": "object"
      },
      "RegisterOrgRepoRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "repo_url": {
            "maxLength": 400,
            "minLength": 5,
            "title": "Repo Url",
            "type": "string"
          },
          "default_branch": {
            "default": "main",
            "maxLength": 120,
            "title": "Default Branch",
            "type": "string"
          }
        },
        "required": [
          "repo_url"
        ],
        "title": "RegisterOrgRepoRequestDTO",
        "type": "object"
      },
      "InviteRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "minLength": 3,
            "title": "Email",
            "type": "string"
          },
          "role": {
            "default": "member",
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "InviteRequestDTO",
        "type": "object"
      },
      "GrantRepoAccessRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "linked_repo_id": {
            "title": "Linked Repo Id",
            "type": "integer"
          },
          "access": {
            "default": "read",
            "title": "Access",
            "type": "string"
          }
        },
        "required": [
          "linked_repo_id"
        ],
        "title": "GrantRepoAccessRequestDTO",
        "type": "object"
      },
      "AcceptInviteRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "token": {
            "maxLength": 512,
            "minLength": 8,
            "title": "Token",
            "type": "string"
          },
          "password": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 8,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Password"
          },
          "full_name": {
            "anyOf": [
              {
                "maxLength": 160,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Full Name"
          }
        },
        "required": [
          "token"
        ],
        "title": "AcceptInviteRequestDTO",
        "type": "object"
      },
      "ConfigureSSORequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "provider": {
            "default": "oidc",
            "title": "Provider",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 120,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Organization Id"
          },
          "client_id": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Client Id",
            "type": "string"
          },
          "client_secret": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Client Secret"
          },
          "authorize_url": {
            "maxLength": 500,
            "minLength": 8,
            "title": "Authorize Url",
            "type": "string"
          },
          "token_url": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Token Url"
          },
          "userinfo_url": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Userinfo Url"
          },
          "redirect_uri": {
            "maxLength": 500,
            "minLength": 8,
            "title": "Redirect Uri",
            "type": "string"
          },
          "email_domain": {
            "anyOf": [
              {
                "maxLength": 120,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Email Domain"
          }
        },
        "required": [
          "client_id",
          "authorize_url",
          "redirect_uri"
        ],
        "title": "ConfigureSSORequestDTO",
        "type": "object"
      },
      "ComplianceStandard": {
        "description": "Audit standards a traceability pack can be framed against.",
        "enum": [
          "iso_26262",
          "iec_62304",
          "soc2"
        ],
        "title": "ComplianceStandard",
        "type": "string"
      },
      "ExportFormat": {
        "description": "Render targets for a generated compliance pack.",
        "enum": [
          "json",
          "markdown",
          "csv",
          "html"
        ],
        "title": "ExportFormat",
        "type": "string"
      },
      "ComplianceExportRequestDTO": {
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "standard": {
            "$ref": "#/$defs/ComplianceStandard"
          },
          "format": {
            "$ref": "#/$defs/ExportFormat",
            "default": "markdown"
          }
        },
        "required": [
          "standard"
        ],
        "title": "ComplianceExportRequestDTO",
        "type": "object"
      },
      "LinkCodeRequestDTO": {
        "description": "Attach a branch / PR / commit to a ticket.",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "provider": {
            "anyOf": [
              {
                "maxLength": 16,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Provider"
          },
          "repo": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Repo"
          },
          "pr_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Pr Number"
          },
          "branch": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Branch"
          },
          "commit_sha": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Commit Sha"
          },
          "url": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Url"
          }
        },
        "title": "LinkCodeRequestDTO",
        "type": "object"
      },
      "VerifyMergeRequestDTO": {
        "description": "Verify a merged change against a ticket's acceptance criteria.\n\nProvide the change inline (the webhook does this) and/or a PR ref. With no\ninline content the deterministic scorer judges off title/body only.",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "provider": {
            "anyOf": [
              {
                "maxLength": 16,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Provider"
          },
          "repo": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Repo"
          },
          "pr_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Pr Number"
          },
          "code_link_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Code Link Id"
          },
          "pr_title": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Pr Title"
          },
          "pr_body": {
            "anyOf": [
              {
                "maxLength": 20000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Pr Body"
          },
          "changed_files": {
            "items": {
              "type": "string"
            },
            "title": "Changed Files",
            "type": "array"
          },
          "diff": {
            "anyOf": [
              {
                "maxLength": 200000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Diff"
          },
          "auto_close": {
            "default": true,
            "title": "Auto Close",
            "type": "boolean"
          }
        },
        "title": "VerifyMergeRequestDTO",
        "type": "object"
      },
      "ScmWebhookDTO": {
        "additionalProperties": true,
        "description": "An SCM webhook payload (GitHub `pull_request` shape, or flat fields for others).",
        "properties": {
          "reference_urn": {
            "title": "Reference Urn",
            "type": "string"
          },
          "action": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Action"
          },
          "pull_request": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Pull Request"
          },
          "repository": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Repository"
          },
          "repo": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Repo"
          },
          "pr_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Pr Number"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Title"
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Body"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Url"
          },
          "merged": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Merged"
          },
          "auto_close": {
            "default": true,
            "title": "Auto Close",
            "type": "boolean"
          }
        },
        "title": "ScmWebhookDTO",
        "type": "object"
      }
    }
  }
}