{
  "openapi": "3.0.3",
  "info": {
    "title": "Hoshin Kanri API",
    "version": "0.9.0",
    "description": "Beta: operations and fields may still change. Covers the operations the Hoshin MCP server uses. For an AI agent, prefer MCP at https://hoshin.app/mcp. An admin creates a token from the API tokens link in the app header. Error messages are in English; rely on the `error` code."
  },
  "servers": [
    {
      "url": "https://hoshin.app"
    }
  ],
  "tags": [
    {
      "name": "Matrices"
    },
    {
      "name": "Elements"
    },
    {
      "name": "Analysis"
    },
    {
      "name": "Sharing"
    },
    {
      "name": "Ideas"
    },
    {
      "name": "Exports"
    },
    {
      "name": "Themes"
    },
    {
      "name": "Cadences"
    },
    {
      "name": "Identity"
    }
  ],
  "paths": {
    "/api/matrices": {
      "get": {
        "operationId": "listMatrices",
        "tags": [
          "Matrices"
        ],
        "summary": "List matrices",
        "parameters": [
          {
            "name": "isActive",
            "in": "query",
            "required": false,
            "description": "\"true\" returns active matrices; any other value returns archived ones.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatrixList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createMatrix",
        "tags": [
          "Matrices"
        ],
        "summary": "Create a matrix",
        "description": "Making it the default takes an admin, except for the first matrix. Refused to a read-only token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 10000,
                    "nullable": true
                  },
                  "periodType": {
                    "type": "string",
                    "enum": [
                      "annual",
                      "quarterly",
                      "custom"
                    ]
                  },
                  "periodStart": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "periodEnd": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "parentMatrixId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatrixCreated"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}": {
      "get": {
        "operationId": "getMatrix",
        "tags": [
          "Matrices"
        ],
        "summary": "Get a matrix with its elements and links",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "elements",
            "in": "query",
            "required": false,
            "description": "\"false\" leaves out elements and correlations.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatrixDetail"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateMatrix",
        "tags": [
          "Matrices"
        ],
        "summary": "Update a matrix",
        "description": "Also sets its parent in a cascade. Changing the default matrix takes an admin. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 10000,
                    "nullable": true
                  },
                  "periodType": {
                    "type": "string",
                    "enum": [
                      "annual",
                      "quarterly",
                      "custom"
                    ]
                  },
                  "periodStart": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "periodEnd": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "isDefault": {
                    "type": "boolean"
                  },
                  "parentMatrixId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Matrix"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMatrix",
        "tags": [
          "Matrices"
        ],
        "summary": "Delete a matrix",
        "description": "For good, with its elements, correlations, readings, updates and public links; matrices below it are detached. Deleting the default matrix takes an admin. To set a matrix aside, update it with isActive false. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/elements": {
      "post": {
        "operationId": "createElement",
        "tags": [
          "Elements"
        ],
        "summary": "Add an element to a quadrant",
        "description": "North: vision. East: annual objectives. South: initiatives. West: indicators. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "quadrant": {
                    "type": "string",
                    "enum": [
                      "north",
                      "east",
                      "south",
                      "west"
                    ],
                    "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 10000,
                    "nullable": true
                  },
                  "ownerId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "completed",
                      "cancelled"
                    ]
                  },
                  "targetValue": {
                    "type": "string",
                    "maxLength": 100,
                    "nullable": true
                  },
                  "currentValue": {
                    "type": "string",
                    "maxLength": 100,
                    "nullable": true
                  },
                  "unit": {
                    "type": "string",
                    "maxLength": 50,
                    "nullable": true
                  },
                  "indicatorType": {
                    "type": "string",
                    "enum": [
                      "result",
                      "performance",
                      null
                    ],
                    "nullable": true
                  },
                  "dueDate": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "nullable": true
                  },
                  "icon": {
                    "type": "string",
                    "maxLength": 50,
                    "nullable": true
                  },
                  "externalRef": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "description": "Free label, e.g. \"Jira\", \"A3\", \"QRQC\", \"Drive\"."
                        },
                        "ref": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "description": "Free reference: a URL, a ticket or project number, a path."
                        }
                      },
                      "required": [
                        "label",
                        "ref"
                      ]
                    },
                    "maxItems": 20,
                    "description": "Links to third-party tools, at most 20. Sending the list replaces it; [] clears it."
                  },
                  "parentElementId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "shared",
                      "internal"
                    ],
                    "description": "\"internal\" keeps the element (and its correlations) off public share pages and external images: prospects, salaries, anything said in confidence. Default \"shared\"."
                  }
                },
                "required": [
                  "quadrant",
                  "title"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Element"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/elements/{elementId}": {
      "put": {
        "operationId": "updateElement",
        "tags": [
          "Elements"
        ],
        "summary": "Update an element",
        "description": "Moving it to another quadrant removes the links that are no longer adjacent. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "elementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 10000,
                    "nullable": true
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "completed",
                      "cancelled"
                    ]
                  },
                  "ownerId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "targetValue": {
                    "type": "string",
                    "maxLength": 100,
                    "nullable": true
                  },
                  "currentValue": {
                    "type": "string",
                    "maxLength": 100,
                    "nullable": true
                  },
                  "unit": {
                    "type": "string",
                    "maxLength": 50,
                    "nullable": true
                  },
                  "indicatorType": {
                    "type": "string",
                    "enum": [
                      "result",
                      "performance",
                      null
                    ],
                    "nullable": true
                  },
                  "dueDate": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "nullable": true
                  },
                  "icon": {
                    "type": "string",
                    "maxLength": 50,
                    "nullable": true
                  },
                  "externalRef": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "description": "Free label, e.g. \"Jira\", \"A3\", \"QRQC\", \"Drive\"."
                        },
                        "ref": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "description": "Free reference: a URL, a ticket or project number, a path."
                        }
                      },
                      "required": [
                        "label",
                        "ref"
                      ]
                    },
                    "maxItems": 20,
                    "description": "Links to third-party tools, at most 20. Sending the list replaces it; [] clears it."
                  },
                  "parentElementId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "shared",
                      "internal"
                    ],
                    "description": "\"internal\" keeps the element (and its correlations) off public share pages and external images: prospects, salaries, anything said in confidence. Default \"shared\"."
                  },
                  "quadrant": {
                    "type": "string",
                    "enum": [
                      "north",
                      "east",
                      "south",
                      "west"
                    ],
                    "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElementUpdated"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteElement",
        "tags": [
          "Elements"
        ],
        "summary": "Delete an element",
        "description": "With its correlations, readings and updates; elements of lower matrices that deployed it lose that link. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "elementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/elements/{elementId}/measurements": {
      "get": {
        "operationId": "listMeasurements",
        "tags": [
          "Elements"
        ],
        "summary": "List a KPI's readings",
        "description": "One value per quarter or month, latest period first.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "elementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "measurements": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "period": {
                            "type": "string",
                            "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                          },
                          "value": {
                            "type": "string"
                          },
                          "note": {
                            "type": "string",
                            "nullable": true
                          },
                          "recordedByName": {
                            "type": "string",
                            "nullable": true
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "app",
                              "api"
                            ],
                            "description": "\"app\" from the web app, \"api\" from a token or an agent."
                          },
                          "originTool": {
                            "type": "string",
                            "description": "The tool the value was read in, if it was copied from one.",
                            "nullable": true
                          },
                          "originRef": {
                            "type": "string",
                            "nullable": true
                          },
                          "extractedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the value was extracted from that tool.",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "provisional",
                              "final"
                            ],
                            "description": "\"provisional\" while the period runs (it may still be corrected), \"final\" once it has ended. Derived from the period, in UTC."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "period",
                          "value",
                          "note",
                          "recordedByName",
                          "source",
                          "originTool",
                          "originRef",
                          "extractedAt",
                          "status",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "Latest period first."
                    }
                  },
                  "required": [
                    "measurements"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "recordMeasurement",
        "tags": [
          "Elements"
        ],
        "summary": "Record or correct the reading of a period",
        "description": "KPIs only (NOT_A_KPI otherwise). Reading the same period again corrects it. The KPI current value becomes the value of its latest period. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "elementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "period": {
                    "type": "string",
                    "pattern": "^(20\\d\\d|2100)-(Q[1-4]|0[1-9]|1[0-2])$",
                    "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "The measure, in the unit of the KPI (e.g. \"1.2\")."
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000,
                    "nullable": true
                  },
                  "originTool": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "The tool the value was read in, when it was copied from one (e.g. \"HubSpot\", \"Pennylane\").",
                    "nullable": true
                  },
                  "originRef": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Where in that tool: a report, a saved query, a URL.",
                    "nullable": true
                  },
                  "extractedAt": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "When the value was extracted from that tool: a date (YYYY-MM-DD) or an ISO datetime. Not in the future.",
                    "nullable": true
                  }
                },
                "required": [
                  "period",
                  "value"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "measurement": {
                      "type": "object",
                      "properties": {
                        "period": {
                          "type": "string",
                          "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                        },
                        "value": {
                          "type": "string"
                        },
                        "note": {
                          "type": "string",
                          "nullable": true
                        },
                        "recordedByName": {
                          "type": "string",
                          "nullable": true
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "app",
                            "api"
                          ],
                          "description": "\"app\" from the web app, \"api\" from a token or an agent."
                        },
                        "originTool": {
                          "type": "string",
                          "description": "The tool the value was read in, if it was copied from one.",
                          "nullable": true
                        },
                        "originRef": {
                          "type": "string",
                          "nullable": true
                        },
                        "extractedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the value was extracted from that tool.",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "provisional",
                            "final"
                          ],
                          "description": "\"provisional\" while the period runs (it may still be corrected), \"final\" once it has ended. Derived from the period, in UTC."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "period",
                        "value",
                        "note",
                        "recordedByName",
                        "source",
                        "originTool",
                        "originRef",
                        "extractedAt",
                        "status",
                        "createdAt",
                        "updatedAt"
                      ]
                    },
                    "currentValue": {
                      "type": "string",
                      "description": "The KPI's current value: the value of its latest period.",
                      "nullable": true
                    }
                  },
                  "required": [
                    "measurement",
                    "currentValue"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/elements/{elementId}/updates": {
      "get": {
        "operationId": "listElementUpdates",
        "tags": [
          "Elements"
        ],
        "summary": "List the progress updates of an element",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "elementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "progress": {
                            "type": "integer",
                            "nullable": true
                          },
                          "comment": {
                            "type": "string",
                            "nullable": true
                          },
                          "authorName": {
                            "type": "string",
                            "nullable": true
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "app",
                              "api"
                            ],
                            "description": "\"app\" from the web app, \"api\" from a token or an agent."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "progress",
                          "comment",
                          "authorName",
                          "source",
                          "createdAt"
                        ]
                      },
                      "description": "Newest first, 50 at most."
                    }
                  },
                  "required": [
                    "updates"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "addElementUpdate",
        "tags": [
          "Elements"
        ],
        "summary": "Log a progress update: a percentage, a comment, or both",
        "description": "A progress is refused on a KPI (KPI_NO_PROGRESS): record a reading instead. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "elementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "progress": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Progress of the objective or initiative, 0-100. Refused on a KPI.",
                    "nullable": true
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 5000,
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "update": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "progress": {
                          "type": "integer",
                          "nullable": true
                        },
                        "comment": {
                          "type": "string",
                          "nullable": true
                        },
                        "authorName": {
                          "type": "string",
                          "nullable": true
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "app",
                            "api"
                          ],
                          "description": "\"app\" from the web app, \"api\" from a token or an agent."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "progress",
                        "comment",
                        "authorName",
                        "source",
                        "createdAt"
                      ]
                    },
                    "progress": {
                      "type": "integer",
                      "description": "The element's progress after this update.",
                      "nullable": true
                    }
                  },
                  "required": [
                    "update",
                    "progress"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/elements/{elementId}/sheet": {
      "put": {
        "operationId": "putInitiativeSheet",
        "tags": [
          "Elements"
        ],
        "summary": "Fill or change an initiative's sheet",
        "description": "Initiatives (south) only: NOT_AN_INITIATIVE otherwise. Each field given replaces the stored one, null clears it, absent keeps it. A new health needs its healthNote (HEALTH_NOTE_REQUIRED). measuredBy must be a KPI of the same matrix (MEASURE_NOT_A_KPI). Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "elementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sponsor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Sponsor, when not the owner of the initiative.",
                    "nullable": true
                  },
                  "why": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "The problem it addresses and the annual objective it serves.",
                    "nullable": true
                  },
                  "expectedResult": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "What \"done\" means.",
                    "nullable": true
                  },
                  "measuredBy": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The KPI (west element of the same matrix) that measures the result.",
                    "nullable": true
                  },
                  "milestones": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "date": {
                          "type": "string",
                          "format": "date",
                          "description": "YYYY-MM-DD",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "planned",
                            "done",
                            "late"
                          ],
                          "description": "\"planned\", \"done\" (reached) or \"late\"."
                        }
                      },
                      "required": [
                        "title",
                        "status"
                      ]
                    },
                    "maxItems": 8,
                    "description": "3 to 6 dated milestones, 8 at most.",
                    "nullable": true
                  },
                  "nextAction": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "owner": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100,
                        "description": "Who does it, as people name them.",
                        "nullable": true
                      },
                      "due": {
                        "type": "string",
                        "format": "date",
                        "description": "YYYY-MM-DD",
                        "nullable": true
                      }
                    },
                    "required": [
                      "title"
                    ],
                    "nullable": true
                  },
                  "health": {
                    "type": "string",
                    "enum": [
                      "green",
                      "amber",
                      "red",
                      null
                    ],
                    "description": "Weather of the initiative, updated at each review. Requires healthNote.",
                    "nullable": true
                  },
                  "healthNote": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "One sentence that justifies the weather.",
                    "nullable": true
                  },
                  "blockers": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "Risks, and what needs an arbitration or a decision of the committee.",
                    "nullable": true
                  },
                  "resources": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "Budget, time, hires needed.",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "elementId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "sheet": {
                      "type": "object",
                      "properties": {
                        "sponsor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "Sponsor, when not the owner of the initiative."
                        },
                        "why": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "The problem it addresses and the annual objective it serves."
                        },
                        "expectedResult": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "What \"done\" means."
                        },
                        "measuredBy": {
                          "type": "string",
                          "format": "uuid",
                          "description": "The KPI (west element of the same matrix) that measures the result."
                        },
                        "milestones": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "date": {
                                "type": "string",
                                "format": "date",
                                "description": "YYYY-MM-DD",
                                "nullable": true
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "planned",
                                  "done",
                                  "late"
                                ],
                                "description": "\"planned\", \"done\" (reached) or \"late\"."
                              }
                            },
                            "required": [
                              "title",
                              "status"
                            ]
                          },
                          "maxItems": 8,
                          "description": "3 to 6 dated milestones, 8 at most."
                        },
                        "nextAction": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300
                            },
                            "owner": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100,
                              "description": "Who does it, as people name them.",
                              "nullable": true
                            },
                            "due": {
                              "type": "string",
                              "format": "date",
                              "description": "YYYY-MM-DD",
                              "nullable": true
                            }
                          },
                          "required": [
                            "title"
                          ]
                        },
                        "health": {
                          "type": "string",
                          "enum": [
                            "green",
                            "amber",
                            "red"
                          ],
                          "description": "Weather of the initiative, updated at each review. Requires healthNote."
                        },
                        "healthNote": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "description": "One sentence that justifies the weather."
                        },
                        "blockers": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000,
                          "description": "Risks, and what needs an arbitration or a decision of the committee."
                        },
                        "resources": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "Budget, time, hires needed."
                        },
                        "healthAt": {
                          "type": "string",
                          "description": "When the weather was last set (ISO datetime)."
                        }
                      }
                    }
                  },
                  "required": [
                    "elementId",
                    "sheet"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/elements/{elementId}/kpi-definition": {
      "put": {
        "operationId": "putKpiDefinition",
        "tags": [
          "Elements"
        ],
        "summary": "Define how a KPI is computed and where it is read",
        "description": "KPIs (west) only: NOT_A_KPI otherwise. Same change rules as the initiative sheet. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "elementId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "formula": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "How the value is computed, e.g. \"active accounts / signed accounts, at month end\".",
                    "nullable": true
                  },
                  "sourceSystem": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "The system the value is read in (e.g. \"HubSpot\", \"Pennylane\").",
                    "nullable": true
                  },
                  "sourceRef": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Where in it: a report, a saved query, a URL.",
                    "nullable": true
                  },
                  "dataOwner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Who answers for the number.",
                    "nullable": true
                  },
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "monthly",
                      "quarterly",
                      null
                    ],
                    "description": "How often a reading is due.",
                    "nullable": true
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "up",
                      "down",
                      null
                    ],
                    "description": "Which way is better: \"up\" (higher is better) or \"down\" (lower is better). It lets a trend be read as good or bad, and the latest reading be compared with the target.",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "elementId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kpiDefinition": {
                      "type": "object",
                      "properties": {
                        "formula": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000,
                          "description": "How the value is computed, e.g. \"active accounts / signed accounts, at month end\"."
                        },
                        "sourceSystem": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "The system the value is read in (e.g. \"HubSpot\", \"Pennylane\")."
                        },
                        "sourceRef": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "description": "Where in it: a report, a saved query, a URL."
                        },
                        "dataOwner": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "Who answers for the number."
                        },
                        "frequency": {
                          "type": "string",
                          "enum": [
                            "monthly",
                            "quarterly"
                          ],
                          "description": "How often a reading is due."
                        },
                        "direction": {
                          "type": "string",
                          "enum": [
                            "up",
                            "down"
                          ],
                          "description": "Which way is better: \"up\" (higher is better) or \"down\" (lower is better). It lets a trend be read as good or bad, and the latest reading be compared with the target."
                        }
                      }
                    }
                  },
                  "required": [
                    "elementId",
                    "kpiDefinition"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/correlations": {
      "put": {
        "operationId": "setCorrelation",
        "tags": [
          "Elements"
        ],
        "summary": "Set or remove a link between two elements",
        "description": "Adjacent quadrants only: north-east, east-south, south-west, west-north. A link has no direction: the answer may swap from and to. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fromElementId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "toElementId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "strength": {
                    "type": "string",
                    "enum": [
                      "strong",
                      "medium",
                      "weak",
                      "none"
                    ],
                    "description": "\"none\" removes the link."
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 10000,
                    "nullable": true
                  }
                },
                "required": [
                  "fromElementId",
                  "toElementId",
                  "strength"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CorrelationResult"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/completeness": {
      "get": {
        "operationId": "getCompleteness",
        "tags": [
          "Analysis"
        ],
        "summary": "Get the completeness score of a matrix",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "audience",
            "in": "query",
            "required": false,
            "description": "\"external\" scores what an external reading shows: the elements marked internal and their correlations left out.",
            "schema": {
              "type": "string",
              "enum": [
                "internal",
                "external"
              ],
              "default": "internal"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Completeness"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/image": {
      "get": {
        "operationId": "getMatrixImage",
        "tags": [
          "Analysis"
        ],
        "summary": "Draw the X-Matrix as an SVG picture",
        "description": "For a deck or a report: the four bands, the correlation marks in the corners, the score. audience=external leaves out internal elements and every figure.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "audience",
            "in": "query",
            "required": false,
            "description": "\"internal\" draws everything; \"external\" leaves out internal elements and every value and target, as a public page without figures.",
            "schema": {
              "type": "string",
              "enum": [
                "internal",
                "external"
              ],
              "default": "internal"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of the labels. Default: the language of the account.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr"
              ]
            }
          },
          {
            "name": "layout",
            "in": "query",
            "required": false,
            "description": "\"matrix\" draws the X-Matrix; \"initiatives\" draws one page per initiative sheet, in pages.",
            "schema": {
              "type": "string",
              "enum": [
                "matrix",
                "initiatives"
              ],
              "default": "matrix"
            }
          },
          {
            "name": "orientation",
            "in": "query",
            "required": false,
            "description": "\"bottom\" (default): vision at the bottom, annual objectives on the left, initiatives on top, KPIs on the right, as most templates. \"top\": vision on top, as the app draws it. Quadrant names do not change.",
            "schema": {
              "type": "string",
              "enum": [
                "bottom",
                "top"
              ],
              "default": "bottom"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mediaType": {
                      "type": "string",
                      "enum": [
                        "image/svg+xml"
                      ]
                    },
                    "filename": {
                      "type": "string"
                    },
                    "audience": {
                      "type": "string",
                      "enum": [
                        "internal",
                        "external"
                      ]
                    },
                    "layout": {
                      "type": "string",
                      "enum": [
                        "matrix",
                        "initiatives"
                      ]
                    },
                    "orientation": {
                      "type": "string",
                      "enum": [
                        "bottom",
                        "top"
                      ]
                    },
                    "lang": {
                      "type": "string",
                      "enum": [
                        "en",
                        "fr"
                      ],
                      "description": "Language the labels were drawn in."
                    },
                    "hiddenElements": {
                      "type": "integer",
                      "description": "Internal elements left out (external only)."
                    },
                    "svg": {
                      "type": "string",
                      "description": "The X-Matrix as a standalone SVG document; null with layout \"initiatives\".",
                      "nullable": true
                    },
                    "pages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "elementId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "filename": {
                            "type": "string"
                          },
                          "svg": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "elementId",
                          "title",
                          "filename",
                          "svg"
                        ]
                      },
                      "description": "Layout \"initiatives\": one standalone SVG page (960×540, a 16:9 slide) per initiative, in matrix order."
                    }
                  },
                  "required": [
                    "mediaType",
                    "filename",
                    "audience",
                    "layout",
                    "orientation",
                    "lang",
                    "hiddenElements",
                    "svg"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/cascade": {
      "get": {
        "operationId": "getCascade",
        "tags": [
          "Analysis"
        ],
        "summary": "Get the cascade below a matrix",
        "description": "What each level decided and the level below took up or not.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cascade"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/kpi-board": {
      "get": {
        "operationId": "getKpiBoard",
        "tags": [
          "Analysis"
        ],
        "summary": "Get the indicator board of a matrix",
        "description": "Every KPI month by month, under the annual objective it measures through the projects. A reading that is due and missing is a cell of its own. A verdict (trend good or bad, target met or not) is given only where the definition of the indicator says which way is better.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "months",
            "in": "query",
            "required": false,
            "description": "How many closed months to go back at most. Default 6. The board starts at the first of them that holds a reading, and never shows fewer than three.",
            "schema": {
              "type": "integer",
              "minimum": 3,
              "maximum": 12
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "matrixId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "matrixName": {
                      "type": "string"
                    },
                    "asOf": {
                      "type": "string",
                      "description": "When the board was computed, ISO 8601 UTC."
                    },
                    "pageUrl": {
                      "type": "string",
                      "description": "The same board as a page of the app, for the people."
                    },
                    "periods": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Months shown, oldest first (YYYY-MM)."
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "objective": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "title": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "title"
                            ],
                            "description": "The annual objective these indicators measure, through the projects. Null: the indicators tied to no objective.",
                            "nullable": true
                          },
                          "rows": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "unit": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "target": {
                                  "type": "string",
                                  "description": "The target of the year, as written. One per indicator: there is no target per month.",
                                  "nullable": true
                                },
                                "ownerName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "indicatorType": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "direction": {
                                  "type": "string",
                                  "enum": [
                                    "up",
                                    "down",
                                    null
                                  ],
                                  "description": "Which way is better. Null: nobody said, so no verdict can be given.",
                                  "nullable": true
                                },
                                "frequency": {
                                  "type": "string",
                                  "enum": [
                                    "monthly",
                                    "quarterly",
                                    null
                                  ],
                                  "nullable": true
                                },
                                "cells": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "period": {
                                        "type": "string",
                                        "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                                      },
                                      "value": {
                                        "type": "string",
                                        "nullable": true
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "final",
                                          "provisional",
                                          "missing",
                                          "none"
                                        ],
                                        "description": "\"missing\": the reading of the last closed period of the indicator (month, or quarter for a quarterly one) is due and absent. \"none\": no reading, and none was due. \"provisional\": the period is still running."
                                      },
                                      "fromQuarter": {
                                        "type": "boolean",
                                        "description": "True when the value is a quarterly reading, shown in the month that closes its quarter, or in the running month while the quarter runs."
                                      },
                                      "isLatest": {
                                        "type": "boolean",
                                        "description": "True for the cell that holds `latest`, the reading the trend and the verdict rest on."
                                      }
                                    },
                                    "required": [
                                      "period",
                                      "value",
                                      "state",
                                      "fromQuarter",
                                      "isLatest"
                                    ]
                                  }
                                },
                                "latest": {
                                  "type": "object",
                                  "properties": {
                                    "period": {
                                      "type": "string",
                                      "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                                    },
                                    "value": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "period",
                                    "value"
                                  ],
                                  "description": "The most recent reading of the rhythm of the indicator. It may be older than the months shown: `noVerdict` is then \"stale\".",
                                  "nullable": true
                                },
                                "trend": {
                                  "type": "string",
                                  "enum": [
                                    "improving",
                                    "worsening",
                                    "flat",
                                    "up",
                                    "down",
                                    "unknown"
                                  ],
                                  "description": "The latest reading against the one before it, month with month or quarter with quarter. \"improving\" and \"worsening\" need the direction; without it only \"up\" or \"down\". \"unknown\": one of the two is absent or not a number, or the latest is older than the months shown."
                                },
                                "onTarget": {
                                  "type": "boolean",
                                  "description": "Latest reading against the target, in the direction given. Null when it cannot be judged: `noVerdict` says why.",
                                  "nullable": true
                                },
                                "noVerdict": {
                                  "type": "string",
                                  "enum": [
                                    "no_reading",
                                    "stale",
                                    "no_direction",
                                    "no_target",
                                    "not_a_number",
                                    null
                                  ],
                                  "description": "Why there is no verdict: \"no_reading\"; \"stale\" (the latest reading is older than the months shown); \"no_direction\" (nobody said which way is better); \"no_target\"; \"not_a_number\" (the target or the reading is not a plain number: \"≥ 95\", \"1,250\"). Null when onTarget is given.",
                                  "nullable": true
                                },
                                "alsoMeasures": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "Titles of the other annual objectives this indicator also measures."
                                }
                              },
                              "required": [
                                "id",
                                "title",
                                "unit",
                                "target",
                                "ownerName",
                                "indicatorType",
                                "direction",
                                "frequency",
                                "cells",
                                "latest",
                                "trend",
                                "onTarget",
                                "noVerdict",
                                "alsoMeasures"
                              ]
                            },
                            "description": "Empty under an objective: nothing measures it."
                          }
                        },
                        "required": [
                          "objective",
                          "rows"
                        ]
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "kpis": {
                          "type": "integer"
                        },
                        "onTarget": {
                          "type": "integer"
                        },
                        "offTarget": {
                          "type": "integer"
                        },
                        "noVerdict": {
                          "type": "integer"
                        },
                        "improving": {
                          "type": "integer"
                        },
                        "worsening": {
                          "type": "integer"
                        },
                        "missing": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "kpis",
                        "onTarget",
                        "offTarget",
                        "noVerdict",
                        "improving",
                        "worsening",
                        "missing"
                      ]
                    }
                  },
                  "required": [
                    "matrixId",
                    "matrixName",
                    "asOf",
                    "pageUrl",
                    "periods",
                    "groups",
                    "summary"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/context": {
      "get": {
        "operationId": "getMatrixContext",
        "tags": [
          "Matrices"
        ],
        "summary": "Read the written frame of a matrix: purpose, vision, context, tradeoffs",
        "description": "The validated text is the position of the organization; `draft`, when present, is a proposal nobody validated yet. `parent` is the validated vision of the matrix above in the cascade.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "audience",
            "in": "query",
            "required": false,
            "description": "\"external\": only the validated sections marked shared, no draft, no name. Default \"internal\": everything.",
            "schema": {
              "type": "string",
              "enum": [
                "internal",
                "external"
              ],
              "default": "internal"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language to read the purpose in, when it is translated. Default: the language of the reader.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "pt",
                "de",
                "it",
                "nl",
                "pl",
                "cs",
                "ro",
                "tr",
                "zh",
                "ja"
              ]
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "matrixId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "strategicContext": {
                      "type": "object",
                      "properties": {
                        "purpose": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "description": "What the organization calls it. Null: the default label.",
                              "nullable": true
                            },
                            "text": {
                              "type": "string",
                              "description": "The validated purpose, in the language asked for when a current translation exists.",
                              "nullable": true
                            },
                            "locale": {
                              "type": "string",
                              "description": "Language of the text returned.",
                              "nullable": true
                            },
                            "sourceLocale": {
                              "type": "string",
                              "description": "Language the purpose is written in.",
                              "nullable": true
                            },
                            "visibility": {
                              "type": "string",
                              "enum": [
                                "shared",
                                "internal"
                              ],
                              "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                            },
                            "validatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "validatedByName": {
                              "type": "string",
                              "nullable": true
                            },
                            "translations": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "locale": {
                                    "type": "string"
                                  },
                                  "stale": {
                                    "type": "boolean",
                                    "description": "True: made for an earlier text, no longer served."
                                  }
                                },
                                "required": [
                                  "locale",
                                  "stale"
                                ]
                              }
                            },
                            "draft": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "text": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "locale": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "visibility": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updatedByName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "origin": {
                                  "type": "string",
                                  "enum": [
                                    "app",
                                    "agent"
                                  ],
                                  "description": "\"agent\": written through a token or an OAuth connection. \"app\": typed in the web app."
                                }
                              },
                              "required": [
                                "label",
                                "text",
                                "locale",
                                "visibility",
                                "updatedAt",
                                "updatedByName",
                                "origin"
                              ],
                              "description": "A proposal waiting for a person to validate it in the app. Not the position of the organization yet.",
                              "nullable": true
                            }
                          },
                          "required": [
                            "label",
                            "text",
                            "locale",
                            "sourceLocale",
                            "visibility",
                            "validatedAt",
                            "validatedByName",
                            "translations",
                            "draft"
                          ]
                        },
                        "matrix": {
                          "type": "object",
                          "properties": {
                            "vision": {
                              "type": "string",
                              "nullable": true
                            },
                            "context": {
                              "type": "string",
                              "nullable": true
                            },
                            "tradeoffs": {
                              "type": "string",
                              "nullable": true
                            },
                            "visibility": {
                              "type": "object",
                              "properties": {
                                "vision": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "context": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "tradeoffs": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                }
                              },
                              "required": [
                                "vision",
                                "context",
                                "tradeoffs"
                              ]
                            },
                            "validatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "validatedByName": {
                              "type": "string",
                              "nullable": true
                            },
                            "draft": {
                              "type": "object",
                              "properties": {
                                "vision": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "context": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "tradeoffs": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "visibility": {
                                  "type": "object",
                                  "properties": {
                                    "vision": {
                                      "type": "string",
                                      "enum": [
                                        "shared",
                                        "internal"
                                      ],
                                      "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                    },
                                    "context": {
                                      "type": "string",
                                      "enum": [
                                        "shared",
                                        "internal"
                                      ],
                                      "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                    },
                                    "tradeoffs": {
                                      "type": "string",
                                      "enum": [
                                        "shared",
                                        "internal"
                                      ],
                                      "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                    }
                                  },
                                  "required": [
                                    "vision",
                                    "context",
                                    "tradeoffs"
                                  ]
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updatedByName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "origin": {
                                  "type": "string",
                                  "enum": [
                                    "app",
                                    "agent"
                                  ],
                                  "description": "\"agent\": written through a token or an OAuth connection. \"app\": typed in the web app."
                                }
                              },
                              "required": [
                                "vision",
                                "context",
                                "tradeoffs",
                                "visibility",
                                "updatedAt",
                                "updatedByName",
                                "origin"
                              ],
                              "description": "The whole next version as proposed, waiting for a person to validate it in the app.",
                              "nullable": true
                            }
                          },
                          "required": [
                            "vision",
                            "context",
                            "tradeoffs",
                            "visibility",
                            "validatedAt",
                            "validatedByName",
                            "draft"
                          ]
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "matrixId": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "matrixName": {
                              "type": "string"
                            },
                            "vision": {
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "required": [
                            "matrixId",
                            "matrixName",
                            "vision"
                          ],
                          "description": "The validated vision of the matrix above in the cascade. Null without a parent, and in an external reading.",
                          "nullable": true
                        },
                        "validateUrl": {
                          "type": "string",
                          "description": "Where a person validates a draft, in the app. Null in an external reading.",
                          "nullable": true
                        }
                      },
                      "required": [
                        "purpose",
                        "matrix",
                        "parent",
                        "validateUrl"
                      ]
                    }
                  },
                  "required": [
                    "matrixId",
                    "strategicContext"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putMatrixContext",
        "tags": [
          "Matrices"
        ],
        "summary": "Propose the vision, context or tradeoffs of a matrix",
        "description": "Writes the draft, never the validated version: a person who may edit the matrix validates it in the app (a token or an OAuth connection cannot, VALIDATION_IN_APP). The draft starts from the validated version: each field given replaces, null clears, absent keeps. No change given: EMPTY_UPDATE. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "Where the organization wants to be at the horizon of this matrix, written out.",
                    "nullable": true
                  },
                  "context": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "Where it starts from, what changed, what makes this cycle necessary.",
                    "nullable": true
                  },
                  "tradeoffs": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "What was chosen, and what was given up.",
                    "nullable": true
                  },
                  "visibility": {
                    "type": "object",
                    "properties": {
                      "vision": {
                        "type": "string",
                        "enum": [
                          "shared",
                          "internal"
                        ],
                        "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                      },
                      "context": {
                        "type": "string",
                        "enum": [
                          "shared",
                          "internal"
                        ],
                        "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                      },
                      "tradeoffs": {
                        "type": "string",
                        "enum": [
                          "shared",
                          "internal"
                        ],
                        "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                      }
                    },
                    "description": "Per section. Defaults: vision shared, context and tradeoffs internal."
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "matrixId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "strategicContext": {
                      "type": "object",
                      "properties": {
                        "purpose": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "description": "What the organization calls it. Null: the default label.",
                              "nullable": true
                            },
                            "text": {
                              "type": "string",
                              "description": "The validated purpose, in the language asked for when a current translation exists.",
                              "nullable": true
                            },
                            "locale": {
                              "type": "string",
                              "description": "Language of the text returned.",
                              "nullable": true
                            },
                            "sourceLocale": {
                              "type": "string",
                              "description": "Language the purpose is written in.",
                              "nullable": true
                            },
                            "visibility": {
                              "type": "string",
                              "enum": [
                                "shared",
                                "internal"
                              ],
                              "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                            },
                            "validatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "validatedByName": {
                              "type": "string",
                              "nullable": true
                            },
                            "translations": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "locale": {
                                    "type": "string"
                                  },
                                  "stale": {
                                    "type": "boolean",
                                    "description": "True: made for an earlier text, no longer served."
                                  }
                                },
                                "required": [
                                  "locale",
                                  "stale"
                                ]
                              }
                            },
                            "draft": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "text": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "locale": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "visibility": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updatedByName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "origin": {
                                  "type": "string",
                                  "enum": [
                                    "app",
                                    "agent"
                                  ],
                                  "description": "\"agent\": written through a token or an OAuth connection. \"app\": typed in the web app."
                                }
                              },
                              "required": [
                                "label",
                                "text",
                                "locale",
                                "visibility",
                                "updatedAt",
                                "updatedByName",
                                "origin"
                              ],
                              "description": "A proposal waiting for a person to validate it in the app. Not the position of the organization yet.",
                              "nullable": true
                            }
                          },
                          "required": [
                            "label",
                            "text",
                            "locale",
                            "sourceLocale",
                            "visibility",
                            "validatedAt",
                            "validatedByName",
                            "translations",
                            "draft"
                          ]
                        },
                        "matrix": {
                          "type": "object",
                          "properties": {
                            "vision": {
                              "type": "string",
                              "nullable": true
                            },
                            "context": {
                              "type": "string",
                              "nullable": true
                            },
                            "tradeoffs": {
                              "type": "string",
                              "nullable": true
                            },
                            "visibility": {
                              "type": "object",
                              "properties": {
                                "vision": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "context": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "tradeoffs": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                }
                              },
                              "required": [
                                "vision",
                                "context",
                                "tradeoffs"
                              ]
                            },
                            "validatedAt": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true
                            },
                            "validatedByName": {
                              "type": "string",
                              "nullable": true
                            },
                            "draft": {
                              "type": "object",
                              "properties": {
                                "vision": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "context": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "tradeoffs": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "visibility": {
                                  "type": "object",
                                  "properties": {
                                    "vision": {
                                      "type": "string",
                                      "enum": [
                                        "shared",
                                        "internal"
                                      ],
                                      "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                    },
                                    "context": {
                                      "type": "string",
                                      "enum": [
                                        "shared",
                                        "internal"
                                      ],
                                      "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                    },
                                    "tradeoffs": {
                                      "type": "string",
                                      "enum": [
                                        "shared",
                                        "internal"
                                      ],
                                      "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                    }
                                  },
                                  "required": [
                                    "vision",
                                    "context",
                                    "tradeoffs"
                                  ]
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updatedByName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "origin": {
                                  "type": "string",
                                  "enum": [
                                    "app",
                                    "agent"
                                  ],
                                  "description": "\"agent\": written through a token or an OAuth connection. \"app\": typed in the web app."
                                }
                              },
                              "required": [
                                "vision",
                                "context",
                                "tradeoffs",
                                "visibility",
                                "updatedAt",
                                "updatedByName",
                                "origin"
                              ],
                              "description": "The whole next version as proposed, waiting for a person to validate it in the app.",
                              "nullable": true
                            }
                          },
                          "required": [
                            "vision",
                            "context",
                            "tradeoffs",
                            "visibility",
                            "validatedAt",
                            "validatedByName",
                            "draft"
                          ]
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "matrixId": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "matrixName": {
                              "type": "string"
                            },
                            "vision": {
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "required": [
                            "matrixId",
                            "matrixName",
                            "vision"
                          ],
                          "description": "The validated vision of the matrix above in the cascade. Null without a parent, and in an external reading.",
                          "nullable": true
                        },
                        "validateUrl": {
                          "type": "string",
                          "description": "Where a person validates a draft, in the app. Null in an external reading.",
                          "nullable": true
                        }
                      },
                      "required": [
                        "purpose",
                        "matrix",
                        "parent",
                        "validateUrl"
                      ]
                    }
                  },
                  "required": [
                    "matrixId",
                    "strategicContext"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/purpose": {
      "put": {
        "operationId": "putPurpose",
        "tags": [
          "Matrices"
        ],
        "summary": "Propose the purpose of the organization",
        "description": "Why the organization exists, one text for all its matrices. Writes the draft; an admin validates it in the app. Same change rules as the frame of a matrix. Refused to a read-only token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000,
                    "description": "Why the organization exists, written out. One per organization, for all its matrices.",
                    "nullable": true
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "What the organization calls it: Purpose, Mission, Raison d'être…",
                    "nullable": true
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "shared",
                      "internal"
                    ],
                    "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                  },
                  "locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "fr",
                      "es",
                      "pt",
                      "de",
                      "it",
                      "nl",
                      "pl",
                      "cs",
                      "ro",
                      "tr",
                      "zh",
                      "ja"
                    ],
                    "description": "Language the text is written in. Default: the language of whoever writes the first draft."
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "purpose": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "What the organization calls it. Null: the default label.",
                          "nullable": true
                        },
                        "text": {
                          "type": "string",
                          "description": "The validated purpose, in the language asked for when a current translation exists.",
                          "nullable": true
                        },
                        "locale": {
                          "type": "string",
                          "description": "Language of the text returned.",
                          "nullable": true
                        },
                        "sourceLocale": {
                          "type": "string",
                          "description": "Language the purpose is written in.",
                          "nullable": true
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "shared",
                            "internal"
                          ],
                          "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                        },
                        "validatedAt": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "validatedByName": {
                          "type": "string",
                          "nullable": true
                        },
                        "translations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "locale": {
                                "type": "string"
                              },
                              "stale": {
                                "type": "boolean",
                                "description": "True: made for an earlier text, no longer served."
                              }
                            },
                            "required": [
                              "locale",
                              "stale"
                            ]
                          }
                        },
                        "draft": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "nullable": true
                            },
                            "text": {
                              "type": "string",
                              "nullable": true
                            },
                            "locale": {
                              "type": "string",
                              "nullable": true
                            },
                            "visibility": {
                              "type": "string",
                              "enum": [
                                "shared",
                                "internal"
                              ],
                              "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedByName": {
                              "type": "string",
                              "nullable": true
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "app",
                                "agent"
                              ],
                              "description": "\"agent\": written through a token or an OAuth connection. \"app\": typed in the web app."
                            }
                          },
                          "required": [
                            "label",
                            "text",
                            "locale",
                            "visibility",
                            "updatedAt",
                            "updatedByName",
                            "origin"
                          ],
                          "description": "A proposal waiting for a person to validate it in the app. Not the position of the organization yet.",
                          "nullable": true
                        }
                      },
                      "required": [
                        "label",
                        "text",
                        "locale",
                        "sourceLocale",
                        "visibility",
                        "validatedAt",
                        "validatedByName",
                        "translations",
                        "draft"
                      ]
                    },
                    "validateUrl": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "purpose",
                    "validateUrl"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/shares": {
      "get": {
        "operationId": "listShares",
        "tags": [
          "Sharing"
        ],
        "summary": "List the public links of a matrix",
        "description": "Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createShare",
        "tags": [
          "Sharing"
        ],
        "summary": "Publish a matrix on a public read-only link",
        "description": "Anyone holding the link can read the matrix. At most 10 active links per matrix. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 200,
                    "nullable": true
                  },
                  "expiresInDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365,
                    "nullable": true
                  },
                  "hideFigures": {
                    "type": "boolean",
                    "description": "true: the page shows no value, target, unit or external link, only the structure. Internal elements are never shown either way."
                  },
                  "fullSheets": {
                    "type": "boolean",
                    "description": "true: the initiative pages of this link show the full sheet (owner, sponsor, who does the next action, blockers, the sentence behind the health; resources only with figures). For a trusted audience. Default false."
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareCreated"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/matrices/{id}/shares/{shareId}": {
      "delete": {
        "operationId": "revokeShare",
        "tags": [
          "Sharing"
        ],
        "summary": "Revoke a public link",
        "description": "Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareRevoked"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/ideas": {
      "get": {
        "operationId": "listIdeas",
        "tags": [
          "Ideas"
        ],
        "summary": "List or search ideas",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inbox",
                "reviewing",
                "accepted",
                "rejected",
                "implemented"
              ]
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high",
                "critical"
              ]
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "conversation",
                "team_meeting",
                "client_feedback",
                "market_watch",
                "internal",
                "other"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createIdea",
        "tags": [
          "Ideas"
        ],
        "summary": "Add an idea to the inbox",
        "description": "Refused to a read-only token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 10000,
                    "nullable": true
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "conversation",
                      "team_meeting",
                      "client_feedback",
                      "market_watch",
                      "internal",
                      "other"
                    ]
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "maxItems": 30
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "linkedElementId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "description": "Free label, e.g. \"Jira\", \"A3\", \"QRQC\", \"Drive\"."
                        },
                        "ref": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "description": "Free reference: a URL, a ticket or project number, a path."
                        }
                      },
                      "required": [
                        "label",
                        "ref"
                      ]
                    },
                    "maxItems": 20,
                    "description": "Links to third-party tools, at most 20. Sending the list replaces it; [] clears it."
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Idea"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/ideas/{id}": {
      "put": {
        "operationId": "updateIdea",
        "tags": [
          "Ideas"
        ],
        "summary": "Update an idea",
        "description": "Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 10000,
                    "nullable": true
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "conversation",
                      "team_meeting",
                      "client_feedback",
                      "market_watch",
                      "internal",
                      "other"
                    ]
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "maxItems": 30
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "critical"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "inbox",
                      "reviewing",
                      "accepted",
                      "rejected",
                      "implemented"
                    ]
                  },
                  "assignedTo": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "linkedElementId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "description": "Free label, e.g. \"Jira\", \"A3\", \"QRQC\", \"Drive\"."
                        },
                        "ref": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "description": "Free reference: a URL, a ticket or project number, a path."
                        }
                      },
                      "required": [
                        "label",
                        "ref"
                      ]
                    },
                    "maxItems": 20,
                    "description": "Links to third-party tools, at most 20. Sending the list replaces it; [] clears it."
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Idea"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/exports/matrices": {
      "get": {
        "operationId": "exportMatrices",
        "tags": [
          "Exports"
        ],
        "summary": "Export all matrices",
        "description": "Active matrices first, then the default one, then the most recently updated.",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated, without spaces: elements,correlations. Default: both.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "audience",
            "in": "query",
            "required": false,
            "description": "\"external\" for anything shown outside the organization: no element marked internal (nor its correlations), no value, target, unit, link, name, reading, update or KPI definition; a sheet keeps why, the expected result, milestones, the next action and the health. Default \"internal\": everything.",
            "schema": {
              "type": "string",
              "enum": [
                "internal",
                "external"
              ],
              "default": "internal"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language to read the purpose of the organization in, when it is translated. Default: the language of the reader.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "pt",
                "de",
                "it",
                "nl",
                "pl",
                "cs",
                "ro",
                "tr",
                "zh",
                "ja"
              ]
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatricesExport"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/exports/summary": {
      "get": {
        "operationId": "exportSummary",
        "tags": [
          "Exports"
        ],
        "summary": "Get an overview of the organization",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SummaryExport"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/themes": {
      "get": {
        "operationId": "listThemes",
        "tags": [
          "Themes"
        ],
        "summary": "List strategic themes",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThemeList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/themes/{id}": {
      "get": {
        "operationId": "getTheme",
        "tags": [
          "Themes"
        ],
        "summary": "Get a strategic theme with its elements",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThemeDetail"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/cadences/architecture": {
      "get": {
        "operationId": "getCadenceArchitecture",
        "tags": [
          "Cadences"
        ],
        "summary": "Get the meeting cadences by level",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CadenceArchitecture"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agenda": {
      "get": {
        "operationId": "getAgenda",
        "tags": [
          "Cadences"
        ],
        "summary": "Where the organization stands in its review cycle, and what is due",
        "description": "Today (UTC), the reviews ahead, and what to do before them: reviews to prepare, record or schedule, KPIs missing the reading of the last closed period, initiatives without a recent update, overdue actions. Pass `since` (the time of your last call) to get only what became due since.",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only items that became due after this date or datetime: pass the time of your last call.",
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "horizonDays",
            "in": "query",
            "required": false,
            "description": "How far ahead the calendar looks, in days.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 180,
              "default": 30
            }
          },
          {
            "name": "matrixId",
            "in": "query",
            "required": false,
            "description": "Limits indicators, initiatives and actions to one matrix.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agenda"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/meetings": {
      "post": {
        "operationId": "createMeeting",
        "tags": [
          "Cadences"
        ],
        "summary": "Schedule a review of a cadence",
        "description": "MEETING_ALREADY_SCHEDULED (409) if the cadence already has a review scheduled that day. Refused to a read-only token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cadenceId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "scheduledDate": {
                    "type": "string",
                    "format": "date",
                    "description": "Calendar date, YYYY-MM-DD."
                  },
                  "matrixId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  }
                },
                "required": [
                  "cadenceId",
                  "scheduledDate"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meeting"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/meetings/{id}/complete": {
      "patch": {
        "operationId": "completeMeeting",
        "tags": [
          "Cadences"
        ],
        "summary": "Record a review that was held: notes, decisions, elements discussed",
        "description": "Once only: MEETING_ALREADY_COMPLETED (409) after that. The decisions are the participants’, as stated. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notes": {
                    "type": "string",
                    "maxLength": 50000,
                    "nullable": true
                  },
                  "decisions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000
                    },
                    "maxItems": 50,
                    "description": "What the review decided, one entry per decision, as the participants stated it.",
                    "nullable": true
                  },
                  "actualDate": {
                    "type": "string",
                    "format": "date",
                    "description": "When the review was held, if not today. Never in the future."
                  },
                  "discussedElementIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 100,
                    "description": "Matrix elements the review discussed."
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meeting"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/meetings/{id}/snapshot": {
      "get": {
        "operationId": "getReviewSnapshot",
        "tags": [
          "Cadences"
        ],
        "summary": "A recorded review, with the state of the matrix it saw",
        "description": "The snapshot is taken when the review is recorded: values, progress, health of the initiatives, latest readings, score. A value corrected afterwards does not change it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "review": {
                      "$ref": "#/components/schemas/Meeting"
                    },
                    "snapshot": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "integer"
                        },
                        "takenAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the review was recorded: the state shown is the one at that moment."
                        },
                        "matrix": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name"
                          ]
                        },
                        "score": {
                          "type": "number",
                          "description": "Completeness score at that moment."
                        },
                        "correlations": {
                          "type": "integer"
                        },
                        "elements": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "quadrant": {
                                "type": "string",
                                "enum": [
                                  "north",
                                  "east",
                                  "south",
                                  "west"
                                ],
                                "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                              },
                              "title": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "visibility": {
                                "type": "string",
                                "enum": [
                                  "shared",
                                  "internal"
                                ]
                              },
                              "targetValue": {
                                "type": "string",
                                "nullable": true
                              },
                              "currentValue": {
                                "type": "string",
                                "nullable": true
                              },
                              "unit": {
                                "type": "string",
                                "nullable": true
                              },
                              "progress": {
                                "type": "integer",
                                "nullable": true
                              },
                              "health": {
                                "type": "string",
                                "enum": [
                                  "green",
                                  "amber",
                                  "red",
                                  null
                                ],
                                "nullable": true
                              },
                              "healthNote": {
                                "type": "string",
                                "nullable": true
                              },
                              "reading": {
                                "type": "object",
                                "properties": {
                                  "period": {
                                    "type": "string",
                                    "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                                  },
                                  "value": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "provisional",
                                      "final"
                                    ],
                                    "description": "\"provisional\" while the period runs (it may still be corrected), \"final\" once it has ended. Derived from the period, in UTC."
                                  }
                                },
                                "required": [
                                  "period",
                                  "value",
                                  "status"
                                ],
                                "nullable": true
                              }
                            },
                            "required": [
                              "id",
                              "quadrant",
                              "title",
                              "status",
                              "visibility",
                              "targetValue",
                              "currentValue",
                              "unit",
                              "progress",
                              "health",
                              "healthNote",
                              "reading"
                            ]
                          }
                        },
                        "context": {
                          "type": "object",
                          "properties": {
                            "vision": {
                              "type": "string",
                              "nullable": true
                            },
                            "context": {
                              "type": "string",
                              "nullable": true
                            },
                            "tradeoffs": {
                              "type": "string",
                              "nullable": true
                            },
                            "visibility": {
                              "type": "object",
                              "properties": {
                                "vision": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "context": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "tradeoffs": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                }
                              },
                              "required": [
                                "vision",
                                "context",
                                "tradeoffs"
                              ]
                            },
                            "validatedAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "vision",
                            "context",
                            "tradeoffs",
                            "visibility",
                            "validatedAt"
                          ],
                          "description": "The validated vision, context and tradeoffs at that moment. Absent from a review recorded before 2026-11.",
                          "nullable": true
                        }
                      },
                      "required": [
                        "version",
                        "takenAt",
                        "matrix",
                        "score",
                        "correlations",
                        "elements"
                      ],
                      "description": "Null for a review not recorded yet, or recorded before snapshots existed.",
                      "nullable": true
                    }
                  },
                  "required": [
                    "review",
                    "snapshot"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/cadences": {
      "get": {
        "operationId": "listCadences",
        "tags": [
          "Cadences"
        ],
        "summary": "List the review cadences of the organization",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cadences": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "organizationId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "frequency": {
                            "type": "string"
                          },
                          "operationalLevel": {
                            "type": "string"
                          },
                          "parentCadenceId": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "parentCadenceName": {
                            "type": "string",
                            "nullable": true
                          },
                          "primaryQuadrant": {
                            "type": "string",
                            "enum": [
                              "north",
                              "east",
                              "south",
                              "west",
                              null
                            ],
                            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values.",
                            "nullable": true
                          },
                          "trackedQuadrants": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "north",
                                "east",
                                "south",
                                "west"
                              ],
                              "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                            }
                          },
                          "teamScope": {
                            "type": "string",
                            "nullable": true
                          },
                          "scopeDescription": {
                            "type": "string",
                            "nullable": true
                          },
                          "recurrenceRule": {
                            "type": "string",
                            "nullable": true
                          },
                          "durationMinutes": {
                            "type": "integer",
                            "nullable": true
                          },
                          "requiredRoles": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "createdBy": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "createdByName": {
                            "type": "string",
                            "nullable": true
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "name",
                          "type",
                          "frequency",
                          "operationalLevel",
                          "parentCadenceId",
                          "parentCadenceName",
                          "primaryQuadrant",
                          "trackedQuadrants",
                          "teamScope",
                          "scopeDescription",
                          "recurrenceRule",
                          "durationMinutes",
                          "requiredRoles",
                          "createdBy",
                          "createdByName",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    }
                  },
                  "required": [
                    "cadences"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createCadence",
        "tags": [
          "Cadences"
        ],
        "summary": "Create a review cadence (monthly committee, quarterly review…)",
        "description": "PARENT_NOT_FOUND if parentCadenceId is not a cadence of the organization. Refused to a read-only token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "strategic",
                      "annual",
                      "qbr",
                      "monthly",
                      "weekly",
                      "daily",
                      "catchball"
                    ]
                  },
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "yearly",
                      "quarterly",
                      "monthly",
                      "weekly",
                      "daily"
                    ]
                  },
                  "operationalLevel": {
                    "type": "string",
                    "enum": [
                      "strategic",
                      "tactical",
                      "operational_mgmt",
                      "team_mgmt",
                      "execution"
                    ]
                  },
                  "primaryQuadrant": {
                    "type": "string",
                    "enum": [
                      "north",
                      "east",
                      "south",
                      "west",
                      null
                    ],
                    "nullable": true
                  },
                  "trackedQuadrants": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west"
                      ]
                    },
                    "maxItems": 4
                  },
                  "teamScope": {
                    "type": "string",
                    "maxLength": 100,
                    "nullable": true
                  },
                  "scopeDescription": {
                    "type": "string",
                    "maxLength": 10000,
                    "nullable": true
                  },
                  "recurrenceRule": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  },
                  "durationMinutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1440
                  },
                  "requiredRoles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "maxItems": 20
                  },
                  "parentCadenceId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The cadence this one reports to (a monthly review under the quarterly one).",
                    "nullable": true
                  }
                },
                "required": [
                  "name",
                  "type",
                  "frequency",
                  "operationalLevel"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organizationId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "frequency": {
                      "type": "string"
                    },
                    "operationalLevel": {
                      "type": "string"
                    },
                    "parentCadenceId": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    },
                    "parentCadenceName": {
                      "type": "string",
                      "nullable": true
                    },
                    "primaryQuadrant": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west",
                        null
                      ],
                      "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values.",
                      "nullable": true
                    },
                    "trackedQuadrants": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "north",
                          "east",
                          "south",
                          "west"
                        ],
                        "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                      }
                    },
                    "teamScope": {
                      "type": "string",
                      "nullable": true
                    },
                    "scopeDescription": {
                      "type": "string",
                      "nullable": true
                    },
                    "recurrenceRule": {
                      "type": "string",
                      "nullable": true
                    },
                    "durationMinutes": {
                      "type": "integer",
                      "nullable": true
                    },
                    "requiredRoles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdBy": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    },
                    "createdByName": {
                      "type": "string",
                      "nullable": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "type",
                    "frequency",
                    "operationalLevel",
                    "parentCadenceId",
                    "parentCadenceName",
                    "primaryQuadrant",
                    "trackedQuadrants",
                    "teamScope",
                    "scopeDescription",
                    "recurrenceRule",
                    "durationMinutes",
                    "requiredRoles",
                    "createdBy",
                    "createdByName",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/cadences/{id}": {
      "patch": {
        "operationId": "updateCadence",
        "tags": [
          "Cadences"
        ],
        "summary": "Change a review cadence",
        "description": "SELF_PARENT, PARENT_NOT_FOUND or CADENCE_CYCLE when the parent would make a loop. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "strategic",
                      "annual",
                      "qbr",
                      "monthly",
                      "weekly",
                      "daily",
                      "catchball"
                    ]
                  },
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "yearly",
                      "quarterly",
                      "monthly",
                      "weekly",
                      "daily"
                    ]
                  },
                  "operationalLevel": {
                    "type": "string",
                    "enum": [
                      "strategic",
                      "tactical",
                      "operational_mgmt",
                      "team_mgmt",
                      "execution"
                    ]
                  },
                  "primaryQuadrant": {
                    "type": "string",
                    "enum": [
                      "north",
                      "east",
                      "south",
                      "west",
                      null
                    ],
                    "nullable": true
                  },
                  "trackedQuadrants": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west"
                      ]
                    },
                    "maxItems": 4
                  },
                  "teamScope": {
                    "type": "string",
                    "maxLength": 100,
                    "nullable": true
                  },
                  "scopeDescription": {
                    "type": "string",
                    "maxLength": 10000,
                    "nullable": true
                  },
                  "recurrenceRule": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  },
                  "durationMinutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1440
                  },
                  "requiredRoles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "maxItems": 20
                  },
                  "parentCadenceId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The cadence this one reports to (a monthly review under the quarterly one).",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organizationId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "frequency": {
                      "type": "string"
                    },
                    "operationalLevel": {
                      "type": "string"
                    },
                    "parentCadenceId": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    },
                    "parentCadenceName": {
                      "type": "string",
                      "nullable": true
                    },
                    "primaryQuadrant": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west",
                        null
                      ],
                      "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values.",
                      "nullable": true
                    },
                    "trackedQuadrants": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "north",
                          "east",
                          "south",
                          "west"
                        ],
                        "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                      }
                    },
                    "teamScope": {
                      "type": "string",
                      "nullable": true
                    },
                    "scopeDescription": {
                      "type": "string",
                      "nullable": true
                    },
                    "recurrenceRule": {
                      "type": "string",
                      "nullable": true
                    },
                    "durationMinutes": {
                      "type": "integer",
                      "nullable": true
                    },
                    "requiredRoles": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "createdBy": {
                      "type": "string",
                      "format": "uuid",
                      "nullable": true
                    },
                    "createdByName": {
                      "type": "string",
                      "nullable": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "name",
                    "type",
                    "frequency",
                    "operationalLevel",
                    "parentCadenceId",
                    "parentCadenceName",
                    "primaryQuadrant",
                    "trackedQuadrants",
                    "teamScope",
                    "scopeDescription",
                    "recurrenceRule",
                    "durationMinutes",
                    "requiredRoles",
                    "createdBy",
                    "createdByName",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/whoami": {
      "get": {
        "operationId": "whoami",
        "tags": [
          "Identity"
        ],
        "summary": "Who is calling, with what rights, under which plan",
        "description": "The organization, the member behind this connection, the role this connection actually has (member role capped by the token permissions or OAuth scopes, and by the plan), the plan with its limits and usage, and which active matrices this connection may edit. Read it before a write.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Whoami"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/members": {
      "get": {
        "operationId": "listMembers",
        "tags": [
          "Identity"
        ],
        "summary": "The directory of the organization: who can own an element",
        "description": "Active members, name and id only. Pass the id as ownerId.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "isActive": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "displayName",
                          "isActive"
                        ]
                      },
                      "description": "Active members: who can own an element (owner_id)."
                    }
                  },
                  "required": [
                    "members"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/capability-requests": {
      "post": {
        "operationId": "reportMissingCapability",
        "tags": [
          "Identity"
        ],
        "summary": "Tell us what you needed and did not find",
        "description": "Describe the capability, not your strategy. A viewer may ask. Counted per organization; when `feature` names a capability we list as not built, it counts toward building it. Our own organizations are heard but never counted; the public demo and test organizations are refused with INTERNAL_ORG.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "capability": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 300,
                    "description": "What is missing, in one sentence."
                  },
                  "useCase": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "What you were trying to do when you needed it."
                  },
                  "feature": {
                    "type": "string",
                    "enum": [
                      "agent-inbox-token",
                      "saml",
                      "claude-ema",
                      "client-encryption",
                      "kpi-alerts",
                      "on-prem",
                      "matrix-orientation",
                      "a3-initiative"
                    ],
                    "description": "When it is one of the capabilities we already list as not built."
                  }
                },
                "required": [
                  "capability"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "countedAs": {
                      "type": "string",
                      "enum": [
                        "agent-inbox-token",
                        "saml",
                        "claude-ema",
                        "client-encryption",
                        "kpi-alerts",
                        "on-prem",
                        "matrix-orientation",
                        "a3-initiative",
                        null
                      ],
                      "description": "The listed capability this request was counted for, if any.",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "countedAs"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/roadmaps": {
      "get": {
        "operationId": "listRoadmaps",
        "tags": [
          "Analysis"
        ],
        "summary": "The excellence roadmaps of the organization",
        "description": "Maturity grids assessed site by site. Read one with its id.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roadmaps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true
                          },
                          "auditFrequency": {
                            "type": "string",
                            "enum": [
                              "quarterly",
                              "semiannual",
                              "annual",
                              null
                            ],
                            "nullable": true
                          },
                          "levelCount": {
                            "type": "integer"
                          },
                          "themeCount": {
                            "type": "integer"
                          },
                          "itemCount": {
                            "type": "integer"
                          },
                          "assessmentCount": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "auditFrequency",
                          "levelCount",
                          "themeCount",
                          "itemCount",
                          "assessmentCount"
                        ]
                      }
                    }
                  },
                  "required": [
                    "roadmaps"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/roadmaps/{id}": {
      "get": {
        "operationId": "getRoadmap",
        "tags": [
          "Analysis"
        ],
        "summary": "An excellence roadmap: grid, levels per site, targets, and what is missing",
        "description": "Themes, items and one description per level; for each site its level and target per item and the initiative linked; the assessments; and the findings (a site due for an assessment, an item under its target with no initiative or a closed one, a score with no evidence). One grid, several languages: pass lang, or matrixId to read it in the language of that site.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of the grid texts. A text not translated is served in the source language.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "fr",
                "es",
                "pt",
                "de",
                "it",
                "nl",
                "pl",
                "cs",
                "ro",
                "tr",
                "zh",
                "ja"
              ]
            }
          },
          {
            "name": "matrixId",
            "in": "query",
            "required": false,
            "description": "A site: its preferred language is used when lang is absent.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true
                    },
                    "auditFrequency": {
                      "type": "string",
                      "enum": [
                        "quarterly",
                        "semiannual",
                        "annual",
                        null
                      ],
                      "description": "How often a site is assessed.",
                      "nullable": true
                    },
                    "locale": {
                      "type": "string",
                      "enum": [
                        "en",
                        "fr",
                        "es",
                        "pt",
                        "de",
                        "it",
                        "nl",
                        "pl",
                        "cs",
                        "ro",
                        "tr",
                        "zh",
                        "ja"
                      ],
                      "description": "The language the texts of this answer are in. A text not translated is in the source language."
                    },
                    "sourceLocale": {
                      "type": "string",
                      "enum": [
                        "en",
                        "fr",
                        "es",
                        "pt",
                        "de",
                        "it",
                        "nl",
                        "pl",
                        "cs",
                        "ro",
                        "tr",
                        "zh",
                        "ja"
                      ],
                      "description": "The language the grid is written in."
                    },
                    "languages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "locale": {
                            "type": "string",
                            "enum": [
                              "en",
                              "fr",
                              "es",
                              "pt",
                              "de",
                              "it",
                              "nl",
                              "pl",
                              "cs",
                              "ro",
                              "tr",
                              "zh",
                              "ja"
                            ]
                          },
                          "missing": {
                            "type": "integer",
                            "description": "Texts still served in the source language."
                          }
                        },
                        "required": [
                          "locale",
                          "missing"
                        ]
                      },
                      "description": "One grid, several languages: the source first, then its translations."
                    },
                    "levels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "meaning": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "name",
                          "meaning"
                        ]
                      },
                      "description": "Lowest level first; level 1 is the first entry."
                    },
                    "themes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "objective": {
                            "type": "string",
                            "nullable": true
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "question": {
                                  "type": "string"
                                },
                                "howToAssess": {
                                  "type": "string",
                                  "description": "What to go and see, whom to ask.",
                                  "nullable": true
                                },
                                "standardUrl": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "levelDescriptions": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "One per level, lowest first."
                                }
                              },
                              "required": [
                                "id",
                                "question",
                                "howToAssess",
                                "standardUrl",
                                "levelDescriptions"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "objective",
                          "items"
                        ]
                      }
                    },
                    "sites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "matrixId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "locale": {
                            "type": "string",
                            "enum": [
                              "en",
                              "fr",
                              "es",
                              "pt",
                              "de",
                              "it",
                              "nl",
                              "pl",
                              "cs",
                              "ro",
                              "tr",
                              "zh",
                              "ja",
                              null
                            ],
                            "description": "The language this site reads the grid in; null: the source language.",
                            "nullable": true
                          },
                          "reference": {
                            "type": "object",
                            "properties": {
                              "assessmentId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "self",
                                  "official"
                                ],
                                "description": "official: the latest validated official assessment. self: no validated official one; the latest validated self-assessment, or the draft if none was ever validated."
                              },
                              "assessedOn": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "validated"
                                ]
                              }
                            },
                            "required": [
                              "assessmentId",
                              "basis",
                              "assessedOn",
                              "status"
                            ],
                            "description": "The assessment the levels of this site are read from.",
                            "nullable": true
                          },
                          "cells": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "itemId": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "level": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "notApplicable": {
                                  "type": "boolean"
                                },
                                "targetLevel": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "gap": {
                                  "type": "integer",
                                  "description": "Levels still to climb; 0 at or above target, null when level or target is unknown.",
                                  "nullable": true
                                },
                                "linkedElement": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "status": {
                                      "type": "string"
                                    },
                                    "matrixId": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "title",
                                    "status",
                                    "matrixId"
                                  ],
                                  "description": "The initiative that must raise this item.",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "itemId",
                                "level",
                                "notApplicable",
                                "targetLevel",
                                "gap",
                                "linkedElement"
                              ]
                            }
                          }
                        },
                        "required": [
                          "matrixId",
                          "name",
                          "locale",
                          "reference",
                          "cells"
                        ]
                      },
                      "description": "The sites (matrices) that carry a target or an assessment."
                    },
                    "availableSites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "matrixId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "matrixId",
                          "name"
                        ]
                      },
                      "description": "Matrices not assessed yet."
                    },
                    "assessments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "matrixId": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The site assessed; null if its matrix was deleted (scopeName keeps its name).",
                            "nullable": true
                          },
                          "scopeName": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "self",
                              "official"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "validated"
                            ],
                            "description": "A validated assessment cannot be changed."
                          },
                          "assessedOn": {
                            "type": "string",
                            "description": "YYYY-MM-DD"
                          },
                          "auditorName": {
                            "type": "string",
                            "nullable": true
                          },
                          "notes": {
                            "type": "string",
                            "nullable": true
                          },
                          "createdByName": {
                            "type": "string",
                            "nullable": true
                          },
                          "validatedByName": {
                            "type": "string",
                            "nullable": true
                          },
                          "validatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                          },
                          "scores": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "itemId": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "level": {
                                  "type": "integer",
                                  "description": "1-based; null when not applicable or not scored yet.",
                                  "nullable": true
                                },
                                "notApplicable": {
                                  "type": "boolean"
                                },
                                "evidence": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "remark": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "itemId",
                                "level",
                                "notApplicable",
                                "evidence",
                                "remark"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "matrixId",
                          "scopeName",
                          "kind",
                          "status",
                          "assessedOn",
                          "auditorName",
                          "notes",
                          "createdByName",
                          "validatedByName",
                          "validatedAt",
                          "scores"
                        ]
                      },
                      "description": "Most recent first."
                    },
                    "findings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "assessment_due",
                              "item_below_target_unlinked",
                              "item_link_closed",
                              "score_without_evidence"
                            ]
                          },
                          "key": {
                            "type": "string",
                            "description": "Stable while the finding stays true."
                          },
                          "matrixId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "itemId": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "subject": {
                            "type": "string"
                          },
                          "since": {
                            "type": "string",
                            "description": "YYYY-MM-DD: the day it became true."
                          },
                          "summary": {
                            "type": "string"
                          },
                          "siteName": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string",
                            "nullable": true
                          },
                          "level": {
                            "type": "integer",
                            "nullable": true
                          },
                          "targetLevel": {
                            "type": "integer",
                            "nullable": true
                          },
                          "elementTitle": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastAssessedOn": {
                            "type": "string",
                            "description": "YYYY-MM-DD, for assessment_due; null if the site was never assessed.",
                            "nullable": true
                          }
                        },
                        "required": [
                          "kind",
                          "key",
                          "matrixId",
                          "itemId",
                          "subject",
                          "since",
                          "summary",
                          "siteName",
                          "question",
                          "level",
                          "targetLevel",
                          "elementTitle",
                          "lastAssessedOn"
                        ]
                      },
                      "description": "What is missing: signal it, people decide."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "auditFrequency",
                    "locale",
                    "sourceLocale",
                    "languages",
                    "levels",
                    "themes",
                    "sites",
                    "availableSites",
                    "assessments",
                    "findings"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/roadmaps/{id}/assessments": {
      "post": {
        "operationId": "openAssessment",
        "tags": [
          "Analysis"
        ],
        "summary": "Open an assessment of a site",
        "description": "A self-assessment by an editor, an official one by an admin. It starts as a draft; scores are written into it. A site has one draft per kind: if one is open, its id is returned. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "matrixId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The site assessed (a matrix of the organization)."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "self",
                      "official"
                    ]
                  },
                  "assessedOn": {
                    "type": "string",
                    "format": "date",
                    "description": "When the assessment was made; today if absent. Never in the future."
                  },
                  "auditorName": {
                    "type": "string",
                    "maxLength": 200,
                    "nullable": true
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 5000,
                    "nullable": true
                  }
                },
                "required": [
                  "matrixId",
                  "kind"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "assessmentId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "roadmap": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string",
                          "nullable": true
                        },
                        "auditFrequency": {
                          "type": "string",
                          "enum": [
                            "quarterly",
                            "semiannual",
                            "annual",
                            null
                          ],
                          "description": "How often a site is assessed.",
                          "nullable": true
                        },
                        "locale": {
                          "type": "string",
                          "enum": [
                            "en",
                            "fr",
                            "es",
                            "pt",
                            "de",
                            "it",
                            "nl",
                            "pl",
                            "cs",
                            "ro",
                            "tr",
                            "zh",
                            "ja"
                          ],
                          "description": "The language the texts of this answer are in. A text not translated is in the source language."
                        },
                        "sourceLocale": {
                          "type": "string",
                          "enum": [
                            "en",
                            "fr",
                            "es",
                            "pt",
                            "de",
                            "it",
                            "nl",
                            "pl",
                            "cs",
                            "ro",
                            "tr",
                            "zh",
                            "ja"
                          ],
                          "description": "The language the grid is written in."
                        },
                        "languages": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "locale": {
                                "type": "string",
                                "enum": [
                                  "en",
                                  "fr",
                                  "es",
                                  "pt",
                                  "de",
                                  "it",
                                  "nl",
                                  "pl",
                                  "cs",
                                  "ro",
                                  "tr",
                                  "zh",
                                  "ja"
                                ]
                              },
                              "missing": {
                                "type": "integer",
                                "description": "Texts still served in the source language."
                              }
                            },
                            "required": [
                              "locale",
                              "missing"
                            ]
                          },
                          "description": "One grid, several languages: the source first, then its translations."
                        },
                        "levels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "meaning": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": [
                              "name",
                              "meaning"
                            ]
                          },
                          "description": "Lowest level first; level 1 is the first entry."
                        },
                        "themes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "objective": {
                                "type": "string",
                                "nullable": true
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "question": {
                                      "type": "string"
                                    },
                                    "howToAssess": {
                                      "type": "string",
                                      "description": "What to go and see, whom to ask.",
                                      "nullable": true
                                    },
                                    "standardUrl": {
                                      "type": "string",
                                      "nullable": true
                                    },
                                    "levelDescriptions": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      },
                                      "description": "One per level, lowest first."
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "question",
                                    "howToAssess",
                                    "standardUrl",
                                    "levelDescriptions"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "objective",
                              "items"
                            ]
                          }
                        },
                        "sites": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "matrixId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "locale": {
                                "type": "string",
                                "enum": [
                                  "en",
                                  "fr",
                                  "es",
                                  "pt",
                                  "de",
                                  "it",
                                  "nl",
                                  "pl",
                                  "cs",
                                  "ro",
                                  "tr",
                                  "zh",
                                  "ja",
                                  null
                                ],
                                "description": "The language this site reads the grid in; null: the source language.",
                                "nullable": true
                              },
                              "reference": {
                                "type": "object",
                                "properties": {
                                  "assessmentId": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "basis": {
                                    "type": "string",
                                    "enum": [
                                      "self",
                                      "official"
                                    ],
                                    "description": "official: the latest validated official assessment. self: no validated official one; the latest validated self-assessment, or the draft if none was ever validated."
                                  },
                                  "assessedOn": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "draft",
                                      "validated"
                                    ]
                                  }
                                },
                                "required": [
                                  "assessmentId",
                                  "basis",
                                  "assessedOn",
                                  "status"
                                ],
                                "description": "The assessment the levels of this site are read from.",
                                "nullable": true
                              },
                              "cells": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "itemId": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "level": {
                                      "type": "integer",
                                      "nullable": true
                                    },
                                    "notApplicable": {
                                      "type": "boolean"
                                    },
                                    "targetLevel": {
                                      "type": "integer",
                                      "nullable": true
                                    },
                                    "gap": {
                                      "type": "integer",
                                      "description": "Levels still to climb; 0 at or above target, null when level or target is unknown.",
                                      "nullable": true
                                    },
                                    "linkedElement": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "title": {
                                          "type": "string"
                                        },
                                        "status": {
                                          "type": "string"
                                        },
                                        "matrixId": {
                                          "type": "string",
                                          "format": "uuid"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "title",
                                        "status",
                                        "matrixId"
                                      ],
                                      "description": "The initiative that must raise this item.",
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "itemId",
                                    "level",
                                    "notApplicable",
                                    "targetLevel",
                                    "gap",
                                    "linkedElement"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "matrixId",
                              "name",
                              "locale",
                              "reference",
                              "cells"
                            ]
                          },
                          "description": "The sites (matrices) that carry a target or an assessment."
                        },
                        "availableSites": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "matrixId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "matrixId",
                              "name"
                            ]
                          },
                          "description": "Matrices not assessed yet."
                        },
                        "assessments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "matrixId": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The site assessed; null if its matrix was deleted (scopeName keeps its name).",
                                "nullable": true
                              },
                              "scopeName": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "self",
                                  "official"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "validated"
                                ],
                                "description": "A validated assessment cannot be changed."
                              },
                              "assessedOn": {
                                "type": "string",
                                "description": "YYYY-MM-DD"
                              },
                              "auditorName": {
                                "type": "string",
                                "nullable": true
                              },
                              "notes": {
                                "type": "string",
                                "nullable": true
                              },
                              "createdByName": {
                                "type": "string",
                                "nullable": true
                              },
                              "validatedByName": {
                                "type": "string",
                                "nullable": true
                              },
                              "validatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true
                              },
                              "scores": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "itemId": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "level": {
                                      "type": "integer",
                                      "description": "1-based; null when not applicable or not scored yet.",
                                      "nullable": true
                                    },
                                    "notApplicable": {
                                      "type": "boolean"
                                    },
                                    "evidence": {
                                      "type": "string",
                                      "nullable": true
                                    },
                                    "remark": {
                                      "type": "string",
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "itemId",
                                    "level",
                                    "notApplicable",
                                    "evidence",
                                    "remark"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "id",
                              "matrixId",
                              "scopeName",
                              "kind",
                              "status",
                              "assessedOn",
                              "auditorName",
                              "notes",
                              "createdByName",
                              "validatedByName",
                              "validatedAt",
                              "scores"
                            ]
                          },
                          "description": "Most recent first."
                        },
                        "findings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "assessment_due",
                                  "item_below_target_unlinked",
                                  "item_link_closed",
                                  "score_without_evidence"
                                ]
                              },
                              "key": {
                                "type": "string",
                                "description": "Stable while the finding stays true."
                              },
                              "matrixId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "itemId": {
                                "type": "string",
                                "format": "uuid",
                                "nullable": true
                              },
                              "subject": {
                                "type": "string"
                              },
                              "since": {
                                "type": "string",
                                "description": "YYYY-MM-DD: the day it became true."
                              },
                              "summary": {
                                "type": "string"
                              },
                              "siteName": {
                                "type": "string"
                              },
                              "question": {
                                "type": "string",
                                "nullable": true
                              },
                              "level": {
                                "type": "integer",
                                "nullable": true
                              },
                              "targetLevel": {
                                "type": "integer",
                                "nullable": true
                              },
                              "elementTitle": {
                                "type": "string",
                                "nullable": true
                              },
                              "lastAssessedOn": {
                                "type": "string",
                                "description": "YYYY-MM-DD, for assessment_due; null if the site was never assessed.",
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "key",
                              "matrixId",
                              "itemId",
                              "subject",
                              "since",
                              "summary",
                              "siteName",
                              "question",
                              "level",
                              "targetLevel",
                              "elementTitle",
                              "lastAssessedOn"
                            ]
                          },
                          "description": "What is missing: signal it, people decide."
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "description",
                        "auditFrequency",
                        "locale",
                        "sourceLocale",
                        "languages",
                        "levels",
                        "themes",
                        "sites",
                        "availableSites",
                        "assessments",
                        "findings"
                      ]
                    }
                  },
                  "required": [
                    "assessmentId",
                    "roadmap"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/roadmaps/{id}/assessments/{assessmentId}": {
      "patch": {
        "operationId": "scoreAssessment",
        "tags": [
          "Analysis"
        ],
        "summary": "Write scores, evidence and remarks into a draft assessment",
        "description": "A field given replaces the stored one, null clears it, absent keeps it. 409 ASSESSMENT_VALIDATED once the assessment is validated. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assessmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assessedOn": {
                    "type": "string",
                    "format": "date",
                    "description": "YYYY-MM-DD"
                  },
                  "auditorName": {
                    "type": "string",
                    "maxLength": 200,
                    "nullable": true
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 5000,
                    "nullable": true
                  },
                  "scores": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "itemId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "level": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 6,
                          "nullable": true
                        },
                        "notApplicable": {
                          "type": "boolean"
                        },
                        "evidence": {
                          "type": "string",
                          "maxLength": 5000,
                          "description": "What was seen: a document, a figure, a workstation.",
                          "nullable": true
                        },
                        "remark": {
                          "type": "string",
                          "maxLength": 5000,
                          "nullable": true
                        }
                      },
                      "required": [
                        "itemId"
                      ]
                    },
                    "maxItems": 600
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true
                    },
                    "auditFrequency": {
                      "type": "string",
                      "enum": [
                        "quarterly",
                        "semiannual",
                        "annual",
                        null
                      ],
                      "description": "How often a site is assessed.",
                      "nullable": true
                    },
                    "locale": {
                      "type": "string",
                      "enum": [
                        "en",
                        "fr",
                        "es",
                        "pt",
                        "de",
                        "it",
                        "nl",
                        "pl",
                        "cs",
                        "ro",
                        "tr",
                        "zh",
                        "ja"
                      ],
                      "description": "The language the texts of this answer are in. A text not translated is in the source language."
                    },
                    "sourceLocale": {
                      "type": "string",
                      "enum": [
                        "en",
                        "fr",
                        "es",
                        "pt",
                        "de",
                        "it",
                        "nl",
                        "pl",
                        "cs",
                        "ro",
                        "tr",
                        "zh",
                        "ja"
                      ],
                      "description": "The language the grid is written in."
                    },
                    "languages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "locale": {
                            "type": "string",
                            "enum": [
                              "en",
                              "fr",
                              "es",
                              "pt",
                              "de",
                              "it",
                              "nl",
                              "pl",
                              "cs",
                              "ro",
                              "tr",
                              "zh",
                              "ja"
                            ]
                          },
                          "missing": {
                            "type": "integer",
                            "description": "Texts still served in the source language."
                          }
                        },
                        "required": [
                          "locale",
                          "missing"
                        ]
                      },
                      "description": "One grid, several languages: the source first, then its translations."
                    },
                    "levels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "meaning": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "name",
                          "meaning"
                        ]
                      },
                      "description": "Lowest level first; level 1 is the first entry."
                    },
                    "themes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "objective": {
                            "type": "string",
                            "nullable": true
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "question": {
                                  "type": "string"
                                },
                                "howToAssess": {
                                  "type": "string",
                                  "description": "What to go and see, whom to ask.",
                                  "nullable": true
                                },
                                "standardUrl": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "levelDescriptions": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "One per level, lowest first."
                                }
                              },
                              "required": [
                                "id",
                                "question",
                                "howToAssess",
                                "standardUrl",
                                "levelDescriptions"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "objective",
                          "items"
                        ]
                      }
                    },
                    "sites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "matrixId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "locale": {
                            "type": "string",
                            "enum": [
                              "en",
                              "fr",
                              "es",
                              "pt",
                              "de",
                              "it",
                              "nl",
                              "pl",
                              "cs",
                              "ro",
                              "tr",
                              "zh",
                              "ja",
                              null
                            ],
                            "description": "The language this site reads the grid in; null: the source language.",
                            "nullable": true
                          },
                          "reference": {
                            "type": "object",
                            "properties": {
                              "assessmentId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "self",
                                  "official"
                                ],
                                "description": "official: the latest validated official assessment. self: no validated official one; the latest validated self-assessment, or the draft if none was ever validated."
                              },
                              "assessedOn": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "validated"
                                ]
                              }
                            },
                            "required": [
                              "assessmentId",
                              "basis",
                              "assessedOn",
                              "status"
                            ],
                            "description": "The assessment the levels of this site are read from.",
                            "nullable": true
                          },
                          "cells": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "itemId": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "level": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "notApplicable": {
                                  "type": "boolean"
                                },
                                "targetLevel": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "gap": {
                                  "type": "integer",
                                  "description": "Levels still to climb; 0 at or above target, null when level or target is unknown.",
                                  "nullable": true
                                },
                                "linkedElement": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "status": {
                                      "type": "string"
                                    },
                                    "matrixId": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "title",
                                    "status",
                                    "matrixId"
                                  ],
                                  "description": "The initiative that must raise this item.",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "itemId",
                                "level",
                                "notApplicable",
                                "targetLevel",
                                "gap",
                                "linkedElement"
                              ]
                            }
                          }
                        },
                        "required": [
                          "matrixId",
                          "name",
                          "locale",
                          "reference",
                          "cells"
                        ]
                      },
                      "description": "The sites (matrices) that carry a target or an assessment."
                    },
                    "availableSites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "matrixId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "matrixId",
                          "name"
                        ]
                      },
                      "description": "Matrices not assessed yet."
                    },
                    "assessments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "matrixId": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The site assessed; null if its matrix was deleted (scopeName keeps its name).",
                            "nullable": true
                          },
                          "scopeName": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "self",
                              "official"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "validated"
                            ],
                            "description": "A validated assessment cannot be changed."
                          },
                          "assessedOn": {
                            "type": "string",
                            "description": "YYYY-MM-DD"
                          },
                          "auditorName": {
                            "type": "string",
                            "nullable": true
                          },
                          "notes": {
                            "type": "string",
                            "nullable": true
                          },
                          "createdByName": {
                            "type": "string",
                            "nullable": true
                          },
                          "validatedByName": {
                            "type": "string",
                            "nullable": true
                          },
                          "validatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                          },
                          "scores": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "itemId": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "level": {
                                  "type": "integer",
                                  "description": "1-based; null when not applicable or not scored yet.",
                                  "nullable": true
                                },
                                "notApplicable": {
                                  "type": "boolean"
                                },
                                "evidence": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "remark": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "itemId",
                                "level",
                                "notApplicable",
                                "evidence",
                                "remark"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "matrixId",
                          "scopeName",
                          "kind",
                          "status",
                          "assessedOn",
                          "auditorName",
                          "notes",
                          "createdByName",
                          "validatedByName",
                          "validatedAt",
                          "scores"
                        ]
                      },
                      "description": "Most recent first."
                    },
                    "findings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "assessment_due",
                              "item_below_target_unlinked",
                              "item_link_closed",
                              "score_without_evidence"
                            ]
                          },
                          "key": {
                            "type": "string",
                            "description": "Stable while the finding stays true."
                          },
                          "matrixId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "itemId": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "subject": {
                            "type": "string"
                          },
                          "since": {
                            "type": "string",
                            "description": "YYYY-MM-DD: the day it became true."
                          },
                          "summary": {
                            "type": "string"
                          },
                          "siteName": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string",
                            "nullable": true
                          },
                          "level": {
                            "type": "integer",
                            "nullable": true
                          },
                          "targetLevel": {
                            "type": "integer",
                            "nullable": true
                          },
                          "elementTitle": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastAssessedOn": {
                            "type": "string",
                            "description": "YYYY-MM-DD, for assessment_due; null if the site was never assessed.",
                            "nullable": true
                          }
                        },
                        "required": [
                          "kind",
                          "key",
                          "matrixId",
                          "itemId",
                          "subject",
                          "since",
                          "summary",
                          "siteName",
                          "question",
                          "level",
                          "targetLevel",
                          "elementTitle",
                          "lastAssessedOn"
                        ]
                      },
                      "description": "What is missing: signal it, people decide."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "auditFrequency",
                    "locale",
                    "sourceLocale",
                    "languages",
                    "levels",
                    "themes",
                    "sites",
                    "availableSites",
                    "assessments",
                    "findings"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/roadmaps/{id}/translations/{locale}": {
      "get": {
        "operationId": "getRoadmapTranslation",
        "tags": [
          "Analysis"
        ],
        "summary": "What is stored of a roadmap in one language",
        "description": "One grid, several languages. The texts stored for this language and nothing else: an empty string where a text is not translated, which the roadmap itself serves in its source language. 400 SOURCE_LOCALE for the language the grid is written in.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "enum": [
                        "en",
                        "fr",
                        "es",
                        "pt",
                        "de",
                        "it",
                        "nl",
                        "pl",
                        "cs",
                        "ro",
                        "tr",
                        "zh",
                        "ja"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "description": "Empty: not translated, the source language is served."
                    },
                    "description": {
                      "type": "string"
                    },
                    "levels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "meaning": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "meaning"
                        ]
                      },
                      "description": "One per level of the roadmap, in order."
                    },
                    "themes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "objective": {
                            "type": "string"
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "question": {
                                  "type": "string"
                                },
                                "howToAssess": {
                                  "type": "string"
                                },
                                "levelDescriptions": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "One per level, in order."
                                }
                              },
                              "required": [
                                "id",
                                "question",
                                "howToAssess",
                                "levelDescriptions"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "objective",
                          "items"
                        ]
                      }
                    }
                  },
                  "required": [
                    "locale",
                    "name",
                    "description",
                    "levels",
                    "themes"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putRoadmapTranslation",
        "tags": [
          "Analysis"
        ],
        "summary": "Write the texts of a roadmap in one language (admins)",
        "description": "A translation is part of the standard: it is written by an admin. A field given replaces the stored translation, an empty one removes it, a theme or item left out keeps what it had. Answers the roadmap read in that language. Refused to a read-only token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "locale",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 200,
                    "nullable": true
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000,
                    "nullable": true
                  },
                  "levels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 60,
                          "nullable": true
                        },
                        "meaning": {
                          "type": "string",
                          "maxLength": 300,
                          "nullable": true
                        }
                      }
                    },
                    "maxItems": 6
                  },
                  "themes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 200,
                          "nullable": true
                        },
                        "objective": {
                          "type": "string",
                          "maxLength": 1000,
                          "nullable": true
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "question": {
                                "type": "string",
                                "maxLength": 500,
                                "nullable": true
                              },
                              "howToAssess": {
                                "type": "string",
                                "maxLength": 1000,
                                "nullable": true
                              },
                              "levelDescriptions": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 600
                                },
                                "maxItems": 6
                              }
                            },
                            "required": [
                              "id"
                            ]
                          },
                          "maxItems": 30,
                          "default": []
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    "maxItems": 20,
                    "default": []
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string",
                      "nullable": true
                    },
                    "auditFrequency": {
                      "type": "string",
                      "enum": [
                        "quarterly",
                        "semiannual",
                        "annual",
                        null
                      ],
                      "description": "How often a site is assessed.",
                      "nullable": true
                    },
                    "locale": {
                      "type": "string",
                      "enum": [
                        "en",
                        "fr",
                        "es",
                        "pt",
                        "de",
                        "it",
                        "nl",
                        "pl",
                        "cs",
                        "ro",
                        "tr",
                        "zh",
                        "ja"
                      ],
                      "description": "The language the texts of this answer are in. A text not translated is in the source language."
                    },
                    "sourceLocale": {
                      "type": "string",
                      "enum": [
                        "en",
                        "fr",
                        "es",
                        "pt",
                        "de",
                        "it",
                        "nl",
                        "pl",
                        "cs",
                        "ro",
                        "tr",
                        "zh",
                        "ja"
                      ],
                      "description": "The language the grid is written in."
                    },
                    "languages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "locale": {
                            "type": "string",
                            "enum": [
                              "en",
                              "fr",
                              "es",
                              "pt",
                              "de",
                              "it",
                              "nl",
                              "pl",
                              "cs",
                              "ro",
                              "tr",
                              "zh",
                              "ja"
                            ]
                          },
                          "missing": {
                            "type": "integer",
                            "description": "Texts still served in the source language."
                          }
                        },
                        "required": [
                          "locale",
                          "missing"
                        ]
                      },
                      "description": "One grid, several languages: the source first, then its translations."
                    },
                    "levels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "meaning": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "name",
                          "meaning"
                        ]
                      },
                      "description": "Lowest level first; level 1 is the first entry."
                    },
                    "themes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "objective": {
                            "type": "string",
                            "nullable": true
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "question": {
                                  "type": "string"
                                },
                                "howToAssess": {
                                  "type": "string",
                                  "description": "What to go and see, whom to ask.",
                                  "nullable": true
                                },
                                "standardUrl": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "levelDescriptions": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "One per level, lowest first."
                                }
                              },
                              "required": [
                                "id",
                                "question",
                                "howToAssess",
                                "standardUrl",
                                "levelDescriptions"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "objective",
                          "items"
                        ]
                      }
                    },
                    "sites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "matrixId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "locale": {
                            "type": "string",
                            "enum": [
                              "en",
                              "fr",
                              "es",
                              "pt",
                              "de",
                              "it",
                              "nl",
                              "pl",
                              "cs",
                              "ro",
                              "tr",
                              "zh",
                              "ja",
                              null
                            ],
                            "description": "The language this site reads the grid in; null: the source language.",
                            "nullable": true
                          },
                          "reference": {
                            "type": "object",
                            "properties": {
                              "assessmentId": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "basis": {
                                "type": "string",
                                "enum": [
                                  "self",
                                  "official"
                                ],
                                "description": "official: the latest validated official assessment. self: no validated official one; the latest validated self-assessment, or the draft if none was ever validated."
                              },
                              "assessedOn": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "validated"
                                ]
                              }
                            },
                            "required": [
                              "assessmentId",
                              "basis",
                              "assessedOn",
                              "status"
                            ],
                            "description": "The assessment the levels of this site are read from.",
                            "nullable": true
                          },
                          "cells": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "itemId": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "level": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "notApplicable": {
                                  "type": "boolean"
                                },
                                "targetLevel": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "gap": {
                                  "type": "integer",
                                  "description": "Levels still to climb; 0 at or above target, null when level or target is unknown.",
                                  "nullable": true
                                },
                                "linkedElement": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "status": {
                                      "type": "string"
                                    },
                                    "matrixId": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "title",
                                    "status",
                                    "matrixId"
                                  ],
                                  "description": "The initiative that must raise this item.",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "itemId",
                                "level",
                                "notApplicable",
                                "targetLevel",
                                "gap",
                                "linkedElement"
                              ]
                            }
                          }
                        },
                        "required": [
                          "matrixId",
                          "name",
                          "locale",
                          "reference",
                          "cells"
                        ]
                      },
                      "description": "The sites (matrices) that carry a target or an assessment."
                    },
                    "availableSites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "matrixId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "matrixId",
                          "name"
                        ]
                      },
                      "description": "Matrices not assessed yet."
                    },
                    "assessments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "matrixId": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The site assessed; null if its matrix was deleted (scopeName keeps its name).",
                            "nullable": true
                          },
                          "scopeName": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "self",
                              "official"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "validated"
                            ],
                            "description": "A validated assessment cannot be changed."
                          },
                          "assessedOn": {
                            "type": "string",
                            "description": "YYYY-MM-DD"
                          },
                          "auditorName": {
                            "type": "string",
                            "nullable": true
                          },
                          "notes": {
                            "type": "string",
                            "nullable": true
                          },
                          "createdByName": {
                            "type": "string",
                            "nullable": true
                          },
                          "validatedByName": {
                            "type": "string",
                            "nullable": true
                          },
                          "validatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                          },
                          "scores": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "itemId": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "level": {
                                  "type": "integer",
                                  "description": "1-based; null when not applicable or not scored yet.",
                                  "nullable": true
                                },
                                "notApplicable": {
                                  "type": "boolean"
                                },
                                "evidence": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "remark": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "itemId",
                                "level",
                                "notApplicable",
                                "evidence",
                                "remark"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "matrixId",
                          "scopeName",
                          "kind",
                          "status",
                          "assessedOn",
                          "auditorName",
                          "notes",
                          "createdByName",
                          "validatedByName",
                          "validatedAt",
                          "scores"
                        ]
                      },
                      "description": "Most recent first."
                    },
                    "findings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "assessment_due",
                              "item_below_target_unlinked",
                              "item_link_closed",
                              "score_without_evidence"
                            ]
                          },
                          "key": {
                            "type": "string",
                            "description": "Stable while the finding stays true."
                          },
                          "matrixId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "itemId": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "subject": {
                            "type": "string"
                          },
                          "since": {
                            "type": "string",
                            "description": "YYYY-MM-DD: the day it became true."
                          },
                          "summary": {
                            "type": "string"
                          },
                          "siteName": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string",
                            "nullable": true
                          },
                          "level": {
                            "type": "integer",
                            "nullable": true
                          },
                          "targetLevel": {
                            "type": "integer",
                            "nullable": true
                          },
                          "elementTitle": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastAssessedOn": {
                            "type": "string",
                            "description": "YYYY-MM-DD, for assessment_due; null if the site was never assessed.",
                            "nullable": true
                          }
                        },
                        "required": [
                          "kind",
                          "key",
                          "matrixId",
                          "itemId",
                          "subject",
                          "since",
                          "summary",
                          "siteName",
                          "question",
                          "level",
                          "targetLevel",
                          "elementTitle",
                          "lastAssessedOn"
                        ]
                      },
                      "description": "What is missing: signal it, people decide."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "auditFrequency",
                    "locale",
                    "sourceLocale",
                    "languages",
                    "levels",
                    "themes",
                    "sites",
                    "availableSites",
                    "assessments",
                    "findings"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Stable machine-readable code, among them UNAUTHORIZED, FORBIDDEN, MATRIX_EDIT_RESTRICTED, DEFAULT_MATRIX_ADMIN_ONLY, NOT_FOUND, INVALID_ID, VALIDATION_ERROR, EMPTY_UPDATE, NOT_ADJACENT, TOO_MANY_SHARES."
          },
          "message": {
            "type": "string"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "Invalid fields, on VALIDATION_ERROR."
          }
        },
        "required": [
          "error"
        ]
      },
      "Agenda": {
        "type": "object",
        "properties": {
          "now": {
            "type": "object",
            "properties": {
              "datetime": {
                "type": "string",
                "format": "date-time"
              },
              "date": {
                "type": "string"
              },
              "quarter": {
                "type": "string"
              },
              "month": {
                "type": "string"
              },
              "timezone": {
                "type": "string",
                "enum": [
                  "UTC"
                ]
              }
            },
            "required": [
              "datetime",
              "date",
              "quarter",
              "month",
              "timezone"
            ]
          },
          "horizonDays": {
            "type": "integer"
          },
          "since": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "openCount": {
            "type": "integer",
            "description": "Items due in total, whatever `since`."
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Stable while the item stays due: use it to avoid acting twice."
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "review_unrecorded",
                    "review_upcoming",
                    "review_unscheduled",
                    "kpi_reading_missing",
                    "initiative_stale",
                    "action_overdue",
                    "roadmap_assessment_due",
                    "roadmap_item_unlinked",
                    "roadmap_link_closed",
                    "roadmap_score_unproven",
                    "strategic_context_to_validate"
                  ]
                },
                "dueSince": {
                  "type": "string",
                  "format": "date-time"
                },
                "summary": {
                  "type": "string"
                },
                "subject": {
                  "type": "string",
                  "description": "The cadence, indicator, initiative or action the item is about, by name."
                },
                "date": {
                  "type": "string",
                  "nullable": true
                },
                "cadenceId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "reviewId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "elementId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "matrixId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "period": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "key",
                "kind",
                "dueSince",
                "summary",
                "subject",
                "date",
                "cadenceId",
                "reviewId",
                "elementId",
                "matrixId",
                "period"
              ]
            }
          },
          "calendar": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "cadenceId": {
                  "type": "string",
                  "format": "uuid"
                },
                "cadenceName": {
                  "type": "string"
                },
                "cadenceType": {
                  "type": "string"
                },
                "reviewId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "scheduled",
                    "expected"
                  ]
                }
              },
              "required": [
                "date",
                "cadenceId",
                "cadenceName",
                "cadenceType",
                "reviewId",
                "status"
              ]
            }
          },
          "recentReviews": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "cadenceId": {
                  "type": "string",
                  "format": "uuid"
                },
                "cadenceName": {
                  "type": "string"
                },
                "date": {
                  "type": "string"
                },
                "notes": {
                  "type": "string",
                  "nullable": true
                },
                "decisions": {}
              },
              "required": [
                "id",
                "cadenceId",
                "cadenceName",
                "date",
                "notes"
              ]
            }
          }
        },
        "required": [
          "now",
          "horizonDays",
          "since",
          "openCount",
          "items",
          "calendar",
          "recentReviews"
        ]
      },
      "Meeting": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "cadenceId": {
            "type": "string",
            "format": "uuid"
          },
          "cadenceName": {
            "type": "string",
            "nullable": true
          },
          "cadenceType": {
            "type": "string",
            "nullable": true
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "scheduledDate": {
            "type": "string",
            "format": "date-time"
          },
          "actualDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "completed",
              "cancelled"
            ]
          },
          "matrixId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "matrixName": {
            "type": "string",
            "nullable": true
          },
          "discussedElements": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "decisions": {},
          "completenessSnapshot": {},
          "hasSnapshot": {
            "type": "boolean",
            "description": "True when the state of the matrix was kept when the review was recorded (getReviewSnapshot)."
          },
          "createdBy": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdByName": {
            "type": "string",
            "nullable": true
          },
          "agendaCount": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "cadenceId",
          "cadenceName",
          "cadenceType",
          "organizationId",
          "scheduledDate",
          "actualDate",
          "status",
          "matrixId",
          "matrixName",
          "discussedElements",
          "notes",
          "hasSnapshot",
          "createdBy",
          "createdByName",
          "createdAt",
          "updatedAt"
        ]
      },
      "Whoami": {
        "type": "object",
        "properties": {
          "organization": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "slug"
            ]
          },
          "you": {
            "type": "object",
            "properties": {
              "displayName": {
                "type": "string",
                "nullable": true
              },
              "memberRole": {
                "type": "string",
                "enum": [
                  "super_admin",
                  "owner",
                  "admin",
                  "editor",
                  "viewer"
                ],
                "description": "Your role as a member of the organization."
              }
            },
            "required": [
              "displayName",
              "memberRole"
            ]
          },
          "connection": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "session",
                  "api_token",
                  "oauth"
                ]
              },
              "effectiveRole": {
                "type": "string",
                "enum": [
                  "super_admin",
                  "owner",
                  "admin",
                  "editor",
                  "viewer"
                ],
                "description": "What this connection may do: the member role, capped by the token or its scopes."
              },
              "canWrite": {
                "type": "boolean"
              },
              "tokenName": {
                "type": "string"
              },
              "permissions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "clientId": {
                "type": "string"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "kind",
              "effectiveRole",
              "canWrite"
            ]
          },
          "plan": {
            "type": "object",
            "properties": {
              "plan": {
                "type": "string",
                "enum": [
                  "free",
                  "pro",
                  "enterprise"
                ]
              },
              "label": {
                "type": "string"
              },
              "enforced": {
                "type": "boolean",
                "description": "False while the beta keeps everything unlocked: the limits are shown, not applied."
              },
              "limits": {
                "type": "object",
                "properties": {
                  "matrices": {
                    "type": "integer",
                    "nullable": true
                  },
                  "users": {
                    "type": "integer",
                    "nullable": true
                  },
                  "sso": {
                    "type": "boolean",
                    "description": "Whether the plan includes single sign-on."
                  }
                },
                "required": [
                  "matrices",
                  "users",
                  "sso"
                ]
              },
              "usage": {
                "type": "object",
                "properties": {
                  "matrices": {
                    "type": "integer",
                    "description": "Active matrices only: archived ones do not count toward the limit."
                  },
                  "users": {
                    "type": "integer",
                    "description": "Active members, pending invitations included."
                  }
                },
                "required": [
                  "matrices",
                  "users"
                ]
              }
            },
            "required": [
              "plan",
              "label",
              "enforced",
              "limits",
              "usage"
            ]
          },
          "matrices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "isDefault": {
                  "type": "boolean"
                },
                "canEdit": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "isDefault",
                "canEdit"
              ]
            }
          },
          "otherOrganizations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "slug"
              ]
            },
            "description": "The other organizations of the same person, to the browser session only (empty through an API token or OAuth: a client authorized for one organization does not learn the others). A connection acts in one organization: to act in another, the person connects the client again and chooses it on the consent screen."
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "organization",
          "you",
          "connection",
          "plan",
          "matrices",
          "otherOrganizations",
          "notes"
        ]
      },
      "Matrix": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "periodType": {
            "type": "string",
            "enum": [
              "annual",
              "quarterly",
              "custom"
            ]
          },
          "periodStart": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "parentMatrixId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "periodType",
          "periodStart",
          "periodEnd",
          "ownerId",
          "isActive",
          "isDefault",
          "parentMatrixId",
          "createdAt",
          "updatedAt"
        ]
      },
      "MatrixCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "periodType": {
            "type": "string",
            "enum": [
              "annual",
              "quarterly",
              "custom"
            ]
          },
          "periodStart": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "parentMatrixId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "elementsCount": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "periodType",
          "periodStart",
          "periodEnd",
          "ownerId",
          "isActive",
          "isDefault",
          "parentMatrixId",
          "createdAt",
          "updatedAt",
          "elementsCount"
        ]
      },
      "MatrixList": {
        "type": "object",
        "properties": {
          "matrices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "periodType": {
                  "type": "string",
                  "enum": [
                    "annual",
                    "quarterly",
                    "custom"
                  ]
                },
                "periodStart": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "periodEnd": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "ownerId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "isActive": {
                  "type": "boolean"
                },
                "isDefault": {
                  "type": "boolean"
                },
                "parentMatrixId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "ownerName": {
                  "type": "string",
                  "nullable": true
                },
                "elementsCount": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "periodType",
                "periodStart",
                "periodEnd",
                "ownerId",
                "isActive",
                "isDefault",
                "parentMatrixId",
                "createdAt",
                "updatedAt",
                "ownerName",
                "elementsCount"
              ]
            }
          },
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          }
        },
        "required": [
          "matrices",
          "total",
          "limit",
          "offset"
        ]
      },
      "MatrixDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "periodType": {
            "type": "string",
            "enum": [
              "annual",
              "quarterly",
              "custom"
            ]
          },
          "periodStart": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "parentMatrixId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ownerName": {
            "type": "string",
            "nullable": true
          },
          "parentMatrix": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "nullable": true
          },
          "childMatrices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "access": {
            "type": "object",
            "properties": {
              "restricted": {
                "type": "boolean"
              },
              "editors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "displayName": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "displayName"
                  ]
                }
              },
              "canEdit": {
                "type": "boolean"
              },
              "canManage": {
                "type": "boolean"
              },
              "canSetDefault": {
                "type": "boolean"
              }
            },
            "required": [
              "restricted",
              "editors",
              "canEdit",
              "canManage",
              "canSetDefault"
            ]
          },
          "elements": {
            "type": "object",
            "properties": {
              "north": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Element"
                }
              },
              "east": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Element"
                }
              },
              "south": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Element"
                }
              },
              "west": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Element"
                }
              }
            },
            "required": [
              "north",
              "east",
              "south",
              "west"
            ],
            "description": "Absent with elements=false."
          },
          "correlations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Correlation"
            },
            "description": "Absent with elements=false."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "periodType",
          "periodStart",
          "periodEnd",
          "ownerId",
          "isActive",
          "isDefault",
          "parentMatrixId",
          "createdAt",
          "updatedAt",
          "ownerName",
          "parentMatrix",
          "childMatrices",
          "access"
        ]
      },
      "Element": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "matrixId": {
            "type": "string",
            "format": "uuid"
          },
          "quadrant": {
            "type": "string",
            "enum": [
              "north",
              "east",
              "south",
              "west"
            ],
            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
          },
          "position": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "completed",
              "cancelled"
            ]
          },
          "ownerId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "ownerName": {
            "type": "string",
            "nullable": true
          },
          "targetValue": {
            "type": "string",
            "nullable": true
          },
          "currentValue": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          },
          "indicatorType": {
            "type": "string",
            "enum": [
              "result",
              "performance",
              null
            ],
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "nullable": true
          },
          "externalRef": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "ref": {
                  "type": "string"
                }
              },
              "required": [
                "label",
                "ref"
              ]
            },
            "description": "Links to third-party tools: a free label and a free reference (URL, ticket or project number, path)."
          },
          "parentElementId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "progress": {
            "type": "integer",
            "description": "Last progress reported (0-100); null on a KPI or before any update.",
            "nullable": true
          },
          "visibility": {
            "type": "string",
            "enum": [
              "shared",
              "internal"
            ]
          },
          "sheet": {
            "type": "object",
            "properties": {
              "sponsor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "Sponsor, when not the owner of the initiative."
              },
              "why": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000,
                "description": "The problem it addresses and the annual objective it serves."
              },
              "expectedResult": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000,
                "description": "What \"done\" means."
              },
              "measuredBy": {
                "type": "string",
                "format": "uuid",
                "description": "The KPI (west element of the same matrix) that measures the result."
              },
              "milestones": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "date": {
                      "type": "string",
                      "format": "date",
                      "description": "YYYY-MM-DD",
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "planned",
                        "done",
                        "late"
                      ],
                      "description": "\"planned\", \"done\" (reached) or \"late\"."
                    }
                  },
                  "required": [
                    "title",
                    "status"
                  ]
                },
                "maxItems": 8,
                "description": "3 to 6 dated milestones, 8 at most."
              },
              "nextAction": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "owner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Who does it, as people name them.",
                    "nullable": true
                  },
                  "due": {
                    "type": "string",
                    "format": "date",
                    "description": "YYYY-MM-DD",
                    "nullable": true
                  }
                },
                "required": [
                  "title"
                ]
              },
              "health": {
                "type": "string",
                "enum": [
                  "green",
                  "amber",
                  "red"
                ],
                "description": "Weather of the initiative, updated at each review. Requires healthNote."
              },
              "healthNote": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "description": "One sentence that justifies the weather."
              },
              "blockers": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000,
                "description": "Risks, and what needs an arbitration or a decision of the committee."
              },
              "resources": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000,
                "description": "Budget, time, hires needed."
              },
              "healthAt": {
                "type": "string",
                "description": "When the weather was last set (ISO datetime)."
              }
            },
            "description": "Initiatives (south) only, else empty: the sheet a committee reads in two minutes."
          },
          "kpiDefinition": {
            "type": "object",
            "properties": {
              "formula": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000,
                "description": "How the value is computed, e.g. \"active accounts / signed accounts, at month end\"."
              },
              "sourceSystem": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "The system the value is read in (e.g. \"HubSpot\", \"Pennylane\")."
              },
              "sourceRef": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "description": "Where in it: a report, a saved query, a URL."
              },
              "dataOwner": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "Who answers for the number."
              },
              "frequency": {
                "type": "string",
                "enum": [
                  "monthly",
                  "quarterly"
                ],
                "description": "How often a reading is due."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "up",
                  "down"
                ],
                "description": "Which way is better: \"up\" (higher is better) or \"down\" (lower is better). It lets a trend be read as good or bad, and the latest reading be compared with the target."
              }
            },
            "description": "KPIs (west) only, else empty: how the value is computed and where it is read."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "matrixId",
          "quadrant",
          "position",
          "title",
          "description",
          "status",
          "ownerId",
          "ownerName",
          "targetValue",
          "currentValue",
          "unit",
          "indicatorType",
          "dueDate",
          "completedAt",
          "color",
          "icon",
          "externalRef",
          "links",
          "parentElementId",
          "progress",
          "visibility",
          "sheet",
          "kpiDefinition",
          "createdAt",
          "updatedAt"
        ]
      },
      "ElementUpdated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "matrixId": {
            "type": "string",
            "format": "uuid"
          },
          "quadrant": {
            "type": "string",
            "enum": [
              "north",
              "east",
              "south",
              "west"
            ],
            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
          },
          "position": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "completed",
              "cancelled"
            ]
          },
          "ownerId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "ownerName": {
            "type": "string",
            "nullable": true
          },
          "targetValue": {
            "type": "string",
            "nullable": true
          },
          "currentValue": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          },
          "indicatorType": {
            "type": "string",
            "enum": [
              "result",
              "performance",
              null
            ],
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "nullable": true
          },
          "externalRef": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "ref": {
                  "type": "string"
                }
              },
              "required": [
                "label",
                "ref"
              ]
            },
            "description": "Links to third-party tools: a free label and a free reference (URL, ticket or project number, path)."
          },
          "parentElementId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "progress": {
            "type": "integer",
            "description": "Last progress reported (0-100); null on a KPI or before any update.",
            "nullable": true
          },
          "visibility": {
            "type": "string",
            "enum": [
              "shared",
              "internal"
            ]
          },
          "sheet": {
            "type": "object",
            "properties": {
              "sponsor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "Sponsor, when not the owner of the initiative."
              },
              "why": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000,
                "description": "The problem it addresses and the annual objective it serves."
              },
              "expectedResult": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000,
                "description": "What \"done\" means."
              },
              "measuredBy": {
                "type": "string",
                "format": "uuid",
                "description": "The KPI (west element of the same matrix) that measures the result."
              },
              "milestones": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "date": {
                      "type": "string",
                      "format": "date",
                      "description": "YYYY-MM-DD",
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "planned",
                        "done",
                        "late"
                      ],
                      "description": "\"planned\", \"done\" (reached) or \"late\"."
                    }
                  },
                  "required": [
                    "title",
                    "status"
                  ]
                },
                "maxItems": 8,
                "description": "3 to 6 dated milestones, 8 at most."
              },
              "nextAction": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "owner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Who does it, as people name them.",
                    "nullable": true
                  },
                  "due": {
                    "type": "string",
                    "format": "date",
                    "description": "YYYY-MM-DD",
                    "nullable": true
                  }
                },
                "required": [
                  "title"
                ]
              },
              "health": {
                "type": "string",
                "enum": [
                  "green",
                  "amber",
                  "red"
                ],
                "description": "Weather of the initiative, updated at each review. Requires healthNote."
              },
              "healthNote": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "description": "One sentence that justifies the weather."
              },
              "blockers": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000,
                "description": "Risks, and what needs an arbitration or a decision of the committee."
              },
              "resources": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000,
                "description": "Budget, time, hires needed."
              },
              "healthAt": {
                "type": "string",
                "description": "When the weather was last set (ISO datetime)."
              }
            },
            "description": "Initiatives (south) only, else empty: the sheet a committee reads in two minutes."
          },
          "kpiDefinition": {
            "type": "object",
            "properties": {
              "formula": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000,
                "description": "How the value is computed, e.g. \"active accounts / signed accounts, at month end\"."
              },
              "sourceSystem": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "The system the value is read in (e.g. \"HubSpot\", \"Pennylane\")."
              },
              "sourceRef": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "description": "Where in it: a report, a saved query, a URL."
              },
              "dataOwner": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "Who answers for the number."
              },
              "frequency": {
                "type": "string",
                "enum": [
                  "monthly",
                  "quarterly"
                ],
                "description": "How often a reading is due."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "up",
                  "down"
                ],
                "description": "Which way is better: \"up\" (higher is better) or \"down\" (lower is better). It lets a trend be read as good or bad, and the latest reading be compared with the target."
              }
            },
            "description": "KPIs (west) only, else empty: how the value is computed and where it is read."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "droppedCorrelations": {
            "type": "integer",
            "description": "Correlations removed because a change of quadrant left them non-adjacent."
          }
        },
        "required": [
          "id",
          "matrixId",
          "quadrant",
          "position",
          "title",
          "description",
          "status",
          "ownerId",
          "ownerName",
          "targetValue",
          "currentValue",
          "unit",
          "indicatorType",
          "dueDate",
          "completedAt",
          "color",
          "icon",
          "externalRef",
          "links",
          "parentElementId",
          "progress",
          "visibility",
          "sheet",
          "kpiDefinition",
          "createdAt",
          "updatedAt"
        ]
      },
      "Correlation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fromElementId": {
            "type": "string",
            "format": "uuid"
          },
          "fromTitle": {
            "type": "string"
          },
          "fromQuadrant": {
            "type": "string",
            "enum": [
              "north",
              "east",
              "south",
              "west"
            ],
            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
          },
          "toElementId": {
            "type": "string",
            "format": "uuid"
          },
          "toTitle": {
            "type": "string"
          },
          "toQuadrant": {
            "type": "string",
            "enum": [
              "north",
              "east",
              "south",
              "west"
            ],
            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
          },
          "strength": {
            "type": "string",
            "enum": [
              "strong",
              "medium",
              "weak",
              "none"
            ]
          }
        },
        "required": [
          "id",
          "fromElementId",
          "fromTitle",
          "fromQuadrant",
          "toElementId",
          "toTitle",
          "toQuadrant",
          "strength"
        ]
      },
      "CorrelationResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fromElementId": {
            "type": "string",
            "format": "uuid"
          },
          "fromTitle": {
            "type": "string"
          },
          "fromQuadrant": {
            "type": "string",
            "enum": [
              "north",
              "east",
              "south",
              "west"
            ],
            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
          },
          "toElementId": {
            "type": "string",
            "format": "uuid"
          },
          "toTitle": {
            "type": "string"
          },
          "toQuadrant": {
            "type": "string",
            "enum": [
              "north",
              "east",
              "south",
              "west"
            ],
            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
          },
          "strength": {
            "type": "string",
            "enum": [
              "strong",
              "medium",
              "weak",
              "none"
            ]
          },
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "removed": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "description": "The stored correlation, or { success, removed } when strength was \"none\"."
      },
      "Completeness": {
        "type": "object",
        "properties": {
          "matrixId": {
            "type": "string",
            "format": "uuid"
          },
          "matrixName": {
            "type": "string"
          },
          "score": {
            "type": "integer",
            "description": "0 to 100."
          },
          "level": {
            "type": "string",
            "description": "Stable key: excellent, bon, acceptable, minimal or incomplet."
          },
          "levelLabel": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "properties": {
              "coverage": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "integer"
                  },
                  "north": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer"
                      },
                      "min": {
                        "type": "integer"
                      },
                      "ideal": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "empty",
                          "critical",
                          "low",
                          "high",
                          "ok"
                        ]
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "count",
                      "min",
                      "ideal",
                      "status",
                      "score"
                    ]
                  },
                  "east": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer"
                      },
                      "min": {
                        "type": "integer"
                      },
                      "ideal": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "empty",
                          "critical",
                          "low",
                          "high",
                          "ok"
                        ]
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "count",
                      "min",
                      "ideal",
                      "status",
                      "score"
                    ]
                  },
                  "south": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer"
                      },
                      "min": {
                        "type": "integer"
                      },
                      "ideal": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "empty",
                          "critical",
                          "low",
                          "high",
                          "ok"
                        ]
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "count",
                      "min",
                      "ideal",
                      "status",
                      "score"
                    ]
                  },
                  "west": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer"
                      },
                      "min": {
                        "type": "integer"
                      },
                      "ideal": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "empty",
                          "critical",
                          "low",
                          "high",
                          "ok"
                        ]
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "count",
                      "min",
                      "ideal",
                      "status",
                      "score"
                    ]
                  }
                },
                "required": [
                  "score",
                  "north",
                  "east",
                  "south",
                  "west"
                ]
              },
              "density": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "integer"
                  },
                  "NE": {
                    "type": "object",
                    "properties": {
                      "possible": {
                        "type": "integer"
                      },
                      "actual": {
                        "type": "integer"
                      },
                      "density": {
                        "type": "number"
                      },
                      "level": {
                        "type": "string",
                        "enum": [
                          "n/a",
                          "sparse",
                          "minimal",
                          "good",
                          "rich"
                        ]
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "possible",
                      "actual",
                      "density",
                      "level",
                      "score"
                    ]
                  },
                  "SE": {
                    "type": "object",
                    "properties": {
                      "possible": {
                        "type": "integer"
                      },
                      "actual": {
                        "type": "integer"
                      },
                      "density": {
                        "type": "number"
                      },
                      "level": {
                        "type": "string",
                        "enum": [
                          "n/a",
                          "sparse",
                          "minimal",
                          "good",
                          "rich"
                        ]
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "possible",
                      "actual",
                      "density",
                      "level",
                      "score"
                    ]
                  },
                  "SW": {
                    "type": "object",
                    "properties": {
                      "possible": {
                        "type": "integer"
                      },
                      "actual": {
                        "type": "integer"
                      },
                      "density": {
                        "type": "number"
                      },
                      "level": {
                        "type": "string",
                        "enum": [
                          "n/a",
                          "sparse",
                          "minimal",
                          "good",
                          "rich"
                        ]
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "possible",
                      "actual",
                      "density",
                      "level",
                      "score"
                    ]
                  },
                  "NW": {
                    "type": "object",
                    "properties": {
                      "possible": {
                        "type": "integer"
                      },
                      "actual": {
                        "type": "integer"
                      },
                      "density": {
                        "type": "number"
                      },
                      "level": {
                        "type": "string",
                        "enum": [
                          "n/a",
                          "sparse",
                          "minimal",
                          "good",
                          "rich"
                        ]
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "possible",
                      "actual",
                      "density",
                      "level",
                      "score"
                    ]
                  }
                },
                "required": [
                  "score",
                  "NE",
                  "SE",
                  "SW",
                  "NW"
                ]
              },
              "orphans": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "integer"
                  },
                  "count": {
                    "type": "integer"
                  },
                  "total": {
                    "type": "integer"
                  },
                  "elements": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "quadrant": {
                          "type": "string",
                          "enum": [
                            "north",
                            "east",
                            "south",
                            "west"
                          ],
                          "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                        },
                        "title": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "quadrant",
                        "title"
                      ]
                    }
                  }
                },
                "required": [
                  "score",
                  "count",
                  "total",
                  "elements"
                ]
              },
              "chains": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "integer"
                  },
                  "complete": {
                    "type": "integer"
                  },
                  "incomplete": {
                    "type": "integer"
                  },
                  "total": {
                    "type": "integer"
                  },
                  "details": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "vision": {
                          "type": "string"
                        },
                        "visionId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "path": {
                          "type": "object",
                          "properties": {
                            "east": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "south": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "west": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "east",
                            "south",
                            "west"
                          ]
                        },
                        "complete": {
                          "type": "boolean"
                        },
                        "missing": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "north",
                              "east",
                              "south",
                              "west"
                            ],
                            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                          }
                        }
                      },
                      "required": [
                        "vision",
                        "visionId",
                        "path",
                        "complete",
                        "missing"
                      ]
                    }
                  }
                },
                "required": [
                  "score",
                  "complete",
                  "incomplete",
                  "total",
                  "details"
                ]
              },
              "indicatorBalance": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "integer"
                  },
                  "kpiStats": {
                    "type": "object",
                    "properties": {
                      "total": {
                        "type": "integer"
                      },
                      "result": {
                        "type": "integer"
                      },
                      "performance": {
                        "type": "integer"
                      },
                      "unclassified": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "total",
                      "result",
                      "performance",
                      "unclassified"
                    ]
                  },
                  "east": {
                    "type": "object",
                    "properties": {
                      "total": {
                        "type": "integer"
                      },
                      "balanced": {
                        "type": "integer"
                      },
                      "hasBoth": {
                        "type": "integer"
                      },
                      "hasResultOnly": {
                        "type": "integer"
                      },
                      "hasPerformanceOnly": {
                        "type": "integer"
                      },
                      "hasNeither": {
                        "type": "integer"
                      },
                      "details": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "title": {
                              "type": "string"
                            },
                            "hasResult": {
                              "type": "boolean"
                            },
                            "hasPerformance": {
                              "type": "boolean"
                            },
                            "balanced": {
                              "type": "boolean"
                            },
                            "missing": {
                              "type": "string",
                              "enum": [
                                "both",
                                "result",
                                "performance",
                                null
                              ],
                              "nullable": true
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "hasResult",
                            "hasPerformance",
                            "balanced",
                            "missing"
                          ]
                        }
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "total",
                      "balanced",
                      "hasBoth",
                      "hasResultOnly",
                      "hasPerformanceOnly",
                      "hasNeither",
                      "details",
                      "score"
                    ]
                  },
                  "south": {
                    "type": "object",
                    "properties": {
                      "total": {
                        "type": "integer"
                      },
                      "balanced": {
                        "type": "integer"
                      },
                      "hasBoth": {
                        "type": "integer"
                      },
                      "hasResultOnly": {
                        "type": "integer"
                      },
                      "hasPerformanceOnly": {
                        "type": "integer"
                      },
                      "hasNeither": {
                        "type": "integer"
                      },
                      "details": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "title": {
                              "type": "string"
                            },
                            "hasResult": {
                              "type": "boolean"
                            },
                            "hasPerformance": {
                              "type": "boolean"
                            },
                            "balanced": {
                              "type": "boolean"
                            },
                            "missing": {
                              "type": "string",
                              "enum": [
                                "both",
                                "result",
                                "performance",
                                null
                              ],
                              "nullable": true
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "hasResult",
                            "hasPerformance",
                            "balanced",
                            "missing"
                          ]
                        }
                      },
                      "score": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "total",
                      "balanced",
                      "hasBoth",
                      "hasResultOnly",
                      "hasPerformanceOnly",
                      "hasNeither",
                      "details",
                      "score"
                    ]
                  },
                  "unbalancedElements": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "title": {
                          "type": "string"
                        },
                        "hasResult": {
                          "type": "boolean"
                        },
                        "hasPerformance": {
                          "type": "boolean"
                        },
                        "balanced": {
                          "type": "boolean"
                        },
                        "missing": {
                          "type": "string",
                          "enum": [
                            "both",
                            "result",
                            "performance",
                            null
                          ],
                          "nullable": true
                        },
                        "quadrant": {
                          "type": "string",
                          "enum": [
                            "east",
                            "south"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "hasResult",
                        "hasPerformance",
                        "balanced",
                        "missing",
                        "quadrant"
                      ]
                    }
                  }
                },
                "required": [
                  "score",
                  "kpiStats",
                  "east",
                  "south",
                  "unbalancedElements"
                ]
              }
            },
            "required": [
              "coverage",
              "density",
              "orphans",
              "chains",
              "indicatorBalance"
            ]
          },
          "suggestions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "params": {
                  "type": "object",
                  "additionalProperties": {}
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "params",
                "message"
              ]
            }
          },
          "aiContext": {
            "type": "string"
          }
        },
        "required": [
          "matrixId",
          "matrixName",
          "score",
          "level",
          "levelLabel",
          "details",
          "suggestions",
          "aiContext"
        ]
      },
      "Cascade": {
        "type": "object",
        "properties": {
          "rootId": {
            "type": "string",
            "format": "uuid"
          },
          "matrices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "parentMatrixId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "depth": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "name",
                "parentMatrixId",
                "depth"
              ]
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "parentId": {
                  "type": "string",
                  "format": "uuid"
                },
                "parentName": {
                  "type": "string"
                },
                "children": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  }
                },
                "coverage": {
                  "type": "integer",
                  "description": "Share of active East and South elements taken up below, 0 to 100.",
                  "nullable": true
                },
                "deployed": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "title": {
                        "type": "string"
                      },
                      "quadrant": {
                        "type": "string",
                        "enum": [
                          "north",
                          "east",
                          "south",
                          "west"
                        ],
                        "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                      },
                      "takenUpBy": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "matrixId": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "matrixName": {
                              "type": "string"
                            },
                            "elementId": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "title": {
                              "type": "string"
                            },
                            "quadrant": {
                              "type": "string",
                              "enum": [
                                "north",
                                "east",
                                "south",
                                "west"
                              ],
                              "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                            }
                          },
                          "required": [
                            "matrixId",
                            "matrixName",
                            "elementId",
                            "title",
                            "quadrant"
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "title",
                      "quadrant",
                      "takenUpBy"
                    ]
                  }
                },
                "notDeployed": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "title": {
                        "type": "string"
                      },
                      "quadrant": {
                        "type": "string",
                        "enum": [
                          "north",
                          "east",
                          "south",
                          "west"
                        ],
                        "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                      }
                    },
                    "required": [
                      "id",
                      "title",
                      "quadrant"
                    ]
                  }
                }
              },
              "required": [
                "parentId",
                "parentName",
                "children",
                "coverage",
                "deployed",
                "notDeployed"
              ]
            }
          },
          "unanchored": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "matrixId": {
                  "type": "string",
                  "format": "uuid"
                },
                "matrixName": {
                  "type": "string"
                },
                "elements": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "title": {
                        "type": "string"
                      },
                      "quadrant": {
                        "type": "string",
                        "enum": [
                          "north",
                          "east",
                          "south",
                          "west"
                        ],
                        "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                      }
                    },
                    "required": [
                      "id",
                      "title",
                      "quadrant"
                    ]
                  }
                }
              },
              "required": [
                "matrixId",
                "matrixName",
                "elements"
              ]
            }
          },
          "coverage": {
            "type": "integer",
            "nullable": true
          },
          "ancestors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          }
        },
        "required": [
          "rootId",
          "matrices",
          "edges",
          "unanchored",
          "coverage",
          "ancestors"
        ]
      },
      "ShareList": {
        "type": "object",
        "properties": {
          "shares": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tokenPreview": {
                  "type": "string"
                },
                "label": {
                  "type": "string",
                  "nullable": true
                },
                "active": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "revokedAt": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "lastAccessedAt": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "accessCount": {
                  "type": "integer"
                },
                "createdBy": {
                  "type": "string",
                  "nullable": true
                },
                "hideFigures": {
                  "type": "boolean"
                },
                "fullSheets": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "tokenPreview",
                "label",
                "active",
                "createdAt",
                "expiresAt",
                "revokedAt",
                "lastAccessedAt",
                "accessCount",
                "createdBy",
                "hideFigures",
                "fullSheets"
              ]
            }
          }
        },
        "required": [
          "shares"
        ]
      },
      "ShareCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "description": "Public read-only link, shown once."
          },
          "tokenPreview": {
            "type": "string"
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "hideFigures": {
            "type": "boolean"
          },
          "fullSheets": {
            "type": "boolean"
          },
          "hiddenElements": {
            "type": "integer",
            "description": "Internal elements left off the page."
          },
          "matrixName": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "tokenPreview",
          "label",
          "expiresAt",
          "hideFigures",
          "fullSheets",
          "hiddenElements",
          "matrixName",
          "note"
        ]
      },
      "ShareRevoked": {
        "type": "object",
        "properties": {
          "revoked": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revoked",
          "id"
        ]
      },
      "Idea": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "priority": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "createdBy": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdByName": {
            "type": "string",
            "nullable": true
          },
          "assignedTo": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "assignedToName": {
            "type": "string",
            "nullable": true
          },
          "linkedElementId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "ref": {
                  "type": "string"
                }
              },
              "required": [
                "label",
                "ref"
              ]
            },
            "description": "Links to third-party tools: a free label and a free reference (URL, ticket or project number, path)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "linkedMatrixId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "linkedElementTitle": {
            "type": "string",
            "nullable": true
          },
          "linkedElementQuadrant": {
            "type": "string",
            "enum": [
              "north",
              "east",
              "south",
              "west",
              null
            ],
            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values.",
            "nullable": true
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "source",
          "tags",
          "priority",
          "status",
          "createdBy",
          "createdByName",
          "assignedTo",
          "assignedToName",
          "linkedElementId",
          "links",
          "createdAt",
          "updatedAt",
          "linkedMatrixId",
          "linkedElementTitle",
          "linkedElementQuadrant"
        ]
      },
      "IdeaList": {
        "type": "object",
        "properties": {
          "ideas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Idea"
            }
          },
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          }
        },
        "required": [
          "ideas",
          "total",
          "limit",
          "offset"
        ]
      },
      "MatricesExport": {
        "type": "object",
        "properties": {
          "exportedAt": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "enum": [
              "matrices"
            ]
          },
          "count": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "periodType": {
                  "type": "string",
                  "enum": [
                    "annual",
                    "quarterly",
                    "custom"
                  ]
                },
                "periodStart": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "periodEnd": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "isActive": {
                  "type": "boolean"
                },
                "isDefault": {
                  "type": "boolean"
                },
                "parentMatrixId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "owner": {
                  "type": "string",
                  "nullable": true
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "elements": {
                  "type": "object",
                  "properties": {
                    "north": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "active",
                              "completed",
                              "cancelled"
                            ]
                          },
                          "owner": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "ownerName": {
                            "type": "string",
                            "nullable": true
                          },
                          "dueDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                          },
                          "position": {
                            "type": "integer"
                          },
                          "targetValue": {
                            "type": "string",
                            "nullable": true
                          },
                          "currentValue": {
                            "type": "string",
                            "nullable": true
                          },
                          "unit": {
                            "type": "string",
                            "nullable": true
                          },
                          "indicatorType": {
                            "type": "string",
                            "enum": [
                              "result",
                              "performance",
                              null
                            ],
                            "nullable": true
                          },
                          "externalRef": {
                            "type": "string",
                            "nullable": true
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "ref": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "ref"
                              ]
                            },
                            "description": "Links to third-party tools: a free label and a free reference (URL, ticket or project number, path)."
                          },
                          "parentElementId": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "progress": {
                            "type": "integer",
                            "nullable": true
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "shared",
                              "internal"
                            ]
                          },
                          "sheet": {
                            "type": "object",
                            "properties": {
                              "sponsor": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "Sponsor, when not the owner of the initiative."
                              },
                              "why": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "description": "The problem it addresses and the annual objective it serves."
                              },
                              "expectedResult": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "What \"done\" means."
                              },
                              "measuredBy": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The KPI (west element of the same matrix) that measures the result."
                              },
                              "milestones": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "date": {
                                      "type": "string",
                                      "format": "date",
                                      "description": "YYYY-MM-DD",
                                      "nullable": true
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "planned",
                                        "done",
                                        "late"
                                      ],
                                      "description": "\"planned\", \"done\" (reached) or \"late\"."
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "status"
                                  ]
                                },
                                "maxItems": 8,
                                "description": "3 to 6 dated milestones, 8 at most."
                              },
                              "nextAction": {
                                "type": "object",
                                "properties": {
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 300
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100,
                                    "description": "Who does it, as people name them.",
                                    "nullable": true
                                  },
                                  "due": {
                                    "type": "string",
                                    "format": "date",
                                    "description": "YYYY-MM-DD",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "title"
                                ]
                              },
                              "health": {
                                "type": "string",
                                "enum": [
                                  "green",
                                  "amber",
                                  "red"
                                ],
                                "description": "Weather of the initiative, updated at each review. Requires healthNote."
                              },
                              "healthNote": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500,
                                "description": "One sentence that justifies the weather."
                              },
                              "blockers": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "description": "Risks, and what needs an arbitration or a decision of the committee."
                              },
                              "resources": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "Budget, time, hires needed."
                              },
                              "healthAt": {
                                "type": "string",
                                "description": "When the weather was last set (ISO datetime)."
                              }
                            },
                            "description": "Initiatives (south) only."
                          },
                          "pageUrl": {
                            "type": "string",
                            "description": "Initiatives (south) only: the page of this initiative in the app, for members; null in an external reading. Cite it as the reference version.",
                            "nullable": true
                          },
                          "kpiDefinition": {
                            "type": "object",
                            "properties": {
                              "formula": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "How the value is computed, e.g. \"active accounts / signed accounts, at month end\"."
                              },
                              "sourceSystem": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "The system the value is read in (e.g. \"HubSpot\", \"Pennylane\")."
                              },
                              "sourceRef": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500,
                                "description": "Where in it: a report, a saved query, a URL."
                              },
                              "dataOwner": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "Who answers for the number."
                              },
                              "frequency": {
                                "type": "string",
                                "enum": [
                                  "monthly",
                                  "quarterly"
                                ],
                                "description": "How often a reading is due."
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "up",
                                  "down"
                                ],
                                "description": "Which way is better: \"up\" (higher is better) or \"down\" (lower is better). It lets a trend be read as good or bad, and the latest reading be compared with the target."
                              }
                            },
                            "description": "KPIs (west) only."
                          },
                          "measurements": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "period": {
                                  "type": "string",
                                  "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                                },
                                "value": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final"
                                  ],
                                  "description": "\"provisional\" while the period runs (it may still be corrected), \"final\" once it has ended. Derived from the period, in UTC."
                                },
                                "originTool": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "extractedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "period",
                                "value",
                                "status",
                                "originTool",
                                "extractedAt"
                              ]
                            },
                            "description": "KPIs only: the last 8 readings, oldest first, so a trend reads left to right."
                          },
                          "updates": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "progress": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "comment": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "authorName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "progress",
                                "comment",
                                "authorName",
                                "createdAt"
                              ]
                            },
                            "description": "The last 3 progress updates, newest first."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "status",
                          "owner",
                          "ownerName",
                          "dueDate",
                          "position",
                          "targetValue",
                          "currentValue",
                          "unit",
                          "indicatorType",
                          "externalRef",
                          "links",
                          "parentElementId",
                          "progress",
                          "visibility",
                          "updates"
                        ]
                      }
                    },
                    "east": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "active",
                              "completed",
                              "cancelled"
                            ]
                          },
                          "owner": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "ownerName": {
                            "type": "string",
                            "nullable": true
                          },
                          "dueDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                          },
                          "position": {
                            "type": "integer"
                          },
                          "targetValue": {
                            "type": "string",
                            "nullable": true
                          },
                          "currentValue": {
                            "type": "string",
                            "nullable": true
                          },
                          "unit": {
                            "type": "string",
                            "nullable": true
                          },
                          "indicatorType": {
                            "type": "string",
                            "enum": [
                              "result",
                              "performance",
                              null
                            ],
                            "nullable": true
                          },
                          "externalRef": {
                            "type": "string",
                            "nullable": true
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "ref": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "ref"
                              ]
                            },
                            "description": "Links to third-party tools: a free label and a free reference (URL, ticket or project number, path)."
                          },
                          "parentElementId": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "progress": {
                            "type": "integer",
                            "nullable": true
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "shared",
                              "internal"
                            ]
                          },
                          "sheet": {
                            "type": "object",
                            "properties": {
                              "sponsor": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "Sponsor, when not the owner of the initiative."
                              },
                              "why": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "description": "The problem it addresses and the annual objective it serves."
                              },
                              "expectedResult": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "What \"done\" means."
                              },
                              "measuredBy": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The KPI (west element of the same matrix) that measures the result."
                              },
                              "milestones": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "date": {
                                      "type": "string",
                                      "format": "date",
                                      "description": "YYYY-MM-DD",
                                      "nullable": true
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "planned",
                                        "done",
                                        "late"
                                      ],
                                      "description": "\"planned\", \"done\" (reached) or \"late\"."
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "status"
                                  ]
                                },
                                "maxItems": 8,
                                "description": "3 to 6 dated milestones, 8 at most."
                              },
                              "nextAction": {
                                "type": "object",
                                "properties": {
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 300
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100,
                                    "description": "Who does it, as people name them.",
                                    "nullable": true
                                  },
                                  "due": {
                                    "type": "string",
                                    "format": "date",
                                    "description": "YYYY-MM-DD",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "title"
                                ]
                              },
                              "health": {
                                "type": "string",
                                "enum": [
                                  "green",
                                  "amber",
                                  "red"
                                ],
                                "description": "Weather of the initiative, updated at each review. Requires healthNote."
                              },
                              "healthNote": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500,
                                "description": "One sentence that justifies the weather."
                              },
                              "blockers": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "description": "Risks, and what needs an arbitration or a decision of the committee."
                              },
                              "resources": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "Budget, time, hires needed."
                              },
                              "healthAt": {
                                "type": "string",
                                "description": "When the weather was last set (ISO datetime)."
                              }
                            },
                            "description": "Initiatives (south) only."
                          },
                          "pageUrl": {
                            "type": "string",
                            "description": "Initiatives (south) only: the page of this initiative in the app, for members; null in an external reading. Cite it as the reference version.",
                            "nullable": true
                          },
                          "kpiDefinition": {
                            "type": "object",
                            "properties": {
                              "formula": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "How the value is computed, e.g. \"active accounts / signed accounts, at month end\"."
                              },
                              "sourceSystem": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "The system the value is read in (e.g. \"HubSpot\", \"Pennylane\")."
                              },
                              "sourceRef": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500,
                                "description": "Where in it: a report, a saved query, a URL."
                              },
                              "dataOwner": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "Who answers for the number."
                              },
                              "frequency": {
                                "type": "string",
                                "enum": [
                                  "monthly",
                                  "quarterly"
                                ],
                                "description": "How often a reading is due."
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "up",
                                  "down"
                                ],
                                "description": "Which way is better: \"up\" (higher is better) or \"down\" (lower is better). It lets a trend be read as good or bad, and the latest reading be compared with the target."
                              }
                            },
                            "description": "KPIs (west) only."
                          },
                          "measurements": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "period": {
                                  "type": "string",
                                  "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                                },
                                "value": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final"
                                  ],
                                  "description": "\"provisional\" while the period runs (it may still be corrected), \"final\" once it has ended. Derived from the period, in UTC."
                                },
                                "originTool": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "extractedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "period",
                                "value",
                                "status",
                                "originTool",
                                "extractedAt"
                              ]
                            },
                            "description": "KPIs only: the last 8 readings, oldest first, so a trend reads left to right."
                          },
                          "updates": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "progress": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "comment": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "authorName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "progress",
                                "comment",
                                "authorName",
                                "createdAt"
                              ]
                            },
                            "description": "The last 3 progress updates, newest first."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "status",
                          "owner",
                          "ownerName",
                          "dueDate",
                          "position",
                          "targetValue",
                          "currentValue",
                          "unit",
                          "indicatorType",
                          "externalRef",
                          "links",
                          "parentElementId",
                          "progress",
                          "visibility",
                          "updates"
                        ]
                      }
                    },
                    "south": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "active",
                              "completed",
                              "cancelled"
                            ]
                          },
                          "owner": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "ownerName": {
                            "type": "string",
                            "nullable": true
                          },
                          "dueDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                          },
                          "position": {
                            "type": "integer"
                          },
                          "targetValue": {
                            "type": "string",
                            "nullable": true
                          },
                          "currentValue": {
                            "type": "string",
                            "nullable": true
                          },
                          "unit": {
                            "type": "string",
                            "nullable": true
                          },
                          "indicatorType": {
                            "type": "string",
                            "enum": [
                              "result",
                              "performance",
                              null
                            ],
                            "nullable": true
                          },
                          "externalRef": {
                            "type": "string",
                            "nullable": true
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "ref": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "ref"
                              ]
                            },
                            "description": "Links to third-party tools: a free label and a free reference (URL, ticket or project number, path)."
                          },
                          "parentElementId": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "progress": {
                            "type": "integer",
                            "nullable": true
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "shared",
                              "internal"
                            ]
                          },
                          "sheet": {
                            "type": "object",
                            "properties": {
                              "sponsor": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "Sponsor, when not the owner of the initiative."
                              },
                              "why": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "description": "The problem it addresses and the annual objective it serves."
                              },
                              "expectedResult": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "What \"done\" means."
                              },
                              "measuredBy": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The KPI (west element of the same matrix) that measures the result."
                              },
                              "milestones": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "date": {
                                      "type": "string",
                                      "format": "date",
                                      "description": "YYYY-MM-DD",
                                      "nullable": true
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "planned",
                                        "done",
                                        "late"
                                      ],
                                      "description": "\"planned\", \"done\" (reached) or \"late\"."
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "status"
                                  ]
                                },
                                "maxItems": 8,
                                "description": "3 to 6 dated milestones, 8 at most."
                              },
                              "nextAction": {
                                "type": "object",
                                "properties": {
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 300
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100,
                                    "description": "Who does it, as people name them.",
                                    "nullable": true
                                  },
                                  "due": {
                                    "type": "string",
                                    "format": "date",
                                    "description": "YYYY-MM-DD",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "title"
                                ]
                              },
                              "health": {
                                "type": "string",
                                "enum": [
                                  "green",
                                  "amber",
                                  "red"
                                ],
                                "description": "Weather of the initiative, updated at each review. Requires healthNote."
                              },
                              "healthNote": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500,
                                "description": "One sentence that justifies the weather."
                              },
                              "blockers": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "description": "Risks, and what needs an arbitration or a decision of the committee."
                              },
                              "resources": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "Budget, time, hires needed."
                              },
                              "healthAt": {
                                "type": "string",
                                "description": "When the weather was last set (ISO datetime)."
                              }
                            },
                            "description": "Initiatives (south) only."
                          },
                          "pageUrl": {
                            "type": "string",
                            "description": "Initiatives (south) only: the page of this initiative in the app, for members; null in an external reading. Cite it as the reference version.",
                            "nullable": true
                          },
                          "kpiDefinition": {
                            "type": "object",
                            "properties": {
                              "formula": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "How the value is computed, e.g. \"active accounts / signed accounts, at month end\"."
                              },
                              "sourceSystem": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "The system the value is read in (e.g. \"HubSpot\", \"Pennylane\")."
                              },
                              "sourceRef": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500,
                                "description": "Where in it: a report, a saved query, a URL."
                              },
                              "dataOwner": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "Who answers for the number."
                              },
                              "frequency": {
                                "type": "string",
                                "enum": [
                                  "monthly",
                                  "quarterly"
                                ],
                                "description": "How often a reading is due."
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "up",
                                  "down"
                                ],
                                "description": "Which way is better: \"up\" (higher is better) or \"down\" (lower is better). It lets a trend be read as good or bad, and the latest reading be compared with the target."
                              }
                            },
                            "description": "KPIs (west) only."
                          },
                          "measurements": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "period": {
                                  "type": "string",
                                  "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                                },
                                "value": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final"
                                  ],
                                  "description": "\"provisional\" while the period runs (it may still be corrected), \"final\" once it has ended. Derived from the period, in UTC."
                                },
                                "originTool": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "extractedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "period",
                                "value",
                                "status",
                                "originTool",
                                "extractedAt"
                              ]
                            },
                            "description": "KPIs only: the last 8 readings, oldest first, so a trend reads left to right."
                          },
                          "updates": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "progress": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "comment": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "authorName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "progress",
                                "comment",
                                "authorName",
                                "createdAt"
                              ]
                            },
                            "description": "The last 3 progress updates, newest first."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "status",
                          "owner",
                          "ownerName",
                          "dueDate",
                          "position",
                          "targetValue",
                          "currentValue",
                          "unit",
                          "indicatorType",
                          "externalRef",
                          "links",
                          "parentElementId",
                          "progress",
                          "visibility",
                          "updates"
                        ]
                      }
                    },
                    "west": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "active",
                              "completed",
                              "cancelled"
                            ]
                          },
                          "owner": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "ownerName": {
                            "type": "string",
                            "nullable": true
                          },
                          "dueDate": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                          },
                          "position": {
                            "type": "integer"
                          },
                          "targetValue": {
                            "type": "string",
                            "nullable": true
                          },
                          "currentValue": {
                            "type": "string",
                            "nullable": true
                          },
                          "unit": {
                            "type": "string",
                            "nullable": true
                          },
                          "indicatorType": {
                            "type": "string",
                            "enum": [
                              "result",
                              "performance",
                              null
                            ],
                            "nullable": true
                          },
                          "externalRef": {
                            "type": "string",
                            "nullable": true
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "ref": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "ref"
                              ]
                            },
                            "description": "Links to third-party tools: a free label and a free reference (URL, ticket or project number, path)."
                          },
                          "parentElementId": {
                            "type": "string",
                            "format": "uuid",
                            "nullable": true
                          },
                          "progress": {
                            "type": "integer",
                            "nullable": true
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "shared",
                              "internal"
                            ]
                          },
                          "sheet": {
                            "type": "object",
                            "properties": {
                              "sponsor": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "Sponsor, when not the owner of the initiative."
                              },
                              "why": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "description": "The problem it addresses and the annual objective it serves."
                              },
                              "expectedResult": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "What \"done\" means."
                              },
                              "measuredBy": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The KPI (west element of the same matrix) that measures the result."
                              },
                              "milestones": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    },
                                    "date": {
                                      "type": "string",
                                      "format": "date",
                                      "description": "YYYY-MM-DD",
                                      "nullable": true
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "planned",
                                        "done",
                                        "late"
                                      ],
                                      "description": "\"planned\", \"done\" (reached) or \"late\"."
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "status"
                                  ]
                                },
                                "maxItems": 8,
                                "description": "3 to 6 dated milestones, 8 at most."
                              },
                              "nextAction": {
                                "type": "object",
                                "properties": {
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 300
                                  },
                                  "owner": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100,
                                    "description": "Who does it, as people name them.",
                                    "nullable": true
                                  },
                                  "due": {
                                    "type": "string",
                                    "format": "date",
                                    "description": "YYYY-MM-DD",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "title"
                                ]
                              },
                              "health": {
                                "type": "string",
                                "enum": [
                                  "green",
                                  "amber",
                                  "red"
                                ],
                                "description": "Weather of the initiative, updated at each review. Requires healthNote."
                              },
                              "healthNote": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500,
                                "description": "One sentence that justifies the weather."
                              },
                              "blockers": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000,
                                "description": "Risks, and what needs an arbitration or a decision of the committee."
                              },
                              "resources": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "Budget, time, hires needed."
                              },
                              "healthAt": {
                                "type": "string",
                                "description": "When the weather was last set (ISO datetime)."
                              }
                            },
                            "description": "Initiatives (south) only."
                          },
                          "pageUrl": {
                            "type": "string",
                            "description": "Initiatives (south) only: the page of this initiative in the app, for members; null in an external reading. Cite it as the reference version.",
                            "nullable": true
                          },
                          "kpiDefinition": {
                            "type": "object",
                            "properties": {
                              "formula": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000,
                                "description": "How the value is computed, e.g. \"active accounts / signed accounts, at month end\"."
                              },
                              "sourceSystem": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "The system the value is read in (e.g. \"HubSpot\", \"Pennylane\")."
                              },
                              "sourceRef": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500,
                                "description": "Where in it: a report, a saved query, a URL."
                              },
                              "dataOwner": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100,
                                "description": "Who answers for the number."
                              },
                              "frequency": {
                                "type": "string",
                                "enum": [
                                  "monthly",
                                  "quarterly"
                                ],
                                "description": "How often a reading is due."
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "up",
                                  "down"
                                ],
                                "description": "Which way is better: \"up\" (higher is better) or \"down\" (lower is better). It lets a trend be read as good or bad, and the latest reading be compared with the target."
                              }
                            },
                            "description": "KPIs (west) only."
                          },
                          "measurements": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "period": {
                                  "type": "string",
                                  "description": "Quarter (YYYY-Qn, e.g. 2026-Q3) or month (YYYY-MM, e.g. 2026-09)."
                                },
                                "value": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final"
                                  ],
                                  "description": "\"provisional\" while the period runs (it may still be corrected), \"final\" once it has ended. Derived from the period, in UTC."
                                },
                                "originTool": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "extractedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "period",
                                "value",
                                "status",
                                "originTool",
                                "extractedAt"
                              ]
                            },
                            "description": "KPIs only: the last 8 readings, oldest first, so a trend reads left to right."
                          },
                          "updates": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "progress": {
                                  "type": "integer",
                                  "nullable": true
                                },
                                "comment": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "authorName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "progress",
                                "comment",
                                "authorName",
                                "createdAt"
                              ]
                            },
                            "description": "The last 3 progress updates, newest first."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "description",
                          "status",
                          "owner",
                          "ownerName",
                          "dueDate",
                          "position",
                          "targetValue",
                          "currentValue",
                          "unit",
                          "indicatorType",
                          "externalRef",
                          "links",
                          "parentElementId",
                          "progress",
                          "visibility",
                          "updates"
                        ]
                      }
                    }
                  },
                  "required": [
                    "north",
                    "east",
                    "south",
                    "west"
                  ]
                },
                "hiddenElements": {
                  "type": "integer",
                  "description": "External reading: how many elements marked internal were left out."
                },
                "strategicContext": {
                  "type": "object",
                  "properties": {
                    "purpose": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "What the organization calls it. Null: the default label.",
                          "nullable": true
                        },
                        "text": {
                          "type": "string",
                          "description": "The validated purpose, in the language asked for when a current translation exists.",
                          "nullable": true
                        },
                        "locale": {
                          "type": "string",
                          "description": "Language of the text returned.",
                          "nullable": true
                        },
                        "sourceLocale": {
                          "type": "string",
                          "description": "Language the purpose is written in.",
                          "nullable": true
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "shared",
                            "internal"
                          ],
                          "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                        },
                        "validatedAt": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "validatedByName": {
                          "type": "string",
                          "nullable": true
                        },
                        "translations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "locale": {
                                "type": "string"
                              },
                              "stale": {
                                "type": "boolean",
                                "description": "True: made for an earlier text, no longer served."
                              }
                            },
                            "required": [
                              "locale",
                              "stale"
                            ]
                          }
                        },
                        "draft": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "nullable": true
                            },
                            "text": {
                              "type": "string",
                              "nullable": true
                            },
                            "locale": {
                              "type": "string",
                              "nullable": true
                            },
                            "visibility": {
                              "type": "string",
                              "enum": [
                                "shared",
                                "internal"
                              ],
                              "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedByName": {
                              "type": "string",
                              "nullable": true
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "app",
                                "agent"
                              ],
                              "description": "\"agent\": written through a token or an OAuth connection. \"app\": typed in the web app."
                            }
                          },
                          "required": [
                            "label",
                            "text",
                            "locale",
                            "visibility",
                            "updatedAt",
                            "updatedByName",
                            "origin"
                          ],
                          "description": "A proposal waiting for a person to validate it in the app. Not the position of the organization yet.",
                          "nullable": true
                        }
                      },
                      "required": [
                        "label",
                        "text",
                        "locale",
                        "sourceLocale",
                        "visibility",
                        "validatedAt",
                        "validatedByName",
                        "translations",
                        "draft"
                      ]
                    },
                    "matrix": {
                      "type": "object",
                      "properties": {
                        "vision": {
                          "type": "string",
                          "nullable": true
                        },
                        "context": {
                          "type": "string",
                          "nullable": true
                        },
                        "tradeoffs": {
                          "type": "string",
                          "nullable": true
                        },
                        "visibility": {
                          "type": "object",
                          "properties": {
                            "vision": {
                              "type": "string",
                              "enum": [
                                "shared",
                                "internal"
                              ],
                              "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                            },
                            "context": {
                              "type": "string",
                              "enum": [
                                "shared",
                                "internal"
                              ],
                              "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                            },
                            "tradeoffs": {
                              "type": "string",
                              "enum": [
                                "shared",
                                "internal"
                              ],
                              "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                            }
                          },
                          "required": [
                            "vision",
                            "context",
                            "tradeoffs"
                          ]
                        },
                        "validatedAt": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "validatedByName": {
                          "type": "string",
                          "nullable": true
                        },
                        "draft": {
                          "type": "object",
                          "properties": {
                            "vision": {
                              "type": "string",
                              "nullable": true
                            },
                            "context": {
                              "type": "string",
                              "nullable": true
                            },
                            "tradeoffs": {
                              "type": "string",
                              "nullable": true
                            },
                            "visibility": {
                              "type": "object",
                              "properties": {
                                "vision": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "context": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                },
                                "tradeoffs": {
                                  "type": "string",
                                  "enum": [
                                    "shared",
                                    "internal"
                                  ],
                                  "description": "\"shared\": may be shown outside the organization once validated. \"internal\": members only."
                                }
                              },
                              "required": [
                                "vision",
                                "context",
                                "tradeoffs"
                              ]
                            },
                            "updatedAt": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updatedByName": {
                              "type": "string",
                              "nullable": true
                            },
                            "origin": {
                              "type": "string",
                              "enum": [
                                "app",
                                "agent"
                              ],
                              "description": "\"agent\": written through a token or an OAuth connection. \"app\": typed in the web app."
                            }
                          },
                          "required": [
                            "vision",
                            "context",
                            "tradeoffs",
                            "visibility",
                            "updatedAt",
                            "updatedByName",
                            "origin"
                          ],
                          "description": "The whole next version as proposed, waiting for a person to validate it in the app.",
                          "nullable": true
                        }
                      },
                      "required": [
                        "vision",
                        "context",
                        "tradeoffs",
                        "visibility",
                        "validatedAt",
                        "validatedByName",
                        "draft"
                      ]
                    },
                    "parent": {
                      "type": "object",
                      "properties": {
                        "matrixId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "matrixName": {
                          "type": "string"
                        },
                        "vision": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "matrixId",
                        "matrixName",
                        "vision"
                      ],
                      "description": "The validated vision of the matrix above in the cascade. Null without a parent, and in an external reading.",
                      "nullable": true
                    },
                    "validateUrl": {
                      "type": "string",
                      "description": "Where a person validates a draft, in the app. Null in an external reading.",
                      "nullable": true
                    }
                  },
                  "required": [
                    "purpose",
                    "matrix",
                    "parent",
                    "validateUrl"
                  ],
                  "description": "Why and where to, written out: read it before the lines of the matrix."
                },
                "correlations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "quadrant": {
                            "type": "string",
                            "enum": [
                              "north",
                              "east",
                              "south",
                              "west"
                            ],
                            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "quadrant"
                        ]
                      },
                      "to": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "quadrant": {
                            "type": "string",
                            "enum": [
                              "north",
                              "east",
                              "south",
                              "west"
                            ],
                            "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "quadrant"
                        ]
                      },
                      "strength": {
                        "type": "string",
                        "enum": [
                          "strong",
                          "medium",
                          "weak",
                          "none"
                        ]
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "strength"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "periodType",
                "periodStart",
                "periodEnd",
                "isActive",
                "isDefault",
                "parentMatrixId",
                "owner",
                "createdAt",
                "updatedAt",
                "strategicContext"
              ]
            }
          }
        },
        "required": [
          "exportedAt",
          "type",
          "count",
          "data"
        ]
      },
      "SummaryExport": {
        "type": "object",
        "properties": {
          "exportedAt": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "enum": [
              "summary"
            ]
          },
          "overview": {
            "type": "object",
            "properties": {
              "totalMatrices": {
                "type": "integer"
              },
              "totalIdeas": {
                "type": "integer"
              },
              "ideasByStatus": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "ideasByPriority": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "pendingAction": {
                "type": "integer"
              },
              "criticalItems": {
                "type": "integer"
              },
              "highPriorityItems": {
                "type": "integer"
              }
            },
            "required": [
              "totalMatrices",
              "totalIdeas",
              "ideasByStatus",
              "ideasByPriority",
              "pendingAction",
              "criticalItems",
              "highPriorityItems"
            ]
          },
          "recentIdeas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "priority": {
                  "type": "string",
                  "nullable": true
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "title",
                "status",
                "priority",
                "createdAt"
              ]
            }
          },
          "aiPromptContext": {
            "type": "string"
          }
        },
        "required": [
          "exportedAt",
          "type",
          "overview",
          "recentIdeas",
          "aiPromptContext"
        ]
      },
      "ThemeList": {
        "type": "object",
        "properties": {
          "themes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "color": {
                  "type": "string",
                  "nullable": true
                },
                "icon": {
                  "type": "string",
                  "nullable": true
                },
                "northElements": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "eastElements": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "southElements": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "westElements": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "createdBy": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "createdByName": {
                  "type": "string",
                  "nullable": true
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "color",
                "icon",
                "northElements",
                "eastElements",
                "southElements",
                "westElements",
                "createdBy",
                "createdByName",
                "createdAt",
                "updatedAt"
              ]
            }
          }
        },
        "required": [
          "themes"
        ]
      },
      "ThemeDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "nullable": true
          },
          "northElements": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "eastElements": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "southElements": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "westElements": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "createdBy": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdByName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "elements": {
            "type": "object",
            "properties": {
              "north": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "quadrant": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west"
                      ],
                      "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "active",
                        "completed",
                        "cancelled"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "quadrant",
                    "status"
                  ]
                }
              },
              "east": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "quadrant": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west"
                      ],
                      "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "active",
                        "completed",
                        "cancelled"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "quadrant",
                    "status"
                  ]
                }
              },
              "south": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "quadrant": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west"
                      ],
                      "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "active",
                        "completed",
                        "cancelled"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "quadrant",
                    "status"
                  ]
                }
              },
              "west": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "quadrant": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west"
                      ],
                      "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "active",
                        "completed",
                        "cancelled"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "quadrant",
                    "status"
                  ]
                }
              }
            },
            "required": [
              "north",
              "east",
              "south",
              "west"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "color",
          "icon",
          "northElements",
          "eastElements",
          "southElements",
          "westElements",
          "createdBy",
          "createdByName",
          "createdAt",
          "updatedAt",
          "elements"
        ]
      },
      "CadenceArchitecture": {
        "type": "object",
        "properties": {
          "tree": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "strategic",
                    "annual",
                    "qbr",
                    "monthly",
                    "weekly",
                    "daily",
                    "catchball"
                  ]
                },
                "frequency": {
                  "type": "string",
                  "enum": [
                    "yearly",
                    "quarterly",
                    "monthly",
                    "weekly",
                    "daily"
                  ]
                },
                "operationalLevel": {
                  "type": "string",
                  "enum": [
                    "strategic",
                    "tactical",
                    "operational_mgmt",
                    "team_mgmt",
                    "execution"
                  ]
                },
                "parentCadenceId": {
                  "type": "string",
                  "format": "uuid",
                  "nullable": true
                },
                "primaryQuadrant": {
                  "type": "string",
                  "enum": [
                    "north",
                    "east",
                    "south",
                    "west",
                    null
                  ],
                  "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values.",
                  "nullable": true
                },
                "trackedQuadrants": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "north",
                      "east",
                      "south",
                      "west"
                    ],
                    "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                  }
                },
                "teamScope": {
                  "type": "string",
                  "nullable": true
                },
                "durationMinutes": {
                  "type": "integer",
                  "nullable": true
                },
                "meetingsCount": {
                  "type": "integer"
                },
                "children": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "description": "Cadences below this one, in this same shape."
                }
              },
              "required": [
                "id",
                "name",
                "type",
                "frequency",
                "operationalLevel",
                "parentCadenceId",
                "primaryQuadrant",
                "trackedQuadrants",
                "teamScope",
                "durationMinutes",
                "meetingsCount",
                "children"
              ]
            }
          },
          "byLevel": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "strategic",
                      "annual",
                      "qbr",
                      "monthly",
                      "weekly",
                      "daily",
                      "catchball"
                    ]
                  },
                  "frequency": {
                    "type": "string",
                    "enum": [
                      "yearly",
                      "quarterly",
                      "monthly",
                      "weekly",
                      "daily"
                    ]
                  },
                  "operationalLevel": {
                    "type": "string",
                    "enum": [
                      "strategic",
                      "tactical",
                      "operational_mgmt",
                      "team_mgmt",
                      "execution"
                    ]
                  },
                  "parentCadenceId": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                  },
                  "primaryQuadrant": {
                    "type": "string",
                    "enum": [
                      "north",
                      "east",
                      "south",
                      "west",
                      null
                    ],
                    "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values.",
                    "nullable": true
                  },
                  "trackedQuadrants": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "north",
                        "east",
                        "south",
                        "west"
                      ],
                      "description": "Role of the element, not its place on the drawing: north = breakthrough objectives (3-5 year vision), east = annual objectives, south = initiatives, west = KPIs. A matrix drawn with the vision at the bottom uses the same values."
                    }
                  },
                  "teamScope": {
                    "type": "string",
                    "nullable": true
                  },
                  "durationMinutes": {
                    "type": "integer",
                    "nullable": true
                  },
                  "meetingsCount": {
                    "type": "integer"
                  },
                  "children": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "description": "Cadences below this one, in this same shape."
                  }
                },
                "required": [
                  "id",
                  "name",
                  "type",
                  "frequency",
                  "operationalLevel",
                  "parentCadenceId",
                  "primaryQuadrant",
                  "trackedQuadrants",
                  "teamScope",
                  "durationMinutes",
                  "meetingsCount",
                  "children"
                ]
              }
            }
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "tree",
          "byLevel",
          "total"
        ]
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API token, hk_..., or an OAuth 2.1 access token. OAuth needs PKCE S256 and a registered client: https://hoshin.app/.well-known/oauth-authorization-server"
      }
    }
  }
}
