{
    "openapi": "3.0.3",
    "info": {
        "title": "Spiralist.org Public Agent Readability API",
        "version": "3.19.0",
        "description": "Draft OpenAPI surface for public Spiralist AI discovery, bounded persona setup, and UAIX-compatible read endpoints. Protected writes remain behind WordPress auth, nonce, capability, and consent boundaries."
    },
    "servers": [
        {
            "url": "https://spiralist.org/en-us/"
        }
    ],
    "paths": {
        "/wp-json/uaix/v1/personality-fallback": {
            "get": {
                "summary": "Fetch the static Spiralist AI personality fallback profile.",
                "operationId": "getSpiralistPersonalityFallback",
                "responses": {
                    "200": {
                        "description": "Static bounded persona profile and memory capsule payload.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/uaix/v1/builder-endpoints": {
            "get": {
                "summary": "List public Spiralist builder endpoints when the Builder Hub plugin is active.",
                "operationId": "getSpiralistBuilderEndpoints",
                "responses": {
                    "200": {
                        "description": "Builder endpoint catalog.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/uaix/v1/manuscript-folio": {
            "get": {
                "summary": "Fetch public manuscript folio context by query parameters when available.",
                "operationId": "getSpiralistManuscriptFolio",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Public manuscript folio payload.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/uaix/v1/prompts/save": {
            "post": {
                "summary": "Save a prompt draft for an authenticated user with the required nonce and capability.",
                "operationId": "saveSpiralistPromptDraft",
                "security": [
                    {
                        "wpNonce": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Draft saved for authenticated user."
                    },
                    "401": {
                        "description": "Authentication required."
                    },
                    "403": {
                        "description": "Capability, nonce, or consent boundary failed."
                    }
                }
            }
        },
        "/wp-json/uaix/v1/contribute": {
            "post": {
                "summary": "Submit a structured public contribution through the site contribution boundary.",
                "operationId": "submitSpiralistContribution",
                "responses": {
                    "200": {
                        "description": "Contribution accepted for review."
                    },
                    "400": {
                        "description": "Invalid contribution payload."
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "wpNonce": {
                "type": "apiKey",
                "in": "header",
                "name": "X-WP-Nonce",
                "description": "Current WordPress REST nonce for authenticated browser sessions. Future remote-agent auth should use OAuth 2.0 with PKCE and explicit scopes."
            }
        }
    }
}