{
  "openapi": "3.1.0",
  "info": {
    "title": "AnchorFact Machine API",
    "version": "0.3.0",
    "description": "Read-only static machine contract for AnchorFact verified claims, retrieval indexes, sources, and signed provenance.",
    "license": {
      "name": "MIT code / CC-BY-4.0 content",
      "url": "https://github.com/anchorfact/anchorfact/blob/main/LICENSE"
    }
  },
  "servers": [
    {
      "url": "https://anchorfact.org"
    }
  ],
  "x-anchorfact-schema-version": "anchorfact.openapi.v1",
  "x-generated": "2026-06-03T02:21:45.252Z",
  "x-provenance-url": "https://anchorfact.org/provenance.json",
  "paths": {
    "/agent.json": {
      "get": {
        "summary": "AI agent discovery profile",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentProfile"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/anchorfact.json": {
      "get": {
        "summary": "Well-known alias for the AI agent discovery profile",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentProfile"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "This OpenAPI machine contract",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiContract"
                }
              }
            }
          }
        }
      }
    },
    "/api": {
      "get": {
        "summary": "Compact live API discovery index",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiIndex"
                }
              }
            }
          }
        }
      }
    },
    "/artifact-summary.json": {
      "get": {
        "summary": "Lightweight static artifact size and alternative-call summary",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactSummary"
                }
              }
            }
          }
        }
      }
    },
    "/manifest.json": {
      "get": {
        "summary": "Public and draft article manifest",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Manifest"
                }
              }
            }
          }
        }
      }
    },
    "/claims.json": {
      "get": {
        "summary": "Public verified atomic claims",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Claims"
                }
              }
            }
          }
        }
      }
    },
    "/topics.json": {
      "get": {
        "summary": "Public topic coverage map",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Topics"
                }
              }
            }
          }
        }
      }
    },
    "/capabilities.json": {
      "get": {
        "summary": "AI capability router",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                }
              }
            }
          }
        }
      }
    },
    "/content-health.json": {
      "get": {
        "summary": "Signed corpus health summary",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentHealth"
                }
              }
            }
          }
        }
      }
    },
    "/coverage.json": {
      "get": {
        "summary": "AI coverage and limits guide",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Coverage"
                }
              }
            }
          }
        }
      }
    },
    "/examples.json": {
      "get": {
        "summary": "Executable AI usage examples",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Examples"
                }
              }
            }
          }
        }
      }
    },
    "/graph.json": {
      "get": {
        "summary": "Public knowledge graph",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Graph"
                }
              }
            }
          }
        }
      }
    },
    "/evals.json": {
      "get": {
        "summary": "Executable AI integration checks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Evals"
                }
              }
            }
          }
        }
      }
    },
    "/mcp.json": {
      "get": {
        "summary": "Local MCP installation manifest",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpProfile"
                }
              }
            }
          }
        }
      }
    },
    "/api/plan": {
      "get": {
        "summary": "Read-only AI query planner for AnchorFact coverage and next calls",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Natural-language query to plan against AnchorFact public coverage."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 3
            },
            "description": "Maximum article match count to include in the plan."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/evidence": {
      "get": {
        "summary": "Read-only public query evidence packs",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Natural-language query."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 5
            },
            "description": "Maximum evidence pack count."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "json",
                "markdown",
                "md"
              ],
              "default": "json"
            },
            "description": "Response format. JSON is the default; markdown returns answer-ready context text."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceApiResponse"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/context": {
      "get": {
        "summary": "Read-only AI prompt context with planning status, content health, and evidence packs",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Natural-language query."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 3
            },
            "description": "Maximum evidence pack count."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "json",
                "markdown",
                "md"
              ],
              "default": "json"
            },
            "description": "Response format. JSON is the default; markdown returns prompt-ready context text."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContextApiResponse"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/search": {
      "get": {
        "summary": "Read-only search over public AnchorFact records",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Natural-language query."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 5
            },
            "description": "Maximum result count."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/resolve": {
      "get": {
        "summary": "Read-only resolver for public AnchorFact references",
        "parameters": [
          {
            "name": "ref",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Claim id, article slug, source id, AnchorFact URL, or original source URL."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/resolve-batch": {
      "get": {
        "summary": "Read-only batch resolver for public AnchorFact references",
        "parameters": [
          {
            "name": "ref",
            "in": "query",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "maxItems": 20
            },
            "style": "form",
            "explode": true,
            "description": "Repeat this parameter for each claim id, article slug, source id, AnchorFact URL, or original source URL."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "json",
                "markdown",
                "md"
              ],
              "default": "json"
            },
            "description": "Response format. JSON is the default; markdown returns a compact resolution summary."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveBatchApiResponse"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/article": {
      "get": {
        "summary": "Read-only public article evidence bundle",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Canonical public article slug, such as ai/3d-generation-gaussian-splatting."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArticleApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/claim": {
      "get": {
        "summary": "Read-only public atomic claim lookup",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Public claim id, such as https://anchorfact.org/fact/f1. Shorthand ids such as f1 are also accepted."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/cite": {
      "get": {
        "summary": "Read-only citation export for one public atomic claim",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Public claim id, such as https://anchorfact.org/fact/f1. Shorthand ids such as f1 are also accepted."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "json",
                "markdown",
                "md"
              ],
              "default": "json"
            },
            "description": "Response format. JSON is the default; markdown returns answer-ready citation text."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiteApiResponse"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/source": {
      "get": {
        "summary": "Read-only public source lookup",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Source id from /sources.json, /api/article, or /api/claim, such as source:58200638706697c4."
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Original source URL. Either id or url is required."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/search-index.json": {
      "get": {
        "summary": "Compact public retrieval index",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchIndex"
                }
              }
            }
          }
        }
      }
    },
    "/sources.json": {
      "get": {
        "summary": "Deduplicated public source index",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sources"
                }
              }
            }
          }
        }
      }
    },
    "/provenance.json": {
      "get": {
        "summary": "Signed build provenance and artifact hashes",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provenance"
                }
              }
            }
          }
        }
      }
    },
    "/provenance.sig": {
      "get": {
        "summary": "Detached provenance signature",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvenanceSignature"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "LLM crawler index",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/{canonical_slug}/index.json": {
      "get": {
        "summary": "Per-article JSON-LD record",
        "parameters": [
          {
            "name": "canonical_slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Canonical public article slug, such as ai/transformer."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArticleJsonLd"
                }
              }
            }
          }
        }
      }
    },
    "/{canonical_slug}/index.md": {
      "get": {
        "summary": "Per-article Markdown",
        "parameters": [
          {
            "name": "canonical_slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/{canonical_slug}/index.txt": {
      "get": {
        "summary": "Per-article plain text",
        "parameters": [
          {
            "name": "canonical_slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/{canonical_slug}/index.ttl": {
      "get": {
        "summary": "Per-article Turtle RDF",
        "parameters": [
          {
            "name": "canonical_slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/turtle": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "OpenApiContract": {
        "type": "object",
        "required": [
          "openapi",
          "info",
          "paths"
        ],
        "properties": {
          "openapi": {
            "const": "3.1.0"
          },
          "info": {
            "type": "object"
          },
          "paths": {
            "type": "object"
          }
        },
        "additionalProperties": true
      },
      "AgentProfile": {
        "type": "object",
        "description": "Agent profile payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.agent.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "quick_start": {
            "$ref": "#/components/schemas/AgentQuickStart"
          }
        },
        "additionalProperties": true
      },
      "AgentQuickStart": {
        "type": "object",
        "description": "Smallest stable decision contract for AI consumers choosing an AnchorFact answer path.",
        "required": [
          "default_answer_path",
          "default_answer_mode",
          "citation_path",
          "trust_check",
          "fallback_policy"
        ],
        "properties": {
          "purpose": {
            "type": "string"
          },
          "default_answer_path": {
            "const": "/api/context?q={query}"
          },
          "default_answer_mode": {
            "enum": [
              "answer_with_citations"
            ]
          },
          "local_mcp_answer_tool": {
            "const": "anchorfact_context"
          },
          "citation_path": {
            "const": "/api/cite?id={claim_id}"
          },
          "primary_api_conversion": {
            "type": "object",
            "properties": {
              "target_ratio": {
                "type": "number"
              },
              "measured_as": {
                "type": "string"
              },
              "discovery_entrypoints": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "primary_entrypoints": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "next_call_after_discovery": {
                "type": "string"
              },
              "guidance": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "trust_check": {
            "type": "object",
            "properties": {
              "path": {
                "const": "/provenance.json"
              },
              "signature_path": {
                "const": "/provenance.sig"
              },
              "require_trusted_signature": {
                "type": "boolean"
              },
              "pinned_public_key_path": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "fallback_policy": {
            "type": "object",
            "properties": {
              "unsupported_answer_mode": {
                "enum": [
                  "external_sources_required"
                ]
              },
              "use_external_sources_when": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": true
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "do_not_use": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "ApiIndex": {
        "type": "object",
        "description": "API index payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.api-index.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "read_only": {
            "type": "boolean"
          },
          "ai_adoption_guidance": {
            "type": "object"
          },
          "recommended_sequence": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "primary_entrypoints": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "static_fallbacks": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "ArtifactSummary": {
        "type": "object",
        "description": "Artifact summary payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.artifact-summary.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "total_bytes": {
            "type": "integer"
          },
          "artifact_growth_policy": {
            "type": "object"
          },
          "recommended_default_calls": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "artifacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "Manifest": {
        "type": "object",
        "description": "Manifest payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.manifest.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "article_count": {
            "type": "integer"
          },
          "public_article_count": {
            "type": "integer"
          },
          "draft_article_count": {
            "type": "integer"
          },
          "articles": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "Claims": {
        "type": "object",
        "description": "Claims payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.claims.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "claim_count": {
            "type": "integer"
          },
          "claims": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "Topics": {
        "type": "object",
        "description": "Topics payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.topics.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "topic_count": {
            "type": "integer"
          },
          "public_article_count": {
            "type": "integer"
          },
          "public_claim_count": {
            "type": "integer"
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "Capabilities": {
        "type": "object",
        "description": "Capabilities payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.capabilities.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "capability_count": {
            "type": "integer"
          },
          "default_sequence": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "selection_rules": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "Coverage": {
        "type": "object",
        "description": "Coverage payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.coverage.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "coverage_summary": {
            "type": "object"
          },
          "topic_coverage": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "best_entrypoints": {
            "type": "object"
          },
          "recommended_decision_flow": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "coverage_limits": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "ContentHealth": {
        "type": "object",
        "description": "Content health payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.content-health.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "snapshot": {
            "type": "object"
          },
          "public": {
            "type": "object"
          },
          "draft": {
            "type": "object"
          },
          "machine_guidance": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "trust_boundaries": {
            "type": "object"
          }
        },
        "additionalProperties": true
      },
      "Examples": {
        "type": "object",
        "description": "Examples payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.examples.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "example_count": {
            "type": "integer"
          },
          "examples": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "Graph": {
        "type": "object",
        "description": "Graph payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.graph.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "public_article_count": {
            "type": "integer"
          },
          "public_claim_count": {
            "type": "integer"
          },
          "source_count": {
            "type": "integer"
          },
          "topic_count": {
            "type": "integer"
          },
          "node_count": {
            "type": "integer"
          },
          "edge_count": {
            "type": "integer"
          },
          "nodes": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "Evals": {
        "type": "object",
        "description": "Evals payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.evals.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "eval_count": {
            "type": "integer"
          },
          "evals": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "McpProfile": {
        "type": "object",
        "description": "MCP profile payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.mcp.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "name": {
            "type": "string"
          },
          "installation": {
            "type": "object"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "SearchIndex": {
        "type": "object",
        "description": "Search index payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.search-index.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "article_count": {
            "type": "integer"
          },
          "public_claim_count": {
            "type": "integer"
          },
          "records": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "SearchApiResponse": {
        "type": "object",
        "description": "Search API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.search-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "query": {
            "type": "string"
          },
          "limit": {
            "type": "integer"
          },
          "result_count": {
            "type": "integer"
          },
          "source_index_generated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "PlanApiResponse": {
        "type": "object",
        "description": "Plan API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.plan-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "query": {
            "type": "string"
          },
          "limit": {
            "type": "integer"
          },
          "coverage_status": {
            "enum": [
              "supported",
              "topic_supported",
              "unsupported",
              "site_help"
            ]
          },
          "should_use_anchorfact": {
            "type": "boolean"
          },
          "query_intent": {
            "enum": [
              "content",
              "site_help"
            ]
          },
          "unsupported_intent_reasons": {
            "type": "array",
            "items": {
              "enum": [
                "local_or_personalized",
                "live_or_time_sensitive"
              ]
            }
          },
          "confidence": {
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "matched_topics": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "matched_articles": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "recommended_next_calls": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "fallback_guidance": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "EvidenceApiResponse": {
        "type": "object",
        "description": "Evidence API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.evidence-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "query": {
            "type": "string"
          },
          "limit": {
            "type": "integer"
          },
          "result_count": {
            "type": "integer"
          },
          "citation_contract": {
            "type": "object"
          },
          "search_index_generated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "manifest_generated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "claims_generated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "source_index_generated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "packs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "ContextApiResponse": {
        "type": "object",
        "description": "Context API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.context-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "query": {
            "type": "string"
          },
          "limit": {
            "type": "integer"
          },
          "coverage_status": {
            "enum": [
              "supported",
              "topic_supported",
              "unsupported",
              "site_help"
            ]
          },
          "should_use_anchorfact": {
            "type": "boolean"
          },
          "query_intent": {
            "enum": [
              "content",
              "site_help"
            ]
          },
          "unsupported_intent_reasons": {
            "type": "array",
            "items": {
              "enum": [
                "local_or_personalized",
                "live_or_time_sensitive"
              ]
            }
          },
          "answer_policy": {
            "$ref": "#/components/schemas/AnswerPolicy"
          },
          "citation_ready_claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CitationReadyClaim"
            }
          },
          "evidence_pack_count": {
            "type": "integer"
          },
          "evidence_packs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "content_health": {
            "type": [
              "object",
              "null"
            ]
          },
          "recommended_next_calls": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "fallback_guidance": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      },
      "AnswerPolicy": {
        "type": "object",
        "description": "Machine decision telling agents whether AnchorFact can support a cited answer for the current query.",
        "required": [
          "can_answer_with_anchorfact",
          "answer_mode",
          "max_claims_to_cite",
          "required_action",
          "guardrails"
        ],
        "properties": {
          "can_answer_with_anchorfact": {
            "type": "boolean"
          },
          "answer_mode": {
            "enum": [
              "answer_with_citations",
              "external_sources_required",
              "api_guidance"
            ]
          },
          "max_claims_to_cite": {
            "type": "integer",
            "minimum": 0
          },
          "required_action": {
            "type": "string"
          },
          "unsupported_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "guardrails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "CitationReadyClaim": {
        "type": "object",
        "description": "Compact claim-level citation candidate extracted from context evidence packs.",
        "required": [
          "rank",
          "claim_id",
          "statement",
          "confidence",
          "canonical_slug",
          "source_url",
          "cite_api_path"
        ],
        "properties": {
          "rank": {
            "type": "integer",
            "minimum": 1
          },
          "claim_id": {
            "type": "string",
            "format": "uri"
          },
          "statement": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "enum": [
              "high",
              "medium",
              "low",
              null
            ]
          },
          "canonical_slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "article_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "article_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "source_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "source_tier": {
            "enum": [
              "S",
              "A",
              "B",
              "C",
              null
            ]
          },
          "source_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "anchorfact_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "cite_api_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "cite_api_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "citation_markdown": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "ResolveApiResponse": {
        "type": "object",
        "description": "Resolve API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.resolve-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "ref": {
            "type": "string"
          },
          "resolved_type": {
            "enum": [
              "article",
              "claim",
              "source"
            ]
          },
          "canonical_ref": {
            "type": "string"
          },
          "result_schema_version": {
            "type": "string"
          },
          "links": {
            "type": "object"
          },
          "result": {
            "type": "object"
          }
        },
        "additionalProperties": true
      },
      "ResolveBatchApiResponse": {
        "type": "object",
        "description": "Resolve batch API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.resolve-batch-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "reference_count": {
            "type": "integer"
          },
          "ok_count": {
            "type": "integer"
          },
          "error_count": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "ArticleApiResponse": {
        "type": "object",
        "description": "Article API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.article-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "canonical_slug": {
            "type": "string"
          },
          "article": {
            "type": "object"
          },
          "retrieval": {
            "type": [
              "object",
              "null"
            ]
          },
          "citation_contract": {
            "type": "object"
          },
          "claim_count": {
            "type": "integer"
          },
          "claims": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "citation_exports": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "source_count": {
            "type": "integer"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "ClaimApiResponse": {
        "type": "object",
        "description": "Claim API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.claim-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "claim_id": {
            "type": "string",
            "format": "uri"
          },
          "canonical_slug": {
            "type": "string"
          },
          "claim": {
            "type": "object"
          },
          "citation_contract": {
            "type": "object"
          },
          "citation_export": {
            "type": "object"
          },
          "article": {
            "type": "object"
          },
          "source_count": {
            "type": "integer"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "CiteApiResponse": {
        "type": "object",
        "description": "Citation API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.cite-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "claim_id": {
            "type": "string",
            "format": "uri"
          },
          "canonical_slug": {
            "type": "string"
          },
          "citation_contract": {
            "type": "object"
          },
          "citation_export": {
            "type": "object"
          },
          "claim": {
            "type": "object"
          },
          "article": {
            "type": "object"
          },
          "source": {
            "type": [
              "object",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "SourceApiResponse": {
        "type": "object",
        "description": "Source API response payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.source-api.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "source_id": {
            "type": "string"
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "source": {
            "type": "object"
          },
          "claim_count": {
            "type": "integer"
          },
          "claims": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "ApiError": {
        "type": "object",
        "required": [
          "schema_version",
          "error"
        ],
        "properties": {
          "schema_version": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "Sources": {
        "type": "object",
        "description": "Sources payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.sources.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "source_count": {
            "type": "integer"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      },
      "Provenance": {
        "type": "object",
        "description": "Provenance payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.provenance.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          },
          "artifacts": {
            "type": "object"
          },
          "signature": {
            "type": "object"
          }
        },
        "additionalProperties": true
      },
      "ProvenanceSignature": {
        "type": "object",
        "description": "Provenance signature payload.",
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "const": "anchorfact.provenance-signature.v1"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "provenance_url": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": true
      },
      "ArticleJsonLd": {
        "type": "object",
        "required": [
          "@context",
          "@type",
          "@id",
          "url",
          "headline",
          "anchorfact:status"
        ],
        "properties": {
          "@context": {
            "const": "https://schema.org"
          },
          "@type": {
            "type": "string"
          },
          "@id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "headline": {
            "type": "string"
          },
          "anchorfact:status": {
            "enum": [
              "public",
              "draft"
            ]
          },
          "anchorfact:confidence": {
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "anchorfact:verification": {
            "type": "object"
          },
          "citation": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "additionalProperties": true
      }
    }
  }
}