{
  "openapi": "3.1.0",
  "info": {
    "title": "CodeVetter public API",
    "version": "1.0.0",
    "description": "CodeVetter provides execution-backed verification and evaluation for coding-agent changes. The public web API exposes read-only agent surfaces: the agent catalog, sitemap, and markdown alternates. The verification engine itself runs locally through the packaged CLI and MCP sidecars and does not expose a remote API.",
    "contact": {
      "name": "CodeVetter",
      "url": "https://codevetter.com"
    },
    "license": {
      "name": "ISC",
      "url": "https://github.com/Codevetter/codevetter/blob/main/LICENSE"
    }
  },
  "servers": [
    {
      "url": "https://codevetter.com"
    }
  ],
  "tags": [
    {
      "name": "agent-surfaces",
      "description": "Machine-readable public surfaces"
    }
  ],
  "paths": {
    "/api/ai": {
      "get": {
        "operationId": "getAgentCatalog",
        "tags": [
          "agent-surfaces"
        ],
        "summary": "Agent catalog",
        "description": "JSON inventory of public agent surfaces: llms.txt, llms-full.txt, sitemap, robots, and per-page markdown alternates.",
        "responses": {
          "200": {
            "description": "Agent catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentCatalog"
                }
              }
            }
          },
          "404": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "tags": [
          "agent-surfaces"
        ],
        "summary": "llms.txt index",
        "description": "Compact agent index following the llms.txt convention.",
        "responses": {
          "200": {
            "description": "Markdown index",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "operationId": "getLlmsFullTxt",
        "tags": [
          "agent-surfaces"
        ],
        "summary": "Full agent brief",
        "description": "Full canonical agent brief with product, architecture, and surface inventory.",
        "responses": {
          "200": {
            "description": "Markdown brief",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "operationId": "getSitemap",
        "tags": [
          "agent-surfaces"
        ],
        "summary": "Sitemap",
        "description": "XML sitemap listing all public HTML routes.",
        "responses": {
          "200": {
            "description": "XML sitemap",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApiSpec",
        "tags": [
          "agent-surfaces"
        ],
        "summary": "OpenAPI specification",
        "description": "This document.",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 spec",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentCatalog": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "llms": {
            "type": "string",
            "format": "uri"
          },
          "llmsFull": {
            "type": "string",
            "format": "uri"
          },
          "sitemap": {
            "type": "string",
            "format": "uri"
          },
          "robots": {
            "type": "string",
            "format": "uri"
          },
          "markdown": {
            "type": "object",
            "properties": {
              "suffix": {
                "type": "string"
              },
              "negotiation": {
                "type": "boolean"
              }
            }
          },
          "surfaces": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "md": {
                  "type": "string",
                  "format": "uri"
                },
                "kind": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "path": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "path"
            ]
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}