{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/programmes-net/json-schema/programmes-net-robots-txt-build-schema.json",
  "title": "robots-txt.build",
  "description": "Build robots.txt: allow or block search engines, AI answer engines/assistants and AI training crawlers (named), with Content-Signal and Sitemap lines.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/programmes-net-openapi.json#/components/schemas/robots-txt.build",
  "type": "object",
  "properties": {
    "operation": {
      "const": "build"
    },
    "input": {
      "type": "string",
      "description": "One item per line: sitemap URLs (https://…) and paths every crawler should skip (/admin/). May be empty.",
      "maxLength": 4096
    },
    "options": {
      "type": "object",
      "properties": {
        "search": {
          "type": "string",
          "description": "Search engines and every crawler not named (the * group).",
          "enum": [
            "allow",
            "block"
          ],
          "default": "allow"
        },
        "aiAnswer": {
          "type": "string",
          "description": "AI answer engines and assistants that fetch pages to answer a question.",
          "enum": [
            "allow",
            "block"
          ],
          "default": "allow"
        },
        "aiTrain": {
          "type": "string",
          "description": "Crawlers that collect text to train AI models.",
          "enum": [
            "allow",
            "block"
          ],
          "default": "block"
        },
        "contentSignal": {
          "type": "boolean",
          "description": "Add contentsignals.org Content-Signal lines matching the choices.",
          "default": true
        }
      }
    }
  },
  "required": [
    "operation"
  ]
}