{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://acidstudios.ro/schemas/ai-context/1.0.json",
    "title": "ai-context.json 1.0",
    "description": "The machine readable profile of a website: the same facts llms.txt states in prose, in a shape a program can load without parsing text. Published at /ai-context.json by the Acid AEO WordPress plugin. Two promises: the twelve top level members are always present and always in this order, and every value that is present is one the site owner filled in - empty values are dropped rather than published as empty strings, at every depth. A 0, a 0.0 coordinate and a false are answers and are kept. This is not schema.org and carries no @context; the field names borrow schema.org's vocabulary where one exists, so a consumer can map the two without a lookup table. Inside a major version members may be added; a member is never renamed or given a new meaning, so a consumer should ignore members it does not know.",
    "type": "object",
    "required": [
        "$schema",
        "version",
        "generated",
        "language",
        "instructions",
        "organization",
        "offerings",
        "keyPages",
        "faq",
        "contact",
        "policy",
        "links"
    ],
    "additionalProperties": true,
    "properties": {
        "$schema": {
            "description": "This document's schema. Fixed.",
            "type": "string",
            "format": "uri",
            "const": "https://acidstudios.ro/schemas/ai-context/1.0.json"
        },
        "version": {
            "description": "Schema version.",
            "type": "string",
            "pattern": "^1\\.[0-9]+$"
        },
        "generated": {
            "description": "The UTC day the document was rendered. May be an empty string when the generator was given none.",
            "type": "string",
            "anyOf": [
                { "const": "" },
                { "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" }
            ]
        },
        "language": {
            "description": "The site's main language, as a BCP 47 primary subtag (e.g. \"ro\"). May be an empty string.",
            "type": "string"
        },
        "instructions": {
            "description": "How to treat the document. Always present, always with all three members.",
            "type": "object",
            "required": ["purpose", "confidence", "generator"],
            "additionalProperties": true,
            "properties": {
                "purpose": {
                    "description": "What the document is for, naming the organization when one is set.",
                    "type": "string"
                },
                "confidence": {
                    "description": "How much the reader may trust the document.",
                    "type": "string"
                },
                "generator": {
                    "description": "The software that wrote the file, e.g. \"Acid AEO 1.0.2\".",
                    "type": "string"
                }
            }
        },
        "organization": {
            "description": "Who the site belongs to. Every member is optional and omitted when unset; the section is {} when nothing is set.",
            "type": "object",
            "additionalProperties": true,
            "properties": {
                "name": { "description": "Public name of the organization or person.", "type": "string" },
                "legalName": { "description": "Registered legal name, when it differs.", "type": "string" },
                "alternateName": { "description": "Another name the site is known by.", "type": "string" },
                "url": { "description": "Site home page.", "type": "string", "format": "uri" },
                "logo": { "description": "Full size logo, falling back to the site icon.", "type": "string", "format": "uri" },
                "description": { "description": "One paragraph about the organization.", "type": "string" },
                "email": { "description": "Public email address.", "type": "string" },
                "telephone": { "description": "Public phone number, as typed.", "type": "string" },
                "foundingDate": {
                    "description": "When the organization started.",
                    "type": "string",
                    "pattern": "^[0-9]{4}(-[0-9]{2}-[0-9]{2})?$"
                },
                "taxID": { "description": "VAT or tax registration number.", "type": "string" },
                "address": {
                    "description": "Postal address. Each member is omitted when unset.",
                    "type": "object",
                    "additionalProperties": true,
                    "properties": {
                        "streetAddress": { "type": "string" },
                        "addressLocality": { "type": "string" },
                        "addressRegion": { "type": "string" },
                        "postalCode": { "type": "string" },
                        "addressCountry": { "type": "string" }
                    }
                },
                "geo": {
                    "description": "Coordinates. Omitted entirely when both are 0, which is the settings default rather than a place.",
                    "type": "object",
                    "required": ["latitude", "longitude"],
                    "additionalProperties": true,
                    "properties": {
                        "latitude": { "type": "number", "minimum": -90, "maximum": 90 },
                        "longitude": { "type": "number", "minimum": -180, "maximum": 180 }
                    }
                },
                "openingHours": {
                    "description": "Schema.org opening hours specifications, e.g. \"Mo-Fr 09:00-18:00\".",
                    "type": "array",
                    "items": { "type": "string" }
                },
                "priceRange": { "description": "A price range, written the way schema.org writes one.", "type": "string" },
                "areaServed": {
                    "description": "Places the organization serves.",
                    "type": "array",
                    "items": { "type": "string" }
                },
                "knowsLanguage": {
                    "description": "Language tags the organization works in.",
                    "type": "array",
                    "items": { "type": "string" }
                },
                "sameAs": {
                    "description": "Profiles elsewhere that are the same entity.",
                    "type": "array",
                    "items": { "type": "string", "format": "uri" }
                },
                "founder": {
                    "description": "The person behind the site.",
                    "type": "object",
                    "additionalProperties": true,
                    "properties": {
                        "name": { "type": "string" },
                        "url": { "description": "Author archive.", "type": "string", "format": "uri" }
                    }
                }
            }
        },
        "offerings": {
            "description": "What the site sells, in the order the site owner chose. [] when nothing is listed.",
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                    "name": { "description": "Offering name.", "type": "string" },
                    "url": { "description": "Page describing it.", "type": "string", "format": "uri" },
                    "summary": { "description": "One or two sentences.", "type": "string" },
                    "priceFrom": {
                        "description": "Lowest price, in the currency named below. Omitted when it is not above 0, which is the settings default rather than a free service.",
                        "type": "number",
                        "exclusiveMinimum": 0
                    },
                    "currency": {
                        "description": "ISO 4217 currency of priceFrom.",
                        "type": "string",
                        "pattern": "^[A-Z]{3}$"
                    },
                    "delivery": { "description": "Lead time or delivery terms, as typed.", "type": "string" }
                }
            }
        },
        "keyPages": {
            "description": "The pages a reader - or an agent - should start from, in the order the site owner chose.",
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                    "title": { "description": "Page title.", "type": "string" },
                    "url": { "description": "Absolute URL.", "type": "string", "format": "uri" },
                    "summary": { "description": "The page's TL;DR, hand written or derived from its content.", "type": "string" }
                }
            }
        },
        "faq": {
            "description": "The site wide FAQ followed by the FAQ of every key page.",
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                    "question": { "type": "string" },
                    "answer": { "type": "string" }
                }
            }
        },
        "contact": {
            "description": "How to reach a human. {} when nothing is set.",
            "type": "object",
            "additionalProperties": true,
            "properties": {
                "email": { "type": "string" },
                "telephone": { "type": "string" },
                "address": { "description": "The postal address on one line, comma separated.", "type": "string" },
                "openingHours": {
                    "description": "Same values as organization.openingHours.",
                    "type": "array",
                    "items": { "type": "string" }
                }
            }
        },
        "policy": {
            "description": "How the content may be used. The authoritative statement of the same policy is robots.txt plus the Content-Signal header; this section mirrors it.",
            "type": "object",
            "additionalProperties": true,
            "properties": {
                "preset": {
                    "description": "The policy preset the site owner chose.",
                    "type": "string",
                    "enum": ["citable", "search_only", "open", "closed", "custom"]
                },
                "contentSignal": {
                    "description": "The Content-Signal value, e.g. \"search=yes, ai-input=yes, ai-train=no\".",
                    "type": "string"
                },
                "license": { "description": "Human readable licence, or the site's own terms.", "type": "string" },
                "licenseUrl": { "description": "Licence text, when the licence has one.", "type": "string", "format": "uri" },
                "permissionsContact": { "description": "Who to ask for permissions beyond the licence.", "type": "string" }
            }
        },
        "links": {
            "description": "Absolute URLs of the site's other machine readable files. A file whose module is switched off is not linked, so no member here is ever a dead link.",
            "type": "object",
            "additionalProperties": true,
            "properties": {
                "llms": { "description": "/llms.txt", "type": "string", "format": "uri" },
                "llmsFull": { "description": "/llms-full.txt", "type": "string", "format": "uri" },
                "humans": { "description": "/humans.txt", "type": "string", "format": "uri" },
                "security": { "description": "/.well-known/security.txt", "type": "string", "format": "uri" },
                "sitemap": { "description": "XML sitemap.", "type": "string", "format": "uri" },
                "feed": { "description": "RSS feed.", "type": "string", "format": "uri" },
                "aiPolicy": { "description": "/ai.txt", "type": "string", "format": "uri" }
            }
        }
    }
}
