{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Prayer Guide Agent Resources",
    "version": "1.0.0",
    "summary": "Read-only Prayer Guide content and discovery resources.",
    "description": "This document describes the public, read-only HTTP resources on Prayer Guide. The site has no write operations, authentication flow, transactional API, or MCP server.",
    "termsOfService": "https://prayerguide.co.uk/terms",
    "license": {
      "name": "Prayer Guide terms",
      "url": "https://prayerguide.co.uk/terms"
    }
  },
  "servers": [
    {
      "url": "https://prayerguide.co.uk",
      "description": "Canonical Prayer Guide site"
    }
  ],
  "externalDocs": {
    "description": "Prayer Guide developer and agent resources",
    "url": "https://prayerguide.co.uk/developers"
  },
  "security": [],
  "tags": [
    {
      "name": "Discovery",
      "description": "Indexes and instructions for agents."
    },
    {
      "name": "Content",
      "description": "Published prayer guide content."
    }
  ],
  "paths": {
    "/openapi.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Get this OpenAPI description",
        "operationId": "getOpenApiDescription",
        "responses": {
          "200": {
            "description": "The OpenAPI description for Prayer Guide public resources.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    },
    "/agent-routes.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Get the route manifest",
        "operationId": "getAgentRouteManifest",
        "responses": {
          "200": {
            "description": "HTML and Markdown route pairs with content metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRouteManifest"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Get the short agent index",
        "operationId": "getLlmsIndex",
        "responses": {
          "200": {
            "description": "A short index of Prayer Guide pages and agent resources.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Get all public page text",
        "operationId": "getLlmsFullText",
        "responses": {
          "200": {
            "description": "The full text of all indexable Prayer Guide pages.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    },
    "/agent-instructions.md": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Get agent instructions",
        "operationId": "getAgentInstructions",
        "responses": {
          "200": {
            "description": "When-to-use, access, recovery, and safety guidance.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    },
    "/.well-known/agent-skills/index.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Get the Agent Skills index",
        "operationId": "getAgentSkillsIndex",
        "responses": {
          "200": {
            "description": "The public Agent Skills discovery index.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    },
    "/.well-known/agent-skills/prayer-guide/SKILL.md": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Get the Prayer Guide agent skill",
        "operationId": "getPrayerGuideAgentSkill",
        "responses": {
          "200": {
            "description": "Instructions for agents that use Prayer Guide content.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Get the XML sitemap index",
        "operationId": "getSitemap",
        "responses": {
          "200": {
            "description": "The sitemap index for indexable Prayer Guide HTML pages.",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    },
    "/guides/{slug}": {
      "get": {
        "tags": [
          "Content"
        ],
        "summary": "Get a prayer guide",
        "description": "Returns HTML by default. Send Accept: text/markdown to request the matching Markdown file.",
        "operationId": "getPrayerGuide",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "A published Prayer Guide guide slug.",
            "schema": {
              "type": "string",
              "enum": [
                "acts-prayer",
                "christmas-prayer",
                "daily-prayer",
                "evening-prayer",
                "family-prayer",
                "finding-time-to-pray",
                "hearing-god-in-prayer",
                "how-to-pray",
                "intercessory-prayer",
                "lords-prayer",
                "mealtime-prayers",
                "morning-prayer",
                "prayer-before-bed",
                "prayer-for-anxiety",
                "prayer-for-children",
                "prayer-for-family",
                "prayer-for-forgiveness",
                "prayer-for-friend",
                "prayer-for-grief",
                "prayer-for-guidance",
                "prayer-for-healing",
                "prayer-for-protection",
                "prayer-for-sleep",
                "prayer-for-spouse",
                "prayer-for-strength",
                "prayer-group",
                "prayer-journal",
                "prayer-with-children",
                "serenity-prayer",
                "st-francis-prayer",
                "wandering-thoughts-in-prayer",
                "when-prayer-feels-hard"
              ]
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "required": false,
            "description": "The preferred response format.",
            "schema": {
              "type": "string",
              "enum": [
                "text/html",
                "text/markdown"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A published prayer guide.",
            "headers": {
              "Vary": {
                "description": "Shows that the response can vary by Accept header.",
                "schema": {
                  "type": "string",
                  "const": "Accept"
                }
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    },
    "/guides/{slug}.md": {
      "get": {
        "tags": [
          "Content"
        ],
        "summary": "Get a prayer guide as Markdown",
        "operationId": "getPrayerGuideMarkdown",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "A published Prayer Guide guide slug.",
            "schema": {
              "type": "string",
              "enum": [
                "acts-prayer",
                "christmas-prayer",
                "daily-prayer",
                "evening-prayer",
                "family-prayer",
                "finding-time-to-pray",
                "hearing-god-in-prayer",
                "how-to-pray",
                "intercessory-prayer",
                "lords-prayer",
                "mealtime-prayers",
                "morning-prayer",
                "prayer-before-bed",
                "prayer-for-anxiety",
                "prayer-for-children",
                "prayer-for-family",
                "prayer-for-forgiveness",
                "prayer-for-friend",
                "prayer-for-grief",
                "prayer-for-guidance",
                "prayer-for-healing",
                "prayer-for-protection",
                "prayer-for-sleep",
                "prayer-for-spouse",
                "prayer-for-strength",
                "prayer-group",
                "prayer-journal",
                "prayer-with-children",
                "serenity-prayer",
                "st-francis-prayer",
                "wandering-thoughts-in-prayer",
                "when-prayer-feels-hard"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A published prayer guide in Markdown.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundHtml"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "NotFoundHtml": {
        "description": "The page does not exist. The HTML response links to /404.md, /llms.txt, and /sitemap.xml for recovery.",
        "content": {
          "text/html": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "schemas": {
      "AgentRoutePage": {
        "type": "object",
        "required": [
          "canonical",
          "description",
          "htmlPath",
          "language",
          "markdownPath",
          "noindex",
          "sha256",
          "title"
        ],
        "properties": {
          "canonical": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "htmlPath": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "markdownPath": {
            "type": "string"
          },
          "noindex": {
            "type": "boolean"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "title": {
            "type": "string"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0
          },
          "tokens": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "AgentRouteManifest": {
        "type": "object",
        "required": [
          "version",
          "site",
          "pages"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "const": 1
          },
          "site": {
            "type": "string",
            "format": "uri"
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentRoutePage"
            }
          }
        }
      }
    }
  }
}
