{
  "components": {
    "headers": {
      "API-Version": {
        "description": "Version of the API that served the response.",
        "schema": {
          "example": "2.1.0",
          "type": "string"
        }
      },
      "Deprecation": {
        "description": "RFC 9745 deprecation timestamp when an endpoint is scheduled for replacement.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Limit": {
        "description": "Maximum number of requests permitted in the current rate-limit window.",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "RateLimit-Policy": {
        "description": "IETF RateLimit policy declaration (for example `600;w=60`).",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Remaining": {
        "description": "Number of requests remaining in the current rate-limit window.",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the rate-limit quota resets.",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying after a 429 Too Many Requests response.",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "Sunset": {
        "description": "RFC 8594 HTTP-date after which a deprecated endpoint will be removed (at least 90 days notice).",
        "schema": {
          "type": "string"
        }
      }
    },
    "parameters": {
      "ApiVersion": {
        "description": "Requested API version label (defaults to the current stable version).",
        "in": "header",
        "name": "API-Version",
        "required": false,
        "schema": {
          "default": "2.1.0",
          "type": "string"
        }
      }
    },
    "schemas": {
      "ProblemDetails": {
        "properties": {
          "code": {
            "description": "Machine-readable error code.",
            "type": "string"
          },
          "detail": {
            "description": "Explanation of this specific error.",
            "type": "string"
          },
          "hint": {
            "description": "Actionable recovery guidance for callers.",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code.",
            "type": "integer"
          },
          "title": {
            "description": "Short summary of the error.",
            "type": "string"
          },
          "type": {
            "description": "Stable URI identifying the error class.",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "description": "Least-privilege OAuth 2.1 scopes for authenticated operations; public read operations also accept anonymous requests.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://plan.ferrite.run/oauth/authorize",
            "scopes": {
              "apps:discover": "Discover available operations, schemas, and public metadata.",
              "apps:read": "Read-only access to declared GET and read-only operations.",
              "apps:write": "Invoke mutating operations and asynchronous jobs."
            },
            "tokenUrl": "https://plan.ferrite.run/oauth/token"
          }
        },
        "type": "oauth2"
      }
    }
  },
  "info": {
    "description": "Plan Studio is a set of planning rooms that people and agents share. Each room holds one plan in Markdown, with chat, comments anchored to the words they are about, proposals from demo agents, and the plan's published revisions. Use it to read a plan, comment on it, ask for a proposal, review one or publish a revision. Publishing names the revision it was based on, so a change never overwrites work its author had not seen.\n\nVersioning and deprecation policy: endpoints are versioned via URL path and the optional `API-Version` header (current version: 2.1.0). Deprecated endpoints emit RFC 9745 `Deprecation` and RFC 8594 `Sunset` response headers at least 90 days before removal. Rate limits are communicated via IETF `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, `RateLimit-Policy`, and `Retry-After` headers.",
    "title": "fe-plan-studio",
    "version": "2.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/rooms": {
      "get": {
        "operationId": "get_rooms",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The rooms list.",
                  "properties": {
                    "agents": {
                      "description": "The agents any room may call on.",
                      "items": {
                        "description": "One agent that can be asked to review a plan. Agents are deterministic reviewers declared in the server: an agent PROPOSES a revision as a suggestion and never edits the plan silently.",
                        "properties": {
                          "focus": {
                            "description": "What this agent looks for in a plan.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The agent id, as request_suggestion takes it.",
                            "type": "string"
                          },
                          "name": {
                            "description": "Its full name, as it signs chat messages.",
                            "type": "string"
                          },
                          "short_name": {
                            "description": "The short name a compact UI shows.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "short_name",
                          "focus"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "rooms": {
                      "description": "Every room, most recently changed first.",
                      "items": {
                        "description": "One room in the list.",
                        "properties": {
                          "chat_count": {
                            "description": "How many chat messages the room holds.",
                            "type": "integer"
                          },
                          "excerpt": {
                            "description": "The first paragraph of the plan, for the card.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The room id.",
                            "type": "string"
                          },
                          "idle_minutes": {
                            "description": "How long ago that was, in whole minutes.",
                            "type": "integer"
                          },
                          "labelled_versions": {
                            "description": "How many labelled versions the history carries.",
                            "type": "integer"
                          },
                          "open_comments": {
                            "description": "How many comments are still open.",
                            "type": "integer"
                          },
                          "open_suggestions": {
                            "description": "How many agent suggestions are awaiting review.",
                            "type": "integer"
                          },
                          "participants": {
                            "description": "The people and agents who have spoken or published here.",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "revision": {
                            "description": "The current published revision, zero before anything is published.",
                            "type": "integer"
                          },
                          "title": {
                            "description": "Its title.",
                            "type": "string"
                          },
                          "updated_at_ms": {
                            "description": "When the room last changed.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "excerpt",
                          "revision",
                          "chat_count",
                          "open_comments",
                          "open_suggestions",
                          "labelled_versions",
                          "participants",
                          "updated_at_ms",
                          "idle_minutes"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "total": {
                      "description": "The total count.",
                      "type": "string"
                    },
                    "truncated": {
                      "description": "Whether the list read hit its ceiling.",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "rooms",
                    "total",
                    "truncated",
                    "agents"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "List every open planning room, most recently changed first. Use it first to find a room id. Returns each room's title, excerpt, revision, comment and suggestion counts and participants, plus the demo agents a room can ask.",
        "x-idempotent": true,
        "x-read-only": true
      },
      "post": {
        "operationId": "create_room",
        "parameters": [
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "author": {
                    "description": "the display name to open the room under, up to 64 characters",
                    "examples": [
                      "Ada Lovelace"
                    ],
                    "type": "string"
                  },
                  "body": {
                    "description": "the opening plan in Markdown, up to 40,000 characters; leave out to open an empty room",
                    "examples": [
                      "# Goal\n\nTry every operation once."
                    ],
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "the room's title, up to 120 characters",
                    "examples": [
                      "Try the planning API"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "title",
                  "author"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What a room mutation answers with.",
                  "properties": {
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "revision": {
                      "description": "Its current revision.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "Its title.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "revision"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Open a planning room. Use it when no existing room covers the subject; pass body to publish an opening plan as revision 1. Returns the new room's id, title and revision. Everyone can read the room.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}": {
      "get": {
        "operationId": "get_room",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-1"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A room, as the room screen renders it.",
                  "properties": {
                    "activity": {
                      "description": "The most recent audit entries, newest first.",
                      "items": {
                        "description": "One entry of the room's hash-chained audit trail.",
                        "properties": {
                          "actor": {
                            "description": "Who did it.",
                            "type": "string"
                          },
                          "at_ms": {
                            "description": "When.",
                            "type": "string"
                          },
                          "hash": {
                            "description": "The entry's hash, which binds it to its predecessor.",
                            "type": "string"
                          },
                          "kind": {
                            "description": "What happened, for example comment_created.",
                            "type": "string"
                          },
                          "seq": {
                            "description": "Its sequence, one-based.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "seq",
                          "kind",
                          "actor",
                          "at_ms",
                          "hash"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "archived": {
                      "description": "Whether the room is archived: kept whole, left out of the rooms list, and closed to changes until it is restored.",
                      "type": "boolean"
                    },
                    "body": {
                      "description": "The published plan, as Markdown.",
                      "type": "string"
                    },
                    "can_archive": {
                      "description": "Whether the caller may archive or restore it: the person who opened the room (the same signed-in account or browser), or the app's administrator.",
                      "type": "boolean"
                    },
                    "chat": {
                      "description": "The most recent chat, oldest first.",
                      "items": {
                        "description": "One chat message.",
                        "properties": {
                          "actor_kind": {
                            "description": "Who said something.",
                            "enum": [
                              "Human",
                              "Agent"
                            ],
                            "type": "string"
                          },
                          "at_ms": {
                            "description": "When it was posted.",
                            "type": "string"
                          },
                          "author": {
                            "description": "The display name it was posted under.",
                            "type": "string"
                          },
                          "body": {
                            "description": "The text.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The message id.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "actor_kind",
                          "author",
                          "body",
                          "at_ms"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "chat_total": {
                      "description": "How many messages the room holds in total.",
                      "type": "integer"
                    },
                    "comments": {
                      "description": "Every comment, oldest first.",
                      "items": {
                        "description": "One comment on the plan.",
                        "properties": {
                          "anchor": {
                            "description": "Where in the plan a comment points. A range over the published body in CHARACTERS, plus the text it covered when the comment was made. The server validates the range against the body it holds, and reports when a later revision has moved the text from under the comment.",
                            "properties": {
                              "end": {
                                "description": "The last character, exclusive.",
                                "type": "integer"
                              },
                              "quote": {
                                "description": "The text the range covered when the comment was made.",
                                "type": "string"
                              },
                              "stale": {
                                "description": "Whether the current body no longer holds that text at that range.",
                                "type": "boolean"
                              },
                              "start": {
                                "description": "The first character, inclusive.",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "start",
                              "end",
                              "quote",
                              "stale"
                            ],
                            "type": "object"
                          },
                          "at_ms": {
                            "description": "When it was posted.",
                            "type": "string"
                          },
                          "author": {
                            "description": "Who wrote it.",
                            "type": "string"
                          },
                          "body": {
                            "description": "The text.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The comment id.",
                            "type": "string"
                          },
                          "resolved_at_ms": {
                            "description": "When it was resolved.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resolved_by": {
                            "description": "Who resolved it, when resolved.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "description": "A comment's lifecycle.",
                            "enum": [
                              "Open",
                              "Resolved"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "author",
                          "body",
                          "anchor",
                          "status",
                          "at_ms"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "created_at_ms": {
                      "description": "When the room was opened.",
                      "type": "string"
                    },
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "idle_minutes": {
                      "description": "How long ago that was, in whole minutes.",
                      "type": "integer"
                    },
                    "open_suggestions": {
                      "description": "How many agent suggestions await review.",
                      "type": "integer"
                    },
                    "revision": {
                      "description": "The current revision, zero before anything is published.",
                      "type": "integer"
                    },
                    "revisions": {
                      "description": "The revision history, newest first, bodies omitted.",
                      "items": {
                        "description": "One published revision, without its body.",
                        "properties": {
                          "at_ms": {
                            "description": "When it was published.",
                            "type": "string"
                          },
                          "author": {
                            "description": "Who published it.",
                            "type": "string"
                          },
                          "label": {
                            "description": "The version label, when someone snapshotted this revision.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "length": {
                            "description": "How many characters the body held.",
                            "type": "integer"
                          },
                          "note": {
                            "description": "The publish note, when the author left one.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "seq": {
                            "description": "Its sequence, one-based.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "seq",
                          "author",
                          "at_ms",
                          "length"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "suggestions_total": {
                      "description": "How many suggestions the room has ever received.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "Its title.",
                      "type": "string"
                    },
                    "updated_at_ms": {
                      "description": "When the room last changed.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "body",
                    "revision",
                    "revisions",
                    "chat",
                    "chat_total",
                    "comments",
                    "open_suggestions",
                    "suggestions_total",
                    "activity",
                    "created_at_ms",
                    "updated_at_ms",
                    "idle_minutes",
                    "archived",
                    "can_archive"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Read one room. Use it before commenting on or changing a plan. Returns the published plan as Markdown, its current revision, recent chat, every comment with the text it is anchored to, and recent activity.",
        "x-idempotent": true,
        "x-read-only": true
      }
    },
    "/api/rooms/{id}/archive": {
      "post": {
        "operationId": "archive_room",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-4"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "archived": {
                    "description": "true to archive, false to restore",
                    "examples": [
                      true
                    ],
                    "type": "boolean"
                  },
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-4"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "archived"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What a room mutation answers with.",
                  "properties": {
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "revision": {
                      "description": "Its current revision.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "Its title.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "revision"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Archive a room, or restore an archived one. Use it when a plan is finished: the room keeps everything, leaves get_rooms and refuses changes until it is restored. Returns the room. Only the browser or account that opened it, or the app's administrator, may; anyone else gets 403.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}/chat": {
      "post": {
        "operationId": "post_chat",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-4"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "author": {
                    "description": "the display name to post under",
                    "examples": [
                      "Ada Lovelace"
                    ],
                    "type": "string"
                  },
                  "body": {
                    "description": "the message, up to 4,000 characters",
                    "examples": [
                      "Reading the plan now."
                    ],
                    "type": "string"
                  },
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-4"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "author",
                  "body"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "One chat message.",
                  "properties": {
                    "actor_kind": {
                      "description": "Who said something.",
                      "enum": [
                        "Human",
                        "Agent"
                      ],
                      "type": "string"
                    },
                    "at_ms": {
                      "description": "When it was posted.",
                      "type": "string"
                    },
                    "author": {
                      "description": "The display name it was posted under.",
                      "type": "string"
                    },
                    "body": {
                      "description": "The text.",
                      "type": "string"
                    },
                    "id": {
                      "description": "The message id.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "actor_kind",
                    "author",
                    "body",
                    "at_ms"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Post a message to a room's chat. Use it for a question or a remark about the whole plan; use post_comment for exact words. Returns the stored message with its id and time.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}/comments": {
      "post": {
        "operationId": "post_comment",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-4"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "author": {
                    "description": "the display name to comment under",
                    "examples": [
                      "Ada Lovelace"
                    ],
                    "type": "string"
                  },
                  "body": {
                    "description": "the comment, up to 4,000 characters",
                    "examples": [
                      "Is this still the right name?"
                    ],
                    "type": "string"
                  },
                  "end": {
                    "description": "the character after the last one in the range",
                    "examples": [
                      12
                    ],
                    "type": "integer"
                  },
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-4"
                    ],
                    "type": "string"
                  },
                  "start": {
                    "description": "the first character of the range, counting from 0",
                    "examples": [
                      2
                    ],
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "author",
                  "body",
                  "start",
                  "end"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "One comment on the plan.",
                  "properties": {
                    "anchor": {
                      "description": "Where in the plan a comment points. A range over the published body in CHARACTERS, plus the text it covered when the comment was made. The server validates the range against the body it holds, and reports when a later revision has moved the text from under the comment.",
                      "properties": {
                        "end": {
                          "description": "The last character, exclusive.",
                          "type": "integer"
                        },
                        "quote": {
                          "description": "The text the range covered when the comment was made.",
                          "type": "string"
                        },
                        "stale": {
                          "description": "Whether the current body no longer holds that text at that range.",
                          "type": "boolean"
                        },
                        "start": {
                          "description": "The first character, inclusive.",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "start",
                        "end",
                        "quote",
                        "stale"
                      ],
                      "type": "object"
                    },
                    "at_ms": {
                      "description": "When it was posted.",
                      "type": "string"
                    },
                    "author": {
                      "description": "Who wrote it.",
                      "type": "string"
                    },
                    "body": {
                      "description": "The text.",
                      "type": "string"
                    },
                    "id": {
                      "description": "The comment id.",
                      "type": "string"
                    },
                    "resolved_at_ms": {
                      "description": "When it was resolved.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resolved_by": {
                      "description": "Who resolved it, when resolved.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "description": "A comment's lifecycle.",
                      "enum": [
                        "Open",
                        "Resolved"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "author",
                    "body",
                    "anchor",
                    "status",
                    "at_ms"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Comment on a range of characters in the published plan. Use it after get_room, counting characters in its body. Returns the comment with the quoted text the range covered, or 400 when the range is outside the plan.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}/comments/{comment_id}/resolve": {
      "post": {
        "operationId": "resolve_comment",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-4"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "description": "the comment id, from get_room",
              "examples": [
                "c-3"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "actor": {
                    "description": "the display name of whoever resolves it",
                    "examples": [
                      "Ada Lovelace"
                    ],
                    "type": "string"
                  },
                  "comment_id": {
                    "description": "the comment id, from get_room",
                    "examples": [
                      "c-3"
                    ],
                    "type": "string"
                  },
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-4"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "comment_id",
                  "actor"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What a comment mutation answers with.",
                  "properties": {
                    "comment_id": {
                      "description": "The comment id.",
                      "type": "string"
                    },
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "status": {
                      "description": "A comment's lifecycle.",
                      "enum": [
                        "Open",
                        "Resolved"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "comment_id",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Mark a comment as dealt with. Use it when the plan or a reply has answered the comment. Returns the comment's status; resolving one that is already resolved succeeds and changes nothing.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}/draft": {
      "post": {
        "operationId": "save_draft",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-4"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "base_revision": {
                    "description": "the revision the draft started from, from get_editor",
                    "examples": [
                      1
                    ],
                    "minimum": 0,
                    "type": "integer"
                  },
                  "body": {
                    "description": "the whole plan as you want it, in Markdown",
                    "examples": [
                      "# Q3 roadmap\n\nOne owner for every bet."
                    ],
                    "type": "string"
                  },
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-4"
                    ],
                    "type": "string"
                  },
                  "owner": {
                    "description": "a display handle echoed back in the answer; it never selects another person's draft",
                    "examples": [
                      "ada"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "owner",
                  "body",
                  "base_revision"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What a draft mutation answers with.",
                  "properties": {
                    "behind": {
                      "description": "Whether someone published since the draft was started.",
                      "type": "boolean"
                    },
                    "draft_differs": {
                      "description": "Whether it differs from the published body.",
                      "type": "boolean"
                    },
                    "has_draft": {
                      "description": "Whether a draft is now open.",
                      "type": "boolean"
                    },
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "owner": {
                      "description": "Whose draft.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "owner",
                    "has_draft",
                    "draft_differs",
                    "behind"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Save the caller's private draft of a plan without publishing it. Use it to work on a change over several calls; it needs the browser's own cookie or a signed-in session and answers 401 without one. Returns whether the draft differs from the plan and whether the plan has moved on.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}/draft/discard": {
      "post": {
        "operationId": "discard_draft",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-4"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-4"
                    ],
                    "type": "string"
                  },
                  "owner": {
                    "description": "a display handle echoed back in the answer; it never selects another person's draft",
                    "examples": [
                      "ada"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "owner"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What a draft mutation answers with.",
                  "properties": {
                    "behind": {
                      "description": "Whether someone published since the draft was started.",
                      "type": "boolean"
                    },
                    "draft_differs": {
                      "description": "Whether it differs from the published body.",
                      "type": "boolean"
                    },
                    "has_draft": {
                      "description": "Whether a draft is now open.",
                      "type": "boolean"
                    },
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "owner": {
                      "description": "Whose draft.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "owner",
                    "has_draft",
                    "draft_differs",
                    "behind"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Throw away the caller's own draft and leave the published plan alone. Use it to start again from the current revision, with the cookie or session that saved the draft. Returns has_draft false, also when there was nothing to discard.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}/draft/publish": {
      "post": {
        "operationId": "publish_draft",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-4"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "author": {
                    "description": "the display name the revision is credited to",
                    "examples": [
                      "Ada Lovelace"
                    ],
                    "type": "string"
                  },
                  "expect_revision": {
                    "description": "the revision you edited, from get_editor",
                    "examples": [
                      1
                    ],
                    "minimum": 0,
                    "type": "integer"
                  },
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-4"
                    ],
                    "type": "string"
                  },
                  "note": {
                    "description": "a short note for the history, up to 80 characters",
                    "examples": [
                      "Named an owner for each bet"
                    ],
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "owner": {
                    "description": "a display handle echoed back in the answer; it never selects another person's draft",
                    "examples": [
                      "ada"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "owner",
                  "author",
                  "expect_revision"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What a room mutation answers with.",
                  "properties": {
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "revision": {
                      "description": "Its current revision.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "Its title.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "revision"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Publish the caller's own draft as the next revision. Use it after save_draft, with the same cookie or session. Returns the room's new revision, or 409 when someone published after expect_revision, so newer work is never overwritten.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}/editor/{owner}": {
      "get": {
        "operationId": "get_editor",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-1"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "description": "a display handle echoed back in the answer; it never selects another person's draft",
              "examples": [
                "ada"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The editor, as one owner sees it.",
                  "properties": {
                    "behind": {
                      "description": "Whether someone published since this draft was started. When true, publishing with the draft's base revision will be refused and the owner must re-base first.",
                      "type": "boolean"
                    },
                    "body": {
                      "description": "The published plan.",
                      "type": "string"
                    },
                    "draft": {
                      "description": "This owner's unsaved draft, when one is open.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "draft_at_ms": {
                      "description": "When the draft was last touched.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "draft_base_revision": {
                      "description": "The revision the draft was started against.",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "draft_differs": {
                      "description": "Whether the draft differs from the published body. Computed on the SERVER: a client deciding this for itself would disagree with the server the moment someone else published.",
                      "type": "boolean"
                    },
                    "draft_idle_minutes": {
                      "description": "How long the draft has been idle, in whole minutes.",
                      "type": "integer"
                    },
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "lease_minutes": {
                      "description": "How long an untouched draft survives, in whole minutes.",
                      "type": "integer"
                    },
                    "owner": {
                      "description": "The owner whose draft this is.",
                      "type": "string"
                    },
                    "revision": {
                      "description": "The current published revision.",
                      "type": "integer"
                    },
                    "revision_author": {
                      "description": "Who published the current revision, when anyone has.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "title": {
                      "description": "Its title.",
                      "type": "string"
                    },
                    "updated_at_ms": {
                      "description": "When the room last changed: the same clock the room view carries, so a client holding this view can tell when the room has moved past it.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "owner",
                    "body",
                    "revision",
                    "draft_idle_minutes",
                    "draft_differs",
                    "behind",
                    "lease_minutes",
                    "updated_at_ms"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Read what the editor shows the caller. Use it before saving a draft, to learn the revision it must be based on. Returns the published plan, its revision and the caller's own draft; the draft is null when the caller has none or sends no session.",
        "x-idempotent": true,
        "x-read-only": true
      }
    },
    "/api/rooms/{id}/history": {
      "get": {
        "operationId": "get_history",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-1"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The history of one room.",
                  "properties": {
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "retained": {
                      "description": "How many revisions the history retains at most.",
                      "type": "integer"
                    },
                    "revision": {
                      "description": "The current revision.",
                      "type": "integer"
                    },
                    "revisions": {
                      "description": "Every retained revision, newest first.",
                      "items": {
                        "description": "One published revision, body included.",
                        "properties": {
                          "at_ms": {
                            "description": "When it was published.",
                            "type": "string"
                          },
                          "author": {
                            "description": "Who published it.",
                            "type": "string"
                          },
                          "body": {
                            "description": "The body as published.",
                            "type": "string"
                          },
                          "label": {
                            "description": "The version label, when someone snapshotted this revision.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "note": {
                            "description": "The publish note, when the author left one.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "seq": {
                            "description": "Its sequence, one-based.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "seq",
                          "author",
                          "at_ms",
                          "body"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "title": {
                      "description": "Its title.",
                      "type": "string"
                    },
                    "truncated": {
                      "description": "Whether older revisions were dropped from the retained window.",
                      "type": "boolean"
                    },
                    "updated_at_ms": {
                      "description": "When the room last changed: the same clock the room view carries, so a client holding this view can tell when the room has moved past it.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "revision",
                    "revisions",
                    "truncated",
                    "retained",
                    "updated_at_ms"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Read the published revisions of a plan, newest first. Use it to compare two versions or to find when something changed. Returns the full Markdown of each retained revision with its author, note and version label.",
        "x-idempotent": true,
        "x-read-only": true
      }
    },
    "/api/rooms/{id}/suggestions": {
      "get": {
        "operationId": "get_suggestions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-1"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The suggestion queue of one room.",
                  "properties": {
                    "agents": {
                      "description": "The agents that can be asked.",
                      "items": {
                        "description": "One agent that can be asked to review a plan. Agents are deterministic reviewers declared in the server: an agent PROPOSES a revision as a suggestion and never edits the plan silently.",
                        "properties": {
                          "focus": {
                            "description": "What this agent looks for in a plan.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The agent id, as request_suggestion takes it.",
                            "type": "string"
                          },
                          "name": {
                            "description": "Its full name, as it signs chat messages.",
                            "type": "string"
                          },
                          "short_name": {
                            "description": "The short name a compact UI shows.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "short_name",
                          "focus"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "revision": {
                      "description": "The current revision, which accepting a suggestion must name.",
                      "type": "integer"
                    },
                    "suggestions": {
                      "description": "Every suggestion, newest first.",
                      "items": {
                        "description": "One agent suggestion.",
                        "properties": {
                          "agent_id": {
                            "description": "The agent that made it.",
                            "type": "string"
                          },
                          "agent_name": {
                            "description": "That agent's name.",
                            "type": "string"
                          },
                          "applied_revision": {
                            "description": "The revision accepting it produced.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "at_ms": {
                            "description": "When it was made.",
                            "type": "string"
                          },
                          "body": {
                            "description": "The proposed Markdown, which accepting appends to the plan.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The suggestion id.",
                            "type": "string"
                          },
                          "prompt": {
                            "description": "The prompt that produced it.",
                            "type": "string"
                          },
                          "requested_by": {
                            "description": "Who asked.",
                            "type": "string"
                          },
                          "resolved_at_ms": {
                            "description": "When it was reviewed.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "resolved_by": {
                            "description": "Who reviewed it, once reviewed.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "description": "A suggestion's lifecycle.",
                            "enum": [
                              "Open",
                              "Accepted",
                              "Rejected"
                            ],
                            "type": "string"
                          },
                          "title": {
                            "description": "A short title.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "agent_id",
                          "agent_name",
                          "title",
                          "body",
                          "prompt",
                          "requested_by",
                          "status",
                          "at_ms"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "tasks": {
                      "description": "Every task, newest first.",
                      "items": {
                        "description": "One agent task: the request that produced a suggestion.",
                        "properties": {
                          "agent_id": {
                            "description": "The agent.",
                            "type": "string"
                          },
                          "at_ms": {
                            "description": "When it was requested.",
                            "type": "string"
                          },
                          "id": {
                            "description": "The task id.",
                            "type": "string"
                          },
                          "prompt": {
                            "description": "The prompt.",
                            "type": "string"
                          },
                          "requested_by": {
                            "description": "Who asked.",
                            "type": "string"
                          },
                          "suggestion_id": {
                            "description": "The suggestion it produced.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "agent_id",
                          "prompt",
                          "requested_by",
                          "suggestion_id",
                          "at_ms"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "title": {
                      "description": "Its title.",
                      "type": "string"
                    },
                    "updated_at_ms": {
                      "description": "When the room last changed: the same clock the room view carries, so a client holding this view can tell when the room has moved past it.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "revision",
                    "agents",
                    "suggestions",
                    "tasks",
                    "updated_at_ms"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Read what the demo agents have proposed for a plan. Use it to find a suggestion that is waiting for review. Returns every suggestion with its Markdown and status, the request behind it, and the revision a review must name.",
        "x-idempotent": true,
        "x-read-only": true
      },
      "post": {
        "operationId": "request_suggestion",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-4"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "agent_id": {
                    "description": "which demo agent to ask",
                    "enum": [
                      "planner",
                      "security-reviewer",
                      "implementation-editor"
                    ],
                    "examples": [
                      "planner"
                    ],
                    "type": "string"
                  },
                  "author": {
                    "description": "the display name of whoever asks",
                    "examples": [
                      "Ada Lovelace"
                    ],
                    "type": "string"
                  },
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-4"
                    ],
                    "type": "string"
                  },
                  "prompt": {
                    "description": "what the proposal should address, up to 6,000 characters",
                    "examples": [
                      "Give every bet an owner."
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "agent_id",
                  "prompt",
                  "author"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What a suggestion mutation answers with.",
                  "properties": {
                    "applied_revision": {
                      "description": "The revision accepting it produced, when accepted.",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "status": {
                      "description": "A suggestion's lifecycle.",
                      "enum": [
                        "Open",
                        "Accepted",
                        "Rejected"
                      ],
                      "type": "string"
                    },
                    "suggestion_id": {
                      "description": "The suggestion id.",
                      "type": "string"
                    },
                    "task_id": {
                      "description": "The task that produced it.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "suggestion_id",
                    "task_id",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Ask a demo agent to propose a section for the plan. Use it to try the review flow: each agent answers with its fixed template and your prompt, and does not analyze the plan. Returns the id of the suggestion, which waits for review.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}/suggestions/{suggestion_id}/resolve": {
      "post": {
        "operationId": "resolve_suggestion",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-1"
              ],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "suggestion_id",
            "required": true,
            "schema": {
              "description": "the suggestion id, from get_suggestions or request_suggestion",
              "examples": [
                "s-12"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "accept": {
                    "description": "true to append the proposal, false to decline it",
                    "examples": [
                      false
                    ],
                    "type": "boolean"
                  },
                  "actor": {
                    "description": "the display name of whoever decides",
                    "examples": [
                      "Ada Lovelace"
                    ],
                    "type": "string"
                  },
                  "expect_revision": {
                    "description": "the plan revision the decision is based on, from get_suggestions",
                    "examples": [
                      4
                    ],
                    "type": "integer"
                  },
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-1"
                    ],
                    "type": "string"
                  },
                  "suggestion_id": {
                    "description": "the suggestion id, from get_suggestions or request_suggestion",
                    "examples": [
                      "s-12"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "suggestion_id",
                  "accept",
                  "actor",
                  "expect_revision"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What a suggestion mutation answers with.",
                  "properties": {
                    "applied_revision": {
                      "description": "The revision accepting it produced, when accepted.",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "status": {
                      "description": "A suggestion's lifecycle.",
                      "enum": [
                        "Open",
                        "Accepted",
                        "Rejected"
                      ],
                      "type": "string"
                    },
                    "suggestion_id": {
                      "description": "The suggestion id.",
                      "type": "string"
                    },
                    "task_id": {
                      "description": "The task that produced it.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "suggestion_id",
                    "task_id",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Accept or reject a suggestion. Use it once a person has decided: accepting appends the proposal to the plan as a new revision. Returns the suggestion's status, or 409 when the plan has moved past the expect_revision of an acceptance.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/rooms/{id}/versions": {
      "post": {
        "operationId": "snapshot_version",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the room id, from get_rooms",
              "examples": [
                "r-4"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "author": {
                    "description": "the display name of whoever labels it",
                    "examples": [
                      "Ada Lovelace"
                    ],
                    "type": "string"
                  },
                  "id": {
                    "description": "the room id, from get_rooms",
                    "examples": [
                      "r-4"
                    ],
                    "type": "string"
                  },
                  "label": {
                    "description": "the label, up to 80 characters",
                    "examples": [
                      "v1, approved"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "author"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What snapshotting answers with.",
                  "properties": {
                    "id": {
                      "description": "The room id.",
                      "type": "string"
                    },
                    "label": {
                      "description": "The label.",
                      "type": "string"
                    },
                    "seq": {
                      "description": "The revision that now carries the label.",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "id",
                    "seq",
                    "label"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Label the current revision as a named version. Use it when a plan reaches a point worth returning to, such as an approval. Returns the revision number that now carries the label.",
        "x-idempotent": true,
        "x-read-only": false
      }
    }
  },
  "security": [
    {},
    {
      "oauth2": [
        "apps:discover",
        "apps:read",
        "apps:write"
      ]
    }
  ],
  "servers": [
    {
      "url": "https://plan.ferrite.run"
    }
  ],
  "x-agent-card": "https://plan.ferrite.run/.well-known/agent-card.json",
  "x-ard-catalog": "https://plan.ferrite.run/.well-known/ard.json",
  "x-llms-txt": "https://plan.ferrite.run/llms.txt",
  "x-mcp-endpoint": "https://plan.ferrite.run/mcp",
  "x-webmcp": "https://plan.ferrite.run/.well-known/webmcp.js"
}